/* Base reset + typography */

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--ff-body);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  color: var(--ink);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

img, svg, video { display: block; max-width: 100%; }
button { font: inherit; color: inherit; cursor: pointer; background: none; border: 0; padding: 0; }
a { color: inherit; text-decoration: none; }

::selection { background: var(--mint); color: var(--ink); }

/* Display & headings */
h1, h2, h3, h4, h5 {
  font-family: var(--ff-display);
  font-weight: 800;
  color: var(--sapin);
  margin: 0;
  letter-spacing: var(--tracking-tight);
  line-height: var(--lh-tight);
  text-wrap: balance;
}
h1 { font-size: var(--fs-h1); letter-spacing: var(--tracking-display); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); line-height: var(--lh-snug); }
h4 { font-size: var(--fs-h4); line-height: var(--lh-snug); }

p { margin: 0; text-wrap: pretty; }
p + p { margin-top: 1em; }

.display {
  font-family: var(--ff-display);
  font-weight: 900;
  font-size: var(--fs-display);
  line-height: var(--lh-tight);
  letter-spacing: var(--tracking-display);
  color: var(--sapin);
  margin: 0;
}

.eyebrow {
  font-family: var(--ff-display);
  font-weight: 700;
  font-size: var(--fs-eyebrow);
  letter-spacing: var(--tracking-eyebrow);
  text-transform: uppercase;
  color: var(--sapin);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.eyebrow::before {
  content: "";
  width: 24px;
  height: 1.5px;
  background: var(--mint);
  display: inline-block;
}
.eyebrow.on-dark { color: var(--mint); }
.eyebrow.on-dark::before { background: var(--mint); }

.lead {
  font-size: var(--fs-lead);
  line-height: 1.55;
  color: var(--ink-60);
  max-width: 56ch;
}
.muted { color: var(--ink-60); }

/* Layout */
.container {
  width: 100%;
  max-width: var(--maxw);
  padding-inline: var(--gutter);
  margin-inline: auto;
}
.section { padding-block: clamp(64px, 9vw, 128px); }
.section-tight { padding-block: clamp(48px, 6vw, 88px); }

.divider { height: 1px; background: var(--line); border: 0; margin: 0; }

/* Surfaces */
.surface-light { background: var(--light); }
.surface-dark  { background: var(--sapin); color: var(--white); }
.surface-dark h1, .surface-dark h2, .surface-dark h3, .surface-dark h4 { color: var(--white); }
.surface-dark .muted { color: rgba(255,255,255,0.65); }
.surface-dark .lead  { color: rgba(255,255,255,0.75); }

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 52px;
  padding: 0 22px;
  border-radius: var(--r-md);
  font-family: var(--ff-display);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: -0.005em;
  transition: transform var(--t-fast), background var(--t-fast), color var(--t-fast), box-shadow var(--t-fast);
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }

.btn-primary {
  background: var(--mint);
  color: var(--ink);
}
.btn-primary:hover {
  background: #00c97c;
  box-shadow: 0 10px 24px rgba(0,223,139,0.35);
}

.btn-secondary {
  background: transparent;
  color: var(--sapin);
  border: 1.5px solid var(--sapin);
}
.btn-secondary:hover { background: var(--sapin); color: var(--white); }

.btn-ghost {
  background: transparent;
  color: var(--sapin);
  padding: 0 4px;
}
.btn-ghost .arrow { transition: transform var(--t-fast); }
.btn-ghost:hover .arrow { transform: translateX(4px); }

.btn-on-dark.btn-secondary {
  color: var(--white);
  border-color: rgba(255,255,255,0.4);
}
.btn-on-dark.btn-secondary:hover { background: var(--white); color: var(--sapin); }

.btn-sm { height: 40px; padding: 0 16px; font-size: 14px; }

/* ===== Cards ===== */
.card {
  background: var(--white);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-card);
  padding: var(--s-6);
  transition: transform var(--t-base), box-shadow var(--t-base);
}
.card:hover { transform: translateY(-2px); box-shadow: var(--shadow-hover); }

.card-flat {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  padding: var(--s-6);
}

