/* ==========================================================================
   CHERIKEY — design tokens + base
   Palette sampled from logo.jpeg
   ========================================================================== */

:root {
  /* Brand */
  --magenta:        #E52C78;
  --magenta-600:    #C81F63;
  --magenta-700:    #A81551;
  --magenta-100:    #FCE3ED;
  --magenta-050:    #FDF1F6;

  --pine:           #2F5D3A;
  --pine-700:       #234A2C;
  --pine-100:       #DCE9DC;
  --leaf:           #558754;

  --teal-ink:       #496E77;

  /* Surfaces */
  --cream:          #FEFBEA;
  --cream-200:      #F7F2DC;
  --paper:          #FFFFFF;
  --ink:            #1C2A2E;
  --ink-600:        #46585D;
  --ink-400:        #7A8A8E;
  --line:           #E7E2CE;
  --line-soft:      #F0EBD9;

  /* Status */
  --ok:             #2E7D53;
  --warn:           #B8860B;
  --danger:         #C62828;

  /* Type */
  --font-display: "Bricolage Grotesque", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-body:    "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;

  /* Space + shape */
  --r-sm: 8px;
  --r-md: 14px;
  --r-lg: 22px;
  --r-pill: 999px;
  --shadow-sm: 0 1px 2px rgba(28,42,46,.06), 0 2px 8px rgba(28,42,46,.05);
  --shadow-md: 0 4px 14px rgba(28,42,46,.08), 0 12px 32px rgba(28,42,46,.07);
  --shadow-lg: 0 18px 50px rgba(28,42,46,.14);
  --maxw: 1200px;
  --header-h: 68px;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
}

img, svg, video { max-width: 100%; display: block; }
/* Images carry width/height attributes so the browser can reserve space
   before they load. Without this, the attribute height would still apply
   after CSS shrinks the width, and photos would stretch. */
