/* home.css: Nagpal Girlswear home page. Tokens, type steps and shared components come from base.css. */

/* The curtain (first visit of a session) ---------------------------------------- */
.curtain { display: none; }
html.curtain-on .curtain {
  display: block;
  position: fixed;
  inset: 0;
  z-index: var(--z-curtain);
  animation: curtain-failsafe .01s linear 4s forwards;
}
@keyframes curtain-failsafe { to { visibility: hidden; } }
.curtain__half {
  position: absolute;
  top: 0; bottom: 0;
  display: flex;
  align-items: center;
  width: 50%;
  background: var(--ink);
}
.curtain__half--l { left: 0; justify-content: flex-end; }
.curtain__half--r { right: 0; justify-content: flex-start; }
.curtain__word {
  position: relative;
  padding-inline: .06em;
  color: var(--bg);
  /* Capped by width so the longer half ("Girlswear") still fits its panel on a phone. */
  font-size: min(var(--step-display), 9.5vw);
  font-weight: 600;
  letter-spacing: -.05em;
  line-height: .92;
  white-space: nowrap;
}
/* The house name sits under the wordmark, starting on the seam with "Girlswear", and leaves with its panel. */
.curtain__sub {
  position: absolute;
  top: 100%;
  left: 0;
  padding-inline: inherit;
  margin-top: .6rem;
  font-size: max(.19em, .9375rem);
  font-weight: 500;
  letter-spacing: -.01em;
  line-height: 1.2;
}

/* Shared page bits --------------------------------------------------------------- */
.page-flow { position: relative; z-index: 2; background: var(--bg); }
.page-flow img { background: var(--surface); }
img.is-missing { visibility: hidden; }
/* base.css gives every .section its full rhythm; neighbours on one ground share it, so each takes half. */
.cats.section, .wedding.section, .fresh.section, .visit.section { padding-block: calc(var(--section) / 2); }
.budget.section { padding-block: calc(var(--section) * .6); }

/* 1. The mirror ------------------------------------------------------------------ */
/* Default: the open picture with the headline on a neutral scrim (no script, no scroll timeline, reduced motion). */
.mirror { position: relative; background: var(--bg); }
.mirror__stage {
  position: relative;
  height: calc(100svh - var(--header-h) - var(--announce-h));
  min-height: 30rem;
  max-height: 58rem;
  overflow: clip;
  background: var(--surface);
}
.mirror__window { position: absolute; inset: 0; }
.mirror__window > picture { display: contents; }
.mirror__photo { width: 100%; height: 100%; object-fit: cover; object-position: 50% 50%; background: var(--surface); }
.mirror__text {
  position: absolute;
  left: var(--margin);
  bottom: var(--margin);
  display: grid;
  gap: 20px;
  width: min(34rem, calc(100% - 2 * var(--margin)));
  padding: clamp(20px, 3vw, 32px);
  background: rgb(53 26 43 / .8);
  color: var(--bg);
}
.mirror__h1 { font-size: var(--step-head); line-height: .95; text-wrap: wrap; }
.mirror__lede { font-size: var(--step-body); }
.mirror__action { justify-self: start; }
.mirror__ln-mask { padding-bottom: .16em; margin-bottom: -.16em; }

