/* ==========================================================================
   Ladushi — pages.css
   Layouts that belong to a single page type: hero, case study, about, contact.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Home hero
   -------------------------------------------------------------------------- */

.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding-block: calc(var(--s-12) + var(--s-8)) var(--s-8);
  overflow: hidden;
}

.hero__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.hero__bg img,
.hero__bg svg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: .5;
}

/* Cover regardless of the source aspect. The film is 1920x1080, encoded from
   the 4K master. */
.hero__bg video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

/* Wash only where the type sits. */
.hero__bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    /* No header band: the header carries its own backdrop now, so the film
       runs clean all the way to the top of the frame. */
    /* Held back deliberately: enough of a bed under the bottom-aligned type to
       keep it readable, released quickly so the film is not veiled. Solid only
       at the very foot, where it has to meet the page ground cleanly. */
    linear-gradient(to top,
      var(--c-bg) 1%,
      rgba(253, 252, 250, .90) 14%,
      rgba(253, 252, 250, .74) 28%,
      rgba(253, 252, 250, .52) 42%,
      rgba(253, 252, 250, .22) 56%,
      rgba(253, 252, 250, 0) 70%);
}

.hero__inner { position: relative; z-index: 1; width: 100%; }

/* The faint tone is tuned for a plain ground; over moving footage it needs
   the extra weight to stay readable. */
.hero .eyebrow { color: var(--c-fg-muted); }

.hero__title {
  font-size: var(--t-4xl);
  line-height: 0.98;
  letter-spacing: -0.035em;
  max-width: 18ch;
  text-wrap: balance;
}

/* The emphasised words in display type carry the script. They were already
   the gold accent moments, so this ties the page to the wordmark without
   putting a high-contrast script anywhere it has to be read at length. */
.hero__title em,
.cta__title em,
.section-head__title em,
.notfound h1 em {
  font-family: var(--font-script);
  font-style: normal;
  font-size: 1.18em;
  letter-spacing: 0;
  color: var(--c-accent);
}

.hero__foot {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--s-7);
  margin-block-start: var(--s-9);
  padding-block-start: var(--s-6);
  /* The strong line, not the hairline. This rule sits over moving footage:
     at 14% it survived the darker frames and disappeared entirely against the
     bright ones, which read as a divider that had failed to load. */
  border-block-start: 1px solid var(--c-line-strong);
}

/* The symbol sits beside the standfirst rather than above it, so the foot of
   the hero reads as one mark-and-sentence unit. */
.hero__note {
  display: flex;
  align-items: center;
  gap: var(--s-5);
  max-width: 42rem;
}

.hero__eye {
  width: auto;
  height: 5rem;
  flex: none;
}

.hero__blurb { max-width: 30rem; color: var(--c-fg-muted); }

/* The desktop rhythm leaves acres of dead space once the viewport narrows:
   the hero is already full height, so the generous margins have nothing to
   balance against. */
@media (max-width: 48rem) {
  .hero { padding-block: calc(var(--s-11) + var(--s-5)) var(--s-6); }
  .hero__foot {
    margin-block-start: var(--s-6);
    padding-block-start: var(--s-5);
    gap: var(--s-5);
  }
  .hero__title { max-width: none; }
}

@media (max-width: 40rem) {
  .hero__note { gap: var(--s-4); }
  .hero__eye { height: 3.25rem; }
}

.hero__scroll {
  display: inline-flex;
  align-items: center;
  gap: var(--s-3);
  font-family: var(--font-mono);
  font-size: var(--t-xs);
  letter-spacing: var(--tr-wider);
  text-transform: uppercase;
  color: var(--c-fg-faint);
  text-decoration: none;
}

.hero__scroll-line {
  display: block;
  width: 1px;
  height: 2.5rem;
  background: linear-gradient(to bottom, var(--c-accent), transparent);
  animation: scroll-hint 2.2s var(--e-in-out) infinite;
}

@keyframes scroll-hint {
  0%, 100% { transform: scaleY(1); opacity: 1; }
  50%      { transform: scaleY(.4); opacity: .4; }
}

/* Generic page hero used by every interior page. */
.page-hero {
  padding-block: calc(var(--s-12) + var(--s-9)) var(--section-y);
  border-block-end: var(--border);
}

