/* KDH Club Munnar — shared design tokens & primitives (CLAUDE.md §3)
   Used by all three prototype variants. */

:root {
  --tea-950: #0B211B;
  --tea-900: #0F2A22;
  --tea-700: #1D4436;
  --tea-500: #3E6450;
  --mist-100: #DCE3D6;
  --mist-200: #C9D3CC;
  --ivory-50: #FBF8F1;
  --ivory-100: #F4EFE4;
  --sand-200: #E9E1D0;
  --line: #D8CEB9;
  --brass-500: #B8935A;
  --brass-300: #E3C78F;
  --brass-700: #8A6A35;
  --ink-600: #3A4A42;
  --ink-500: #6B5A3A;

  --font-display: "Cormorant Garamond", "Cormorant", Georgia, "Times New Roman", serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --ease: cubic-bezier(.2, .7, .2, 1);
  --ease-cine: cubic-bezier(.65, 0, .2, 1);

  --container: 1240px;
  --container-wide: 1320px;
  --gutter: 40px;
  --section-y: 120px;
  --nav-h: 84px;
}

@media (max-width: 760px) {
  :root { --gutter: 20px; --section-y: 72px; --nav-h: 68px; }
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--nav-h) + 12px); }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: clamp(16px, .25vw + 15px, 18px);
  line-height: 1.7;
  color: var(--ink-600);
  background: var(--ivory-100);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, svg, video { display: block; max-width: 100%; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 500; line-height: 1.05; margin: 0; color: var(--tea-900); letter-spacing: -.01em; }
p { margin: 0 0 1em; }
:focus-visible { outline: 2px solid var(--brass-500); outline-offset: 3px; }
.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.skip-link {
  position: absolute; left: 16px; top: -60px; z-index: 1000;
  background: var(--brass-500); color: var(--tea-900); padding: 12px 18px; text-decoration: none; font-weight: 600;
}
.skip-link:focus { top: 16px; }

/* ---------- type scale ---------- */
.h1 { font-size: clamp(52px, 7.2vw, 112px); line-height: .98; font-weight: 500; }
.h2 { font-size: clamp(40px, 4vw, 58px); line-height: 1.04; }
.h3 { font-size: clamp(26px, 2.2vw, 36px); line-height: 1.1; }
.h1 em, .h2 em, .h3 em { font-style: italic; font-weight: 400; }
.on-dark { color: var(--mist-100); }
.on-dark h1, .on-dark h2, .on-dark h3, .on-dark .h1, .on-dark .h2, .on-dark .h3 { color: var(--ivory-50); }
.on-dark em { color: var(--brass-300); }
.lead { font-size: clamp(17px, .5vw + 15px, 20px); line-height: 1.7; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 14px;
  font-family: var(--font-body); font-size: 12px; font-weight: 600;
  letter-spacing: .32em; text-transform: uppercase; color: var(--brass-700);
}
.on-dark .eyebrow { color: var(--brass-300); }
.eyebrow::before { content: ""; width: 36px; height: 1px; background: currentColor; transform-origin: left; }

/* ---------- layout ---------- */
.container { width: min(100% - var(--gutter) * 2, var(--container)); margin-inline: auto; }
.container-wide { width: min(100% - var(--gutter) * 2, var(--container-wide)); margin-inline: auto; }
.section { padding-block: var(--section-y); }

/* ---------- buttons ---------- */
.btn {
  --bg: var(--brass-500); --fg: var(--tea-900); --bd: var(--brass-500);
  display: inline-flex; align-items: center; justify-content: center; gap: 12px;
  min-height: 52px; padding: 0 28px; border-radius: 2px; border: 1px solid var(--bd);
  background: var(--bg); color: var(--fg); text-decoration: none; cursor: pointer;
  font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
  transition: transform .35s var(--ease), box-shadow .35s var(--ease), background-color .3s, color .3s;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 12px 24px -12px rgba(11, 33, 27, .45); }
.btn:active { transform: translateY(0); }
.btn--dark { --bg: var(--tea-900); --fg: var(--ivory-50); --bd: var(--tea-900); }
.btn--ghost { --bg: transparent; --fg: var(--ivory-50); --bd: rgba(251, 248, 241, .6); }
.btn--ghost:hover { --bg: rgba(251, 248, 241, .08); }
.btn--outline { --bg: transparent; --fg: var(--tea-900); --bd: var(--tea-900); }
.btn svg { width: 18px; height: 18px; }

.arrow-link {
  display: inline-flex; align-items: center; gap: 10px; min-height: 44px;
  font-size: 13px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase;
  text-decoration: none; color: var(--tea-900); transition: gap .4s var(--ease);
}
.on-dark .arrow-link { color: var(--brass-300); }
.arrow-link:hover { gap: 18px; }
.arrow-link svg { width: 18px; height: 18px; }

