/*
  GOKULAM GALLERIA — "House of Calicut"
  ─────────────────────────────────────────────────────────────
  Heritage Indian luxury house meets civic theatre.
  Deep midnight navy + burnished gold (from their actual GG logo).
  Cormorant Garamond italic display + Manrope body + Malayalam accents.
  Asymmetric editorial layouts, NEVER a wireframe grid.
*/

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,500;0,600;0,700;1,300;1,400;1,500;1,600;1,700&family=Manrope:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@300;400;500&family=Noto+Serif+Malayalam:wght@400;500;600&display=swap');

/* ━━━━━━━━━━━ TOKENS ━━━━━━━━━━━ */
:root {
  /* Core palette */
  --navy: #0F1B2E;
  --navy-2: #15243C;
  --navy-3: #1D2F4A;
  --navy-hairline: #2A3C58;

  --ivory: #F5EFE2;
  --paper: #FAF6EB;
  --cream: #E8DCC2;
  --ink: #1B1B1F;
  --ink-soft: #3A3A40;

  --gold: #B89758;          /* their actual logo gold */
  --gold-hi: #D4B57A;
  --gold-deep: #8E6F38;

  --crimson: #A8201A;       /* their EOSS sale crimson */
  --crimson-hi: #C8302A;

  --olive: #5B6B3A;         /* floor accent — Hypermarket */
  --amethyst: #6B4287;      /* floor accent — Cinepolis */

  --mute: #8A8A8E;
  --mute-dark: #8B98AB;

  /* Type */
  --display: 'Cormorant Garamond', 'EB Garamond', Georgia, serif;
  --body: 'Manrope', 'Inter', system-ui, sans-serif;
  --mono: 'JetBrains Mono', 'Courier New', monospace;
  --mal: 'Noto Serif Malayalam', serif;

  /* Space */
  --gutter: clamp(20px, 4vw, 64px);
  --max: 1360px;
  --bleed: clamp(40px, 6vw, 96px);

  /* Curves */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-q: cubic-bezier(0.65, 0, 0.35, 1);
}

/* ━━━━━━━━━━━ RESET ━━━━━━━━━━━ */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--navy);
  color: var(--ivory);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.6;
  font-weight: 400;
  font-feature-settings: 'kern', 'liga', 'calt';
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
img, video, svg { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; background: none; border: 0; color: inherit; padding: 0; }

/* ━━━━━━━━━━━ TYPE SCALE ━━━━━━━━━━━ */
h1, h2, h3, h4 { margin: 0; font-family: var(--display); font-weight: 400; line-height: 1.02; letter-spacing: -0.01em; }
h1 { font-size: clamp(56px, 8.5vw, 148px); }
h2 { font-size: clamp(40px, 5.5vw, 84px); }
h3 { font-size: clamp(28px, 3.3vw, 48px); }
h4 { font-size: clamp(22px, 2.4vw, 32px); }
.serif-it { font-style: italic; font-weight: 300; color: var(--gold-hi); }
p { margin: 0 0 1em; }
.lead { font-size: clamp(17px, 1.4vw, 21px); color: var(--cream); line-height: 1.55; max-width: 60ch; }

/* Eyebrow / folio / mono labels */
.eyebrow {
  font-family: var(--mono);
  font-weight: 400;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
}
.eyebrow--mute { color: var(--mute); }
.folio {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--mute-dark);
}
.mal {
  font-family: var(--mal);
  font-weight: 400;
  letter-spacing: 0;
}

/* Drop cap */
.dropcap::first-letter {
  font-family: var(--display);
  font-weight: 300;
  font-style: italic;
  color: var(--gold);
  font-size: 5.2em;
  line-height: 0.78;
  float: left;
  padding-right: 14px;
  padding-top: 8px;
  padding-left: 0;
}

/* ━━━━━━━━━━━ LAYOUT ━━━━━━━━━━━ */
.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding-inline: var(--gutter); min-width: 0; }
.section { padding-block: clamp(80px, 11vw, 160px); position: relative; overflow-x: clip; }
.section--paper { background: var(--paper); color: var(--ink); }
.section--paper .eyebrow { color: var(--crimson); }
.section--paper .serif-it { color: var(--crimson); }
.section--ink { background: var(--ink); color: var(--ivory); }
.section--cream { background: var(--cream); color: var(--ink); }
.section--cream .eyebrow { color: var(--crimson); }
.section--cream .serif-it { color: var(--gold-deep); }

