:root,
[data-theme="light"] {
  color-scheme: light;
  --bg: #f6f5f2;
  --surface: #ffffff;
  --ink: #12141a;
  --mute: #5c6270;
  --accent: #b8c400;
  --accent-ink: #12141a;
  --accent-soft: #9aa800;
  --border: #ddd8cd;
  --inset: #efece6;
  --elev: 0 16px 36px color-mix(in srgb, #12141a 8%, transparent);
  --brand-mark-bg: transparent;
  --link-hover: #8a9600;
}

[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0a0b0d;
  --surface: #14171d;
  --ink: #ffffff;
  --mute: #9ca3ad;
  --accent: #c4d114;
  --accent-ink: #0a0b0d;
  --accent-soft: #c4d114;
  --border: #262b35;
  --inset: #0d0f13;
  --elev: 0 18px 40px color-mix(in srgb, #000 35%, transparent);
  --brand-mark-bg: #000;
  --link-hover: #d4e040;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "DM Sans", system-ui, sans-serif;
  font-size: 1.02rem;
  line-height: 1.6;
  font-optical-sizing: auto;
}

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

a {
  color: var(--accent-soft);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}
a:hover { color: var(--link-hover); }

h1, h2, h3 {
  font-family: "Instrument Serif", Georgia, "Times New Roman", serif;
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin: 0 0 0.6em;
  color: var(--ink);
}
h1 { font-size: clamp(2.1rem, 5.5vw, 3.5rem); }
h2 { font-size: clamp(1.7rem, 3.5vw, 2.35rem); }
h3 {
  font-family: "DM Sans", system-ui, sans-serif;
  font-weight: 600;
  font-size: 1.12rem;
  letter-spacing: -0.02em;
  margin-bottom: 0.35em;
}

p {
  margin: 0 0 1em;
  color: var(--mute);
}
p:last-child { margin-bottom: 0; }

strong { color: var(--ink); font-weight: 600; }

.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  background: var(--accent);
  color: var(--accent-ink);
  padding: 0.5rem 0.8rem;
  z-index: 100;
  border-radius: 4px;
}
.skip:focus { top: 1rem; }

.wrap {
  width: min(1120px, calc(100% - 2rem));
  margin-inline: auto;
}

/* —— Masthead —— */
.masthead {
  position: sticky;
  top: 0;
  z-index: 20;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
[data-theme="light"] .masthead {
  background: color-mix(in srgb, var(--bg) 82%, var(--surface));
}

.masthead-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 56px;
  gap: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--ink);
  text-decoration: none;
}
.brand:hover { color: var(--ink); }

.brand-mark {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--brand-mark-bg);
  object-fit: cover;
}
[data-theme="light"] .brand-mark { border-color: transparent; }

.brand-word {
  font-family: "Instrument Serif", Georgia, serif;
  font-weight: 400;
  letter-spacing: -0.02em;
  font-size: 1.15rem;
}

.masthead-tools {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin-left: auto;
}

.nav {
  display: flex;
  align-items: center;
  gap: 1.15rem;
  font-size: 0.88rem;
}
.nav a {
  color: var(--mute);
  text-decoration: none;
}
.nav a:hover,
.nav a:focus-visible { color: var(--ink); }

.nav-cta {
  color: var(--ink) !important;
  border: 1px solid var(--border);
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
}
.nav-cta:hover { border-color: var(--accent); }

.theme-toggle {
  appearance: none;
  width: 2.15rem;
  height: 2.15rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: color-mix(in srgb, var(--surface) 70%, transparent);
  color: var(--ink);
  cursor: pointer;
  padding: 0;
}
.theme-toggle:hover { border-color: var(--accent); }

.theme-icon {
  width: 1.05rem;
  height: 1.05rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  display: none;
}
[data-theme="dark"] .theme-icon-sun { display: block; }
[data-theme="light"] .theme-icon-moon { display: block; }

/* —— Shared —— */
.kicker {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-soft);
  margin-bottom: 0.7rem;
}

.btn {
  appearance: none;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 0.7rem 1.2rem;
  font-family: "DM Sans", system-ui, sans-serif;
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  line-height: 1.2;
}
.btn:focus-visible,
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.btn-primary {
  background: var(--accent);
  color: var(--accent-ink);
}
.btn-primary:hover {
  filter: brightness(1.06);
  color: var(--accent-ink);
}
[data-theme="light"] .btn-primary:hover { filter: brightness(0.96); }

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--border);
}
.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--ink);
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.75rem;
}

.section {
  padding: clamp(2.25rem, 6vw, 4.125rem) 0;
  scroll-margin-top: 72px;
}
.section-head {
  max-width: 38rem;
  margin-bottom: 2rem;
}

.title-link {
  color: var(--accent-soft);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}
.title-link:hover { color: var(--link-hover); }

/* —— Hero —— */
.hero {
  display: grid;
  gap: 2.5rem;
  padding: clamp(2.5rem, 8vw, 5.5rem) 0 clamp(3rem, 8vw, 5rem);
  align-items: center;
}
.lede {
  font-size: 1.08rem;
  max-width: 40rem;
}
.hero-media { justify-self: center; }

