/* Design tokens, defined once. Home uses .theme-waymark, Moa uses .theme-moa. */
:root {
  --step--1: 0.875rem;
  --step-0: 1.0625rem;
  --step-1: 1.375rem;
  --step-2: clamp(1.75rem, 1.35rem + 1.6vw, 2.5rem);
  --step-3: clamp(2.4rem, 1.5rem + 3.6vw, 4.25rem);
  --step-4: clamp(3rem, 1.5rem + 6vw, 6rem);

  --s-2: 8px; --s-3: 12px; --s-4: 16px; --s-6: 24px; --s-8: 32px;
  --s-12: 48px; --s-16: 64px; --s-24: 96px;
  --wrap: 1120px;
  --radius: 14px;
  --field-edge: #7b8598;
}

.theme-waymark {
  --paper: #fbf7f1;
  --sand: #f0e7da;
  --ink: #142b52;
  --muted: #3b4a66;
  --brand: #5b2e91;
  --action: #ff6b57;
  --action-ink: #142b52;
  --rule: #e0d5c5;
  --font-display: 'Nunito Sans', system-ui, sans-serif;
  --font-body: 'Nunito Sans', system-ui, sans-serif;
}

.theme-moa {
  --paper: #ffffff;
  --cloud: #eaecee;
  --ink: #0f172e;
  --muted: #3a4358;
  --brand: #6c47c9;
  --purple: #6c47c9;
  --teal: #00b7c6;
  --green: #6fcf57;
  --orange: #ff9500;
  --action: #ff9500;
  --action-ink: #0f172e;
  --rule: #eaecee;
  --font-display: 'Nunito', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 96px; }
body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--font-display); line-height: 1.08; text-wrap: balance; }
p { text-wrap: pretty; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--s-6); }
@media (max-width: 720px) { .wrap { padding: 0 var(--s-4); } }

:focus-visible { outline: 3px solid var(--brand); outline-offset: 3px; border-radius: 4px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: #fff; padding: 10px 16px; z-index: 100; }
.skip:focus { left: 8px; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 50; background: var(--paper); border-bottom: 1px solid var(--rule); }
.nav { max-width: var(--wrap); margin: 0 auto; padding: var(--s-3) var(--s-6); display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2) var(--s-8); }
.nav .brand img { height: 36px; width: auto; }
.nav-links { display: flex; flex-wrap: wrap; gap: 0 var(--s-6); margin-left: auto; font-weight: 700; font-size: 0.95rem; }
.nav-links a { display: inline-flex; align-items: center; min-height: 44px; text-decoration: none; }
.nav-links a:hover { text-decoration: underline; text-underline-offset: 6px; text-decoration-thickness: 2px; }
@media (max-width: 720px) {
  .nav { padding: var(--s-3) var(--s-4); }
  .nav-links { order: 3; width: 100%; margin-left: 0; gap: 0 var(--s-4); }
  .nav .btn { margin-left: auto; }
}

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0 var(--s-6); border-radius: 999px;
  font: 800 1rem var(--font-display); text-decoration: none; cursor: pointer; border: 2px solid transparent;
}
.btn-action { background: var(--action); color: var(--action-ink); }
.btn-action:hover { box-shadow: inset 0 0 0 2px var(--action-ink); }
.btn-line { border-color: currentColor; background: transparent; }
.btn-line:hover { background: rgba(127, 127, 127, 0.14); }
.nav .btn { min-height: 44px; padding: 0 var(--s-4); font-size: 0.95rem; }

/* Contact form */
.form { display: grid; gap: var(--s-4); }
.form label { display: grid; gap: 6px; font-weight: 700; font-size: 0.95rem; }
.form input, .form textarea {
  font: 400 1rem var(--font-body); color: var(--ink); background: #fff;
  border: 1.5px solid var(--field-edge); border-radius: 10px; padding: 12px 14px; width: 100%;
}
.form textarea { resize: vertical; }
.form .row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-4); }
@media (max-width: 560px) { .form .row { grid-template-columns: 1fr; } }
.form .btn { justify-self: start; }
.form .btn[disabled] { opacity: 0.6; cursor: progress; }
.form [hidden] { display: none !important; }
.form .hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-fine { font-size: var(--step--1); color: var(--muted); }
.form-status { display: none; padding: var(--s-4); border-radius: 10px; font-weight: 700; }
.form-status.is-ok { display: block; background: #e3f4ea; color: #0f4a2a; border: 1.5px solid #2e8b57; }
.form-status.is-err { display: block; background: #fdeaea; color: #7a1414; border: 1.5px solid #c53030; }
.form-status a { color: inherit; }

/* Footer */
.site-footer { border-top: 1px solid var(--rule); padding: var(--s-12) 0 var(--s-8); }
.foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--s-8); }
.foot img { height: 34px; width: auto; }
.foot ul { list-style: none; padding: 0; display: grid; gap: 2px; }
.foot a { display: inline-flex; min-height: 32px; align-items: center; font-weight: 700; }
.foot-legal { margin-top: var(--s-8); font-size: 0.875rem; color: var(--muted); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation: none !important; transition: none !important; }
}