.page-hero__title { font-size: var(--t-3xl); margin-block-start: var(--s-5); }

.page-hero__lead { margin-block-start: var(--s-6); }

@media (max-width: 48rem) {
  .page-hero {
    padding-block: calc(var(--s-9) + var(--s-6)) var(--s-9);
  }
  .page-hero__title { margin-block-start: var(--s-4); }
  .page-hero__lead { margin-block-start: var(--s-5); }
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s-2);
  font-family: var(--font-mono);
  font-size: var(--t-xs);
  letter-spacing: var(--tr-wide);
  text-transform: uppercase;
  color: var(--c-fg-faint);
}

.breadcrumb a { text-decoration: none; transition: color var(--d-fast) var(--e-out); }
.breadcrumb a:hover { color: var(--c-accent); }
.breadcrumb__sep { opacity: .5; }

/* The symbol block. The mark is sized against the copy beside it rather than
   against its column: at full column width it stood three times the height of
   the three short lines it belongs to, and the row read as a hole. */
.symbol { align-items: center; }

.symbol__mark {
  width: 100%;
  max-width: 17rem;
  height: auto;
  margin-inline: auto;
}

/* Stacked, a 13rem mark sat marooned above the copy with a full grid gap
   under it. Smaller, tighter, and sharing the left edge with the text it
   belongs to. */
@media (max-width: 60rem) {
  .symbol { gap: var(--s-5); }
  .symbol__mark { max-width: 8.5rem; margin-inline: 0; }
}

/* --------------------------------------------------------------------------
   2. Case study
   -------------------------------------------------------------------------- */

.case-hero {
  position: relative;
  padding-block-start: calc(var(--s-12) + var(--s-8));
}

.case-hero__title {
  font-size: var(--t-3xl);
  margin-block: var(--s-5) var(--s-7);
  max-width: 20ch;
}

.case-hero__media {
  margin-block-start: var(--s-9);
}

.case-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr));
  gap: var(--s-6) var(--gutter);
  padding-block: var(--s-7);
  border-block: var(--border);
}

.case-meta__key {
  font-family: var(--font-mono);
  font-size: var(--t-xs);
  letter-spacing: var(--tr-wide);
  text-transform: uppercase;
  color: var(--c-fg-faint);
  margin-block-end: var(--s-2);
}

.case-meta__val { font-size: var(--t-sm); }

/* Alternating text / image rows inside a case study. */
.case-block {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: var(--s-8) var(--gutter);
  align-items: center;
}

.case-block__text { grid-column: 1 / span 5; }
.case-block__media { grid-column: 7 / span 6; }

.case-block--flip .case-block__text { grid-column: 8 / span 5; }
.case-block--flip .case-block__media { grid-column: 1 / span 6; grid-row: 1; }

@media (max-width: 60rem) {
  .case-block__text,
  .case-block__media,
  .case-block--flip .case-block__text,
  .case-block--flip .case-block__media {
    grid-column: span 12;
    grid-row: auto;
  }
}

.case-gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--gutter);
}

.case-gallery--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.case-gallery__wide { grid-column: 1 / -1; }

/* Two up rather than one. Stacked full-width, four stills turned the section
   into a long column of near-identical 16:9 blocks; paired, they read as a
   set. The film keeps the full width via .case-gallery__wide. */
@media (max-width: 48rem) {
  .case-gallery,
  .case-gallery--3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--s-3);
  }
}

/* Next-project footer band. */
.next-project {
  position: relative;
  display: block;
  padding-block: var(--section-y);
  text-decoration: none;
  color: inherit;
  overflow: hidden;
  border-block-start: var(--border);
  text-align: center;
}

.next-project__label {
  font-family: var(--font-mono);
  font-size: var(--t-xs);
  letter-spacing: var(--tr-wider);
  text-transform: uppercase;
  color: var(--c-fg-faint);
}

.next-project__title {
  font-size: var(--t-3xl);
  margin-block-start: var(--s-4);
  transition: color var(--d-base) var(--e-out);
}

.next-project:hover .next-project__title { color: var(--c-accent); }

/* --------------------------------------------------------------------------
   3. About
   -------------------------------------------------------------------------- */

