/* ============================================================
   HOUSE OF HIERO — styles.css
   ------------------------------------------------------------
   DESIGN TOKENS — adjust these to match your Webflow project.
   In Webflow: Project Settings → or inspect any element's
   colour/font in the Designer and paste the values here.
   ============================================================ */
:root {
  /* Colour */
  --ink: #111110;            /* primary text */
  --ink-soft: #44423d;       /* secondary text */
  --paper: #f7f5f0;          /* page background */
  --paper-raised: #ffffff;   /* cards / form fields */
  /* Decorative pastel accents (from the live site) — used for the varied dots
     at the end of headlines and the coloured underlines on statement lines. */
  --accent-1: #5dffa8;       /* green */
  --accent-2: #ffe2a0;       /* yellow */
  --accent-3: #ffbfc0;       /* pink */
  --line: #dcd8cf;           /* hairlines / borders */

  /* Type — Inter Tight is the brand typeface (from the Webflow export) */
  --font-display: "Inter Tight", system-ui, sans-serif;
  --font-body: "Inter Tight", system-ui, sans-serif;

  /* Scale */
  --display-xl: clamp(3rem, 9vw, 7.5rem);
  --display-lg: clamp(2.75rem, 9vw, 6.875rem); /* section H2 — 110px on desktop */
  --display-md: clamp(1.5rem, 3.5vw, 2.5rem);

  --max-width: 1280px;
  --gutter: clamp(1.25rem, 4vw, 3.5rem);
  --section-pad: clamp(4rem, 4vw, 9rem);

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ============ Reset / base ============ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }

a { color: inherit; text-decoration: none; }

.container {
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

:focus-visible {
  outline: 2px solid var(--accent-1);
  outline-offset: 3px;
}

/* ============ Header / nav ============ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding-block: 1rem;
}

.nav__logo img { height: 2.25rem; width: auto; }

.nav__links {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
}

.nav__links a {
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  position: relative;
}

.nav__links a::after {
  content: "";
  position: absolute;
  left: 0; bottom: -4px;
  width: 100%; height: 2px;
  background: var(--accent-1);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s var(--ease);
}

.nav__links a:hover::after { transform: scaleX(1); }

.nav__location {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ink-soft);
}

.nav__toggle {
  display: none;
  background: none;
  border: 0;
  cursor: pointer;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 600;
}

@media (max-width: 820px) {
  .nav__links {
    /* NB: .site-header has backdrop-filter, which makes it the containing
       block for this fixed element — so size it explicitly rather than
       relying on inset/bottom (which would collapse to the header height). */
    position: fixed;
    top: 64px;
    left: 0;
    width: 100%;
    height: calc(100dvh - 64px);
    z-index: 40;
    flex-direction: column;
    justify-content: center;
    gap: 2.5rem;
    background: var(--paper);
    transform: translateY(-110%);
    transition: transform 0.4s var(--ease);
  }
  .nav__links.is-open { transform: translateY(0); }
  .nav__links a { font-size: 1.5rem; font-family: var(--font-display); }
  .nav__toggle { display: block; }
  .nav__location { display: none; }
}

/* ============ Hero ============ */
.hero {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-block: clamp(2rem, 6vw, 4rem) clamp(3rem, 6vw, 5rem);
}

/* Mask that clips the title for the slide-up reveal on load.
   The padding/margin pair keeps ascenders & descenders from clipping at rest. */
.hero__mask {
  overflow: hidden;
  padding-block: 0.14em;
  margin-block: -0.14em;
}

.hero__title {
  font-family: var(--font-display);
  /* Matches the live site's .text---heading-large (12vw / 600 / 0.8 / -0.04em) */
  font-size: 12vw;
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.04em;
  color: var(--ink);
  /* Slide up from behind the mask on load. Resting state is visible
     (translateY 0); the animation's backwards-fill supplies the hidden
     start, so the title is never stuck hidden if the animation is skipped. */
  animation: hero-rise 1s var(--ease) 0.1s both;
}

/* Responsive sizing — kept large but capped so long single words
   (e.g. "unstoppable") never overflow the viewport on small screens. */
@media (max-width: 991px) { .hero__title { font-size: 13.5vw; } }
@media (max-width: 479px) { .hero__title { font-size: 14vw; } }

/* Headline dots — varied pastel accents (single-class specificity so a
   per-instance .mark--2 / .mark--3 always wins). */
.mark { color: var(--accent-1); }
.mark.mark--2 { color: var(--accent-2); }
.mark.mark--3 { color: var(--accent-3); }

.hero .eyebrow { animation: hero-fade-up 0.8s var(--ease) 0.15s both; }


@keyframes hero-rise {
  from { transform: translateY(110%); }
  to { transform: translateY(0); }
}