.portrait {
  margin: 0;
  max-width: 360px;
  padding: 4px;
  background: var(--accent);
  border-radius: 3px;
}
.portrait img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: center 18%;
  display: block;
  border-radius: 1px;
}

/* —— Steps —— */
.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  box-shadow: var(--elev);
}
.steps li {
  background: var(--surface);
  padding: 1.4rem 1.3rem 1.5rem;
}
.steps h3 {
  font-family: "Instrument Serif", Georgia, serif;
  font-weight: 400;
  font-size: 1.35rem;
  letter-spacing: -0.02em;
}
.step-num {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.75rem;
  color: var(--accent-soft);
  display: block;
  margin-bottom: 0.55rem;
}

/* —— Feature grid —— */
.grid-4 {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  box-shadow: var(--elev);
}
.grid-4 li {
  background: var(--surface);
  padding: 1.4rem 1.3rem 1.5rem;
}
.grid-4 h3 {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}
.card-icon {
  width: 1.2rem;
  height: 1.2rem;
  flex: 0 0 auto;
  fill: none;
  stroke: var(--accent-soft);
  stroke-width: 1.7;
  stroke-linejoin: round;
  stroke-linecap: round;
}

.product-cta {
  margin-top: 1.25rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem 2rem;
  padding: clamp(1.5rem, 4vw, 2.15rem) clamp(1.3rem, 4vw, 2rem);
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--accent) 10%, var(--surface)) 0%, var(--surface) 48%),
    var(--surface);
  border: 1px solid var(--border);
  position: relative;
  box-shadow: var(--elev);
}
.product-cta::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: var(--accent);
}
.product-cta-copy {
  max-width: 38rem;
  padding-left: 0.35rem;
}
.product-cta-copy p {
  margin: 0;
  color: var(--mute);
  font-size: 1.05rem;
}
.product-cta-btn {
  padding: 0.95rem 1.7rem;
  font-size: 1.05rem;
  font-weight: 600;
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 35%, transparent);
}

/* —— Experience —— */
.experience-copy {
  max-width: 46rem;
}
.experience-copy p {
  color: var(--mute);
  margin: 0 0 1.15rem;
  font-size: 1.02rem;
}
.experience-copy p:first-child {
  color: var(--ink);
  font-size: 1.08rem;
}
.experience-copy p:last-child { margin-bottom: 0; }

.contact-inline {
  list-style: none;
  margin: 1.25rem 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  font-size: 0.95rem;
}
.contact-inline a {
  color: var(--mute);
  text-decoration: none;
}
.contact-inline a:hover { color: var(--accent-soft); }

/* —— Book panel —— */
.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: clamp(1.4rem, 4vw, 2rem);
  box-shadow: var(--elev);
}
.book-panel h3 {
  font-family: "DM Sans", system-ui, sans-serif;
  font-weight: 600;
  font-size: 1.2rem;
  margin-bottom: 0.4rem;
}
.book-panel p {
  margin-bottom: 1.25rem;
  max-width: 32rem;
}

/* —— Footer —— */
.footer {
  border-top: 1px solid var(--border);
  padding: 2rem 0 2.5rem;
}
.footer-inner {
  display: grid;
  gap: 0.6rem;
  align-items: center;
}
.footer-inner p {
  margin: 0;
  line-height: 1.35;
}
.mute { color: var(--mute); }
.footer .mute a {
  color: var(--mute);
  text-decoration: none;
}
.footer .mute a:hover { color: var(--accent-soft); }

/* —— Responsive —— */
@media (min-width: 720px) {
  .hero {
    grid-template-columns: 1.15fr 0.85fr;
    gap: 3.5rem;
  }
  .steps { grid-template-columns: repeat(3, 1fr); }
  .grid-4 { grid-template-columns: 1fr 1fr; }
}

@media (min-width: 980px) {
  .grid-4 { grid-template-columns: repeat(4, 1fr); }
  .footer-inner {
    grid-template-columns: 1fr auto auto;
    align-items: center;
  }
}

@media (max-width: 520px) {
  .nav a:not(.nav-cta) { display: none; }
  .brand-word { font-size: 1.02rem; }
}


.lede-sub {
  margin: 0.75rem 0 0;
  max-width: 36rem;
  font-size: 1.05rem;
  line-height: 1.55;
  color: var(--mute, #5c6570);
}

.steps .security-note {
  margin: 0.85rem 0 0;
  padding: 0.85rem 0.95rem;
  border-left: 3px solid var(--accent, #B3C100);
  background: color-mix(in srgb, var(--accent, #B3C100) 10%, transparent);
  border-radius: 0 8px 8px 0;
  color: var(--ink);
  font-size: 0.95rem;
  line-height: 1.45;
}
.steps .security-note strong {
  display: block;
  margin-bottom: 0.25rem;
  font-weight: 600;
}

#feasibility .section-head a,
.section-head a.title-link {
  color: var(--accent, #B3C100);
  text-decoration: underline;
  text-underline-offset: 0.15em;
  font-weight: 600;
}
#feasibility .section-head a:hover,
.section-head a.title-link:hover {
  color: var(--ink);
}
