/* ==========================================================================
   SECTIONS — header, hero, drip, collection, process, marquee, thread, footer
   ========================================================================== */

/* --- Header ------------------------------------------------------------ */

.header {
  position: fixed;
  top: 0;
  /* Anchored left+right rather than width:100% — with body overflow-x
     clipped, a percentage width resolves against the overflowing content
     box and pushes the menu button off-screen on narrow viewports. */
  left: 0;
  right: 0;
  z-index: var(--z-header);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1rem var(--pad-x);
  transition: transform var(--dur) var(--ease-out);
}

/* Hidden while scrolling down, revealed on the way back up. */
.header.is-tucked { transform: translateY(-120%); }

.header__brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--c-ink);
}

.header__logo {
  width: 34px;
  height: 34px;
  object-fit: contain;
  border-radius: 50%;
}

.header__wordmark {
  font-family: var(--font-display);
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 700;
  /* A hairline white outline instead of a solid plate behind the wordmark, so
     it stays legible over the video and photography without a visible box.
     Four offsets rather than a blur — a glow would look soft at this size. */
  text-shadow:
    -0.6px -0.6px 0 rgba(255, 255, 255, 0.95),
     0.6px -0.6px 0 rgba(255, 255, 255, 0.95),
    -0.6px  0.6px 0 rgba(255, 255, 255, 0.95),
     0.6px  0.6px 0 rgba(255, 255, 255, 0.95);
}

/* Over a deep section the outline would fight the light text — drop it. */
.header--on-dark .header__wordmark { text-shadow: none; }

.header__nav {
  display: flex;
  gap: clamp(1rem, 2.2vw, 2.4rem);
}

.header__nav a {
  font-size: var(--fs-label);
  letter-spacing: 0.08em;
  opacity: 0.9;
  transition: opacity var(--dur-fast) var(--ease-out);
}

.header__nav a:hover,
.header__nav a[aria-current="page"] { opacity: 1; text-decoration: underline; text-underline-offset: 5px; }

/* The nav inherits the dark body colour, which suits the sky-blue and white
   surfaces that make up most of the site. Over a deep section it has to
   invert or it disappears into the page. */
.header--on-dark .header__nav a,
.header--on-dark .header__brand,
.header--on-dark .header__burger { color: var(--c-bone); }

.header--on-dark .header__cta {
  background: var(--c-bone);
  color: var(--c-ink);
}

.header__nav a,
.header__burger,
.header__cta {
  transition: color var(--dur-fast) var(--ease-out),
              background var(--dur-fast) var(--ease-out);
}

.header__burger { display: none; }

@media (max-width: 900px) {
  .header__nav {
    position: fixed;
    inset: 0;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1.6rem;
    background: var(--c-deep);
    font-size: 1.1rem;
    translate: 0 -100%;
    transition: translate var(--dur) var(--ease-out);
  }
  .header__nav.is-open { translate: 0 0; }
  .header__nav a { font-size: 0.95rem; }
  .header__burger {
    display: block;
    z-index: 1;
    font-size: var(--fs-label);
    letter-spacing: var(--track-label);
    text-transform: uppercase;
  }
  .header__cta { display: none; }
}

/* --- Hero -------------------------------------------------------------- */

.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  background: var(--c-mid);
  padding: 7rem var(--pad-x) 5rem;
  overflow: hidden;
}

.hero__inner { width: 100%; }

.hero__title {
  font-size: var(--fs-hero);
  /* Each masked line must stay on ONE line — .hero__line clips overflow, so a
     wrapped line gets cut in half. Wide enough for the longest line plus the
     inline image chip. */
  max-width: 22ch;
}

.hero__line > span { white-space: nowrap; }

/* Each line is masked so it can slide up from nothing on load. */
.hero__line {
  display: block;
  overflow: hidden;
}

.hero__line > span {
  display: inline-block;
  transform: translateY(105%);
}

/* Staggered indents recreate the reference's ragged left edge. */
.hero__line:nth-child(2) { padding-left: 1.6em; }
.hero__line:nth-child(3) { padding-left: 0.4em; }
.hero__line:nth-child(4) { padding-left: 1.1em; }

/* The image chip that sits INLINE inside the headline. */
.hero__chip {
  display: inline-block;
  vertical-align: baseline;
  width: 2.7em;
  height: 0.72em;
  margin-inline: 0.12em;
  border-radius: 3px;
  object-fit: cover;
  translate: 0 0.04em;
}