/* Vertical wordmark — signature element */
.vmark {
  position: absolute;
  left: clamp(8px, 1.6vw, 24px);
  top: clamp(60px, 12vw, 140px);
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.6em;
  text-transform: uppercase;
  color: var(--gold);
  opacity: 0.6;
}
.section--paper .vmark, .section--cream .vmark { color: var(--crimson); opacity: 0.5; }
@media (max-width: 768px) { .vmark { display: none; } }

/* ━━━━━━━━━━━ NAV ━━━━━━━━━━━ */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 60;
  padding: 18px var(--gutter);
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 32px;
  transition: background 0.4s var(--ease), padding 0.4s var(--ease), border-color 0.4s var(--ease);
  background: linear-gradient(180deg, rgba(15,27,46,0.92), rgba(15,27,46,0));
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  background: rgba(15,27,46,0.85);
  backdrop-filter: saturate(180%) blur(18px);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  padding-block: 12px;
  border-bottom-color: var(--navy-hairline);
}
.nav__brand { display: flex; align-items: center; gap: 14px; }
.nav__crest { width: auto; height: 46px; flex-shrink: 0; object-fit: contain; display: block; filter: drop-shadow(0 2px 8px rgba(0,0,0,0.35)); }
.foot__brand .nav__crest { height: 54px; }
.nav__word { display: flex; flex-direction: column; line-height: 1; gap: 4px; }
.nav__word b { font-family: var(--display); font-weight: 500; font-size: 21px; letter-spacing: 0.04em; color: var(--ivory); }
.nav__word small { font-family: var(--mono); font-size: 9px; letter-spacing: 0.34em; text-transform: uppercase; color: var(--gold); }

.nav__links { display: flex; justify-content: center; gap: 36px; }
.nav__links a {
  font-family: var(--body);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ivory);
  position: relative;
  padding: 8px 0;
  transition: color 0.3s var(--ease);
}
.nav__links a::before {
  content: ''; position: absolute; left: 50%; right: 50%; bottom: 2px;
  height: 1px; background: var(--gold);
  transition: left 0.35s var(--ease), right 0.35s var(--ease);
}
.nav__links a:hover, .nav__links a.on { color: var(--gold-hi); }
.nav__links a:hover::before, .nav__links a.on::before { left: 0; right: 0; }

.nav__call {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 12px 22px;
  border: 1px solid var(--gold);
  color: var(--gold-hi);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  background: transparent;
  transition: all 0.3s var(--ease);
}
.nav__call:hover { background: var(--gold); color: var(--navy); border-color: var(--gold); }

.nav__hamb { display: none; padding: 8px; }
.nav__hamb svg { width: 26px; height: 26px; stroke: var(--ivory); }

@media (max-width: 1024px) {
  .nav__links, .nav__call { display: none; }
  .nav__hamb { display: inline-flex; }
  .nav { grid-template-columns: 1fr auto; }
}

/* Mobile menu */
.mmenu {
  position: fixed; inset: 0; z-index: 70;
  background: var(--navy);
  padding: 100px var(--gutter) 40px;
  transform: translateY(-101%);
  transition: transform 0.55s var(--ease-q);
  display: flex; flex-direction: column;
}
.mmenu.open { transform: translateY(0); }
.mmenu__x { position: absolute; top: 24px; right: var(--gutter); padding: 8px; }
.mmenu__x svg { width: 26px; height: 26px; stroke: var(--ivory); }
.mmenu__list { display: flex; flex-direction: column; gap: 4px; margin-top: 16px; }
.mmenu__list a {
  display: grid; grid-template-columns: 36px 1fr; align-items: baseline; gap: 16px;
  padding: 18px 0; border-bottom: 1px solid var(--navy-hairline);
  font-family: var(--display); font-size: 36px; font-weight: 400; color: var(--ivory);
}
.mmenu__list a span:first-child {
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.32em;
  color: var(--gold); align-self: center;
}
.mmenu__foot { margin-top: auto; padding-top: 24px; border-top: 1px solid var(--navy-hairline); font-family: var(--mono); font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--mute); display: flex; flex-direction: column; gap: 4px; }
.mmenu__foot a { color: var(--gold); }

