:root {
  /* Pulled from the app theme (src/core/theme/tokens.ts) so the page and the
     product read as one brand. */
  --navy: #0e2a3a;
  --navy-soft: #21475a;
  --accent: #d93b1c;
  --accent-wash: #fce6de;
  --ink: #14181c;
  --ink-muted: #5d6670;
  --ink-subtle: #9a9ea6;
  --bg: #ffffff;
  --surface: #f6f6f6;
  --line: #e3e3e3;
  --on-dark: #ffffff;

  --font-serif: 'Fraunces', Georgia, 'Times New Roman', serif;
  --font-sans:
    -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell,
    'Helvetica Neue', sans-serif;
  --font-hand: 'Caveat', var(--font-serif);

  --content: 760px;
  --wide: 1040px;
  --radius: 16px;

  /* Hand-drawn underline used beneath section headings (echoes the app's
     sketched separators). */
  --squiggle: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='90' height='10' viewBox='0 0 90 10'%3E%3Cpath d='M2 6 C 14 1, 24 1, 34 6 S 56 11, 66 5 S 82 2, 88 6' fill='none' stroke='%23d93b1c' stroke-width='2.4' stroke-linecap='round'/%3E%3C/svg%3E");
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-serif);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

/* ====================== Top bar ====================== */
.topbar {
  max-width: var(--wide);
  margin: 0 auto;
  padding: 1.1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
}
.brand:hover {
  text-decoration: none;
}

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--navy);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.brand-mark svg {
  width: 22px;
  height: 22px;
  fill: #fff;
  stroke: #fff;
  stroke-width: 7;
  stroke-linecap: round;
}
.brand-mark svg circle {
  stroke: none;
}

.brand-word {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 1.3rem;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.brand-word-accent {
  /* Wordmark is a single colour now — no red on "ni". */
  color: inherit;
}

.topbar-nav {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}
.topbar-nav > a:not(.btn) {
  font-family: var(--font-sans);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ink-muted);
}

.lang-select {
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink-muted);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.4rem 0.6rem;
  cursor: pointer;
}
.lang-select:hover {
  border-color: var(--ink-subtle);
}

/* ====================== Buttons ====================== */
.btn {
  display: inline-block;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 1rem;
  padding: 0.85rem 1.5rem;
  border-radius: 999px;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: opacity 0.15s ease;
}
.btn:hover {
  text-decoration: none;
  opacity: 0.9;
}
.btn-sm {
  padding: 0.55rem 1.1rem;
  font-size: 0.9rem;
}
.btn-primary {
  background: var(--accent);
  color: #fff;
}
.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
}
.btn-ghost-on-dark {
  background: transparent;
  color: var(--on-dark);
  border-color: rgba(255, 255, 255, 0.4);
}

/* ====================== Hero ====================== */
.hero {
  background: linear-gradient(160deg, var(--navy-soft), var(--navy));
  color: var(--on-dark);
  padding: 4.5rem 1.5rem 5rem;
  text-align: center;
  border-bottom-left-radius: 28px;
  border-bottom-right-radius: 28px;
}
.hero h1 {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: clamp(2rem, 6vw, 3.25rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin: 0.6rem auto 0;
  max-width: 14ch;
}
.hero-lede {
  color: rgba(255, 255, 255, 0.82);
  font-size: 1.1rem;
  max-width: 52ch;
  margin: 1.4rem auto 0;
}
.hero-note {
  font-family: var(--font-sans);
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.6);
  margin: 1.6rem 0 0;
}

/* ====================== Overlines ====================== */
.overline {
  font-family: var(--font-sans);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--accent);
  margin: 0 0 0.5rem;
}
.overline-on-dark {
  color: rgba(255, 255, 255, 0.7);
}

/* ====================== Sections ====================== */
.section {
  max-width: var(--content);
  margin: 0 auto;
  padding: 4rem 1.5rem;
}
.section-alt {
  /* Full-bleed surface band while the content column stays exactly aligned with
     the normal centred sections. The huge box-shadow paints the background
     edge-to-edge; clip-path stops it bleeding vertically into neighbours. */
  background: var(--surface);
  box-shadow: 0 0 0 100vmax var(--surface);
  clip-path: inset(0 -100vmax);
}

