/*
  Hapsu static site.
  Part 1 (base, header, footer) stands in for what Horizon gives on Shopify: its variables, .button and inputs.
  Part 2 (.hh-*, .hq-*) is the same CSS as sections/hapsu-home.liquid and sections/hapsu-quote.liquid.
  Keep part 2 in step with those sections: when the site moves to Shopify, it goes back into their {% stylesheet %}.
*/

/* ---------- Part 1: base (Horizon stand-ins) ---------- */

:root {
  --page-width: 90rem;
  --page-margin: 1rem;
  --header-height: 4.5rem;
  --font-body--family: "Inter", system-ui, sans-serif;
  --font-heading--family: "Archivo Black", "Inter", sans-serif;
  --color-bg: #F8F7F3;
  --color-text: #141414;
  --color-teal: #2A7A80;
  --color-input-text: #141414;
  --color-input-background: #FFFFFF;
  --color-input-border: #CFC9BC;
  --style-border-radius-inputs: 0;
  --style-border-width-inputs: 1px;
}

@media screen and (min-width: 750px) {
  :root {
    --page-margin: 2.5rem;
    --header-height: 5rem;
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-body--family);
  font-size: 1rem;
  line-height: 1.5;
  color: var(--color-text);
  background: var(--color-bg);
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
}

.button {
  --button-background-color: #141414;
  --button-color: #F8F7F3;
  --button-border-color: #141414;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.95rem 1.75rem;
  font: inherit;
  font-weight: 500;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  color: var(--button-color);
  background: var(--button-background-color);
  border: 1px solid var(--button-border-color);
  border-radius: 0;
  transition: background-color 0.2s, color 0.2s;
}

.button:hover {
  --button-background-color: #2A7A80;
  --button-border-color: #2A7A80;
}

.button-secondary {
  --button-background-color: transparent;
  --button-color: #141414;
  --button-border-color: #141414;
}

.button-secondary:hover {
  --button-background-color: #141414;
  --button-color: #F8F7F3;
  --button-border-color: #141414;
}

:focus-visible {
  outline: 2px solid #2A7A80;
  outline-offset: 2px;
}

.skip-link {
  position: absolute;
  left: -9999px;
}

.skip-link:focus {
  left: 1rem;
  top: 1rem;
  z-index: 100;
  background: #F8F7F3;
  padding: 0.5rem 1rem;
}

/* Header: over the hero on the front page, plain on other pages */

.site-header {
  position: relative;
  z-index: 10;
  border-bottom: 1px solid #D8D3C8;
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  height: var(--header-height);
  max-width: var(--page-width);
  margin-inline: auto;
  padding-inline: var(--page-margin);
}

.site-header__logo img {
  height: 2.25rem;
  width: auto;
}

@media screen and (min-width: 750px) {
  .site-header__logo img {
    height: 2.75rem;
  }
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 1.75rem;
}

.site-nav a:not(.button) {
  display: none;
  text-decoration: none;
  font-size: 0.9375rem;
  font-weight: 500;
}

.site-nav a:not(.button):hover {
  color: #2A7A80;
}

@media screen and (min-width: 990px) {
  .site-nav a:not(.button) {
    display: inline;
  }
}

.site-nav .button {
  padding: 0.7rem 1.25rem;
}

/* Front page: the header sits on top of the hero photo */
.site-header--overlay {
  margin-bottom: calc(-1 * var(--header-height) - 1px);
  border-bottom-color: rgba(248, 247, 243, 0.25);
  color: #F8F7F3;
}

.site-header--overlay .site-nav a:not(.button):hover {
  color: #7DB6B8;
}

/* Footer */

.site-footer {
  background: #141414;
  color: #F8F7F3;
  padding-block: 4rem 2rem;
}

.site-footer__inner {
  max-width: var(--page-width);
  margin-inline: auto;
  padding-inline: var(--page-margin);
  display: grid;
  gap: 2.5rem;
}

@media screen and (min-width: 750px) {
  .site-footer__inner {
    grid-template-columns: 2fr 1fr 1fr;
  }
}