.hero__meta {
  position: absolute;
  right: var(--pad-x);
  top: 42%;
  text-align: right;
  opacity: 0.85;
}

.hero__since {
  position: absolute;
  left: var(--pad-x);
  bottom: 6rem;
  opacity: 0.85;
}

@media (max-width: 760px) {
  .hero__meta { position: static; text-align: left; margin-bottom: 1.5rem; }
  .hero__since { position: static; margin-top: 2rem; }
  .hero__line:nth-child(n) { padding-left: 0; }
}

/* --- Full-bleed plate + ink drip transition ---------------------------- */

.plate {
  position: relative;
  height: 100svh;
  overflow: hidden;
  background: var(--c-deep);
}

.plate__img {
  width: 100%;
  height: 120%;
  object-fit: cover;
  will-change: transform;
}

/* The drip sits at the bottom of the plate and melts into the next
   section's white. Its own fill is set from the following section. */
.drip {
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 100%;
  height: clamp(80px, 12vw, 170px);
  color: var(--c-white);
  pointer-events: none;
}

.drip svg { width: 100%; height: 100%; }

/* Loose droplets that fall ahead of the melting edge. */
.drip__drop {
  position: absolute;
  bottom: 100%;
  width: 10px;
  height: 13px;
  color: var(--c-white);
}

/* --- White statement section ------------------------------------------ */

.statement__title {
  font-size: var(--fs-h2);
  max-width: 22ch;
  margin-bottom: clamp(2.5rem, 6vw, 5rem);
}

.statement__art {
  width: 100%;
  /* Without this the width/height attributes on the <img> win and the drawing
     is stretched horizontally to fill the column. */
  height: auto;
  /* The source is only 612px wide, so cap it rather than upscaling it into
     mush on a wide monitor. Replace with a larger export to go full width. */
  max-width: 760px;
  margin-inline: auto;
  color: var(--c-ink);
  opacity: 0.85;
}

/* --- Capability spec grid --------------------------------------------- */

.spec-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: clamp(1.5rem, 3vw, 3rem);
  border-top: 1px solid var(--rule);
  padding-top: clamp(1.5rem, 3vw, 2.5rem);
}

.spec__n { opacity: 0.5; }

.spec__title {
  font-family: var(--font-display);
  font-size: var(--fs-h3);
  text-transform: uppercase;
  line-height: 1.1;
  margin: 0.6rem 0 0.7rem;
}

.spec__body {
  font-size: 0.88rem;
  line-height: 1.6;
  opacity: 0.75;
}

/* --- Colour swatch (dyeing page) --------------------------------------- */

.swatch {
  aspect-ratio: 3 / 4;
  border-radius: var(--radius);
  background: var(--s);
  border: 1px solid var(--rule);
  transition: transform var(--dur) var(--ease-out);
}

.card-product:hover .swatch { transform: translateY(-6px); }

/* --- Collection carousel ---------------------------------------------- */

.collection { overflow: hidden; }

.collection__track {
  display: flex;
  gap: clamp(0.75rem, 1.4vw, 1.4rem);
  padding-inline: var(--pad-x);
  width: max-content;
  will-change: transform;
}

.card-product { width: clamp(190px, 21vw, 320px); flex: none; }

.card-product__media {
  overflow: hidden;
  border-radius: var(--radius);
  aspect-ratio: 3 / 4;
  background: var(--c-soft);
}

.card-product__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--dur-slow) var(--ease-out);
}

.card-product:hover .card-product__media img { transform: scale(1.06); }

.card-product__title {
  margin-top: 0.9rem;
  font-size: 0.82rem;
}

.card-product__price {
  font-size: 0.82rem;
  opacity: 0.65;
}

/* --- Process section with fanned card stack ---------------------------- */

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

.process__title {
  font-size: var(--fs-h2);
  max-width: 14ch;
  margin-bottom: 1.6rem;
}

.process__body {
  opacity: 0.82;
  margin-bottom: 2rem;
  font-size: 0.95rem;
}

.stack {
  position: relative;
  height: clamp(320px, 32vw, 420px);
  /* Guard for very narrow screens: the fan offsets are applied as transforms,
     which would otherwise widen the page and stretch the fixed header. */
  overflow-x: clip;
}

