/* Varstel - one-page site. Two colours, one accent, system sans. */

:root {
  --paper: #f6f5f2;
  --paper-2: #efede8;
  --card: #ffffff;
  --ink: #1a1d21;
  --ink-2: #5b6068;
  --rule: #e2dfd9;
  --accent: #2c6e63;
  --accent-2: #235a51;
  --focus: #2c6e63;
  --max: 68rem;
  --narrow: 42rem;
  --gap: clamp(1rem, 3vw, 1.5rem);
  --pad: clamp(1.25rem, 5vw, 2.5rem);
  --section: clamp(4rem, 10vw, 7rem);
  --font: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

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

html {
  font-family: var(--font);
  font-size: 106.25%;               /* 17px */
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  -webkit-text-size-adjust: 100%;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  scroll-padding-top: 4.5rem;
}
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body { margin: 0; }

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

h1, h2, h3, h4 {
  margin: 0;
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.01em;
  text-wrap: balance;
}
h1 { font-size: clamp(2.1rem, 5.2vw, 3.4rem); letter-spacing: -0.02em; max-width: 20ch; }
h2 { font-size: clamp(1.6rem, 3.4vw, 2.2rem); margin-bottom: 1rem; }
h3 { font-size: clamp(1.25rem, 2.4vw, 1.5rem); }
h4 { font-size: 1.05rem; }

p { margin: 0 0 1rem; max-width: 62ch; }
p:last-child { margin-bottom: 0; }

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

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

.wrap { width: min(100% - 2 * var(--pad), var(--max)); margin-inline: auto; }
.wrap.narrow { max-width: var(--narrow); }
.row { display: flex; align-items: center; justify-content: space-between; gap: var(--gap); flex-wrap: wrap; }

/* Skip link */
.skip {
  position: absolute; left: 0; top: 0; transform: translateY(-120%);
  padding: 0.6rem 1rem; background: var(--ink); color: var(--paper);
  z-index: 100; text-decoration: none;
}
.skip:focus { transform: none; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 10;
  background: rgba(246, 245, 242, 0.92);
  backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid var(--rule);
}
.site-header .wrap { min-height: 3.75rem; }
.wordmark { font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; font-size: 0.95rem; color: var(--ink); text-decoration: none; }
.site-header nav { display: flex; gap: clamp(0.9rem, 3vw, 1.75rem); flex-wrap: wrap; }
.site-header nav a { color: var(--ink-2); text-decoration: none; font-size: 0.92rem; padding: 0.35rem 0; border-bottom: 1px solid transparent; transition: color 160ms ease, border-color 160ms ease; }
.site-header nav a:hover { color: var(--ink); border-color: var(--ink); }

/* Hero */
.hero { padding: clamp(4.5rem, 14vw, 9rem) 0 var(--section); }
.eyebrow { font-size: 0.85rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); margin-bottom: 1.25rem; font-weight: 600; }
.hero h1 { margin-bottom: 1.5rem; }
.lead { font-size: clamp(1.1rem, 2vw, 1.3rem); color: var(--ink-2); max-width: 52ch; }
.hero .button { margin-top: 0.75rem; }

/* Subtle entrance, opt-in only */
@media (prefers-reduced-motion: no-preference) {
  .rise { animation: rise 640ms cubic-bezier(0.2, 0.7, 0.2, 1) both; }
  .rise:nth-child(2) { animation-delay: 60ms; }
  .rise:nth-child(3) { animation-delay: 120ms; }
  .rise:nth-child(4) { animation-delay: 180ms; }
  .rise:nth-child(5) { animation-delay: 240ms; }
  @keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
}

