/* =============================================================================
   TKM Chennai: bespoke editorial + motion layer
   Sits on top of the shared UI-Kit (output.css). Reads the kit's design tokens
   (--primary #004C31 evergreen, --gold #b4a057). "Quiet institutional luxury":
   evergreen-dominant, gold used only for hairline rules and emphasis, warm
   ivory paper neutrals, Geist at editorial scale, generous negative space.
   ALL motion is gated behind prefers-reduced-motion at the bottom of the file.
   ============================================================================= */

:root {
  --site-header-h: 5rem;
  --paper: #f6f4ee;          /* warm ivory page neutral */
  --paper-deep: #efebe1;     /* slightly deeper paper for alternating bands */
  --ink: #1c1c1a;
  --evergreen: var(--primary);
  --evergreen-deep: #003B26;
  --gold-line: #b4a057;
  --shell-max: 80rem;
}

html { -webkit-text-size-adjust: 100%; }
body { font-family: var(--font-sans); background: var(--paper); color: var(--ink); }

/* Container ----------------------------------------------------------------- */
.site-shell {
  width: 100%;
  max-width: var(--shell-max);
  margin-inline: auto;
  padding-inline: 1.25rem;
}
@media (min-width: 768px) { .site-shell { padding-inline: 2rem; } }
@media (min-width: 1280px) { .site-shell { padding-inline: 2.5rem; } }

/* Skip link ----------------------------------------------------------------- */
.skip-link {
  position: fixed; top: 0.5rem; left: 0.5rem; z-index: 100;
  transform: translateY(-150%);
  background: var(--evergreen); color: #fff;
  padding: 0.6rem 1rem; border-radius: 0.5rem; font-weight: 600;
}
.skip-link:focus { transform: translateY(0); outline: 2px solid var(--gold-line); }

/* Editorial type ------------------------------------------------------------ */
.eyebrow {
  display: inline-flex; align-items: center; gap: 0.6rem;
  font-size: 0.75rem; font-weight: 600; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--gold-line);
}
.eyebrow::before {
  content: ""; width: 2rem; height: 1px; background: currentColor; opacity: 0.85;
}
.display {
  font-weight: 600; line-height: 1.04; letter-spacing: -0.02em;
  font-size: clamp(2.4rem, 6vw, 4.5rem);
}
.headline {
  font-weight: 600; line-height: 1.1; letter-spacing: -0.015em;
  font-size: clamp(1.9rem, 3.6vw, 2.9rem);
}
.lede { font-size: clamp(1.05rem, 1.6vw, 1.25rem); line-height: 1.7; }

/* Hairline rules (letterpress-style gold) ----------------------------------- */
.rule-gold {
  height: 1px; border: 0;
  background: linear-gradient(90deg, transparent, var(--gold-line) 12%, var(--gold-line) 88%, transparent);
  opacity: 0.7;
}
.site-rule-gold { height: 1px; background: rgba(180, 160, 87, 0.35); }

/* Header -------------------------------------------------------------------- */
.site-header {
  position: fixed; inset-inline: 0; top: 0; z-index: 50;
  transition: background-color .35s ease, box-shadow .35s ease, border-color .35s ease;
  border-bottom: 1px solid transparent;
}
.site-header.is-transparent { background: transparent; }
.site-header.is-solid {
  background: rgba(246, 244, 238, 0.92);
  -webkit-backdrop-filter: saturate(120%) blur(10px);
  backdrop-filter: saturate(120%) blur(10px);
  border-bottom-color: rgba(180, 160, 87, 0.35);
  box-shadow: 0 1px 24px rgba(0, 0, 0, 0.05);
}
.site-header-spacer { height: var(--site-header-h); }
.site-logo { height: 2.6rem; width: auto; display: block; }
.site-wordmark {
  font-weight: 600; letter-spacing: -0.01em; font-size: 1.05rem;
  transition: color .35s ease;
}
@media (max-width: 480px) { .site-wordmark { display: none; } }