/* ===== Photo placeholders (subtle green gradients) ===== */
.photo {
  position: relative;
  border-radius: var(--r-xl);
  overflow: hidden;
  background:
    radial-gradient(120% 100% at 0% 0%, rgba(0,223,139,0.35) 0%, transparent 55%),
    radial-gradient(140% 100% at 100% 100%, rgba(0,69,66,0.95) 0%, rgba(0,69,66,0.6) 60%, transparent 100%),
    linear-gradient(135deg, #0a5a55 0%, #002522 100%);
  color: rgba(255,255,255,0.85);
  font-family: var(--ff-mono);
  font-size: 12px;
  letter-spacing: 0.05em;
  isolation: isolate;
}
.photo::after {
  /* film grain via subtle dots */
  content: "";
  position: absolute; inset: 0;
  background-image:
    radial-gradient(rgba(255,255,255,0.04) 1px, transparent 1px);
  background-size: 3px 3px;
  mix-blend-mode: overlay;
  opacity: .6;
  pointer-events: none;
}
.photo .photo-label {
  position: absolute;
  left: 16px; bottom: 14px;
  padding: 6px 10px;
  background: rgba(0,21,21,0.55);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 999px;
  backdrop-filter: blur(8px);
  font-size: 11px;
}
.photo .photo-tag {
  position: absolute;
  top: 16px; left: 16px;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--mint);
  font-family: var(--ff-mono);
}
.photo.tall { aspect-ratio: 3/4; }
.photo.square { aspect-ratio: 1; }
.photo.wide { aspect-ratio: 16/10; }
.photo.cine { aspect-ratio: 21/9; }

/* Photo variant — light */
.photo.light {
  background:
    radial-gradient(120% 100% at 20% 10%, rgba(0,223,139,0.30) 0%, transparent 60%),
    linear-gradient(160deg, #f1faf3 0%, #d9eee0 60%, #b6dcc5 100%);
  color: rgba(0,69,66,0.7);
}

/* Photo variant — soft mint */
.photo.mint {
  background:
    radial-gradient(120% 100% at 10% 0%, rgba(255,255,255,0.4) 0%, transparent 55%),
    linear-gradient(140deg, #00DF8B 0%, #00a76a 70%, #007a53 100%);
  color: rgba(0,21,21,0.7);
}

/* ===== Badge / pill ===== */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 28px;
  padding: 0 10px;
  border-radius: var(--r-pill);
  background: var(--mint-tint);
  color: var(--sapin);
  font-family: var(--ff-display);
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.02em;
}
.pill-dark { background: rgba(0,223,139,0.16); color: var(--mint); }
.pill .dot {
  width: 6px; height: 6px; border-radius: 50%; background: var(--mint);
}

/* ===== Mono caption ===== */
.mono {
  font-family: var(--ff-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--ink-60);
}

/* ===== Number marker ===== */
.num {
  font-family: var(--ff-display);
  font-weight: 700;
  font-size: 13px;
  color: var(--mint);
  letter-spacing: 0.04em;
}

/* ===== Inline icon wrapper ===== */
.icon-tile {
  width: 56px; height: 56px;
  display: grid; place-items: center;
  border-radius: var(--r-lg);
  background: var(--mint-tint);
  color: var(--sapin);
  flex-shrink: 0;
}
.icon-tile.on-dark { background: rgba(0,223,139,0.14); color: var(--mint); }

/* Utility */
.flex { display: flex; }
.flex-col { display: flex; flex-direction: column; }
.gap-2 { gap: var(--s-2); }
.gap-3 { gap: var(--s-3); }
.gap-4 { gap: var(--s-4); }
.gap-5 { gap: var(--s-5); }
.gap-6 { gap: var(--s-6); }
.gap-7 { gap: var(--s-7); }
.gap-8 { gap: var(--s-8); }
.center { display: grid; place-items: center; }
.text-center { text-align: center; }
.full { width: 100%; }
.cluster { display: flex; flex-wrap: wrap; gap: var(--s-4); align-items: center; }
.stack { display: flex; flex-direction: column; gap: var(--s-5); }
.stack-tight { display: flex; flex-direction: column; gap: var(--s-3); }
.stack-loose { display: flex; flex-direction: column; gap: var(--s-7); }
.grid { display: grid; gap: var(--s-6); }

/* Anchor scroll offset */
section[id] { scroll-margin-top: calc(var(--header-h) + 16px); }