/* Buttons */
.button {
  display: inline-block; padding: 0.8rem 1.35rem;
  background: var(--ink); color: var(--paper);
  border: 1px solid var(--ink); border-radius: 4px;
  font: inherit; font-weight: 500; text-decoration: none; cursor: pointer;
  transition: background-color 160ms ease, border-color 160ms ease, transform 160ms ease;
}
.button:hover { background: var(--accent-2); border-color: var(--accent-2); color: var(--paper); }
.button:active { transform: translateY(1px); }
.button:disabled { opacity: 0.6; cursor: default; transform: none; }

/* Sections */
.section { padding: var(--section) 0; border-top: 1px solid var(--rule); }
.section.alt { background: var(--paper-2); }
.intro { color: var(--ink-2); font-size: 1.08rem; margin-bottom: 2.5rem; }

.line { padding: 2.5rem 0; border-top: 1px solid var(--rule); }
.line:first-of-type { border-top: 0; padding-top: 0; }
.line-head { max-width: var(--narrow); margin-bottom: 1.75rem; }
.line-head h3 { margin-bottom: 0.6rem; }
.line-head p { color: var(--ink-2); }
.sub { margin: 2rem 0 1rem; color: var(--ink-2); font-weight: 500; font-size: 0.95rem; letter-spacing: 0.04em; text-transform: uppercase; }
.note { margin-top: 1.5rem; color: var(--ink-2); font-size: 0.95rem; max-width: var(--narrow); }

/* Cards */
.cards { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--gap); grid-template-columns: 1fr; }
@media (min-width: 40em) { .cards { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 62em) { .cards { grid-template-columns: repeat(3, 1fr); } }
.card {
  background: var(--card); border: 1px solid var(--rule); border-radius: 6px;
  padding: 1.5rem; display: flex; flex-direction: column; gap: 0.6rem;
  transition: border-color 160ms ease;
}
.card:hover { border-color: #c9c5bd; }
.card h4 { color: var(--ink); }
.card p { font-size: 0.97rem; color: var(--ink-2); margin: 0; }
.card .meta { margin-top: auto; padding-top: 0.75rem; font-size: 0.85rem; color: var(--accent); font-weight: 500; }
.cards.compact .card { padding: 1.2rem 1.35rem; }
.cards.compact .card h4 { font-size: 1rem; }

/* Principles */
.principles { margin: 0; display: grid; gap: 1.75rem; }
.principles > div { padding-left: 1.25rem; border-left: 2px solid var(--accent); }
.principles dt { font-weight: 600; margin-bottom: 0.35rem; }
.principles dd { margin: 0; color: var(--ink-2); }

/* Form */
.form { display: grid; gap: 1.1rem; max-width: 36rem; }
.field { display: grid; gap: 0.4rem; }
label { font-weight: 500; font-size: 0.95rem; }
input, textarea {
  width: 100%; font: inherit; color: var(--ink);
  padding: 0.7rem 0.85rem; background: var(--card);
  border: 1px solid #cfcbc3; border-radius: 4px;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}
textarea { resize: vertical; min-height: 9rem; }
input:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(44, 110, 99, 0.18); }
.form-actions { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; margin-top: 0.25rem; }
.form-status { color: var(--ink-2); font-size: 0.95rem; }
.small { font-size: 0.88rem; color: var(--ink-2); }

/* Honeypot: off-screen, not display:none, so naive bots still fill it */
.hp { position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }

/* Post-submit notices, shown by URL fragment so they work without JavaScript */
.notice { display: none; padding: 0.9rem 1.1rem; border-radius: 4px; margin-bottom: 1.5rem; max-width: 36rem; }
.notice:target { display: block; }
.notice.ok { background: #e6f0ed; border: 1px solid #bcd6cf; color: #1f4d45; }
.notice.err { background: #f5e9e6; border: 1px solid #e0c4bd; color: #6b2f24; }

/* Footer */
.site-footer { padding: 2.5rem 0 3rem; border-top: 1px solid var(--rule); color: var(--ink-2); font-size: 0.95rem; }
.site-footer p { margin-bottom: 0.4rem; }
.site-footer a { color: inherit; }
