/* Festival pages (Navratri, Dussehra, Diwali): one template, data from
   /fest/<slug>.json. Same tokens as the landing (v2.css); the signature is the
   hero, which takes on the selected day's colour, with a zari-like glint
   sweeping across the garment. */
:root {
  --bg: #FFFFFF;
  --bg-2: #F7F5F0;
  --ink: #0E0E0F;
  --soft: #6B6760;
  --dim: #A39E95;
  --line: #E9E5DD;
  --brass: #A8743A;
  --paper: #F3F1EC;
  --day: #A8743A;                 /* set from the data, per selected day */
  --field: #FFFFFF;
  --on-ink: #FFFFFF;
  --night: #0E0E0F;               /* dark-by-design bands, dark in both themes */
  --galti-bg: #FBEDEA;
  --galti: #B3261E;
  --display: "Bricolage Grotesque", ui-sans-serif, system-ui, -apple-system, sans-serif;
  --serif: "Newsreader", ui-serif, Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --out: cubic-bezier(.16,1,.3,1);
  --gut: clamp(16px, 5vw, 64px);
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--sans); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
img { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--display); margin: 0; letter-spacing: -.035em; text-wrap: balance; }

/* nav ------------------------------------------------------------------------ */
.f-nav { position: absolute; top: 0; left: 0; right: 0; z-index: 5; display: flex; align-items: center; justify-content: space-between; padding: 18px var(--gut); }
.f-brand { font-family: var(--display); font-weight: 800; letter-spacing: .32em; text-decoration: none; font-size: 15px; }
.f-pill {
  display: inline-flex; align-items: center; gap: 10px; border-radius: 999px; background: var(--ink); color: var(--on-ink);
  text-decoration: none; font-weight: 600; padding: 12px 22px; font-size: 15px; transition: transform .3s var(--out), background .3s;
}
.f-pill:hover { background: var(--brass); }
.f-pill:active { transform: scale(.97); }
.f-pill.sm { padding: 9px 16px; font-size: 14px; }
.f-pill.big { padding: 18px 30px; font-size: 16px; }
.f-pill .arrow { font-style: normal; transition: transform .4s var(--out); }
.f-pill:hover .arrow { transform: translateX(4px); }

/* hero ----------------------------------------------------------------------- */
.f-hero { position: relative; min-height: min(92vh, 820px); display: grid; grid-template-columns: 1.05fr 1fr; align-items: center; gap: 2vw; padding: 96px var(--gut) 56px; overflow: hidden; isolation: isolate; }
.f-wash {
  position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(60% 70% at 78% 52%, color-mix(in srgb, var(--day) 34%, transparent), transparent 70%),
    radial-gradient(50% 60% at 12% 10%, color-mix(in srgb, var(--day) 14%, transparent), transparent 70%),
    var(--bg-2);
  transition: background 0.8s var(--out);
}
.f-kicker { font-size: 12px; letter-spacing: .2em; text-transform: uppercase; color: var(--brass); font-weight: 700; margin: 0 0 14px; }
.f-h { font-size: clamp(64px, 12vw, 168px); line-height: .86; font-weight: 800; font-variation-settings: "wdth" 78; color: var(--day); transition: color .6s var(--out); }
.f-h.dark-ink { -webkit-text-stroke: 1.5px var(--ink); }
.f-note { font-family: var(--serif); font-style: italic; font-size: clamp(20px, 2.4vw, 28px); margin: 14px 0 0; color: var(--ink); font-weight: 300; }
.f-sub { max-width: 44ch; color: var(--soft); font-size: 16.5px; line-height: 1.55; margin: 22px 0 0; }

.f-hero-g { position: relative; margin: 0; justify-self: center; width: min(46vw, 520px); aspect-ratio: 1; }
.f-hero-g img { width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 30px 40px rgba(14,14,15,.22)); animation: f-float 6s ease-in-out infinite; }
.f-hero-g img.swap { animation: f-in .7s var(--out) both, f-float 6s ease-in-out .7s infinite; }
/* the glint: a soft band of light that sweeps the garment, masked to its shape */
.f-glint {
  position: absolute; inset: 0; pointer-events: none; mix-blend-mode: soft-light;
  background: linear-gradient(105deg, transparent 38%, rgba(255,255,255,.95) 50%, transparent 62%);
  background-size: 260% 100%; background-position: 140% 0;
  -webkit-mask: var(--g) center / contain no-repeat; mask: var(--g) center / contain no-repeat;
  animation: f-glint 3.6s ease-in-out 1s infinite;
}

/* rule band ------------------------------------------------------------------ */
.f-rule {
  margin: 0; padding: 22px var(--gut); background: var(--night); color: #fff; text-align: center;
  font-family: var(--serif); font-style: italic; font-weight: 300; font-size: clamp(20px, 2.6vw, 30px);
}

