/* ---------- Fonts ---------- */
@font-face {
  font-family: "Fraunces";
  src: url("/fonts/fraunces-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Hanken Grotesk";
  src: url("/fonts/hanken-grotesk-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

/* ---------- Tokens ---------- */
:root {
  --ink: #13203a;
  --ink-soft: #36425b;
  --muted: #5a6477;
  --paper: #f6f4ee;
  --surface: #ffffff;
  --line: #dedad0;
  --line-strong: #c4bfb1;
  --accent: #a4552a;
  --accent-strong: #86421d;
  --accent-on-dark: #d9b26a;
  --navy: #13203a;
  --navy-deep: #0d172b;
  --on-navy: #f1f3f7;
  --on-navy-muted: #b7bfcd;
  --error: #a32020;
  --error-bg: #fbeeee;
  --success: #1c6541;
  --success-bg: #ecf5ef;
  --notice-bg: #eef1f7;

  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "Hanken Grotesk", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;

  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-md: 1.125rem;
  --text-lg: 1.375rem;
  --text-xl: clamp(1.625rem, 1.3rem + 1.4vw, 2.125rem);
  --text-2xl: clamp(2rem, 1.4rem + 2.6vw, 3rem);
  --text-3xl: clamp(2.375rem, 1.5rem + 3.9vw, 3.875rem);

  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 72px;
  --space-9: 104px;

  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 18px;
  --container: 1120px;
  --gutter: 20px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --fast: 180ms;

  --z-header: 20;
  --z-skip: 100;
}

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

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

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.12;
  letter-spacing: -0.015em;
  margin: 0;
  text-wrap: balance;
}
h1 { font-size: var(--text-3xl); }
h2 { font-size: var(--text-2xl); }
h3 { font-size: var(--text-lg); line-height: 1.25; letter-spacing: -0.005em; }

p { margin: 0; }
ul { margin: 0; padding: 0; }
img, svg { display: block; max-width: 100%; }
address { font-style: normal; }

a { color: var(--accent); text-underline-offset: 3px; transition: color var(--fast) var(--ease); }
a:hover { color: var(--accent-strong); }

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: 3px;
}
.on-dark :focus-visible, .on-dark:focus-visible { outline-color: var(--accent-on-dark); }

.skip-link {
  position: absolute;
  left: var(--space-4);
  top: -100px;
  z-index: var(--z-skip);
  background: var(--navy);
  color: var(--on-navy);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-sm);
}
.skip-link:focus { top: var(--space-4); color: var(--on-navy); }

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.container {
  width: 100%;
  max-width: calc(var(--container) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.eyebrow {
  font-size: var(--text-sm);
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}
.lead { font-size: var(--text-md); color: var(--ink-soft); max-width: 62ch; }
.muted { color: var(--muted); }

.icon { width: 24px; height: 24px; flex: none; }
.icon--sm { width: 20px; height: 20px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  min-height: 48px;
  padding: 0 var(--space-5);
  border: 1.5px solid transparent;
  border-radius: var(--radius-sm);
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  touch-action: manipulation;
  transition: background-color var(--fast) var(--ease), border-color var(--fast) var(--ease),
    color var(--fast) var(--ease), transform var(--fast) var(--ease);
}
.btn:active { transform: scale(0.98); }
.btn--primary { background: var(--navy); color: var(--on-navy); }
.btn--primary:hover { background: var(--navy-deep); color: #fff; }
.btn--secondary { background: transparent; border-color: var(--line-strong); color: var(--ink); }
.btn--secondary:hover { border-color: var(--ink); color: var(--ink); }
.btn--block { width: 100%; }
.btn[disabled] { opacity: 0.55; cursor: progress; transform: none; }
.btn .icon { transition: transform var(--fast) var(--ease); }
.btn:hover .icon--arrow { transform: translateX(3px); }

.text-link { font-weight: 600; display: inline-flex; align-items: center; gap: var(--space-2); }

/* ---------- Brand ---------- */
.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  min-height: 44px;
  font-family: var(--font-display);
  font-size: 1.1875rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ink);
  text-decoration: none;
}
.brand:hover { color: var(--ink); }
.brand__mark { width: 30px; height: 30px; flex: none; }
.brand--light, .brand--light:hover { color: var(--on-navy); }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: var(--z-header);
  background: rgba(246, 244, 238, 0.94);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  min-height: 68px;
}
.nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px; height: 44px;
  background: none;
  border: 1.5px solid var(--line-strong);
  border-radius: var(--radius-sm);
  color: var(--ink);
  cursor: pointer;
}
.site-nav {
  display: none;
  position: absolute;
  left: 0; right: 0; top: 100%;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  padding: var(--space-3) var(--gutter) var(--space-5);
}
.site-nav.is-open { display: block; }
.site-nav__list { list-style: none; display: flex; flex-direction: column; }
.site-nav__link {
  display: flex;
  align-items: center;
  min-height: 48px;
  color: var(--ink-soft);
  font-weight: 500;
  text-decoration: none;
  border-bottom: 2px solid transparent;
}
.site-nav__link:hover { color: var(--ink); }
.site-nav__link[aria-current="page"] { color: var(--ink); font-weight: 600; border-bottom-color: var(--accent); }
.site-nav__account { margin-top: var(--space-3); padding-top: var(--space-4); border-top: 1px solid var(--line); }
.site-nav__account .btn { min-height: 44px; padding-inline: var(--space-4); }