/* Live: the closed arch that opens to the edges. */
@media (prefers-reduced-motion: no-preference) {
  html.js .mirror {
    --open: 100svh;
    --hold: 20svh;
    --stage: calc(100svh - var(--header-h));
    --edge: clamp(28px, 7svh, 72px);
    --pt: var(--edge);
    --h: min(45vw, calc(100svh - var(--header-h) - var(--announce-h) - 2 * var(--edge)));
    --w: calc(var(--h) * .8);
    height: calc(var(--stage) + var(--open) + var(--hold) + 100svh);
    margin-bottom: -100svh;
  }
  html.js .mirror__stage {
    position: sticky;
    top: var(--header-h);
    height: var(--stage);
    min-height: 0;
    max-height: none;
    background: none;
  }
  html.js .mirror__window {
    --p: 0;
    clip-path: inset(
      calc(var(--pt) * (1 - var(--p)))
      calc((100% - var(--w)) / 2 * (1 - var(--p)))
      calc((100% - var(--pt) - var(--h)) * (1 - var(--p)))
      calc((100% - var(--w)) / 2 * (1 - var(--p)))
      round calc(var(--w) / 2 * (1 - var(--p))) calc(var(--w) / 2 * (1 - var(--p))) 0 0
    );
  }
  html.js .mirror__text { position: static; display: contents; width: auto; padding: 0; background: none; color: var(--ink); }
  html.js .mirror:not(.is-live) .mirror__text { visibility: hidden; }
  html.js .mirror__title { position: absolute; left: var(--margin); bottom: calc(100% - var(--pt) - var(--h)); z-index: 1; }
  html.js .mirror__aside { position: absolute; z-index: 1; display: grid; gap: 20px; justify-items: start; }
  html.js .mirror__h1 { font-size: var(--step-head); }
  html.js .mirror__lede { font-size: 1.125rem; max-width: 28ch; }
}
@media (min-width: 900px) and (prefers-reduced-motion: no-preference) {
  html.js .mirror__aside { right: var(--margin); bottom: calc(100% - var(--pt) - var(--h)); width: calc(25% - var(--margin)); max-width: 30rem; }
}
@media (max-width: 899.98px) and (prefers-reduced-motion: no-preference) {
  html.js .mirror {
    --open: 70svh;
    --pt: clamp(120px, 15svh, 150px);
    --h: min(105vw, calc(100svh - var(--header-h) - var(--pt) - 208px));
  }
  html.js .mirror__title { top: 20px; bottom: auto; }
  html.js .mirror__h1 { font-size: var(--step-display); }
  /* The shop front is centred in both photos, so the window frames the sign without any zoom. */
  html.js .mirror__aside { left: var(--margin); right: var(--margin); bottom: calc(var(--announce-h) + 20px); }
  html.js .mirror__lede { font-size: 1rem; max-width: none; }
  html.js .mirror__cta { width: 100%; }
  html.js .mirror__action { justify-self: stretch; }
}

/* 2. Trust row ------------------------------------------------------------------- */
.trust { background: var(--surface); }
.trust__list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px var(--gap);
  margin-inline: auto;
  padding-block: clamp(24px, 3vw, 44px);
  list-style: none;
}
@media (min-width: 900px) { .trust__list { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.trust__item { font-size: var(--step-lead); font-weight: 500; letter-spacing: -.02em; line-height: 1.2; text-wrap: balance; }
.trust__link { text-decoration: underline; text-decoration-thickness: .08em; text-underline-offset: .2em; transition: text-decoration-thickness .15s linear; }
.trust__link:hover { text-decoration-thickness: .16em; }

/* 3. The Dhund edit -------------------------------------------------------------- */
.dhund { position: relative; background: var(--ink); color: var(--bg); --focus: var(--bg); }
.dhund__stage { position: relative; padding-block: clamp(56px, 14vw, 96px) clamp(40px, 10vw, 72px); overflow: clip; }
.dhund__bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: brightness(.45); background: var(--ink); }
.dhund__stage::after { content: ""; position: absolute; inset: 0; background: rgb(53 26 43 / .2); pointer-events: none; }
.dhund__track { position: relative; z-index: 1; }
.dhund__intro { display: grid; gap: 16px; padding-inline: var(--margin); max-width: 40rem; margin-bottom: clamp(28px, 7vw, 44px); }
.dhund__title { font-size: var(--step-head); }
.dhund__sub { font-size: var(--step-lead); font-weight: 500; line-height: 1.3; letter-spacing: -.02em; max-width: 28ch; }

.dhund__rail {
  display: flex;
  gap: 12px;
  margin: 0;
  padding: 0 var(--margin) 8px;
  list-style: none;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: var(--margin);
  scrollbar-width: none;
}
.dhund__rail::-webkit-scrollbar { display: none; }
.dcard { display: flex; flex: 0 0 74vw; max-width: 22rem; scroll-snap-align: start; }
.dcard__link { display: flex; flex-direction: column; width: 100%; color: var(--ink); background: var(--bg); transition: scale .1s linear; }
.dcard__link:active { scale: .97; }
.dcard__media { position: relative; display: block; overflow: hidden; aspect-ratio: 4 / 5; background: var(--surface); }
.dcard__media img { width: 100%; height: 100%; object-fit: cover; }
.dcard__panel { display: grid; flex: 1; gap: 6px; align-content: start; padding: 16px 18px 20px; }
.dcard__name { font-size: var(--step-lead); font-weight: 600; letter-spacing: -.03em; line-height: 1.1; text-wrap: balance; }
@media (hover: hover) and (pointer: fine) {
  .dcard__media img { transition: transform 600ms var(--ease-out); }
  .dcard__link:hover .dcard__media img { transform: scale(1.04); }
}

/* Phones: as a card crosses the rail it grows to full size at its rest position and its photo drifts sideways
   (compositor only). The named view timeline sits on the card because .dcard__media clips; GSAP's desktop pin is untouched. */
@keyframes ng-dcard-pass { entry 0% { scale: .94; } exit 0% { scale: 1; } exit 100% { scale: .94; } }
@keyframes ng-dcard-drift { entry 0% { translate: -5% 0; } exit 0% { translate: 0 0; } exit 100% { translate: 5% 0; } }
@media (max-width: 899.98px) and (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: view()) {
    .dcard { view-timeline: --ng-dcard inline; animation: ng-dcard-pass linear both; animation-timeline: --ng-dcard; }
    .dcard__media img { scale: 1.1; animation: ng-dcard-drift linear both; animation-timeline: --ng-dcard; }
  }
}