/* timeline ------------------------------------------------------------------- */
.f-line { padding: 64px 0 18px; }
.f-line-h { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; padding: 0 var(--gut); }
.f-sec { font-size: clamp(32px, 5vw, 64px); line-height: .98; font-weight: 700; font-variation-settings: "wdth" 82; }
.f-hint { color: var(--dim); font-size: 13px; margin: 0; white-space: nowrap; }
.f-days {
  list-style: none; margin: 28px 0 0; padding: 6px var(--gut) 18px; display: flex; gap: 12px;
  overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
}
.f-days::-webkit-scrollbar { display: none; }
.f-day {
  flex: none; scroll-snap-align: start; width: 112px; padding: 14px 12px 12px; border-radius: 18px;
  border: 1.5px solid var(--line); background: var(--field); cursor: pointer; text-align: left; font: inherit; color: inherit;
  transition: transform .35s var(--out), border-color .3s, box-shadow .35s var(--out);
  animation: f-rise .6s var(--out) both;
}
.f-day:hover { transform: translateY(-3px); }
.f-day:focus-visible { outline: 2px solid var(--brass); outline-offset: 3px; }
.f-day .dot { display: block; width: 40px; height: 40px; border-radius: 50%; background: var(--c); box-shadow: inset 0 0 0 1px rgba(0,0,0,.08); margin-bottom: 12px; transition: transform .45s var(--out); }
.f-day b { display: block; font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--soft); }
.f-day span { display: block; font-family: var(--display); font-weight: 700; font-size: 16px; line-height: 1.1; margin-top: 4px; letter-spacing: -.02em; }
.f-day small { display: block; color: var(--dim); font-size: 12px; margin-top: 6px; }
.f-day.on { border-color: var(--ink); box-shadow: 0 14px 30px -14px rgba(14,14,15,.35); }
.f-day.on .dot { transform: scale(1.12); }
.f-day.today b::after { content: " · today"; color: var(--brass); }
.f-day.past { opacity: .55; }

/* the look ------------------------------------------------------------------- */
.f-look { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(20px, 4vw, 64px); align-items: center; padding: 30px var(--gut) 80px; }
/* Rows are fixed fractions of the card and every image is fitted inside its
   cell (min-height 0 + object-fit), so nothing can grow past the card and get
   clipped at the bottom. */
.f-look-g {
  position: relative; border-radius: 28px; background: var(--paper); aspect-ratio: 4 / 5; padding: 5% 5% 7%;
  display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: 3fr 2fr; gap: 3%; overflow: hidden;
}
.f-look-g::after { content: ""; position: absolute; inset: auto 0 0 0; height: 6px; background: var(--day); transition: background .6s; }
.f-look-g figure { margin: 0; min-width: 0; min-height: 0; animation: f-in .6s var(--out) both; }
.f-look-g figure:first-child { grid-column: 1 / -1; }
.f-look-g img { width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 12px 16px rgba(14,14,15,.16)); }
.f-look-g.four { grid-template-columns: 1fr 1fr 1fr; }
.f-look-g.four figure:first-child { grid-column: 1 / -1; }
.f-look-h { font-size: clamp(30px, 4vw, 52px); line-height: 1; font-weight: 700; font-variation-settings: "wdth" 82; }
.f-pieces { list-style: none; padding: 0; margin: 18px 0 22px; display: flex; flex-wrap: wrap; gap: 8px; }
.f-pieces li { border: 1px solid var(--line); border-radius: 999px; padding: 7px 12px; font-size: 14px; }
.f-why, .f-galti { border-radius: 16px; padding: 14px 16px; margin-top: 10px; }
.f-why { background: var(--bg-2); }
.f-galti { background: var(--galti-bg); }
.f-why b, .f-galti b { display: block; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; margin-bottom: 4px; }
.f-why b { color: var(--brass); }
.f-galti b { color: var(--galti); }
.f-galti b::before { content: "✕ "; }
.f-why p, .f-galti p { margin: 0; font-size: 16px; line-height: 1.5; }
.f-look-t > * { animation: f-rise .55s var(--out) both; }
.f-look-t > *:nth-child(2) { animation-delay: .05s; }
.f-look-t > *:nth-child(3) { animation-delay: .1s; }
.f-look-t > *:nth-child(4) { animation-delay: .15s; }
.f-look-t > *:nth-child(5) { animation-delay: .2s; }

