:root {
  --bg: #ffffff;
  --bg-tint: #F4F1EA;
  --ink: #1A1D1B;
  --muted: #5b5f5a;
  --border: #e2e0da;
  --card-bg: #ffffff;
  --accent: #2D6A4F;
  --accent-ink: #ffffff;
  --header-bg: rgba(244,241,234,0.92);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #15171a;
    --bg-tint: #1b1e1a;
    --ink: #ece9e3;
    --muted: #9a9c96;
    --border: #34372f;
    --card-bg: #1e2120;
    --accent-ink: #0e1310;
    --header-bg: rgba(21,23,26,0.92);
  }
}

:root[data-theme="dark"] {
  --bg: #15171a;
  --bg-tint: #1b1e1a;
  --ink: #ece9e3;
  --muted: #9a9c96;
  --border: #34372f;
  --card-bg: #1e2120;
  --accent-ink: #0e1310;
  --header-bg: rgba(21,23,26,0.92);
}

* { box-sizing: border-box; }

html { color-scheme: light dark; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: ui-sans-serif, -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
  line-height: 1.55;
}

img, svg { max-width: 100%; }

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 20px; }

a { color: var(--accent); }

.eyebrow {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 8px;
}

h1, h2, h3 { line-height: 1.2; margin: 0 0 12px; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.05rem; margin-bottom: 8px; }

.btn {
  display: inline-block;
  font-size: 0.88rem;
  font-weight: 700;
  padding: 11px 20px;
  border-radius: 24px;
  text-decoration: none;
  border: 1px solid transparent;
}
.btn--sm { padding: 7px 14px; font-size: 0.78rem; }
.btn--primary { background: var(--accent); color: var(--accent-ink); }
.btn--secondary { background: transparent; color: var(--ink); border-color: var(--border); }

/* ---------------------------------------------------------------- header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--header-bg);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--border);
}
.site-header__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 20px;
}
.site-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
  flex: none;
}
.site-logo svg { width: 28px; height: 28px; color: var(--accent); }
.site-logo__wm {
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-size: 0.7rem;
  white-space: nowrap;
}

.site-nav {
  display: none;
  gap: 22px;
  font-size: 0.88rem;
}
.site-nav a { color: var(--ink); text-decoration: none; opacity: 0.82; }
.site-nav a:hover { opacity: 1; }
.site-nav__cta { display: none; }

.header-controls { display: flex; align-items: center; gap: 12px; }

.nav-toggle {
  background: none;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 1.1rem;
  padding: 4px 10px;
  color: var(--ink);
  cursor: pointer;
}

.prefs { position: relative; }
.prefs summary {
  list-style: none;
  cursor: pointer;
  font-size: 0.78rem;
  color: var(--muted);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 6px 12px;
}
.prefs summary::-webkit-details-marker { display: none; }
.prefs__panel {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px;
  width: 210px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.14);
}
.prefs__panel h3 { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); margin: 0 0 8px; }
.prefs__panel h3:not(:first-child) { margin-top: 14px; }
.theme-choices { display: flex; gap: 6px; }
.theme-choices button {
  flex: 1;
  font-size: 0.76rem;
  padding: 6px 0;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--ink);
  cursor: pointer;
}
.theme-choices button.is-active { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.accent-choices { display: flex; gap: 8px; }
.accent-choices button {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 2px solid var(--border);
  background: var(--swatch);
  cursor: pointer;
  padding: 0;
}
.accent-choices button.is-active { border-color: var(--ink); }

.prefs__reset {
  display: block;
  width: 100%;
  margin-top: 16px;
  padding: 7px 0;
  font-size: 0.76rem;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}
.prefs__reset:hover { color: var(--ink); border-color: var(--ink); }

/* ---------------------------------------------------------------- hero */
.hero { padding: 64px 0 56px; }
.hero__inner { text-align: center; }
.hero__mark { width: 64px; height: 64px; color: var(--accent); margin-bottom: 20px; }
.hero h1 { font-size: 1.9rem; max-width: 20ch; margin: 0 auto 16px; }
.hero__lede { color: var(--muted); max-width: 56ch; margin: 0 auto 28px; font-size: 1.02rem; }
.hero__cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* ---------------------------------------------------------------- sections */
.section { padding: 52px 0; }
.section--tint { background: var(--bg-tint); }

.card-grid { display: grid; grid-template-columns: 1fr; gap: 16px; margin-top: 20px; }
.card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 22px;
}
.card p { color: var(--muted); margin: 0; font-size: 0.92rem; }

.principle-rows { display: flex; flex-direction: column; gap: 22px; margin-top: 20px; }
.principle-row { border-left: 3px solid var(--accent); padding-left: 16px; }
.principle-row p { color: var(--muted); margin: 0; font-size: 0.92rem; max-width: 62ch; }

.about-wrap { max-width: 68ch; }
.about-copy { color: var(--muted); font-size: 1rem; }
.about-copy strong { color: var(--ink); }

.contact-wrap { text-align: center; }
.contact-lede { color: var(--muted); max-width: 52ch; margin: 0 auto 24px; }

/* ---------------------------------------------------------------- footer */
.site-footer { border-top: 1px solid var(--border); padding: 28px 0; }
.site-footer__inner {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
  text-align: center;
}
.site-footer__brand { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 0.82rem; }
.site-footer__brand svg { width: 20px; height: 20px; color: var(--accent); }
.site-footer__meta { color: var(--muted); font-size: 0.78rem; }

/* ---------------------------------------------------------------- breakpoints */
@media (min-width: 640px) {
  .card-grid { grid-template-columns: repeat(3, 1fr); }
  .hero h1 { font-size: 2.3rem; }
}

@media (min-width: 760px) {
  .site-nav { display: flex; }
  .nav-toggle { display: none; }
  .site-footer__inner { flex-direction: row; justify-content: space-between; text-align: left; }
}

@media (max-width: 759px) {
  .site-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    padding: 16px 20px;
    gap: 14px;
  }
  .site-nav.is-open { display: flex; }
  .site-header__bar { position: relative; }
}

/* The wordmark plus icon, the Display picker, the CTA and the hamburger cannot all fit on one
   row under ~480px without wrapping or clipping — verified by rendering at 390px, not assumed.
   Dropping the wordmark (the icon alone still identifies the mark) and tightening spacing is
   what actually closes the gap; a duplicate CTA link inside the nav dropdown means removing it
   from the header row loses nothing reachable. */
@media (max-width: 480px) {
  .site-header__bar { padding: 10px 14px; gap: 8px; }
  .site-logo__wm { display: none; }
  .header-controls { gap: 8px; }
  .header-controls > .btn--sm { display: none; }
  .prefs summary { padding: 6px 9px; font-size: 0.72rem; }
  .site-nav__cta {
    display: inline-block;
    margin-top: 4px;
    padding: 9px 16px;
    border-radius: 20px;
    background: var(--accent);
    color: var(--accent-ink);
    font-weight: 700;
    font-size: 0.85rem;
    text-align: center;
    opacity: 1;
  }
}
