/* ============================================================
   mellis — design system
   Palette: pristine white base (matches hero video) + neutral
   ink + a single locked honey-amber accent (mellis = Latin "honey").
   Type: SF Pro via the Apple system-font stack — renders genuine
   San Francisco on iOS / macOS / Safari, graceful fallback elsewhere.
   Radii: buttons = pill, cards = 18px, inputs = 10px.
   ============================================================ */

:root {
  --ink: #17161a;
  --ink-soft: #54515a;
  --ink-faint: #8a8790;
  --line: #e9e7e2;
  --line-strong: #d8d5cd;
  --bg: #ffffff;
  --surface: #f7f6f3;
  --surface-2: #f1efe9;

  --accent: #e0a33e;          /* honey */
  --accent-bright: #f0b955;
  --accent-deep: #b9791d;
  --accent-text: #95590c;     /* AA-contrast amber for links on white */

  --maxw: 1240px;
  --gut: clamp(20px, 5vw, 64px);
  --radius-card: 18px;
  --radius-input: 10px;

  /* SF Pro (San Francisco) via Apple's system stack */
  --ff-display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro", "Helvetica Neue", system-ui, sans-serif;
  --ff-body: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro", "Helvetica Neue", system-ui, sans-serif;

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--ff-body);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Lenis */
html.lenis,
html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: clip; }

img { max-width: 100%; height: auto; display: block; }

a { color: var(--accent-text); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }

h1, h2, h3, h4 {
  font-family: var(--ff-display);
  font-weight: 600;
  line-height: 1.04;
  letter-spacing: -0.02em;
  margin: 0;
  color: var(--ink);
}

p { margin: 0 0 1em; }

.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gut);
}

.eyebrow {
  font-family: var(--ff-body);
  font-weight: 700;
  font-size: 12.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent-text);
  margin: 0 0 18px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
}
.eyebrow::before {
  content: "";
  width: 22px; height: 1.5px;
  background: var(--accent);
}

.lede { font-size: clamp(17px, 2vw, 20px); color: var(--ink-soft); max-width: 60ch; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  font-family: var(--ff-body);
  font-weight: 700;
  font-size: 15px;
  line-height: 1;
  padding: 15px 26px;
  border-radius: 999px;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: transform 0.25s var(--ease), background 0.25s, color 0.25s, border-color 0.25s;
  white-space: nowrap;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px) scale(0.99); }

.btn--primary { background: var(--accent); color: #20160a; }
.btn--primary:hover { background: var(--accent-bright); transform: translateY(-1px); }

.btn--ghost { background: transparent; color: var(--ink); border-color: var(--line-strong); }
.btn--ghost:hover { border-color: var(--ink); transform: translateY(-1px); }

.btn--light { background: var(--ink); color: #fff; }
.btn--light:hover { background: #000; transform: translateY(-1px); }

/* ---------- Nav ---------- */
.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 60;
  height: 72px;
  display: flex;
  align-items: center;
  transition: background 0.4s var(--ease), border-color 0.4s, backdrop-filter 0.4s;
  border-bottom: 1px solid transparent;
}
.nav.is-solid {
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: saturate(180%) blur(14px);
  border-bottom-color: var(--line);
}
.nav__inner {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gut);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--ff-display);
  font-weight: 700;
  font-size: 22px;
  letter-spacing: -0.03em;
  color: var(--ink);
  text-transform: lowercase;
}
.brand:hover { text-decoration: none; }
.brand__dot { width: 13px; height: 16px; display: inline-block; }
.nav__links {
  display: flex;
  align-items: center;
  gap: 30px;
  list-style: none;
  margin: 0; padding: 0;
}
.nav__links a {
  color: var(--ink-soft);
  font-weight: 500;
  font-size: 15px;
}
.nav__links a:hover { color: var(--ink); text-decoration: none; }
.nav__cta { display: flex; align-items: center; gap: 14px; }
.nav__burger {
  display: none;
  width: 44px; height: 44px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: #fff;
  cursor: pointer;
  align-items: center;
  justify-content: center;
}
.nav__burger span,
.nav__burger span::before,
.nav__burger span::after {
  content: "";
  display: block;
  width: 18px; height: 1.6px;
  background: var(--ink);
  position: relative;
  transition: transform 0.3s var(--ease), opacity 0.3s;
}
.nav__burger span::before { position: absolute; top: -6px; }
.nav__burger span::after { position: absolute; top: 6px; }