h2 {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  line-height: 1.15;
  letter-spacing: -0.015em;
  margin: 0 0 1rem;
}
.squiggle::after {
  content: '';
  display: block;
  width: 84px;
  height: 10px;
  margin-top: 0.6rem;
  background: var(--squiggle) no-repeat;
}

h3 {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 1.2rem;
  margin: 0 0 0.4rem;
  color: var(--ink);
}

.lede {
  font-size: 1.15rem;
  color: var(--ink-muted);
  margin: 0 0 2rem;
}
.prose {
  color: var(--ink-muted);
  margin: 0 0 1.1rem;
}
.prose em {
  color: var(--ink);
}

/* ====================== Card grid ====================== */
.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}
.card {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.4rem;
}
.section-alt .card {
  background: var(--bg);
}
.card p {
  margin: 0;
  color: var(--ink-muted);
  font-size: 1rem;
}

/* ====================== Feature lists ====================== */
.feature-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1.1rem;
}
.feature-list li {
  position: relative;
  padding-left: 1.6rem;
  color: var(--ink-muted);
}
.feature-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--accent);
}
.feature-list strong {
  color: var(--ink);
  font-weight: 600;
}

/* ====================== CTA / contact ====================== */
.cta {
  max-width: var(--content);
  margin: 0 auto;
  padding: 4.5rem 1.5rem 3rem;
  text-align: center;
}
.cta h2 {
  margin-bottom: 0.6rem;
}
.cta > p {
  color: var(--ink-muted);
  font-size: 1.1rem;
  max-width: 46ch;
  margin: 0 auto 1.8rem;
}
.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  justify-content: center;
  margin-top: 1.8rem;
}
.hero .cta-row {
  margin-top: 2rem;
}

/* ====================== Subscribe ====================== */
.subscribe {
  margin: 3rem auto 0;
  max-width: 460px;
  text-align: left;
}
.subscribe-intro {
  font-family: var(--font-sans);
  font-size: 0.9rem;
  color: var(--ink-muted);
  text-align: center;
  margin: 0 0 0.8rem;
}
.subscribe-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.6rem;
}
.subscribe input[type='email'] {
  font-family: var(--font-sans);
  padding: 0.8rem 1rem;
  font-size: 1rem;
  background: var(--bg);
  color: var(--ink);
  border: 1.5px solid var(--line);
  border-radius: 999px;
  outline: none;
}
.subscribe input[type='email']:focus {
  border-color: var(--accent);
}
.subscribe button {
  font-family: var(--font-sans);
  font-weight: 600;
  padding: 0.8rem 1.3rem;
  font-size: 0.95rem;
  background: var(--navy);
  color: #fff;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
}
.subscribe button:disabled {
  opacity: 0.6;
  cursor: progress;
}
.consent {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  margin-top: 0.8rem;
  font-family: var(--font-sans);
  font-size: 0.82rem;
  color: var(--ink-subtle);
  line-height: 1.4;
}
.consent input {
  margin-top: 0.2em;
  accent-color: var(--accent);
}
.status {
  min-height: 1.4em;
  margin: 0.6rem 0 0;
  font-family: var(--font-sans);
  font-size: 0.88rem;
}
.status.ok {
  color: #2f7a4d;
}
.status.err {
  color: var(--accent);
}

/* ====================== Footer ====================== */
footer {
  border-top: 1px solid var(--line);
  padding: 2.5rem 1.5rem 3rem;
  text-align: center;
}
.footer-word {
  font-size: 1.1rem;
}
.footer-links {
  margin: 0.7rem 0 0;
  font-family: var(--font-sans);
  font-size: 0.9rem;
  color: var(--ink-muted);
}
.footer-links a {
  color: var(--ink-muted);
  text-decoration: underline;
}
.footer-links a:hover {
  color: var(--accent);
}
.footer-fine {
  margin: 0.4rem 0 0;
  font-family: var(--font-sans);
  font-size: 0.8rem;
  color: var(--ink-subtle);
}

/* ====================== Utilities ====================== */
.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;
}

/* ====================== Responsive ====================== */
@media (max-width: 860px) {
  .grid {
    grid-template-columns: 1fr 1fr;
  }
}
@media (max-width: 560px) {
  .grid {
    grid-template-columns: 1fr;
  }
  .subscribe-row {
    grid-template-columns: 1fr;
  }
  .topbar-nav > a:not(.btn) {
    display: none;
  }
}