@media (min-width: 900px) and (prefers-reduced-motion: no-preference) {
  html.js .dhund { height: 300svh; }
  html.js .dhund__stage {
    --card: clamp(260px, min(26vw, calc((100svh - var(--header-h) - 260px) * .8)), 440px);
    position: sticky;
    top: var(--header-h);
    height: calc(100svh - var(--header-h));
    padding-block: 0;
  }
  html.js .dhund__track { display: flex; align-items: center; gap: 40px; width: max-content; height: 100%; padding-inline: var(--margin); }
  html.js .dhund__intro { align-self: flex-start; width: min(42vw, 40rem); margin: clamp(32px, 7svh, 72px) 0 0; padding: 0; }
  html.js .dhund__rail { overflow: visible; scroll-snap-type: none; gap: 40px; padding: 0; }
  html.js .dcard { flex: none; width: var(--card); max-width: none; }
}

/* 4. Shop by category ------------------------------------------------------------ */
.cats__grid { display: block; }
.cats__media { position: sticky; top: var(--header-h); z-index: 3; margin-inline: calc(var(--margin) * -1); }
.cats__frame { position: relative; height: 38svh; overflow: hidden; background: var(--surface); }
.cats__frame img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 25%; opacity: 0; transition: opacity .3s linear; }
.cats__frame img.is-on { opacity: 1; }
.cats__title { margin-block: 32px 16px; font-size: var(--step-head); }
.cats__rows { list-style: none; }
.crow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 56px;
  font-size: var(--step-lead);
  font-weight: 500;
  letter-spacing: -.02em;
  line-height: 1.2;
  color: var(--muted);
  transition: color .15s linear;
}
.crow__name { display: block; transition: transform var(--t-fast) var(--ease-out); }
.crow__from { flex: none; font-size: var(--step-body); font-weight: 500; letter-spacing: -.01em; font-variant-numeric: tabular-nums lining-nums; }
.crow.is-active { color: var(--ink); }
.crow.is-active .crow__name { transform: translateX(10px); }
@media (min-width: 900px) {
  .cats__grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap); align-items: start; }
  .cats__media { grid-column: 1 / span 5; top: calc(var(--header-h) + 5svh); z-index: auto; margin-inline: 0; }
  .cats__frame { width: min(100%, calc((100svh - var(--header-h) - 10svh) * .8)); height: auto; aspect-ratio: 4 / 5; }
  .cats__frame img { object-position: 50% 50%; }
  .cats__list { grid-column: 7 / -1; }
  .cats__title { margin-block: 0 48px; }
  .crow { min-height: 58px; }
}
@media (prefers-reduced-motion: reduce) {
  .cats__frame img { transition: none; }
  .crow__name { transition: none; }
}

/* 5. Shop by budget -------------------------------------------------------------- */
.budget { background: var(--surface); }
.budget__title { font-size: var(--step-head); }
.budget__list { margin-top: clamp(28px, 4vw, 56px); list-style: none; }
.budget__link {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--gap);
  margin-inline: calc(var(--margin) * -1);
  padding: clamp(8px, 1.4vw, 20px) var(--margin);
  transition: background-color .15s linear, scale .1s linear;
}
.budget__link:hover { background: var(--bg); }
.budget__link:active { scale: .99; }
.budget__label { font-size: var(--step-display); font-weight: 600; letter-spacing: -.05em; line-height: .95; }
.budget__count { flex: none; font-size: var(--step-lead); font-weight: 500; letter-spacing: -.02em; }