@keyframes hero-fade-up {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}

/* ============ Sections ============ */
.section { padding-block: var(--section-pad); }


.eyebrow {
  font-size: 1.2rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--ink-soft);
  margin-bottom: 1.5rem;
}

.section__title {
  font-family: var(--font-display);
  font-size: var(--display-lg);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 0.95;
  margin-bottom: 2rem;
}


.lede {
  font-size: clamp(1.15rem, 2vw, 1.45rem);
  line-height: 1.55;
  max-width: 38ch;
  color: var(--ink-soft);
}

.lede strong { color: var(--ink); }

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 5rem);
  align-items: start;
}

@media (max-width: 820px) {
  .split { grid-template-columns: 1fr; }
}

.statement {
  font-family: var(--font-display);
  font-size: var(--display-md);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.01em;
}

/* Statement lines with a thick coloured underline (mirrors the live site's
   heading-highlight treatment). Native underline so it follows wrapped lines. */
.statement__line {
  display: block;
  width: fit-content;
  max-width: 100%;
  text-decoration: underline;
  text-decoration-color: var(--accent-1);
  text-decoration-thickness: 0.12em;
  text-underline-offset: 0.16em;
  text-decoration-skip-ink: none;
}

.statement__line + .statement__line { margin-top: 0.4em; }

.statement__line--2 { text-decoration-color: var(--accent-2); }
.statement__line--3 { text-decoration-color: var(--accent-3); }

.image-pair {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 1.25rem;
  margin-top: 3rem;
}

.image-pair img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 6px;
}

.image-pair img:last-child { margin-top: 3rem; }

@media (max-width: 600px) {
  .image-pair { grid-template-columns: 1fr; }
  .image-pair img:last-child { margin-top: 0; }
}

.feature-link { display: block; margin-top: 3rem; overflow: hidden; border-radius: 6px; }

.feature-link img { transition: transform 0.6s var(--ease); }

.feature-link:hover img { transform: scale(1.025); }

/* ============ Stats ============ */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  margin-top: 4rem;
  border-top: 1px solid var(--line);
  padding-top: 3rem;
}

.stat__value {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 800;
  letter-spacing: -0.02em;
}

.stat__label {
  margin-top: 0.5rem;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ink-soft);
}

@media (max-width: 820px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
}

/* ============ CTA ============ */
.button {
  display: inline-block;
  margin-top: 2rem;
  padding: 0.9rem 2rem;
  font-weight: 600;
  background: var(--ink);
  color: var(--paper);
  border: 1px solid var(--ink);
  border-radius: 999px;
  transition: background 0.25s var(--ease), color 0.25s var(--ease);
  cursor: pointer;
  font-size: 1rem;
}

.button:hover { background: var(--accent-1); border-color: var(--accent-1); color: var(--ink); }

/* ============ Work list ============ */
.work-list {
  list-style: none;
  margin-top: clamp(3rem, 6vw, 5rem);
  display: grid;
  gap: clamp(3rem, 6vw, 5.5rem);
}

.work-item { position: relative; padding-top: clamp(1.75rem, 3.5vw, 2.75rem); }

/* Hairline divider that wipes in from the left as the item reveals
   (mirrors the live site's animated work divider). */
.work-item::before {
  content: "";
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 1px;
  background: var(--ink);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.9s var(--ease) 0.1s;
}

.work-item.is-visible::before { transform: scaleX(1); }

.work-item a { display: block; color: inherit; }

.work-item__media {
  overflow: hidden;
  border-radius: 8px;
  aspect-ratio: 2.26 / 1;
  background: var(--paper-raised);
  margin-bottom: clamp(1.25rem, 2.5vw, 2rem);
}

.work-item__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s var(--ease);
}

.work-item a:hover .work-item__media img { transform: scale(1.04); }

.work-item__text {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: clamp(1.5rem, 4vw, 4rem);
  align-items: start;
}

.work-item h3 {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3.2vw, 2.75rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1;
}

/* Work-card dots rotate through the three pastels automatically */
.work-item:nth-child(3n+1) h3 .mark { color: var(--accent-1); }
.work-item:nth-child(3n+2) h3 .mark { color: var(--accent-2); }
.work-item:nth-child(3n+3) h3 .mark { color: var(--accent-3); }

.work-item__desc p { color: var(--ink-soft); max-width: 52ch; }

.work-item .tag {
  display: inline-block;
  margin-top: 0.9rem;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ink-soft);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.25rem 0.75rem;
}

@media (max-width: 720px) {
  .work-item__text { grid-template-columns: 1fr; gap: 0.6rem; }
  .work-item h3 { margin-bottom: 0.25rem; }
}

