:root {
  --paper: #eef1ef;
  --paper-raised: #f7f8f6;
  --ink: #16233d;
  --ink-soft: #4a5568;
  --ink-softer: #74808f;
  --line: #cbd2ce;
  --line-strong: #b3bcb5;
  --amber: #b8801e;
  --stamp-red: #9c3b2e;
  --sage: #4b6b4f;
  --navy-deep: #0f1b30;

  --radius: 3px;
  --shadow-sm: 0 1px 2px rgba(15, 27, 48, 0.06);
  --shadow-md: 0 6px 20px -8px rgba(15, 27, 48, 0.22);
  --shadow-lg: 0 18px 46px -18px rgba(15, 27, 48, 0.32);
  --ring: 0 0 0 2px var(--paper), 0 0 0 4px var(--amber);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

body {
  background-color: var(--paper);
  background-image:
    linear-gradient(180deg, rgba(255, 255, 255, 0.55), rgba(255, 255, 255, 0) 260px),
    radial-gradient(1100px 560px at 100% -12%, rgba(22, 35, 61, 0.035), transparent 60%);
  background-attachment: fixed;
  color: var(--ink);
  font-family: "Inter", system-ui, sans-serif;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection {
  background: rgba(184, 128, 30, 0.22);
}

a {
  color: inherit;
}

.mono {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-feature-settings: "tnum" 1;
}

.serif {
  font-family: "Source Serif 4", Georgia, serif;
}

h1,
h2,
h3 {
  letter-spacing: -0.012em;
  text-wrap: balance;
}

p {
  text-wrap: pretty;
}

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

/* ---------- buttons ---------- */
.btn {
  --btn-shift: 0;
  padding: 13px 22px;
  font-size: 0.92rem;
  font-weight: 500;
  border-radius: var(--radius);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--ink);
  transition: transform 0.16s ease, background 0.16s ease, color 0.16s ease,
    box-shadow 0.16s ease, border-color 0.16s ease;
  cursor: pointer;
  line-height: 1.1;
}

.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  background: var(--ink);
  color: var(--paper-raised);
  box-shadow: var(--shadow-sm);
}
.btn-primary:hover {
  background: var(--navy-deep);
  box-shadow: var(--shadow-md);
}

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

/* arrow nudge on any button whose label ends with an arrow */
.btn:hover {
  --btn-shift: 3px;
}

:where(a, button, input, [tabindex]):focus-visible {
  outline: none;
  box-shadow: var(--ring);
  border-radius: var(--radius);
}

/* ---------- eyebrow / section labels ---------- */
.section-label {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 12px;
}

/* ---------- sticky header polish ---------- */
header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: color-mix(in srgb, var(--paper) 82%, transparent);
  backdrop-filter: saturate(1.1) blur(8px);
  -webkit-backdrop-filter: saturate(1.1) blur(8px);
}

header nav a {
  position: relative;
  transition: color 0.16s ease;
}
header nav a:hover {
  color: var(--ink);
}
header nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -4px;
  height: 1.5px;
  background: var(--amber);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.18s ease;
}
header nav a:hover::after {
  transform: scaleX(1);
}

/* ---------- newsletter form ---------- */
.nl-form {
  display: flex;
  gap: 10px;
  justify-content: center;
  max-width: 440px;
  margin: 0 auto;
  flex-wrap: wrap;
}
.nl-form input[type="email"] {
  flex: 1;
  min-width: 210px;
  padding: 13px 16px;
  border: 1px solid var(--line-strong);
  background: var(--paper-raised);
  color: var(--ink);
  font-family: "Inter", sans-serif;
  font-size: 0.92rem;
  border-radius: var(--radius);
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}
.nl-form input[type="email"]::placeholder {
  color: var(--ink-softer);
}
.nl-form input[type="email"]:focus-visible {
  border-color: var(--ink);
  box-shadow: var(--ring);
}
.nl-hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.nl-status {
  margin-top: 14px;
  font-size: 0.85rem;
  min-height: 1.2em;
  color: var(--ink-soft);
}
.nl-status[data-state="ok"] {
  color: var(--sage);
  font-weight: 600;
}
.nl-status[data-state="error"] {
  color: var(--stamp-red);
  font-weight: 600;
}
.btn[aria-busy="true"] {
  opacity: 0.65;
  pointer-events: none;
}

/* ---------- cookie banner ---------- */
.cookie-banner {
  position: fixed;
  z-index: 60;
  left: 16px;
  right: 16px;
  bottom: 16px;
  max-width: 560px;
  margin: 0 auto;
  background: var(--paper-raised);
  border: 1px solid var(--line-strong);
  border-left: 4px solid var(--amber);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 18px 20px;
  display: none;
}
.cookie-banner.is-visible {
  display: block;
  animation: cookie-rise 0.28s ease both;
}
@keyframes cookie-rise {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.cookie-banner p {
  font-size: 0.86rem;
  color: var(--ink-soft);
  margin-bottom: 14px;
}
.cookie-banner a {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.cookie-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.cookie-actions .btn {
  padding: 10px 18px;
  font-size: 0.85rem;
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}