.site-footer img {
  height: 2.75rem;
  width: auto;
  margin-bottom: 1rem;
}

.site-footer p {
  margin: 0;
  opacity: 0.75;
  max-width: 32ch;
}

.site-footer h2 {
  font-size: 0.8125rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 500;
  color: #7DB6B8;
  margin: 0 0 1rem;
}

.site-footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.5rem;
}

.site-footer a {
  text-decoration: none;
}

.site-footer a:hover {
  color: #7DB6B8;
}

.site-footer__bottom {
  grid-column: 1 / -1;
  border-top: 1px solid rgba(248, 247, 243, 0.15);
  padding-top: 1.5rem;
  font-size: 0.8125rem;
  opacity: 0.6;
  max-width: none;
}

/* Form notice (preview only; the form is not connected yet) */

.hq-form__notice {
  padding: 1rem 1.25rem;
  background: #EDEAE2;
  border-left: 3px solid #2A7A80;
}

.hq-form__notice[hidden] {
  display: none;
}

/* ---------- Part 2: page sections (same as the Liquid sections) ---------- */

/* sections/hapsu-home.liquid */

.hh-container {
  width: 100%;
  max-width: var(--page-width);
  margin-inline: auto;
  padding-inline: var(--page-margin);
}

.hh-section {
  padding-block: 5rem;
}

.hh-section--tint {
  background: #EDEAE2;
}

.hh-h2 {
  font-family: var(--font-heading--family);
  font-weight: 400;
  font-size: clamp(1.9rem, 1.2rem + 2.4vw, 3rem);
  line-height: 1.05;
  text-transform: uppercase;
  letter-spacing: 0.01em;
  margin: 0;
}

.hh-caption {
  font-size: 0.8125rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #2A7A80;
  margin: 0 0 0.75rem;
}

.hh-link {
  color: inherit;
  text-decoration: none;
  border-bottom: 1.5px solid currentColor;
  padding-bottom: 2px;
  white-space: nowrap;
  font-weight: 500;
}

.hh-link:hover {
  color: #2A7A80;
}

.hh-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.hh-center {
  display: flex;
  justify-content: center;
  margin-top: 3rem;
}

.hh-heading-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 2.5rem;
}

.hh-heading-row--center {
  justify-content: center;
  text-align: center;
}

.hh-placeholder {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #DDD8CC;
  fill: #C9C2B2;
}

.hh-btn-light,
.hh-btn-outline {
  --button-background-color: #F8F7F3;
  --button-color: #141414;
  --button-border-color: #F8F7F3;
}

.hh-btn-outline {
  --button-background-color: transparent;
  --button-color: #F8F7F3;
  border: 1px solid #F8F7F3;
}

.hh-btn-outline:hover {
  --button-background-color: #F8F7F3;
  --button-color: #141414;
}

.hh-marquee {
  background: #2A7A80;
  color: #F8F7F3;
  overflow: hidden;
  padding-block: 0.6rem;
  font-size: 0.8125rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.hh-marquee__track {
  display: flex;
  gap: 1.5rem;
  width: max-content;
  animation: hh-marquee 40s linear infinite;
}

.hh-marquee__star {
  opacity: 0.7;
}

@keyframes hh-marquee {
  to { transform: translateX(-33.333%); }
}

@media (prefers-reduced-motion: reduce) {
  .hh-marquee__track { animation: none; }
}

.hh-hero {
  position: relative;
  min-height: 82svh;
  display: grid;
  place-items: center;
  color: #F8F7F3;
  text-align: center;
  isolation: isolate;
}

.hh-hero__media {
  position: absolute;
  inset: 0;
  z-index: -1;
}

.hh-hero__media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(20, 20, 20, 0.75), rgba(20, 20, 20, 0.35));
}

.hh-hero__content {
  padding: 5rem var(--page-margin);
  max-width: 52rem;
}

.hh-hero__title {
  font-family: var(--font-heading--family);
  font-weight: 400;
  font-size: clamp(2.75rem, 1.5rem + 5.5vw, 6rem);
  line-height: 0.98;
  text-transform: uppercase;
  letter-spacing: 0.01em;
  margin: 0 0 1.25rem;
}