/* ============ Contact form ============ */
.form { max-width: 640px; margin-top: 3rem; display: grid; gap: 1.5rem; }

.form label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 0.5rem;
}

.form input,
.form select,
.form textarea {
  width: 100%;
  font: inherit;
  color: var(--ink);
  background: var(--paper-raised);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0.85rem 1rem;
  transition: border-color 0.2s;
}

.form input:focus,
.form select:focus,
.form textarea:focus {
  outline: none;
  border-color: var(--accent-1);
}

.form textarea { min-height: 160px; resize: vertical; }

.form__note { font-size: 0.9rem; color: var(--ink-soft); }

.form__error {
  margin-top: 2rem;
  padding: 1rem 1.25rem;
  border: 1px solid #c0492f;
  border-radius: 6px;
  background: color-mix(in srgb, #c0492f 8%, transparent);
  color: #8f2f1c;
  font-size: 0.95rem;
}

.form__error a { text-decoration: underline; }

/* ============ Footer ============ */
.site-footer {
  border-top: 1px solid var(--line);
  padding-block: 3rem;
}

.site-footer .container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.site-footer img { height: 1.75rem; width: auto; }

.site-footer small {
  font-size: 0.8rem;
  color: var(--ink-soft);
  letter-spacing: 0.02em;
}

.back-to-top {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

.back-to-top:hover { text-decoration: underline; text-decoration-color: var(--accent-1); text-decoration-thickness: 2px; text-underline-offset: 3px; }

/* ============ Case study ============ */
.case-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 2rem;
  margin-top: 2.5rem;
  border-top: 1px solid var(--line);
  padding-top: 2rem;
}

.case-meta dt {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ink-soft);
  margin-bottom: 0.4rem;
}

.case-meta dd {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
}

.case-image {
  margin-top: clamp(2.5rem, 6vw, 4.5rem);
  border-radius: 6px;
  overflow: hidden;
}

.case-image img { width: 100%; }

.case-summary {
  font-size: clamp(1.25rem, 2.4vw, 1.75rem);
  line-height: 1.5;
  max-width: 30ch;
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.01em;
}

.case-body {
  margin-top: 1.5rem;
  font-size: clamp(1.1rem, 1.6vw, 1.3rem);
  line-height: 1.6;
  max-width: 60ch;
  color: var(--ink-soft);
}

.case-next a {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
  margin-top: 1.5rem;
  transition: padding-left 0.3s var(--ease);
}

.case-next a:hover { padding-left: 0.5rem; }

.case-next .case-next__name {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 5vw, 3.5rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.05;
}

.case-next a:hover .case-next__name { text-decoration: underline; text-decoration-color: var(--accent-1); text-decoration-thickness: 2px; text-underline-offset: 3px; }

.case-next__cue {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--ink-soft);
}

/* ============ Case study gallery ============ */
.case-gallery {
  display: flex;
  flex-direction: column;
  gap: clamp(1rem, 2vw, 1.75rem);
  margin-top: clamp(3rem, 6vw, 5rem);
}

.case-gallery img {
  width: 100%;
  display: block;
  border-radius: 8px;
}

/* ============ Error pages ============ */
.error {
  min-height: 72vh;
  display: flex;
  align-items: center;
  padding-block: clamp(2.5rem, 6vw, 4.5rem);
}

.error__code {
  font-family: var(--font-display);
  font-size: clamp(5rem, 16vw, 12rem);
  font-weight: 600;
  line-height: 0.78;
  letter-spacing: -0.05em;
  color: var(--ink);
  margin-bottom: clamp(1rem, 3vw, 1.75rem);
  animation: hero-fade-up 0.7s var(--ease) both;
}

.error__title {
  font-family: var(--font-display);
  font-size: clamp(1.85rem, 5vw, 3.5rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1;
  max-width: 18ch;
  margin-bottom: 1.25rem;
}

.error .lede { margin-bottom: 2rem; max-width: 48ch; }

.error__actions {
  display: flex;
  align-items: center;
  gap: 1.25rem 2rem;
  flex-wrap: wrap;
}

.error__actions .button { margin-top: 0; }

.error__link {
  font-weight: 600;
  border-bottom: 2px solid var(--accent-1);
  padding-bottom: 2px;
  transition: opacity 0.2s var(--ease);
}

.error__link:hover { opacity: 0.65; }

/* ============ Scroll reveal ============ */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

.reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .feature-link img, .work-item a { transition: none; }
  .hero__title, .hero .eyebrow { animation: none; transform: none; opacity: 1; }
  .work-item::before { transform: scaleX(1); transition: none; }
  .work-item__media img { transition: none; }
  .error__code { animation: none; }
}