/* ━━━━━━━━━━━ BUTTONS ━━━━━━━━━━━ */
.btn {
  display: inline-flex; align-items: center; gap: 14px;
  padding: 17px 34px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-weight: 500;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.32s var(--ease);
  white-space: nowrap;
}
.btn--primary { background: var(--crimson); color: var(--ivory); }
.btn--primary:hover { background: var(--crimson-hi); transform: translateY(-2px); box-shadow: 0 8px 24px -8px rgba(168, 32, 26, 0.6); }
.btn--gold { background: var(--gold); color: var(--navy); }
.btn--gold:hover { background: var(--gold-hi); }
.btn--ghost { background: transparent; border-color: var(--gold); color: var(--gold-hi); }
.btn--ghost:hover { background: var(--gold); color: var(--navy); }
.btn--ink { background: var(--ink); color: var(--ivory); }
.btn--ink:hover { background: #000; }
.btn .arrow { width: 12px; height: 12px; transition: transform 0.3s var(--ease); }
.btn:hover .arrow { transform: translateX(5px); }

/* ━━━━━━━━━━━ GG CREST (SVG decoration) ━━━━━━━━━━━ */
.crest {
  display: inline-block;
  width: 80px;
  height: 80px;
  color: var(--gold);
}
.crest--watermark {
  position: absolute;
  width: 220px;
  height: 220px;
  opacity: 0.06;
  pointer-events: none;
}

/* ━━━━━━━━━━━ FOOTER ━━━━━━━━━━━ */
.foot {
  background: #060D18;
  color: var(--mute);
  padding-block: 110px 40px;
  border-top: 1px solid var(--navy-hairline);
  position: relative;
}
.foot .vmark { color: var(--gold); opacity: 0.4; }
.foot__top { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 56px; padding-bottom: 72px; border-bottom: 1px solid var(--navy-hairline); }
.foot__brand .nav__word b { font-size: 32px; }
.foot__lede { margin-top: 22px; max-width: 32ch; color: var(--mute); font-size: 14px; line-height: 1.7; }
.foot__lede .mal { color: var(--gold-hi); display: block; margin-top: 12px; font-size: 18px; }
.foot__col h5 { font-family: var(--mono); font-size: 11px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--gold); margin: 0 0 22px; font-weight: 500; }
.foot__col p, .foot__col a { font-size: 14px; line-height: 1.85; color: var(--mute); display: block; transition: color 0.25s var(--ease); }
.foot__col a:hover { color: var(--ivory); }
.foot__phone { color: var(--gold-hi) !important; font-family: var(--mono); font-size: 13px; letter-spacing: 0.06em; margin-top: 8px; }

.foot__bottom { display: flex; justify-content: space-between; align-items: center; padding-top: 32px; font-family: var(--mono); font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--mute-dark); }
.foot__bottom a { color: var(--mute-dark); }
.foot__bottom a:hover { color: var(--gold); }

@media (max-width: 1024px) {
  .foot__top { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .foot__top { grid-template-columns: 1fr; gap: 36px; }
  .foot__bottom { flex-direction: column; gap: 12px; text-align: center; }
}

/* ━━━━━━━━━━━ REVEAL ANIMATION (fallback-safe) ━━━━━━━━━━━ */
.reveal { transition: opacity 1s var(--ease), transform 1s var(--ease); }
.reveal--hidden { opacity: 0; transform: translateY(36px); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
  .reveal--hidden { opacity: 1; transform: none; }
}

/* ━━━━━━━━━━━ ANCHOR RULES ━━━━━━━━━━━ */
.rule { width: 100%; height: 1px; background: var(--navy-hairline); }
.section--paper .rule, .section--cream .rule { background: rgba(27, 27, 31, 0.18); }

/* Gold double-rule (signature divider) */
.rule-gold {
  display: flex; align-items: center; gap: 14px;
  margin-block: clamp(48px, 6vw, 80px);
}
.rule-gold::before, .rule-gold::after {
  content: ''; flex: 1; height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold) 30%, var(--gold) 70%, transparent);
}
.rule-gold__diamond { width: 8px; height: 8px; background: var(--gold); transform: rotate(45deg); flex-shrink: 0; }
.section--paper .rule-gold::before, .section--paper .rule-gold::after { background: linear-gradient(90deg, transparent, var(--crimson) 30%, var(--crimson) 70%, transparent); }
.section--paper .rule-gold__diamond { background: var(--crimson); }

/* ═══════════════════════════════════════════════
   PREMIUM MOTION LAYER
   ═══════════════════════════════════════════════ */