/* Base rules MUST come before the media query below, otherwise the later
   base `display:none` would override the media query's `display:flex`. */
.mobile-menu {
  display: none;
  position: fixed;
  inset: 72px 0 0 0;
  z-index: 55;
  background: #fff;
  flex-direction: column;
  padding: 24px var(--gut) 40px;
  gap: 6px;
  transform: translateY(-12px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s var(--ease), transform 0.35s var(--ease);
}
.nav.is-open ~ .mobile-menu { opacity: 1; transform: none; pointer-events: auto; }
.mobile-menu a {
  font-family: var(--ff-display);
  font-size: 26px;
  font-weight: 600;
  color: var(--ink);
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}
.mobile-menu a:hover { text-decoration: none; color: var(--accent-text); }
.mobile-menu .btn { margin-top: 18px; }

@media (max-width: 880px) {
  .nav__links, .nav__cta .btn { display: none; }
  .nav__burger { display: inline-flex; }
  .nav.is-open .nav__burger span { background: transparent; }
  .nav.is-open .nav__burger span::before { transform: translateY(6px) rotate(45deg); }
  .nav.is-open .nav__burger span::after { transform: translateY(-6px) rotate(-45deg); }
  .mobile-menu { display: flex; }
}

/* ---------- Generic section ---------- */
.section { padding: clamp(72px, 11vw, 150px) 0; }
.section--tint { background: var(--surface); }
.section__head { max-width: 760px; margin-bottom: clamp(40px, 6vw, 72px); }
.section__head h2 { font-size: clamp(32px, 5vw, 56px); }
.section__head p { margin-top: 20px; }

/* ---------- Feature bento ---------- */
.bento {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 18px;
}
.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  padding: 30px;
  display: flex;
  flex-direction: column;
}
.card__media {
  border-radius: 12px;
  overflow: hidden;
  background: var(--surface);
  margin-bottom: 22px;
}
.card__media img { width: 100%; height: 100%; object-fit: cover; }
.card h3 { font-size: 22px; margin-bottom: 10px; }
.card p { color: var(--ink-soft); font-size: 15.5px; margin: 0; }
.card .tag {
  font-size: 12px; font-weight: 700; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--accent-text); margin-bottom: 14px;
}
.col-3 { grid-column: span 3; }
.col-2 { grid-column: span 2; }
.col-6 { grid-column: span 6; }
.bento--feature { align-items: stretch; }

/* split feature row */
.split {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: clamp(32px, 6vw, 88px);
  align-items: center;
}
.split--rev { grid-template-columns: 1fr 1.05fr; }
.split--rev .split__media { order: -1; }
.split__media {
  border-radius: var(--radius-card);
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
}
.split h2 { font-size: clamp(28px, 4vw, 44px); margin-bottom: 18px; }
.split ul { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 14px; }
.split li { display: flex; gap: 12px; color: var(--ink-soft); font-size: 16px; }
.split li::before {
  content: ""; flex: none; margin-top: 9px;
  width: 7px; height: 7px; border-radius: 999px; background: var(--accent);
}