.site-nav-link {
  position: relative; font-size: 0.95rem; font-weight: 500; padding-block: 0.25rem;
  transition: color .2s ease;
}
.site-nav-link.on-dark { color: rgba(255, 255, 255, 0.86); }
.site-nav-link.on-light { color: #34433d; }
.site-nav-link::after {
  content: ""; position: absolute; left: 0; bottom: -2px; height: 1.5px; width: 0;
  background: var(--gold-line); transition: width .25s ease;
}
.site-nav-link:hover::after,
.site-nav-link.is-active::after { width: 100%; }
.site-nav-link.on-dark:hover { color: #fff; }
.site-nav-link.on-light:hover { color: var(--evergreen); }
.site-nav-link.is-active { color: var(--gold-line); }

/* Buttons ------------------------------------------------------------------- */
.btn-gold, .btn-primary-ever, .btn-ghost-light {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.7rem 1.25rem; border-radius: 0.5rem;
  font-size: 0.95rem; font-weight: 600; line-height: 1;
  transition: background-color .2s ease, color .2s ease, border-color .2s ease, transform .2s ease;
}
.btn-gold {
  background: var(--gold-line); color: #1c1606;
  box-shadow: 0 1px 0 rgba(255,255,255,0.25) inset;
}
.btn-gold:hover { background: #c4b06a; }
.btn-primary-ever { background: var(--evergreen); color: #fff; }
.btn-primary-ever:hover { background: var(--evergreen-deep); }
.btn-ghost-light {
  background: transparent; color: #fff; border: 1px solid rgba(255,255,255,0.55);
}
.btn-ghost-light:hover { background: rgba(255,255,255,0.12); border-color: #fff; }
.btn-gold:focus-visible, .btn-primary-ever:focus-visible, .btn-ghost-light:focus-visible,
.site-nav-link:focus-visible, .site-footer-link:focus-visible {
  outline: 2px solid var(--gold-line); outline-offset: 3px; border-radius: 0.35rem;
}

/* Mobile drawer ------------------------------------------------------------- */
.site-burger { display: inline-flex; padding: 0.5rem; border-radius: 0.5rem; }
.site-burger.on-dark { color: #fff; }
.site-burger.on-light { color: var(--evergreen); }
@media (min-width: 768px) { .site-burger { display: none !important; } }
.site-drawer {
  position: fixed; inset: var(--site-header-h) 0 0 0; z-index: 49;
  background: rgba(0, 59, 38, 0.55);
}
.site-drawer-panel {
  background: var(--paper); padding: 1.5rem 1.25rem 2rem;
  display: flex; flex-direction: column; gap: 0.25rem;
  border-bottom: 1px solid rgba(180,160,87,0.35);
}
.site-drawer-link {
  padding: 0.85rem 0.5rem; font-size: 1.05rem; font-weight: 500; color: #2a352f;
  border-bottom: 1px solid rgba(0,0,0,0.06);
}
.site-drawer-link.is-active { color: var(--gold-line); }

/* Hero ---------------------------------------------------------------------- */
.hero { position: relative; min-height: 100svh; overflow: hidden; display: flex; }
.hero-media { position: absolute; inset: -8% 0 0 0; z-index: 0; }
.hero-media img {
  width: 100%; height: 116%; object-fit: cover; object-position: center;
  will-change: transform;
}
.hero-overlay {
  position: absolute; inset: 0; z-index: 1;
  background:
    linear-gradient(180deg, rgba(0,59,38,0.55) 0%, rgba(0,59,38,0.35) 35%, rgba(0,59,38,0.78) 100%),
    linear-gradient(90deg, rgba(0,40,26,0.55), rgba(0,40,26,0.15));
}
.hero-inner {
  position: relative; z-index: 2; align-self: center; width: 100%;
  padding-top: var(--site-header-h);
}
.hero h1 { color: #fff; max-width: 16ch; }
.hero .lede { color: rgba(255,255,255,0.85); max-width: 46ch; }

/* Gold seal / monogram motif */
.seal { width: clamp(7rem, 11vw, 10rem); height: auto; }
.seal-ring { fill: none; stroke: var(--gold-line); }

/* Bands --------------------------------------------------------------------- */
.band { padding-block: clamp(4rem, 8vw, 7rem); }
.band-paper { background: var(--paper); }
.band-paper-deep { background: var(--paper-deep); }
.band-evergreen { background: var(--evergreen); color: #fff; }
.band-evergreen .eyebrow { color: #d8c98a; }

/* Feature band (portal-managed) */
.feature-panel { position: relative; min-height: 26rem; overflow: hidden; border-radius: 1rem; display: flex; }
.feature-bg { position: absolute; inset: 0; z-index: 0; }
.feature-bg img {
  width: 100%; height: 100%; object-fit: cover;
  transform: scale(1.06);
  transition: transform 1.1s cubic-bezier(.22,.61,.36,1);
}
.feature-panel.is-visible .feature-bg img { transform: scale(1); }
.feature-overlay {
  position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(90deg, rgba(0,59,38,0.92) 0%, rgba(0,59,38,0.7) 55%, rgba(0,59,38,0.45) 100%);
}
.feature-inner { position: relative; z-index: 2; align-self: center; padding: clamp(2rem,4vw,3.5rem); color: #fff; max-width: 40rem; }

/* Identity strip */
.identity-quote { font-size: clamp(1.4rem, 2.8vw, 2.1rem); line-height: 1.45; letter-spacing: -0.01em; }

/* Impact band (count-up) */
.stat-num { font-size: clamp(2.6rem, 5vw, 3.8rem); font-weight: 600; line-height: 1; color: var(--gold-line); letter-spacing: -0.02em; }
.stat-label { margin-top: 0.6rem; font-size: 0.95rem; color: rgba(255,255,255,0.72); }

/* Khidmat cards */
.khidmat-card {
  background: #fff; border: 1px solid rgba(0,0,0,0.07); border-radius: 0.9rem;
  overflow: hidden; display: flex; flex-direction: column;
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.khidmat-card:hover { transform: translateY(-4px); box-shadow: 0 18px 40px rgba(0,59,38,0.12); border-color: rgba(180,160,87,0.5); }
.khidmat-media { aspect-ratio: 4 / 3; overflow: hidden; background: var(--paper-deep); }
/* Reveal-zoom: image starts gently scaled-in, settles when its card enters view. */
.khidmat-media img {
  width: 100%; height: 100%; object-fit: cover;
  transform: scale(1.08);
  transition: transform .9s cubic-bezier(.22,.61,.36,1);
}
.khidmat-card.is-visible .khidmat-media img { transform: scale(1); }
.khidmat-card:hover .khidmat-media img { transform: scale(1.05); }
.khidmat-year {
  display: inline-block; font-size: 0.72rem; font-weight: 600; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--gold-line);
}

/* Quote / aspiration band over gold */
.band-gold { background: linear-gradient(135deg, #b4a057 0%, #c8b772 50%, #a8934a 100%); color: #1c1606; }
.aspiration { font-size: clamp(1.6rem, 3.4vw, 2.6rem); line-height: 1.35; font-weight: 500; letter-spacing: -0.01em; max-width: 30ch; }

/* Footer -------------------------------------------------------------------- */
.site-footer { background: var(--evergreen-deep); color: #fff; }
.site-footer-head { font-size: 0.8rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--gold-line); }
.site-footer-link { color: rgba(255,255,255,0.78); transition: color .2s ease; }
.site-footer-link:hover { color: #fff; }

/* Map embed (contact) ------------------------------------------------------- */
.map-embed {
  position: relative; width: 100%; aspect-ratio: 4 / 3;
  border-radius: 0.9rem; overflow: hidden;
  border: 1px solid rgba(0,0,0,0.1); background: var(--paper-deep);
}
.map-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
@media (min-width: 768px) { .map-embed { aspect-ratio: 3 / 2; height: 100%; } }

/* Prose (privacy / terms) --------------------------------------------------- */
.prose-block { max-width: 46rem; }
.prose-block h2 { font-size: 1.4rem; font-weight: 600; margin-top: 2.5rem; margin-bottom: 0.75rem; color: var(--evergreen); letter-spacing: -0.01em; }
.prose-block p { line-height: 1.75; margin-bottom: 1rem; color: #3a423d; }
.prose-block ul { list-style: disc; padding-left: 1.4rem; margin-bottom: 1rem; line-height: 1.75; color: #3a423d; }
.prose-block li { margin-bottom: 0.4rem; }

/* =============================================================================
   MOTION: scroll reveals, hero entrance, parallax, count-up.
   Everything below is opt-in and fully disabled under reduced-motion.
   ============================================================================= */
/* Scroll-progress indicator (gold hairline, driven by scaleX in site.js) */
.scroll-progress {
  position: fixed; inset: 0 0 auto 0; height: 3px; z-index: 60;
  background: transparent; pointer-events: none;
}
.scroll-progress-bar {
  display: block; height: 100%; width: 100%;
  transform: scaleX(0); transform-origin: left center;
  background: linear-gradient(90deg, var(--gold-line), #c8b772);
}

.reveal { opacity: 0; transform: translateY(28px); transition: opacity .7s ease, transform .7s cubic-bezier(.22,.61,.36,1); }
.reveal.is-visible { opacity: 1; transform: none; }
.reveal[data-delay="1"] { transition-delay: .08s; }
.reveal[data-delay="2"] { transition-delay: .16s; }
.reveal[data-delay="3"] { transition-delay: .24s; }
.reveal[data-delay="4"] { transition-delay: .32s; }
.reveal[data-delay="5"] { transition-delay: .40s; }

.hero-enter { opacity: 0; transform: translateY(18px); }
.hero-ready .hero-enter { opacity: 1; transform: none; transition: opacity 1s ease .15s, transform 1s ease .15s; }
.hero-ready .hero-enter[data-delay="1"] { transition-delay: .35s; }
.hero-ready .hero-enter[data-delay="2"] { transition-delay: .55s; }
.hero-ready .hero-enter[data-delay="3"] { transition-delay: .75s; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal, .hero-enter,
  .site-header, .khidmat-card, .khidmat-media img,
  .btn-gold, .btn-primary-ever, .btn-ghost-light, .site-nav-link::after {
    transition: none !important;
  }
  .reveal { opacity: 1; transform: none; }
  .hero-enter { opacity: 1; transform: none; }
  .hero-media img,
  .khidmat-media img,
  .feature-bg img,
  [data-parallax] { transform: none !important; }
  .scroll-progress { display: none; }
}