/* ---------- icons ---------- */
.icon { width: 24px; height: 24px; stroke: currentColor; stroke-width: 1.5; fill: none; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* ---------- placeholder imagery (until client photos arrive) ---------- */
.ph { position: relative; overflow: hidden; background: var(--tea-700); }
.ph > img, .ph > svg { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease); }
.ph__label {
  position: absolute; left: 12px; bottom: 12px; z-index: 2;
  font-size: 10px; letter-spacing: .14em; text-transform: uppercase; font-weight: 600;
  padding: 5px 8px; background: rgba(11, 33, 27, .78); color: var(--mist-100);
}

/* ---------- forms ---------- */
.field { display: grid; gap: 8px; }
.field label, .field .label { font-size: 12px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-500); }
.on-dark .field label, .on-dark .field .label { color: var(--brass-300); }
.input, .select, .textarea {
  width: 100%; min-height: 52px; padding: 14px 16px; border-radius: 2px;
  border: 1px solid var(--line); background: var(--ivory-50); color: var(--tea-900);
  transition: border-color .25s, box-shadow .25s;
}
.textarea { min-height: 120px; resize: vertical; }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--brass-500); box-shadow: 0 0 0 3px rgba(184, 147, 90, .25); }
.input[aria-invalid="true"], .select[aria-invalid="true"], .textarea[aria-invalid="true"] { border-color: #A3402F; }
.field__error { font-size: 13px; color: #A3402F; min-height: 0; }
.on-dark .field__error { color: #F2B8A8; }
.check { display: flex; gap: 12px; align-items: flex-start; font-size: 14px; }
.check input { width: 20px; height: 20px; margin-top: 3px; accent-color: var(--brass-500); flex: none; }
.hp { position: absolute; left: -9999px; }

.stepper { display: inline-flex; align-items: center; border: 1px solid var(--line); background: var(--ivory-50); border-radius: 2px; }
.stepper button { width: 44px; height: 50px; border: 0; background: none; cursor: pointer; font-size: 20px; color: var(--tea-900); }
.stepper button:disabled { opacity: .3; cursor: not-allowed; }
.stepper output { min-width: 28px; text-align: center; font-weight: 600; color: var(--tea-900); }

/* ---------- enquiry result panel ---------- */
.enquiry-result { display: none; padding: 28px; border: 1px solid var(--brass-500); background: rgba(184, 147, 90, .08); }
.enquiry-result.is-visible { display: block; animation: fadeUp .8s var(--ease) both; }
.enquiry-result .btn-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 16px; }
.enquiry-result pre { white-space: pre-wrap; font-family: var(--font-body); font-size: 14px; background: var(--ivory-50); color: var(--ink-600); padding: 14px; border: 1px solid var(--line); max-height: 200px; overflow: auto; }

.tbc { background: rgba(184, 147, 90, .18); padding: 0 .3em; border-radius: 2px; font-style: normal; white-space: nowrap; }

/* ---------- reveal system (only hides when JS is running) ---------- */
html.js [data-reveal] { opacity: 0; transform: translateY(28px); transition: opacity 1s var(--ease), transform 1s var(--ease); transition-delay: var(--d, 0s); }
html.js [data-reveal].is-in { opacity: 1; transform: none; }
html.js [data-reveal="fade"] { transform: none; }
html.js [data-reveal="wipe"] { opacity: 1; transform: none; clip-path: inset(0 100% 0 0); transition: clip-path 1.4s var(--ease-cine); transition-delay: var(--d, 0s); }
html.js [data-reveal="wipe"].is-in { clip-path: inset(0 0 0 0); }
html.js [data-reveal="wipe-up"] { opacity: 1; transform: none; clip-path: inset(100% 0 0 0); transition: clip-path 1.4s var(--ease-cine); transition-delay: var(--d, 0s); }
html.js [data-reveal="wipe-up"].is-in { clip-path: inset(0 0 0 0); }

@keyframes fadeUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: none; } }
@keyframes drift { from { transform: translateX(-8%); } to { transform: translateX(8%); } }
@keyframes pulse { 0% { transform: scale(.6); opacity: .8; } 100% { transform: scale(2.6); opacity: 0; } }
@keyframes marquee { to { transform: translateX(-50%); } }
@keyframes scrollDot { 0% { transform: translateY(0); opacity: 0; } 30% { opacity: 1; } 100% { transform: translateY(14px); opacity: 0; } }

/* ---------- toast ---------- */
.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 140%); z-index: 999; background: var(--tea-900); color: var(--ivory-50); padding: 14px 20px; font-size: 14px; transition: transform .5s var(--ease); }
.toast.is-visible { transform: translate(-50%, 0); }

/* ---------- reduced motion: kill all non-essential motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  html.js [data-reveal] { opacity: 1 !important; transform: none !important; clip-path: none !important; }
}