/* stats */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.stat { padding: 30px; border: 1px solid var(--line); border-radius: var(--radius-card); background: #fff; }
.stat__n { font-family: var(--ff-display); font-weight: 700; font-size: clamp(34px, 5vw, 52px); letter-spacing: -0.03em; }
.stat__l { color: var(--ink-soft); font-size: 14.5px; margin-top: 6px; }

/* principles list */
.rows { border-top: 1px solid var(--line); }
.row {
  display: grid;
  grid-template-columns: 64px 1fr 2fr;
  gap: 24px;
  padding: 32px 0;
  border-bottom: 1px solid var(--line);
  align-items: baseline;
}
.row__n { font-family: var(--ff-display); color: var(--ink-faint); font-size: 15px; }
.row h3 { font-size: 22px; }
.row p { color: var(--ink-soft); margin: 0; }

/* CTA band */
.cta-band {
  background: var(--ink);
  color: #fff;
  border-radius: 28px;
  padding: clamp(44px, 7vw, 92px);
  text-align: center;
  position: relative;
  overflow: hidden;
}
.cta-band h2 { color: #fff; font-size: clamp(30px, 5vw, 54px); max-width: 16ch; margin: 0 auto 22px; }
.cta-band p { color: rgba(255,255,255,0.66); max-width: 52ch; margin: 0 auto 34px; }
.cta-band .glow {
  position: absolute; width: 460px; height: 460px; border-radius: 50%;
  background: radial-gradient(circle, rgba(224,163,62,0.5), transparent 65%);
  filter: blur(40px); top: -160px; right: -120px; pointer-events: none;
}

/* ---------- Footer ---------- */
.footer { background: var(--bg); border-top: 1px solid var(--line); padding: 72px 0 40px; }
.footer__grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: 40px;
}
.footer h4 { font-family: var(--ff-body); font-size: 13px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-faint); margin-bottom: 18px; }
.footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.footer ul a { color: var(--ink-soft); font-size: 15px; }
.footer ul a:hover { color: var(--ink); text-decoration: none; }
.footer__brand p { color: var(--ink-soft); font-size: 15px; max-width: 34ch; margin-top: 16px; }
.footer__bottom {
  margin-top: 56px; padding-top: 26px; border-top: 1px solid var(--line);
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  color: var(--ink-faint); font-size: 13.5px;
}

/* ---------- Legal / article pages ---------- */
.page-hero {
  padding: 140px 0 56px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}
.page-hero h1 { font-size: clamp(36px, 6vw, 64px); }
.page-hero p { color: var(--ink-soft); margin-top: 16px; }
.article { padding: 64px 0 96px; }
.article .container { max-width: 820px; }
.article h2 { font-size: 26px; margin: 44px 0 14px; }
.article h3 { font-size: 19px; margin: 28px 0 10px; font-family: var(--ff-body); font-weight: 700; }
.article p, .article li { color: #3a373e; font-size: 16.5px; }
.article ul, .article ol { padding-left: 22px; margin: 0 0 1em; }
.article li { margin-bottom: 8px; }
.article .toc {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-card); padding: 24px 28px; margin-bottom: 40px;
}
.article .toc h4 { margin: 0 0 12px; font-size: 13px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-faint); }
.article .toc ul { list-style: none; padding: 0; columns: 2; gap: 24px; }
.article .toc a { font-size: 14.5px; }
.article hr { border: none; border-top: 1px solid var(--line); margin: 40px 0; }

/* contact form */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.field { display: flex; flex-direction: column; gap: 8px; }
.field--full { grid-column: 1 / -1; }
.field label { font-size: 14px; font-weight: 700; }
.field input, .field textarea, .field select {
  font-family: var(--ff-body); font-size: 16px; color: var(--ink);
  padding: 13px 15px; border: 1.5px solid var(--line-strong);
  border-radius: var(--radius-input); background: #fff;
}
.field textarea { min-height: 150px; resize: vertical; }
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(224,163,62,0.18);
}
.field .hint { color: var(--ink-faint); font-size: 13px; }

/* utilities */
.center { text-align: center; }
.mt-l { margin-top: 40px; }
.reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.8s var(--ease), transform 0.8s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .footer__grid { grid-template-columns: 1fr 1fr; }
  .stats { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 760px) {
  .col-3, .col-2, .col-6 { grid-column: 1 / -1; }
  .bento { grid-template-columns: 1fr; }
  .split, .split--rev { grid-template-columns: 1fr; }
  .split--rev .split__media { order: 0; }
  .row { grid-template-columns: 1fr; gap: 8px; }
  .row__n { display: none; }
  .form-grid { grid-template-columns: 1fr; }
  .footer__grid { grid-template-columns: 1fr; gap: 28px; }
  .article .toc ul { columns: 1; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}