/* plan CTA ------------------------------------------------------------------- */
.f-plan { margin: 0 var(--gut) 64px; padding: clamp(28px, 5vw, 64px); border-radius: 32px; background: var(--night); color: #fff; position: relative; overflow: hidden; }
.f-plan::before { content: ""; position: absolute; width: 420px; height: 420px; right: -120px; top: -160px; border-radius: 50%; background: radial-gradient(closest-side, color-mix(in srgb, var(--day) 70%, transparent), transparent); opacity: .7; }
.f-plan .f-sec { max-width: 16ch; position: relative; }
.f-plan-list { list-style: none; padding: 0; margin: 26px 0 30px; display: grid; gap: 12px; position: relative; max-width: 560px; }
.f-plan-list li { display: flex; gap: 14px; align-items: center; font-size: 16px; }
.f-plan-list i { font-style: normal; width: 42px; height: 42px; flex: none; border-radius: 12px; display: grid; place-items: center; background: rgba(255,255,255,.08); font-size: 19px; }
.f-plan-list small { display: block; color: rgba(255,255,255,.6); font-size: 13.5px; margin-top: 2px; }
.f-plan .f-pill { background: #fff; color: #0E0E0F; position: relative; }
.f-plan .f-pill:hover { background: var(--day); color: #fff; }

.f-foot { padding: 0 var(--gut) 40px; color: var(--dim); font-size: 13px; }
.f-foot a { text-decoration: none; }

/* motion --------------------------------------------------------------------- */
@keyframes f-float { 50% { transform: translateY(-10px) rotate(-1deg); } }
@keyframes f-in { from { opacity: 0; transform: translateY(18px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes f-rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes f-glint { 0% { background-position: 140% 0; } 55%, 100% { background-position: -40% 0; } }

/* phone ---------------------------------------------------------------------- */
@media (max-width: 760px) {
  .f-hero { grid-template-columns: 1fr; padding-top: 84px; min-height: 0; text-align: left; gap: 0; }
  .f-hero-g { width: min(78vw, 360px); order: -1; margin: 0 auto -8px; }
  .f-look { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* --- 4 Oct: colour meaning, hero CTA, festive motif ------------------------- */
.f-mean { margin: 10px 0 0; font-size: 15.5px; line-height: 1.5; color: var(--ink); max-width: 40ch; padding-left: 12px; border-left: 3px solid var(--day); transition: border-color .6s; }
.f-hero-cta { margin-top: 26px; }
.f-mean-box { border-radius: 16px; padding: 14px 16px; margin-top: 10px; background: color-mix(in srgb, var(--day) 10%, var(--field)); border: 1px solid color-mix(in srgb, var(--day) 30%, transparent); transition: background .6s, border-color .6s; }
.f-mean-box b { display: block; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; margin-bottom: 4px; color: var(--ink); }
.f-mean-box p { margin: 0; font-size: 16px; line-height: 1.5; }

/* The mandala sits behind the garment in the day's colour: fine lines, low
   opacity, a very slow turn. Festive without competing with the clothes. */
.f-motif {
  position: absolute; z-index: -1; pointer-events: none; color: var(--day); opacity: .22;
  width: min(62vw, 700px); aspect-ratio: 1; right: calc(var(--gut) - 6vw); top: 50%; translate: 0 -50%;
  transition: color .8s var(--out);
}
.f-motif svg { width: 100%; height: 100%; animation: f-turn 120s linear infinite; }
@keyframes f-turn { to { transform: rotate(360deg); } }
.f-plan { background-image: radial-gradient(rgba(255,255,255,.07) 1.2px, transparent 1.6px); background-size: 14px 14px; background-color: var(--ink); }

@media (max-width: 760px) {
  .f-motif { width: 118vw; right: auto; left: 50%; top: 6px; translate: -50% 0; opacity: .18; }
  .f-hero-cta { width: 100%; justify-content: space-between; }
}
@media (prefers-reduced-motion: reduce) { .f-motif svg { animation: none; } }

/* more festivals ------------------------------------------------------------- */
.f-more { padding: 0 var(--gut) 48px; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.f-more .f-kicker { width: 100%; margin-bottom: 4px; }
.f-more-a { display: inline-flex; align-items: center; gap: 10px; padding: 12px 16px; border-radius: 999px; border: 1.5px solid var(--line); text-decoration: none; transition: border-color .3s, transform .3s var(--out); }
.f-more-a:hover { border-color: var(--ink); transform: translateY(-2px); }
.f-more-a i { width: 14px; height: 14px; border-radius: 50%; background: var(--c); }
.f-more-a b { font-family: var(--display); letter-spacing: -.01em; }
.f-more-a small { color: var(--soft); }
.f-more-a em { font-style: normal; }

/* Dark theme: /theme.js sets data-theme on <html> before first paint. */
:root[data-theme="dark"] {
  --bg: #0E0F12;
  --bg-2: #16181D;
  --ink: #ECEAE4;
  --soft: #9A958C;
  --dim: #6E6A62;
  --line: #262A32;
  --brass: #C89050;
  --field: #16181D;
  --on-ink: #0E0F12;
  --night: #1A1C22;
  --galti-bg: #2A1714;
  --galti: #E5675E;
  color-scheme: dark;
}