@media (min-width: 880px) {
  .nav-toggle { display: none; }
  .site-nav {
    display: flex;
    align-items: center;
    gap: var(--space-6);
    position: static;
    padding: 0;
    border: 0;
    background: none;
  }
  .site-nav__list { flex-direction: row; gap: var(--space-6); }
  .site-nav__link { min-height: 68px; margin-bottom: -1px; }
  .site-nav__account { margin: 0; padding: 0; border: 0; }
}

/* ---------- Sections ---------- */
main { flex: 1; }
.section { padding-block: var(--space-8); }
.section--tint { background: var(--surface); border-block: 1px solid var(--line); }
.section__head { display: grid; gap: var(--space-4); margin-bottom: var(--space-7); max-width: 720px; }

@media (min-width: 880px) {
  :root { --gutter: 32px; }
  .section { padding-block: var(--space-9); }
}

/* ---------- Hero ---------- */
.hero { padding-block: var(--space-8) var(--space-8); }
.hero__grid { display: grid; gap: var(--space-7); align-items: center; }
.hero__copy { display: grid; gap: var(--space-5); justify-items: start; }
.hero__actions { display: flex; flex-wrap: wrap; gap: var(--space-3); margin-top: var(--space-2); }
.hero__art {
  position: relative;
  background: var(--navy);
  border-radius: var(--radius-lg);
  aspect-ratio: 4 / 3;
  overflow: hidden;
}
.hero__art svg { position: absolute; inset: 0; width: 100%; height: 100%; }

@media (min-width: 880px) {
  .hero { padding-block: var(--space-9); }
  .hero__grid { grid-template-columns: 1.15fr 0.85fr; gap: var(--space-8); }
  .hero__art { aspect-ratio: 4 / 5; }
}

/* ---------- Page header ---------- */
.page-head { padding-block: var(--space-8) var(--space-7); border-bottom: 1px solid var(--line); }
.page-head__inner { display: grid; gap: var(--space-4); max-width: 760px; }
.page-head h1 { font-size: var(--text-2xl); }
.page-body { padding-block: var(--space-7) var(--space-9); }

/* ---------- Split (about preview, contact) ---------- */
.split { display: grid; gap: var(--space-7); }
@media (min-width: 880px) {
  .split { grid-template-columns: 0.8fr 1.2fr; gap: var(--space-8); }
  .split--even { grid-template-columns: 1fr 1fr; }
}
.stack { display: grid; gap: var(--space-5); align-content: start; }
.stack--sm { gap: var(--space-3); }

/* ---------- Cards ---------- */
.card-grid { display: grid; gap: var(--space-4); list-style: none; }
@media (min-width: 640px) { .card-grid { grid-template-columns: repeat(2, 1fr); gap: var(--space-5); } }

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: var(--space-6);
  display: grid;
  gap: var(--space-3);
  align-content: start;
}
.section--tint .card { background: var(--paper); }
.card__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px; height: 44px;
  border-radius: var(--radius-sm);
  background: var(--navy);
  color: var(--accent-on-dark);
  margin-bottom: var(--space-2);
}
.card p { color: var(--ink-soft); }