/* 6. Wedding season -------------------------------------------------------------- */
.wedding { overflow: clip; }
.wedding__head { display: grid; gap: 20px var(--gap); align-items: end; }
.wedding__title { font-size: var(--step-head); }
.wedding__sub { font-size: var(--step-lead); font-weight: 500; line-height: 1.3; letter-spacing: -.02em; max-width: 30ch; }
@media (min-width: 900px) {
  .wedding__head { grid-template-columns: repeat(12, minmax(0, 1fr)); }
  .wedding__title { grid-column: 1 / span 7; }
  .wedding__sub { grid-column: 9 / -1; }
}
.triptych {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 64vw minmax(0, 1fr);
  align-items: end;
  column-gap: 10px;
  margin-top: clamp(40px, 6vw, 80px);
  padding-block: 70px;
  overflow: clip;
}
.triptych__item { margin: 0; background: var(--surface); }
.triptych__item img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.triptych__item--l, .triptych__item--r { width: 46vw; }
.triptych__item--l { justify-self: end; }
.triptych__item--r { justify-self: start; }
@media (min-width: 900px) {
  .triptych { grid-template-columns: minmax(0, 1fr) min(38vw, 720px) minmax(0, 1fr); column-gap: 10px; }
  .triptych__item--l, .triptych__item--r { width: min(24vw, 460px); }
}
.occasions { display: flex; flex-wrap: wrap; gap: 8px 32px; margin-top: clamp(24px, 3vw, 40px); list-style: none; }
.occasions__link {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  font-size: var(--step-lead);
  font-weight: 500;
  letter-spacing: -.02em;
  text-decoration: underline;
  text-decoration-thickness: .08em;
  text-underline-offset: .22em;
  transition: text-decoration-thickness .15s linear;
}
.occasions__link:hover { text-decoration-thickness: .18em; }

/* 7. New this week --------------------------------------------------------------- */
.fresh__title { margin-bottom: clamp(28px, 4vw, 56px); font-size: var(--step-head); }
.fresh__more { display: flex; margin-top: clamp(36px, 5vw, 64px); }
.fresh__more .btn { width: 100%; }
@media (min-width: 640px) { .fresh__more .btn { width: auto; } }

/* 8. Visit the shop -------------------------------------------------------------- */
.visit__grid { display: grid; gap: 40px var(--gap); }
.visit__map { margin: 0; }
.map { position: relative; aspect-ratio: 4 / 5; overflow: hidden; background: var(--surface); }
.map__svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.map__tag {
  position: absolute;
  z-index: 1;
  font-size: var(--step-small);
  font-weight: 500;
  letter-spacing: -.005em;
  line-height: 1.2;
  white-space: nowrap;
  color: var(--ink);
}
/* Labels are placed in map units (the SVG is 1000 x 1250, so left = x / 10 %, top = y / 12.5 %). The pin is at 500,700. */
.map__tag--noor { left: 58.5%; top: 20%; padding: 3px 7px; transform: translate(-50%, -50%); background: var(--surface); color: var(--accent); font-weight: 600; }
.map__tag--gt { left: 21%; top: 78.4%; transform: translate(-50%, -50%) rotate(16.2deg); color: var(--bg); }
.map__tag--shop { left: calc(53% + 10px); top: 56%; padding: 8px 12px; transform: translateY(-50%); background: var(--ink); color: var(--bg); font-weight: 600; }
.visit__info { display: grid; gap: 20px; align-content: start; }
.visit__title { font-size: var(--step-head); }
.visit__address { display: grid; gap: 2px; font-style: normal; font-size: var(--step-lead); font-weight: 500; line-height: 1.3; letter-spacing: -.02em; }
.visit__name { font-weight: 600; }
.visit__hours, .visit__note { max-width: 36ch; }
.visit__actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.visit__actions .btn { flex: 1 1 12rem; }
@media (min-width: 900px) {
  .visit__grid { grid-template-columns: repeat(12, minmax(0, 1fr)); align-items: stretch; }
  .visit__map { grid-column: 1 / span 5; }
  .visit__info { grid-column: 7 / -1; grid-template-rows: auto auto auto 1fr auto auto; gap: 24px; }
  .visit__title { grid-row: 1; }
  .visit__address { grid-row: 2; }
  .visit__hours { grid-row: 3; margin-top: -8px; font-size: var(--step-lead); font-weight: 500; line-height: 1.3; letter-spacing: -.02em; }
  .visit__note { grid-row: 5; max-width: 30ch; font-size: var(--step-lead); font-weight: 500; line-height: 1.3; letter-spacing: -.02em; }
  .visit__actions { grid-row: 6; margin-top: 0; }
  .visit__actions .btn { flex: 0 0 auto; }
}