.hh-hero__title em {
  font-style: normal;
  color: #7DB6B8;
}

.hh-hero__lead {
  font-size: 1.125rem;
  line-height: 1.5;
  margin: 0 auto 2rem;
  max-width: 36ch;
}

.hh-hero .hh-actions {
  justify-content: center;
}

.hh-usp {
  border-bottom: 1px solid #D8D3C8;
}

.hh-usp__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem 1.5rem;
  padding-block: 2.5rem;
  text-align: center;
}

@media screen and (min-width: 750px) {
  .hh-usp__grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.hh-usp svg {
  width: 2rem;
  height: 2rem;
  color: #2A7A80;
  margin-bottom: 0.75rem;
}

.hh-usp h3 {
  font-size: 0.9375rem;
  font-weight: 600;
  margin: 0 0 0.25rem;
}

.hh-usp p {
  margin: 0;
  font-size: 0.875rem;
  opacity: 0.75;
}

.hh-cats {
  display: grid;
  gap: 1.5rem;
}

@media screen and (min-width: 750px) {
  .hh-cats {
    grid-template-columns: repeat(3, 1fr);
  }
}

.hh-cat {
  color: inherit;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.hh-cat__media {
  aspect-ratio: 4 / 5;
  overflow: hidden;
  margin-bottom: 0.75rem;
}

.hh-cat h3 {
  font-family: var(--font-heading--family);
  font-weight: 400;
  font-size: 1.375rem;
  text-transform: uppercase;
  margin: 0;
}

.hh-cat p {
  margin: 0;
  opacity: 0.8;
}

.hh-cat .hh-link {
  align-self: flex-start;
  margin-top: 0.25rem;
}

.hh-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 2.5rem 2rem;
}

@media screen and (min-width: 750px) {
  .hh-steps {
    grid-template-columns: repeat(4, 1fr);
  }
}

.hh-steps__num {
  display: inline-block;
  font-family: var(--font-heading--family);
  font-size: 2.5rem;
  line-height: 1;
  color: #2A7A80;
  margin-bottom: 0.75rem;
}

.hh-steps h3 {
  font-size: 1.125rem;
  font-weight: 600;
  margin: 0 0 0.5rem;
}

.hh-steps p {
  margin: 0;
  line-height: 1.55;
  opacity: 0.8;
}

.hh-split {
  display: grid;
  gap: 2.5rem;
  align-items: center;
}

@media screen and (min-width: 990px) {
  .hh-split {
    grid-template-columns: 1fr 1fr;
    gap: 5rem;
  }

  .hh-split--reverse .hh-split__media {
    order: -1;
  }
}

.hh-split__text p {
  line-height: 1.6;
  max-width: 48ch;
}

.hh-split__text .hh-h2 {
  margin-bottom: 1.25rem;
}

.hh-split__text .button,
.hh-split__text .hh-link {
  margin-top: 0.5rem;
}

.hh-split__media {
  aspect-ratio: 4 / 3;
}

.hh-split__media--portrait {
  aspect-ratio: 4 / 5;
  max-width: 30rem;
}

.hh-price-note {
  font-size: 0.9375rem;
  padding-left: 1rem;
  border-left: 3px solid #2A7A80;
}

.hh-cta {
  background: #2A7A80;
  color: #F8F7F3;
  padding-block: 6rem;
  text-align: center;
}

.hh-cta__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.hh-cta .hh-h2 {
  max-width: 18ch;
}

.hh-cta p {
  margin: 0 0 1rem;
  opacity: 0.9;
}

.hh-cta .hh-actions {
  justify-content: center;
}

.hh-products {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
}

@media screen and (min-width: 750px) {
  .hh-products {
    grid-template-columns: repeat(4, 1fr);
  }
}

.hh-card {
  color: inherit;
  text-decoration: none;
}

.hh-card__media {
  aspect-ratio: 1;
  overflow: hidden;
  margin-bottom: 0.75rem;
  background: #EDEAE2;
}

.hh-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hh-card__title,
.hh-card__price {
  margin: 0;
}

.hh-card__price {
  opacity: 0.7;
  font-size: 0.9375rem;
}

.hh-insta {
  padding-block: 4rem 0;
}

.hh-insta__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
}

