/* ofodevelopment.com — one hand-written stylesheet.
 *
 * There is no Node on the host, so there is no build step and no purge pass.
 * That is the point: deploy is a file copy. Keep this file readable and keep
 * it the only stylesheet.
 *
 * Palette: "Petrol dark", approved 2026-08-08. Dark-only by decision — there is
 * no light fallback and no toggle. Every pair below is asserted on every test
 * run by tests/unit-palette.php, so these numbers cannot drift from the tokens:
 *   ink / paper        15.95:1
 *   ink / paper-alt    14.71:1
 *   ink-soft / paper    7.63:1
 *   accent / paper     10.09:1
 *   accent-ink / accent 9.12:1   (button label)
 *   error / paper       8.30:1
 * --rule / --paper is 1.33:1; it is a border, not text, so no minimum applies.
 * Print styles at the bottom stay light deliberately — do not darken them.
 */

/* ---------------------------------------------------------------- tokens - */

:root {
  color-scheme: dark;

  --ink: #e8edef;
  --ink-soft: #9aa7ad;
  --paper: #0e1214;
  --paper-alt: #161b1e;
  --rule: #242c31;
  --accent: #4fd1c5;
  --accent-deep: #7fe0d7;
  --accent-ink: #06201f;
  --error: #ff8a8a;

  --measure: 36rem;
  --gutter: 1.5rem;
  --shell: 68rem;

  --step: clamp(1rem, 0.96rem + 0.2vw, 1.125rem);
  --step-lg: clamp(1.25rem, 1.15rem + 0.5vw, 1.5rem);
  --h1: clamp(2.25rem, 1.7rem + 2.6vw, 4rem);
  --h2: clamp(1.5rem, 1.3rem + 0.9vw, 2.125rem);
  --h3: clamp(1.125rem, 1.05rem + 0.35vw, 1.375rem);

  --stack: 1.15em;
  --radius: 3px;
}

/* ----------------------------------------------------------------- reset - */

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

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

body,
h1,
h2,
h3,
p,
ul,
ol,
figure,
blockquote {
  margin: 0;
}

ul[class],
ol[class] {
  list-style: none;
  padding: 0;
}

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

input,
textarea,
button,
select {
  font: inherit;
  color: inherit;
}

/* ------------------------------------------------------------------ base - */

body {
  background: var(--paper);
  color: var(--ink);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: var(--step);
  line-height: 1.65;
  text-rendering: optimizeLegibility;
  display: flex;
  min-height: 100vh;
  flex-direction: column;
}

h1,
h2,
h3 {
  line-height: 1.15;
  letter-spacing: -0.02em;
  font-weight: 620;
  text-wrap: balance;
}

h1 {
  font-size: var(--h1);
  letter-spacing: -0.035em;
}

h2 {
  font-size: var(--h2);
}

h3 {
  font-size: var(--h3);
}

p {
  max-width: var(--measure);
  text-wrap: pretty;
}

p + p {
  margin-top: var(--stack);
}

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--accent-deep);
}

strong {
  font-weight: 620;
}

/* -------------------------------------------------------------- a11y ---- */

.skip-link {
  position: absolute;
  left: -9999px;
}

.skip-link:focus {
  position: fixed;
  left: 1rem;
  top: 1rem;
  z-index: 10;
  background: var(--accent);
  color: var(--accent-ink);
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
  text-decoration: none;
}

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

/* ---------------------------------------------------------------- layout - */

.wrap {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

main.wrap {
  flex: 1 0 auto;
  padding-block: clamp(2.5rem, 1.5rem + 4vw, 5rem);
}

.section {
  margin-top: clamp(2.5rem, 1.8rem + 3vw, 4.5rem);
  padding-top: clamp(2.5rem, 1.8rem + 3vw, 4.5rem);
  border-top: 1px solid var(--rule);
}

.section > * + * {
  margin-top: var(--stack);
}

.section h2 + p {
  margin-top: 0.85em;
}

/* ------------------------------------------------------------------- nav - */

.nav {
  border-bottom: 1px solid var(--rule);
}

.nav .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  min-height: 4.5rem;
  flex-wrap: wrap;
}

.nav img {
  height: 48px;
  width: auto;
}

.nav ul {
  display: flex;
  gap: clamp(1rem, 0.5rem + 1.6vw, 2rem);
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav a {
  color: var(--ink-soft);
  text-decoration: none;
  padding-block: 0.35rem;
  border-bottom: 2px solid transparent;
}

.nav a:hover {
  color: var(--ink);
}

.nav a[aria-current="page"] {
  color: var(--ink);
  border-bottom-color: var(--accent);
}

/* ------------------------------------------------------------------ hero - */

.hero {
  padding-block: clamp(1rem, 0.5rem + 2vw, 2.5rem) 0;
}

.hero h1 {
  max-width: 18ch;
}

.hero p {
  margin-top: 1.1em;
  font-size: var(--step-lg);
  color: var(--ink-soft);
  max-width: 42ch;
}

.hero .btn {
  margin-top: 1.75rem;
}

/* --------------------------------------------------------------- buttons - */

.btn {
  display: inline-block;
  background: var(--accent);
  color: var(--accent-ink);
  text-decoration: none;
  font-weight: 560;
  padding: 0.7rem 1.4rem;
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  cursor: pointer;
}

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

/* ----------------------------------------------------------------- forms - */

form {
  margin-top: 2rem;
  max-width: var(--measure);
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-top: 1.35rem;
}

.field label {
  font-weight: 560;
}

.field label span {
  font-weight: 400;
  color: var(--ink-soft);
}

.field input,
.field textarea {
  width: 100%;
  padding: 0.65rem 0.75rem;
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
}

.field input:focus,
.field textarea:focus {
  border-color: var(--accent);
}

.field textarea {
  resize: vertical;
  min-height: 9rem;
}

.error {
  color: var(--error);
  font-size: 0.925rem;
}

.note {
  background: var(--paper-alt);
  border-left: 3px solid var(--accent);
  padding: 0.9rem 1.1rem;
  border-radius: 0 var(--radius) var(--radius) 0;
}

/* Honeypot. Off-screen rather than display:none — some bots skip hidden
   fields but happily fill positioned ones. */
.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* ---------------------------------------------------------------- footer - */

footer {
  flex-shrink: 0;
  margin-top: clamp(3rem, 2rem + 4vw, 6rem);
  border-top: 1px solid var(--rule);
  background: var(--paper-alt);
  padding-block: 2rem;
  color: var(--ink-soft);
  font-size: 0.95rem;
}

footer .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 2rem;
  align-items: center;
  justify-content: space-between;
}

footer ul {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

footer a {
  color: var(--ink-soft);
  text-decoration-color: var(--rule);
}

footer a:hover {
  color: var(--ink);
}

/* --------------------------------------------------------- preferences -- */

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

@media print {
  .nav,
  .skip-link,
  form,
  .btn {
    display: none;
  }

  body {
    color: #000;
    background: #fff;
  }

  a::after {
    content: " (" attr(href) ")";
    font-size: 0.9em;
    color: #444;
  }
}