.winters { display: grid; gap: 32px var(--gap); margin-top: clamp(72px, 9vw, 140px); }
.winters__title { font-size: var(--step-head); }
.winters__item { margin: 0; display: grid; gap: 12px; align-content: start; }
.winters__photo { aspect-ratio: 4 / 5; background: var(--surface); overflow: hidden; }
.winters__photo img { width: 100%; height: 100%; object-fit: cover; }
.winters__item figcaption { max-width: 32ch; }
@media (min-width: 640px) {
  .winters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .winters__title { grid-column: 1 / -1; }
}
@media (min-width: 900px) {
  .winters { grid-template-columns: repeat(12, minmax(0, 1fr)); align-items: start; }
  .winters__title { grid-column: 1 / span 4; align-self: start; }
  .winters__item:nth-of-type(1) { grid-column: 5 / span 4; }
  .winters__item:nth-of-type(2) { grid-column: 9 / span 4; }
}

/* 9. Good to know --------------------------------------------------------------- */
.know__head { display: flex; align-items: flex-end; min-height: 30svh; padding-block: clamp(20px, 3vw, 40px); background: var(--accent); color: var(--accent-ink); --focus: var(--accent-ink); }
.know__head .wrap { width: 100%; }
.know__title { font-size: var(--step-display); line-height: .92; letter-spacing: -.05em; }
.know__band { padding-block: 32px; }
.know__band:nth-of-type(odd) { background: var(--surface); }
.know__band:nth-of-type(even) { background: var(--bg); }
.know__row { display: grid; gap: 12px var(--gap); }
.know__q { font-size: var(--step-lead); font-weight: 600; letter-spacing: -.03em; line-height: 1.15; }
.know__a { font-size: var(--step-body); line-height: 1.5; max-width: 52ch; }
@media (min-width: 900px) {
  .know__head { min-height: 40svh; }
  .know__band { padding-block: 56px; }
  .know__row { grid-template-columns: repeat(12, minmax(0, 1fr)); }
  .know__q { grid-column: 1 / span 5; }
  .know__a { grid-column: 7 / -1; font-size: 1.125rem; }
}

/* 10. WhatsApp ------------------------------------------------------------------ */
.wa { display: grid; min-height: min(100svh, 52rem); }
.wa__inner { display: grid; grid-template-rows: auto 1fr auto; gap: 32px; padding-block: clamp(32px, 5vw, 64px); }
.wa__lead { max-width: 24ch; font-size: var(--step-lead); font-weight: 500; line-height: 1.25; letter-spacing: -.02em; }
.wa__numbers { align-self: end; display: grid; gap: .1em 0; margin: 0; padding: 0 0 clamp(16px, 6svh, 72px); list-style: none; font-size: min(10.5vw, 4.5rem); }
.wa__number {
  display: inline-block;
  font-weight: 400;
  font-variant-numeric: tabular-nums;
  letter-spacing: -.045em;
  line-height: 1.05;
  white-space: nowrap;
  color: var(--bg);
  transition: color .15s linear;
}
.wa__number:hover { color: var(--accent-ink); }
.wa__corners { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px 32px; font-size: var(--step-small); }
.wa__address { display: grid; gap: 2px; font-style: normal; }
.wa__links { display: flex; flex-wrap: wrap; gap: 4px 24px; }
.wa__links .link, .wa__corners .link { display: inline-flex; align-items: center; min-height: 44px; }
@media (min-width: 900px) {
  .wa__numbers { grid-template-columns: repeat(2, max-content); gap: .15em .6em; font-size: min(5.6vw, 6.5rem); }
}
.wa__ig { display: contents; }