img { height: auto; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -.02em;
  margin: 0 0 .5em;
  color: var(--ink);
}
h1 { font-size: clamp(2.1rem, 5vw, 3.6rem); }
h2 { font-size: clamp(1.7rem, 3.6vw, 2.5rem); }
h3 { font-size: clamp(1.15rem, 2vw, 1.4rem); }
p  { margin: 0 0 1rem; }
a  { color: var(--magenta-600); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---------- Layout ---------- */
.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: 20px; }
/* Landscape on notched iPhones (viewport-fit=cover): keep content clear of the notch */
@supports (padding: max(0px)) {
  .wrap { padding-left: max(20px, env(safe-area-inset-left)); padding-right: max(20px, env(safe-area-inset-right)); }
}
.section { padding-block: clamp(48px, 7vw, 96px); }
.section--tight { padding-block: clamp(32px, 4vw, 56px); }
.section--cream { background: var(--cream-200); }
.section--pine  { background: var(--pine); color: #EEF5EC; }
.section--pine h2, .section--pine h3 { color: #fff; }
.section--pine .card h3 { color: var(--ink); }
.section--paper { background: var(--paper); }

.grid { display: grid; gap: clamp(18px, 2.4vw, 30px); }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }

.stack > * + * { margin-top: 1rem; }
.center { text-align: center; }
.muted { color: var(--ink-600); }
.small { font-size: .875rem; }
.tiny  { font-size: .78rem; }

/* ---------- Eyebrow + section head ---------- */
.eyebrow {
  font-family: var(--font-display);
  font-size: .74rem;
  font-weight: 600;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--magenta);
  margin: 0 0 .7rem;
}
.section--pine .eyebrow { color: #9FD4A6; }
.section-head { max-width: 680px; margin-bottom: clamp(28px, 4vw, 48px); }
.section-head.center { margin-inline: auto; }
.section-head p { color: var(--ink-600); font-size: 1.05rem; margin: 0; }
.section--pine .section-head p { color: #CFE3CD; }

/* ---------- Buttons ---------- */
.btn {
  --btn-bg: var(--magenta);
  --btn-fg: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5em;
  font-family: var(--font-display);
  font-size: .95rem;
  font-weight: 600;
  line-height: 1;
  padding: 15px 26px;
  border: 1px solid transparent;
  border-radius: var(--r-pill);
  background: var(--btn-bg);
  color: var(--btn-fg);
  cursor: pointer;
  text-decoration: none;
  transition: transform .12s ease, background .16s ease, box-shadow .16s ease, color .16s ease;
  white-space: nowrap;
}
.btn:hover { background: var(--magenta-600); text-decoration: none; transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn:active { transform: translateY(0); }
.btn:focus-visible { outline: 3px solid var(--magenta-100); outline-offset: 2px; }
.btn[disabled], .btn.is-disabled { opacity: .5; pointer-events: none; }

.btn--pine  { --btn-bg: var(--pine); }
.btn--pine:hover { background: var(--pine-700); }
.btn--ghost { --btn-bg: transparent; --btn-fg: var(--ink); border-color: var(--ink); }
.btn--ghost:hover { background: var(--ink); color: #fff; }
.btn--light { --btn-bg: #fff; --btn-fg: var(--pine); }
.btn--light:hover { background: #F2F7F1; color: var(--pine-700); }
.btn--sm { padding: 10px 18px; font-size: .85rem; }
.btn--lg { padding: 18px 34px; font-size: 1.05rem; }
.btn--block { width: 100%; }

/* ---------- Pills / badges ---------- */
.pill {
  display: inline-flex; align-items: center; gap: .4em;
  font-size: .75rem; font-weight: 600; letter-spacing: .04em;
  padding: 6px 12px; border-radius: var(--r-pill);
  background: var(--magenta-050); color: var(--magenta-700);
}
.pill--pine { background: var(--pine-100); color: var(--pine-700); }
.pill--ink  { background: #EEF1F0; color: var(--ink-600); }
.pill--warn { background: #FDF3DC; color: #8A6300; }
.pill--danger { background: #FBE4E4; color: var(--danger); }
.pill--ok   { background: #E2F3E9; color: var(--ok); }

/* ---------- Forms ---------- */
label.field { display: block; margin-bottom: 14px; }
.field > span {
  display: block; font-size: .82rem; font-weight: 600;
  color: var(--ink-600); margin-bottom: 6px;
}
input[type=text], input[type=email], input[type=tel], input[type=number], input[type=url],
input[type=search], input[type=password], input[type=file], select, textarea {
  width: 100%;
  font: inherit;
  font-size: .95rem;
  color: var(--ink);
  padding: 12px 14px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  transition: border-color .15s ease, box-shadow .15s ease;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--magenta);
  box-shadow: 0 0 0 3px var(--magenta-050);
}
textarea { min-height: 110px; resize: vertical; }
input[type=file] { padding: 9px 10px; font-size: .85rem; cursor: pointer; }
/* iOS Safari zooms into any focused field under 16px */
@media (max-width: 880px) {
  input[type=text], input[type=email], input[type=tel], input[type=number], input[type=url],
  input[type=search], input[type=password], select, textarea { font-size: 16px; }
}
input[type=file]::file-selector-button {
  font: inherit; font-weight: 600; color: var(--pine-700);
  background: var(--pine-100); border: 0; border-radius: var(--r-pill);
  padding: 6px 12px; margin-right: 10px; cursor: pointer;
}
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
/* The error line is a sibling of the label text, so both match `.field > span`.
   These selectors have to out-specify that rule, not just follow it. */
.field > .err, .err {
  display: none;
  color: var(--danger);
  font-size: .8rem;
  font-weight: 500;
  margin: 4px 0 0;
}
.field.has-err > input, .field.has-err > select, .field.has-err > textarea { border-color: var(--danger); }
.field.has-err > .err, .field.has-err .err { display: block; }

/* ---------- Cards ---------- */
.card {
  background: var(--paper);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
}
.card-pad { padding: clamp(20px, 3vw, 32px); }

/* ---------- Utility ---------- */
.hidden { display: none !important; }
[hidden] { display: none !important; }
.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;
}
.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 200;
  background: var(--magenta); color: #fff; padding: 12px 18px;
  border-radius: var(--r-sm); transition: top .2s ease;
}
.skip-link:focus { top: 12px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