.card-stage {
  position: absolute;
  /* Left-anchored so the rightward fan offset grows INTO the stack, not past it. */
  inset: 0 auto auto 0;
  width: clamp(230px, 24vw, 330px);
  max-width: 100%;
  padding: 1.4rem 1.5rem 1.7rem;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(3px);
  transform-origin: bottom center;
  will-change: transform;
}

.card-stage__n {
  font-size: 0.6rem;
  letter-spacing: 0.2em;
  opacity: 0.6;
}

.card-stage__title {
  font-family: var(--font-display);
  font-size: var(--fs-h3);
  text-transform: uppercase;
  letter-spacing: 0.01em;
  margin: 0.7rem 0 0.9rem;
  line-height: 1.1;
}

.card-stage__body {
  font-size: 0.8rem;
  line-height: 1.55;
  opacity: 0.8;
}

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

/* --- Oversized marquee with floating tiles ----------------------------- */

.marquee {
  position: relative;
  padding: clamp(3rem, 8vw, 7rem) 0;
  background: var(--c-mid);
  overflow: hidden;
}

.marquee__track {
  display: flex;
  align-items: center;
  gap: 0.35em;
  width: max-content;
  will-change: transform;
}

.marquee__word {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: var(--fs-mega);
  line-height: 0.85;
  text-transform: uppercase;
  color: var(--c-soft);
  white-space: nowrap;
}

/* Photo tiles that float over the letterforms at varied offsets. */
.marquee__tile {
  position: absolute;
  width: clamp(70px, 8vw, 120px);
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: 3px;
  will-change: transform;
}

.marquee__tile--a { top: 18%; left: 12%; }
.marquee__tile--b { top: 8%;  left: 62%; }
.marquee__tile--c { bottom: 6%; left: 38%; aspect-ratio: 5 / 4; }

.marquee__cta {
  position: absolute;
  right: var(--pad-x);
  bottom: clamp(1.5rem, 4vw, 3rem);
}

/* --- Thread / splatter section ----------------------------------------- */

.thread {
  position: relative;
  padding: clamp(5rem, 12vw, 11rem) 0;
  background: var(--c-mid);
  overflow: hidden;
  text-align: center;
}

.thread__wave {
  position: absolute;
  left: -5%;
  width: 110%;
  height: clamp(70px, 9vw, 130px);
  color: var(--c-ink);
  opacity: 0.4;
}

.thread__wave--top { top: clamp(1.5rem, 5vw, 4rem); }
.thread__wave--bottom { bottom: clamp(1.5rem, 5vw, 4rem); }

.thread__wave path {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.4;
  stroke-dasharray: 7 7;
  opacity: 0.75;
}

.thread__splat {
  position: absolute;
  width: clamp(14px, 1.6vw, 24px);
  color: var(--c-ink);
  opacity: 0.55;
}

.thread__title {
  position: relative;
  font-size: var(--fs-h2);
  max-width: 18ch;
  margin-inline: auto;
}

/* --- Footer ------------------------------------------------------------ */

.footer {
  position: relative;
  padding: clamp(3rem, 7vw, 5rem) 0 1.2rem;
  background: var(--c-mid);
  overflow: hidden;
}

.footer__nav {
  display: flex;
  justify-content: center;
  gap: clamp(1rem, 2.4vw, 2.6rem);
  margin-bottom: clamp(4rem, 12vw, 9rem);
}

.footer__nav a { font-size: var(--fs-label); letter-spacing: 0.08em; }

/* Tiles fan out above the wordmark. */
.footer__tiles {
  position: absolute;
  left: 50%;
  bottom: clamp(6rem, 13vw, 12rem);
  translate: -50% 0;
  display: flex;
}

.footer__tile {
  width: clamp(48px, 5vw, 74px);
  /* Without this the intrinsic height attribute wins over aspect-ratio and
     the tiles render full-height slivers. */
  height: auto;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: 3px;
  margin-inline: -6px;
  transform-origin: bottom center;
  will-change: transform;
}

.footer__wordmark {
  display: block;
  width: 100%;
  padding-inline: var(--pad-x);
  font-family: var(--font-display);
  font-weight: 900;
  /* Sized so the full "Pro Edge Pakistan" wordmark spans the viewport without
     overflowing. A shorter name can take a larger vw value. */
  font-size: clamp(1.4rem, 8.4vw, 10rem);
  line-height: 0.8;
  text-align: center;
  text-transform: uppercase;
  color: var(--c-ink);
  white-space: nowrap;
}

.footer__base {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1.5rem;
  opacity: 0.7;
}