/* ---------- Detail lists ---------- */
.details { display: grid; margin: 0; border-top: 1px solid var(--line); }
.details__row { display: grid; gap: var(--space-1); padding-block: var(--space-4); border-bottom: 1px solid var(--line); }
.details dt { font-size: var(--text-sm); font-weight: 600; color: var(--muted); letter-spacing: 0.04em; text-transform: uppercase; }
.details dd { margin: 0; overflow-wrap: anywhere; }
@media (min-width: 640px) {
  .details__row { grid-template-columns: 220px 1fr; gap: var(--space-5); align-items: baseline; }
}

.contact-list { list-style: none; display: grid; gap: var(--space-4); }
.contact-list li { display: flex; gap: var(--space-3); align-items: flex-start; overflow-wrap: anywhere; }
.contact-list .icon { color: var(--accent); margin-top: 2px; }
.contact-list__label { display: block; font-size: var(--text-sm); color: var(--muted); font-weight: 600; }

/* ---------- Band ---------- */
.band { background: var(--navy); color: var(--on-navy); }
.band__inner { display: grid; gap: var(--space-5); padding-block: var(--space-8); align-items: center; }
.band p { color: var(--on-navy-muted); max-width: 56ch; }
.band .btn--primary { background: var(--on-navy); color: var(--navy); }
.band .btn--primary:hover { background: #fff; color: var(--navy-deep); }
@media (min-width: 880px) { .band__inner { grid-template-columns: 1fr auto; } }

/* ---------- Forms ---------- */
.form { display: grid; gap: var(--space-5); }
.form__row { display: grid; gap: var(--space-5); }
@media (min-width: 640px) { .form__row { grid-template-columns: 1fr 1fr; } }

.field { display: grid; gap: var(--space-2); }
.field__label { font-weight: 600; font-size: 0.9375rem; }
.field__optional { font-weight: 400; color: var(--muted); }
.field__required { color: var(--error); }
.field__control { position: relative; }
.field__input {
  width: 100%;
  min-height: 48px;
  padding: var(--space-3) var(--space-4);
  font: inherit;
  color: var(--ink);
  background: var(--surface);
  border: 1.5px solid var(--line-strong);
  border-radius: var(--radius-sm);
  transition: border-color var(--fast) var(--ease), box-shadow var(--fast) var(--ease);
}
textarea.field__input { min-height: 150px; resize: vertical; line-height: 1.5; }
.field__input:hover { border-color: var(--muted); }
.field__input:focus-visible { outline: none; border-color: var(--navy); box-shadow: 0 0 0 3px rgba(164, 85, 42, 0.35); }
.field__input[aria-invalid="true"] { border-color: var(--error); }
.field__input--password { padding-right: 52px; }
.field__toggle {
  position: absolute;
  right: 2px; top: 2px;
  width: 44px; height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: 0;
  border-radius: var(--radius-sm);
  color: var(--muted);
  cursor: pointer;
}
.field__toggle:hover { color: var(--ink); }
.field__hint { font-size: var(--text-sm); color: var(--muted); }
.field__error { font-size: var(--text-sm); color: var(--error); font-weight: 500; display: flex; gap: var(--space-2); align-items: flex-start; }
.field__error .icon { width: 18px; height: 18px; margin-top: 2px; }

/* Honeypot field: kept out of sight and out of the tab order. */
.field--extra { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.alert {
  display: flex;
  gap: var(--space-3);
  align-items: flex-start;
  padding: var(--space-4);
  border-radius: var(--radius-sm);
  border: 1px solid;
  font-weight: 500;
}
.alert .icon { margin-top: 1px; }
.alert--error { background: var(--error-bg); border-color: #e2b9b9; color: var(--error); }
.alert--success { background: var(--success-bg); border-color: #b9d8c6; color: var(--success); }
.alert--notice { background: var(--notice-bg); border-color: #c9d1e2; color: var(--ink); }

.form-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: var(--space-5);
  display: grid;
  gap: var(--space-5);
  scroll-margin-top: 96px;
}
@media (min-width: 640px) { .form-panel { padding: var(--space-6); } }

/* ---------- FAQ ---------- */
.faq { border-top: 1px solid var(--line); max-width: 800px; }
.faq__item { border-bottom: 1px solid var(--line); }
.faq__item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  min-height: 64px;
  padding-block: var(--space-4);
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 500;
  cursor: pointer;
  list-style: none;
}
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary .icon { color: var(--accent); transition: transform var(--fast) var(--ease); }
.faq__item[open] summary .icon { transform: rotate(45deg); }
.faq__answer { padding-bottom: var(--space-5); color: var(--ink-soft); max-width: 66ch; }

/* ---------- Prose (policy pages) ---------- */
.prose { max-width: 720px; display: grid; gap: var(--space-4); }
.prose h2 { font-size: var(--text-xl); margin-top: var(--space-6); scroll-margin-top: 96px; }
.prose h2:first-child { margin-top: 0; }
.prose p, .prose li { color: var(--ink-soft); }
.prose ul { padding-left: 1.25rem; display: grid; gap: var(--space-2); }
.prose__meta { font-size: var(--text-sm); color: var(--muted); }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy-deep); color: var(--on-navy-muted); }
.site-footer__inner { display: grid; gap: var(--space-6); padding-block: var(--space-7) var(--space-6); }
.site-footer__company { display: grid; gap: var(--space-2); justify-items: start; }
.site-footer a { color: var(--on-navy); text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.site-footer__links { list-style: none; display: flex; flex-wrap: wrap; gap: var(--space-1) var(--space-5); }
.site-footer__links a, .site-footer__company a:not(.brand) { display: inline-flex; align-items: center; min-height: 44px; }
.site-footer__legal { border-top: 1px solid rgba(255, 255, 255, 0.14); padding-top: var(--space-5); font-size: var(--text-sm); }
@media (min-width: 880px) {
  .site-footer__inner { grid-template-columns: 1fr auto; align-items: start; }
  .site-footer__legal { grid-column: 1 / -1; }
  .site-footer__links { max-width: 560px; justify-content: flex-end; }
}

/* ---------- Gate (sign in / create account) ---------- */
.gate { flex: 1; display: grid; grid-template-rows: auto 1fr; min-height: 100dvh; }
.gate__brand {
  position: relative;
  overflow: hidden;
  background: var(--navy);
  color: var(--on-navy);
  padding: var(--space-4) var(--gutter) var(--space-6);
  display: grid;
  gap: var(--space-5);
  align-content: start;
}
.gate__brand > * { position: relative; z-index: 1; }
.gate__art { position: absolute; z-index: 0; right: -18%; bottom: -30%; width: 90%; max-width: 560px; height: auto; }
.gate__intro { display: grid; gap: var(--space-4); max-width: 30rem; }
.gate__intro h1 { font-size: var(--text-3xl); }
.gate__intro p { color: var(--on-navy-muted); font-size: var(--text-md); }
.gate__main {
  display: flex;
  flex-direction: column;
  padding: var(--space-6) var(--gutter) var(--space-5);
}
.gate__card { width: 100%; max-width: 420px; margin: 0 auto auto; display: grid; gap: var(--space-5); }
.gate__card h2 { font-size: var(--text-xl); }
.gate__switch { color: var(--ink-soft); }
.gate__switch a { font-weight: 600; display: inline-flex; align-items: center; min-height: 44px; }
.gate__footer {
  margin-top: var(--space-7);
  font-size: var(--text-sm);
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-5);
  justify-content: center;
  text-align: center;
}

@media (min-width: 880px) {
  .gate { grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); grid-template-rows: 1fr; }
  .gate__card { margin: auto; }
  .gate__main { padding-top: var(--space-7); }
  .gate__brand { padding: var(--space-6) var(--space-7) var(--space-8); gap: var(--space-7); align-content: space-between; }
  .gate__art { right: -22%; bottom: -18%; width: 110%; max-width: 720px; }
  .gate__intro { margin-bottom: 18vh; }
}

/* ---------- Not found ---------- */
.not-found { display: grid; gap: var(--space-5); justify-items: start; padding-block: var(--space-9); }

/* ---------- Motion ---------- */
@keyframes rise {
  from { transform: translateY(10px); }
  to { transform: none; }
}
.reveal { animation: rise 420ms var(--ease) both; }
.reveal--2 { animation-delay: 70ms; }
.reveal--3 { animation-delay: 140ms; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition-duration: 0.01ms !important; }
}

/* ---------- Utilities ---------- */
.stack--xl { gap: var(--space-8); }
.h-sub { font-size: var(--text-xl); }

/* ---------- Logo ---------- */
.brand__mark-img { height: 44px; width: auto; flex: none; }
.gate__logo { width: 170px; height: auto; }
