/* ==========================================================================
   OrchardTech Greenova — base.css
   Design tokens (design-guide.md §3, §4), reset, base typography, utilities
   ========================================================================== */

:root {
  /* Primary — Deep Evergreen */
  --green-950: #041F18;
  --green-900: #07291F;
  --green-800: #0C4A3C;
  --green-700: #12594A;
  --green-600: #1A6B59;
  --green-500: #23806A;

  /* Accent — Growth Emerald */
  --accent-500: #2ECC71;
  --accent-400: #43D97E;
  --accent-300: #7CE8A5;
  --accent-100: #E2F9EB;

  /* Premium — Warm Gold (IPO moments only) */
  --gold-500: #B8932A;
  --gold-400: #D4AF37;
  --gold-100: #F8F0D9;

  /* Neutrals — green-tinted, never pure grey */
  --ink-900: #0E1F1A;
  --ink-700: #31423C;
  --ink-500: #5C6B65;
  --ink-400: #83918B;

  /* Surfaces */
  --paper: #F6F9F7;
  --surface: #FFFFFF;
  --surface-2: #EDF3EF;
  --line: #DCE6E0;
  --line-strong: #C3D2CA;

  /* Semantic */
  --success: var(--accent-500);
  --warning: #D9A441;
  --danger: #C84F43;

  /* Type scale (fluid, §4.2) */
  --text-display: clamp(2.75rem, 6.5vw, 4.75rem);
  --text-h1: clamp(2.125rem, 4.5vw, 3.125rem);
  --text-h2: clamp(1.625rem, 3.2vw, 2.375rem);
  --text-h3: clamp(1.25rem, 2vw, 1.5625rem);
  --text-lead: clamp(1.125rem, 1.6vw, 1.3125rem);
  --text-body: 1.0625rem;
  --text-sm: 0.9375rem;
  --text-xs: 0.8125rem;

  /* Rhythm */
  --section-pad: clamp(72px, 9vw, 128px);
  --container: 1200px;
  --gutter: clamp(20px, 4vw, 48px);

  /* Fonts */
  --font-display: "Space Grotesk", "Inter", "Noto Sans HK", "Noto Sans SC", system-ui, sans-serif;
  --font-body: "Inter", "Noto Sans HK", "Noto Sans SC", system-ui, "PingFang HK", "PingFang SC", "Microsoft JhengHei", "Microsoft YaHei", sans-serif;
  --font-zh: "Noto Sans HK", "Noto Sans SC", "PingFang HK", "PingFang SC", "Microsoft JhengHei", "Microsoft YaHei", sans-serif;
  --font-zh-display: "Noto Serif HK", "Noto Serif SC", "Songti TC", "Songti SC", "PMingLiU", serif;
  --font-quote: "Source Serif 4", "Noto Serif HK", "Noto Serif SC", Georgia, serif;

  /* Motion */
  --ease-out: cubic-bezier(.22, 1, .36, 1);
  --dur-micro: 180ms;
  --dur-reveal: 700ms;

  /* Shared recipes (§3.2) */
  --grad-accent: linear-gradient(90deg, #2ECC71, #1A6B59);
  --grad-gold: linear-gradient(120deg, #D4AF37, #B8932A);
  --grad-dark-band: linear-gradient(180deg, #07291F, #0C4A3C);
  --hairline-top: linear-gradient(135deg, rgba(12, 74, 60, .5), rgba(255, 255, 255, 0) 40%);
  --shadow-card: 0 24px 48px -12px rgba(6, 42, 34, .14);
  --glow-accent: 0 12px 28px rgba(46, 204, 113, .35);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html {
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
  -webkit-text-size-adjust: 100%;
}
body {
  font-family: var(--font-body);
  font-size: var(--text-body);
  line-height: 1.75;
  color: var(--ink-700);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
}
img, svg, video { display: block; max-width: 100%; }
input, button, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; }
a { color: var(--green-700); text-decoration: none; }
ul, ol { padding: 0; list-style: none; }
strong { font-weight: 700; color: var(--ink-900); }

/* ---------- Headings ---------- */
h1, h2, h3, h4 { color: var(--ink-900); font-weight: 700; }
:lang(zh), :lang(zh-HK) h1, :lang(zh-HK) h2, :lang(zh-HK) h3 { letter-spacing: 0; }

.display-en {
  font-family: var(--font-display);
  letter-spacing: -0.03em;
  line-height: 1.08;
}
html[lang="en"] h1, html[lang="en"] h2, html[lang="en"] .en-head {
  font-family: var(--font-display);
  letter-spacing: -0.025em;
  line-height: 1.12;
}
/* CJK display heads: Noto Serif HK/SC — editorial, consulting-grade voice */
html[lang^="zh"] h1, html[lang^="zh"] h2 {
  font-family: var(--font-zh-display);
  line-height: 1.22;
  letter-spacing: .015em;
}
html[lang^="zh"] h3 { font-family: var(--font-zh); line-height: 1.3; }
html[lang^="zh"] h1 { font-weight: 900; }

.quote {
  font-family: var(--font-quote);
  font-style: italic;
}
html[lang^="zh"] .quote { font-style: normal; font-weight: 600; }
.num { font-variant-numeric: tabular-nums; }

p { max-width: 68ch; }

/* ---------- Utilities ---------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.section { padding-block: var(--section-pad); }
.section--tight { padding-block: clamp(48px, 6vw, 64px); }
.section--surface { background: var(--surface-2); }

/* Dark band (pattern B) */
.band-dark {
  position: relative;
  background: var(--grad-dark-band);
  color: #DDEAE3;
  overflow: hidden;
}
.band-dark::before {
  content: "";
  position: absolute; inset: 0;
  background: radial-gradient(700px 420px at 85% 0%, rgba(46, 204, 113, .22), transparent 70%);
  pointer-events: none;
}
.band-dark > * { position: relative; }
.band-dark h1, .band-dark h2, .band-dark h3, .band-dark h4 { color: #F6F9F7; }
.band-dark p { color: #B9CCC4; }

/* Eyebrow kicker (§4.3, §6.1) */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-500);
  margin-bottom: 18px;
}
html[lang^="zh"] .eyebrow { letter-spacing: 0.08em; text-transform: none; }
.eyebrow::before {
  content: "";
  width: 28px; height: 2px;
  background: var(--grad-accent);
  flex: none;
}
.eyebrow--center { justify-content: center; }
.band-dark .eyebrow { color: var(--accent-300); }

.section-title { font-size: var(--text-h2); margin-bottom: 20px; }
.section-lead {
  font-size: var(--text-lead);
  color: var(--ink-500);
  max-width: 640px;
  line-height: 1.65;
}
.band-dark .section-lead { color: #A9C3B9; }
.section-head--center { text-align: center; }
.section-head--center .section-lead { margin-inline: auto; }

/* Gold IPO badge (§6.7) */
.ipo-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  border-radius: 999px;
  background: var(--grad-gold);
  color: var(--green-950);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: .04em;
  white-space: nowrap;
}
.ipo-badge .diamond { font-size: .85em; }

/* Scroll reveal (§8) */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity var(--dur-reveal) var(--ease-out),
              transform var(--dur-reveal) var(--ease-out);
  transition-delay: var(--reveal-delay, 0ms);
}
.reveal.is-visible { opacity: 1; transform: none; }

.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
[hidden] { display: none !important; }

.skip-link {
  position: absolute; top: 12px; left: 16px; z-index: 300;
  background: var(--green-900); color: #fff;
  padding: 10px 18px; border-radius: 8px;
  transform: translateY(calc(-100% - 16px));
  transition: transform var(--dur-micro) ease-out;
}
.skip-link:focus { transform: none; color: #fff; }

/* Focus rings (§10) */
:focus-visible {
  outline: 3px solid rgba(46, 204, 113, .55);
  outline-offset: 2px;
  border-radius: 4px;
}
.band-dark :focus-visible, .site-footer :focus-visible, .mobile-menu :focus-visible {
  outline-color: rgba(124, 232, 165, .7);
}

/* Selection */
::selection { background: rgba(46, 204, 113, .28); color: var(--ink-900); }

/* Reduced motion (§8) */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  .reveal { opacity: 1; transform: none; }
}