.manifesto {
  font-family: var(--font-display);
  font-size: var(--t-xl);
  line-height: var(--lh-normal);
  letter-spacing: var(--tr-snug);
  max-width: 44rem;
}

.manifesto em {
  font-family: var(--font-script);
  font-style: normal;
  font-size: 1.2em;
  letter-spacing: 0;
  color: var(--c-accent);
}

.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
  gap: var(--s-8) var(--gutter);
}

.member { position: relative; }

.member__media { margin-block-end: var(--s-4); }

.member__name { font-size: var(--t-md); }

.member__role {
  margin-block-start: var(--s-1);
  font-family: var(--font-mono);
  font-size: var(--t-xs);
  letter-spacing: var(--tr-wide);
  text-transform: uppercase;
  color: var(--c-fg-faint);
}

.timeline { border-block-start: var(--border); }

.timeline__row {
  display: grid;
  grid-template-columns: 7rem 1fr;
  gap: var(--s-5);
  padding-block: var(--s-6);
  border-block-end: var(--border);
}

.timeline__year {
  font-family: var(--font-mono);
  font-size: var(--t-sm);
  color: var(--c-accent);
}

.timeline__body { color: var(--c-fg-muted); max-width: var(--measure); }

.timeline__title { font-size: var(--t-md); color: var(--c-fg); margin-block-end: var(--s-2); }

@media (max-width: 40rem) {
  .timeline__row { grid-template-columns: 1fr; gap: var(--s-2); }
}

/* --------------------------------------------------------------------------
   4. Contact
   -------------------------------------------------------------------------- */

.contact-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: var(--s-10) var(--gutter);
}

.contact-grid__form { grid-column: 1 / span 7; }
.contact-grid__aside { grid-column: 9 / span 4; }

@media (max-width: 60rem) {
  .contact-grid__form,
  .contact-grid__aside { grid-column: span 12; }
}

.contact-detail + .contact-detail { margin-block-start: var(--s-7); }

.contact-detail__key {
  font-family: var(--font-mono);
  font-size: var(--t-xs);
  letter-spacing: var(--tr-wide);
  text-transform: uppercase;
  color: var(--c-fg-faint);
  margin-block-end: var(--s-2);
}

.contact-detail__val { font-size: var(--t-md); }

.contact-detail__val a { text-decoration: none; }

/* --------------------------------------------------------------------------
   5. CTA band
   -------------------------------------------------------------------------- */

.cta {
  position: relative;
  text-align: center;
  overflow: hidden;
}

.cta__title {
  font-size: var(--t-3xl);
  max-width: 18ch;
  margin-inline: auto;
}

.cta__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-4);
  justify-content: center;
  margin-block-start: var(--s-8);
}

/* --------------------------------------------------------------------------
   6. Styleguide
   -------------------------------------------------------------------------- */

.sg-section + .sg-section { margin-block-start: var(--s-11); }

.sg-swatches {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr));
  gap: var(--s-4);
}

.sg-swatch { min-width: 0; }

.sg-swatch__chip {
  height: 5rem;
  border-radius: var(--radius-md);
  border: var(--border);
  margin-block-end: var(--s-3);
}

.sg-swatch__name { font-family: var(--font-mono); font-size: var(--t-xs); }
.sg-swatch__hex { font-family: var(--font-mono); font-size: var(--t-xs); color: var(--c-fg-faint); }

.sg-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--s-5);
  padding-block: var(--s-4);
  border-block-end: var(--border);
}

.sg-row__label {
  flex: none;
  width: 6rem;
  font-family: var(--font-mono);
  font-size: var(--t-xs);
  color: var(--c-fg-faint);
}

/* --------------------------------------------------------------------------
   7. 404
   -------------------------------------------------------------------------- */

.notfound {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--s-12) var(--gutter);
}

.notfound .cluster { justify-content: center; }

@media (max-width: 48rem) {
  .notfound { padding: var(--s-10) var(--gutter) var(--s-9); }
}

.notfound__code {
  font-family: var(--font-display);
  font-size: var(--t-4xl);
  line-height: 1;
  letter-spacing: -0.04em;
  color: transparent;
  -webkit-text-stroke: 1px var(--c-line-strong);
}