@media screen and (min-width: 750px) {
  .hh-insta__grid {
    grid-template-columns: repeat(6, 1fr);
  }
}

.hh-insta__grid span {
  aspect-ratio: 1;
  display: block;
  overflow: hidden;
}

/* Static phase only: "enquire to buy" link under each product (Shopify uses the product page instead) */

.hh-card .hh-link {
  display: inline-block;
  margin-top: 0.5rem;
  font-size: 0.9375rem;
}

/* sections/hapsu-quote.liquid */

.hq-container {
  width: 100%;
  max-width: var(--page-width);
  margin-inline: auto;
  padding-inline: var(--page-margin);
}

.hq-caption {
  font-size: 0.8125rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #2A7A80;
  margin: 0 0 1rem;
}

.hq-title {
  font-family: var(--font-heading--family);
  font-weight: 400;
  font-size: clamp(2.25rem, 1.25rem + 3.5vw, 4rem);
  line-height: 1.05;
  text-transform: uppercase;
  letter-spacing: 0.01em;
  max-width: 16ch;
  margin: 0 0 1.5rem;
}

.hq-h2 {
  font-family: var(--font-heading--family);
  font-weight: 400;
  font-size: clamp(1.75rem, 1.2rem + 2vw, 2.75rem);
  line-height: 1.1;
  text-transform: uppercase;
  margin: 0 0 2rem;
}

.hq-h3 {
  font-family: var(--font-heading--family);
  font-weight: 400;
  font-size: 1.25rem;
  line-height: 1.2;
  text-transform: uppercase;
  margin: 0 0 0.75rem;
}

.hq-lead,
.hq-steps p,
.hq-price p {
  line-height: 1.6;
  max-width: 52ch;
  margin: 0;
}

.hq-intro {
  padding-block: 5rem 3rem;
}

.hq-steps {
  padding-block: 2rem 4rem;
}

.hq-steps__grid {
  display: grid;
  gap: 2.5rem;
}

@media screen and (min-width: 750px) {
  .hq-steps__grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 3rem;
  }
}

.hq-step-num {
  color: #2A7A80;
  font-size: 0.8125rem;
  letter-spacing: 0.12em;
  margin: 0 0 1rem;
}

.hq-price {
  background: #EDEAE2;
  padding-block: 3.5rem;
}

.hq-form {
  padding-block: 5rem 6rem;
}

.hq-form__form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  max-width: 44rem;
}

.hq-form__row {
  display: grid;
  gap: 1.5rem;
}

@media screen and (min-width: 750px) {
  .hq-form__row {
    grid-template-columns: 1fr 1fr;
  }
}

.hq-form__field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.hq-form__field label {
  font-size: 0.8125rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.hq-form__field input,
.hq-form__field select,
.hq-form__field textarea {
  width: 100%;
  font: inherit;
  color: var(--color-input-text);
  background-color: var(--color-input-background);
  padding: 0.9rem 1rem;
  border-radius: var(--style-border-radius-inputs);
  border: var(--style-border-width-inputs) solid var(--color-input-border);
}

.hq-form__field :focus-visible {
  outline: 2px solid #2A7A80;
  outline-offset: 2px;
}

.hq-form__field textarea {
  resize: vertical;
  min-height: 10rem;
}

.hq-form__note {
  margin: 0;
  opacity: 0.75;
  line-height: 1.5;
}

.hq-form .button {
  align-self: flex-start;
}

.hq-form__error,
.hq-form__success {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Static phase only: product field shown when the page is opened from "Kysy tuotteesta" */
.hq-form__field[hidden] {
  display: none;
}

/* Static phase only: gaps between the Instagram placeholders until real images are in */
.hh-insta__grid {
  gap: 2px;
}