/* Nav auto-hide */
.nav { transition: background .4s var(--ease), padding .4s var(--ease), border-color .4s var(--ease), transform .5s var(--ease); }
.nav.nav--up { transform: translateY(-105%); }

/* Parallax media wrapper — keeps overflow clipped */
[data-parallax] { will-change: transform; }
.par-clip { overflow: hidden; }

/* Curtain reveal for images: gold sweep uncovers the image */
.curtain { position: relative; overflow: hidden; }
.curtain > img, .curtain > .curtain__inner { transform: scale(1.08); transition: transform 1.4s var(--ease); }
.curtain::after {
  content: ''; position: absolute; inset: 0; z-index: 3;
  background: var(--gold); transform-origin: bottom;
  transition: transform 1s var(--ease);
}
.curtain.reveal--hidden::after { transform: scaleY(1); }
.curtain:not(.reveal--hidden)::after { transform: scaleY(0); }
.curtain:not(.reveal--hidden) > img,
.curtain:not(.reveal--hidden) > .curtain__inner { transform: scale(1); }

/* Heading underline draw — apply via .draw on an element after the heading */
.draw { position: relative; display: inline-block; }
.draw::after {
  content: ''; position: absolute; left: 0; bottom: -0.12em; height: 2px; width: 100%;
  background: var(--gold); transform: scaleX(0); transform-origin: left;
  transition: transform .9s var(--ease) .15s;
}
.reveal:not(.reveal--hidden) .draw::after { transform: scaleX(1); }

/* Custom cursor (desktop). Native cursor hidden only when ours is active. */
.has-custom-cursor, .has-custom-cursor a, .has-custom-cursor button { cursor: none; }
.cursor-dot, .cursor-ring { position: fixed; top: 0; left: 0; pointer-events: none; z-index: 9999; border-radius: 50%; mix-blend-mode: difference; }
.cursor-dot { width: 6px; height: 6px; margin: -3px 0 0 -3px; background: var(--gold-hi); }
.cursor-ring { width: 36px; height: 36px; margin: -18px 0 0 -18px; border: 1px solid var(--gold); transition: width .25s var(--ease), height .25s var(--ease), margin .25s var(--ease), background .25s var(--ease); }
.cursor-ring--grow { width: 60px; height: 60px; margin: -30px 0 0 -30px; background: rgba(184,151,88,0.10); }
@media (max-width: 1024px) { .cursor-dot, .cursor-ring { display: none; } }

/* Card tilt smoothing */
[data-tilt] { transition: transform .35s var(--ease), background .3s var(--ease), border-color .3s var(--ease); transform-style: preserve-3d; }

/* ── Brand marquee (infinite, CSS only, pauses on hover) ── */
.ticker { overflow: hidden; border-block: 1px solid var(--navy-hairline); background: var(--navy-2); padding-block: 26px; }
.section--paper + .ticker, .ticker.ticker--paper { background: var(--cream); border-color: rgba(27,27,31,0.14); }
.ticker__row { display: inline-flex; white-space: nowrap; animation: ticker 42s linear infinite; }
.ticker:hover .ticker__row { animation-play-state: paused; }
.ticker__item {
  display: inline-flex; align-items: center; gap: 38px; padding-right: 38px;
  font-family: var(--display); font-style: italic; font-weight: 300;
  font-size: clamp(22px, 2.6vw, 38px); color: var(--gold);
}
.ticker--paper .ticker__item { color: var(--crimson); }
.ticker__item::after { content: '✦'; font-style: normal; font-size: 12px; color: var(--gold-deep); }
.ticker--paper .ticker__item::after { color: var(--crimson); }
@keyframes ticker { from { transform: translateX(0); } to { transform: translateX(-50%); } }

@media (prefers-reduced-motion: reduce) {
  .nav.nav--up { transform: none; }
  .ticker__row { animation: none; }
  .curtain::after { display: none; }
  .curtain > img, .curtain > .curtain__inner { transform: none; }
  .cursor-dot, .cursor-ring { display: none; }
}

/* Readability: muted text on LIGHT sections needs a darker tone (AA) */
.section--paper .stat__unit,
.section--paper .story__photo-cap,
.section--paper cite,
.section--paper .folio,
.section--cream .stat__unit,
.section--cream .story__photo-cap,
.dine-intro cite { color: #6A6A6F !important; }
