/* StokeForm website: one stylesheet, no scripts, no external requests. Dark by default (the brand), light when the visitor's system is light. */

@font-face {
  font-family: 'Inter';
  src: url('../fonts/inter-latin.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: dark light;
  --bg: #0b0c0b;
  --surface: #151714;
  --surface-2: #1d201b;
  --border: #2a2d27;
  --text: #f4f3ee;
  --muted: #a9ada4;
  --lime: #c5f36b;
  --lime-text: #c5f36b;
  --on-lime: #12140f;
  --focus: #c5f36b;
  --radius: 18px;
  --page: 1080px;
  --prose: 720px;
  --gutter: clamp(16px, 5vw, 32px);
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #f5f4ee;
    --surface: #ffffff;
    --surface-2: #eceae1;
    --border: #dcd9cc;
    --text: #151714;
    --muted: #5d6157;
    --lime-text: #3f5f0c;
    --focus: #3f5f0c;
  }
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 1rem/1.65 var(--font);
  overflow-wrap: break-word;
}

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

a {
  color: var(--lime-text);
  text-underline-offset: 3px;
}

a:hover {
  text-decoration-thickness: 2px;
}

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  border-radius: 6px;
}

.skip {
  position: absolute;
  left: var(--gutter);
  top: -100px;
  z-index: 10;
  padding: 10px 16px;
  border-radius: 10px;
  background: var(--lime);
  color: var(--on-lime);
  font-weight: 700;
}

.skip:focus {
  top: 12px;
}

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

/* Header */
.site-header {
  border-bottom: 1px solid var(--border);
}

.bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 24px;
  padding-block: 14px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.brand img {
  width: 36px;
  height: 36px;
  border-radius: 9px;
}

.brand .accent {
  color: var(--lime-text);
  font-weight: inherit;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 20px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav a {
  display: inline-block;
  padding: 8px 2px;
  color: var(--muted);
  font-weight: 600;
  text-decoration: none;
}

.nav a:hover,
.nav a[aria-current='page'] {
  color: var(--text);
}

.nav a[aria-current='page'] {
  text-decoration: underline;
  text-decoration-color: var(--lime-text);
  text-decoration-thickness: 3px;
  text-underline-offset: 8px;
}

/* Type */
h1,
h2,
h3 {
  margin: 0;
  line-height: 1.15;
  letter-spacing: -0.025em;
}

h1 {
  font-size: clamp(2.1rem, 7vw, 3.6rem);
  font-weight: 800;
}

h2 {
  font-size: clamp(1.5rem, 4.5vw, 2.1rem);
  font-weight: 800;
}

h3 {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

p {
  margin: 0;
}

.lead {
  max-width: 56ch;
  color: var(--muted);
  font-size: clamp(1.05rem, 2.6vw, 1.25rem);
}

.eyebrow {
  display: inline-block;
  margin-bottom: 16px;
  padding: 5px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--lime-text);
  font-size: 0.85rem;
  font-weight: 700;
}

/* Buttons */
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 24px;
  border: 1.5px solid var(--lime);
  border-radius: 999px;
  background: var(--lime);
  color: var(--on-lime);
  font-weight: 700;
  text-decoration: none;
}

.button:hover {
  filter: brightness(1.06);
}

.button.secondary {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}

.button.secondary:hover {
  border-color: var(--lime-text);
}

/* Home */
.hero {
  display: grid;
  gap: 40px;
  align-items: center;
  padding-block: clamp(40px, 9vw, 96px);
}

@media (min-width: 860px) {
  .hero {
    grid-template-columns: 1.15fr 0.85fr;
  }
}

.hero .lead {
  margin-top: 20px;
}

.hero-art {
  justify-self: center;
  width: min(100%, 360px);
  border-radius: 14%;
  box-shadow: 0 30px 80px -30px rgba(197, 243, 107, 0.45);
}

.section {
  padding-block: clamp(36px, 7vw, 72px);
}

.section > .wrap > h2 {
  margin-bottom: 12px;
}

.section > .wrap > .lead {
  margin-bottom: 32px;
}

.grid {
  display: grid;
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
}

.card {
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.card h3 {
  margin-bottom: 8px;
}

.card p {
  color: var(--muted);
}

.steps {
  counter-reset: step;
}

.callout .actions {
  margin-top: 0;
}

.steps .card::before {
  counter-increment: step;
  content: counter(step);
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  margin-bottom: 14px;
  border-radius: 50%;
  background: var(--lime);
  color: var(--on-lime);
  font-weight: 800;
}

.callout {
  display: grid;
  gap: 16px;
  padding: clamp(24px, 5vw, 40px);
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) + 6px);
  background: var(--surface-2);
}

/* Document pages (terms, privacy, contact) */
.doc {
  max-width: var(--prose);
  margin: 0 auto;
  padding: clamp(32px, 7vw, 72px) var(--gutter) 24px;
}

.doc h1 {
  margin-bottom: 12px;
}

.doc .meta {
  margin-bottom: 32px;
  color: var(--muted);
}

.doc h2 {
  margin: 40px 0 12px;
  font-size: 1.4rem;
}

.doc h3 {
  margin: 24px 0 8px;
}

.doc p,
.doc ul,
.doc ol {
  margin: 0 0 16px;
}

.doc ul,
.doc ol {
  padding-inline-start: 1.3em;
}

.doc li {
  margin-bottom: 6px;
}

.doc .note {
  padding: 16px 20px;
  border: 1px solid var(--border);
  border-left: 4px solid var(--lime);
  border-radius: 12px;
  background: var(--surface);
}

.table-wrap {
  margin: 0 0 16px;
  overflow-x: auto;
}

table {
  width: 100%;
  min-width: 480px;
  border-collapse: collapse;
  font-size: 0.95rem;
}

th,
td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  text-align: start;
  vertical-align: top;
}

th {
  color: var(--muted);
  font-weight: 700;
}

/* Narrow screens: each row becomes a small card with its column names, so nothing needs sideways scrolling. */
@media (max-width: 640px) {
  .stack table,
  .stack tbody,
  .stack tr,
  .stack td {
    display: block;
    min-width: 0;
    width: 100%;
  }

  .stack thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
  }

  .stack tr {
    margin-bottom: 12px;
    padding: 6px 16px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--surface);
  }

  .stack td {
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
  }

  .stack td:last-child {
    border-bottom: 0;
  }

  .stack td::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 2px;
    color: var(--muted);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
  }
}

.contact-card {
  display: grid;
  gap: 6px;
  margin: 28px 0;
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.contact-card .mail {
  font-size: clamp(1.15rem, 4.2vw, 1.5rem);
  font-weight: 800;
  overflow-wrap: anywhere;
}

/* Footer */
.site-footer {
  margin-top: 48px;
  padding-block: 32px 48px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.92rem;
}

.site-footer .wrap {
  display: grid;
  gap: 16px;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 20px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-nav a {
  display: inline-block;
  padding: 6px 0;
  color: var(--text);
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}
