/* ============================================================
   LevelSync — site stylesheet
   Design direction: "Nordic infrastructure" (calm, exact, editorial)
   All colors meet WCAG 2.2 AA in their documented pairings.
   No external requests. Flat-dash class names.
   ============================================================ */

:root {
  /* Brand — orange sampled from official vector logo (CMYK 3.3/50.7/88.8/0.2) */
  --brand: #FA7D12;        /* identity, primary buttons (with ink text), accents */
  --brand-down: #E06F0D;   /* pressed/hover surfaces */
  --brand-link: #A14C03;   /* text links: 5.9:1 on white, 5.8:1 on canvas */
  --brand-soft: #FDEDDE;   /* pale tint panels; use ink text on it */
  --slate: #5C686D;        /* wordmark gray: eyebrows, secondary headings */
  --ink: #191918;
  --text: #333330;
  --muted: #686762;        /* smallest legible meta text */
  --canvas: #f7f6f2;
  --surface: #ffffff;
  --line: #deddd7;
  --ok: #1a7a3c;
  --error: #b3261e;
  --focus: #B85602;

  --max: 1240px;
  --measure: 46rem;
  --radius: 8px;
  --step: 8px;
}

/* ── Reset & base ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
body {
  margin: 0;
  overflow-x: clip;
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--canvas);
}
img, svg { max-width: 100%; height: auto; }
h1, h2, h3, h4 { color: var(--ink); line-height: 1.15; margin: 0 0 0.6em; letter-spacing: -0.015em; }
h1 { font-size: clamp(2.25rem, 5vw, 3.75rem); font-weight: 700; }
h2 { font-size: clamp(1.75rem, 3.5vw, 2.5rem); font-weight: 700; }
h3 { font-size: clamp(1.2rem, 2vw, 1.5rem); font-weight: 600; }
p { margin: 0 0 1em; max-width: var(--measure); }
a { color: var(--brand-link); text-decoration: underline; text-underline-offset: 2px; }
a:hover { color: var(--brand-down); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 2px; }
ul, ol { padding-left: 1.3em; }
li { margin-bottom: 0.35em; }
strong { color: var(--ink); }
hr { border: 0; border-top: 1px solid var(--line); margin: 32px 0; }

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--ink); color: #fff; padding: 10px 18px; text-decoration: none;
}
.skip-link:focus { left: 8px; top: 8px; color: #fff; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 24px; }

/* ── Header ───────────────────────────────────────────────── */
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 50;
}
.header-inner {
  display: flex; align-items: center; gap: 24px;
  min-height: 72px;
}
.header-brand { display: flex; align-items: baseline; gap: 12px; text-decoration: none; }
.header-brand img { height: 40px; width: auto; display: block; }
.brand-endorsement {
  font-size: 0.75rem; color: var(--muted); white-space: nowrap;
  border-left: 1px solid var(--line); padding-left: 12px;
  align-self: center;
}
.site-nav { margin-left: auto; }
.site-nav ul { display: flex; align-items: center; gap: 4px; list-style: none; margin: 0; padding: 0; }
.site-nav a {
  display: block; padding: 10px 14px; text-decoration: none; white-space: nowrap;
  color: var(--text); font-weight: 500; font-size: 0.95rem; border-radius: 4px;
}
@media (max-width: 1100px) {
  .site-nav a { padding: 10px 9px; font-size: 0.9rem; }
}
.site-nav a:hover { color: var(--ink); background: var(--canvas); }
.site-nav a[aria-current="page"] { color: var(--brand-link); }
.nav-cta {
  background: var(--brand); color: var(--ink) !important; font-weight: 600;
  border-radius: 6px; margin-left: 8px;
}
.nav-cta:hover { background: var(--brand-down) !important; }
.nav-toggle {
  display: none; margin-left: auto;
  background: none; border: 1px solid var(--line); border-radius: 6px;
  padding: 10px 12px; cursor: pointer; font: inherit; color: var(--ink);
}

@media (max-width: 900px) {
  .brand-endorsement { display: none; }
  .nav-toggle { display: block; }
  .site-nav { display: none; position: absolute; top: 100%; left: 0; right: 0;
    background: var(--surface); border-bottom: 1px solid var(--line);
    box-shadow: 0 12px 24px rgba(25,25,24,0.08); }
  .site-nav.is-open { display: block; }
  .site-nav ul { flex-direction: column; align-items: stretch; gap: 0; padding: 8px 16px 16px; }
  .site-nav a { padding: 13px 10px; font-size: 1.05rem; }
  .nav-cta { margin: 8px 0 0; text-align: center; }
}

/* ── Sections ─────────────────────────────────────────────── */
.section { padding: 72px 0; }
.section-tight { padding: 48px 0; }
.section-alt { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.eyebrow {
  display: block; font-size: 0.8125rem; font-weight: 600; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--slate); margin-bottom: 12px;
}
.lede { font-size: 1.2rem; color: var(--text); }

/* ── Hero ─────────────────────────────────────────────────── */
.hero { padding: 80px 0 64px; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: 56px; align-items: center; }
/* Brand-orange accent: ink text with an exact-#FA7D12 underline — the true
   brand color stays decorative, so text contrast rules are satisfied. */
.hero h1 .accent {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--brand);
  text-decoration-thickness: 0.14em;
  text-underline-offset: 0.13em;
  text-decoration-skip-ink: none;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 28px; }
@media (max-width: 560px) {
  .hero-actions { display: grid; grid-template-columns: 1fr; }
  .hero-actions .btn { text-align: center; }
}
.hero-visual { min-width: 0; }
.hero-visual figcaption { font-size: 0.8125rem; color: var(--muted); margin-top: 10px; }
@media (max-width: 900px) {
  .hero { padding: 48px 0 40px; }
  .hero-grid { grid-template-columns: 1fr; gap: 36px; }
}

/* ── Buttons ──────────────────────────────────────────────── */
.btn {
  display: inline-block; padding: 13px 26px; border-radius: 6px;
  font-weight: 600; font-size: 1rem; text-decoration: none; cursor: pointer;
  border: 1px solid transparent; transition: background 160ms ease, color 160ms ease;
}
.btn-primary { background: var(--brand); color: var(--ink); }
.btn-primary:hover { background: var(--brand-down); color: var(--ink); }
.btn-secondary { background: transparent; color: var(--brand-link); border-color: var(--line); }
.btn-secondary:hover { border-color: var(--brand-link); color: var(--brand-down); }

/* ── Proof strip ──────────────────────────────────────────── */
.proof-strip { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--surface); }
.proof-strip ul {
  list-style: none; margin: 0; padding: 18px 0;
  display: flex; flex-wrap: wrap; gap: 10px 40px;
}
.proof-strip li {
  margin: 0; font-size: 0.9rem; font-weight: 500; color: var(--text);
  display: flex; align-items: center; gap: 9px;
}
.proof-strip li::before {
  content: ""; width: 8px; height: 8px; border-radius: 50%;
  background: var(--brand); flex: none;
}

/* ── Editorial split ──────────────────────────────────────── */
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 64px; align-items: center; }
.split + .split { margin-top: 88px; }
.split-reverse > :first-child { order: 2; }
@media (max-width: 900px) {
  .split, .split-reverse { grid-template-columns: 1fr; gap: 28px; }
  .split-reverse > :first-child { order: 0; }
  .split + .split { margin-top: 56px; }
}
.split-visual { min-width: 0; }
.split-visual img, .split-visual svg { border-radius: var(--radius); display: block; }
.icon-line { width: 52px; height: 52px; margin-bottom: 18px; display: block; }

/* Hosting diagram: desktop vs vertical mobile variant */
.diagram-mobile { display: none; }
@media (max-width: 700px) {
  .diagram-desktop { display: none; }
  .hero-visual { width: 100%; max-width: 360px; margin-inline: auto; }
  .diagram-mobile { display: block; width: 100%; max-width: 360px; height: auto; margin-inline: auto; }
}

/* ── Steps (how it works) ─────────────────────────────────── */
.steps { list-style: none; margin: 40px 0 0; padding: 0;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px; counter-reset: step; }
.steps li { margin: 0; counter-increment: step; border-top: 3px solid var(--brand); padding-top: 18px; }
.steps li::before {
  content: counter(step, decimal-leading-zero);
  display: block; font-size: 0.8125rem; font-weight: 600; color: var(--slate);
  letter-spacing: 0.08em; margin-bottom: 6px;
}
.steps h3 { font-size: 1.05rem; margin-bottom: 0.4em; }
.steps p { font-size: 0.95rem; margin: 0; }
@media (max-width: 900px) { .steps { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .steps { grid-template-columns: 1fr; gap: 24px; } }

/* ── Fact table ───────────────────────────────────────────── */
.fact-table { width: 100%; border-collapse: collapse; margin: 24px 0; font-size: 0.98rem; }
.fact-table th, .fact-table td { text-align: left; padding: 12px 16px 12px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.fact-table th { color: var(--ink); font-weight: 600; white-space: nowrap; width: 34%; }
.fact-table td { color: var(--text); }
.table-scroll { overflow-x: auto; }
@media (max-width: 700px) {
  .fact-table th { white-space: normal; width: auto; min-width: 9em; }
}

/* ── Control list (security) ──────────────────────────────── */
.control-list { list-style: none; margin: 32px 0 0; padding: 0;
  display: grid; grid-template-columns: 1fr 1fr; gap: 28px 48px; }
.control-list li { margin: 0; padding-left: 20px; border-left: 3px solid var(--brand); }
.control-list h3 { font-size: 1.02rem; margin-bottom: 0.3em; }
.control-list p { font-size: 0.95rem; margin: 0; }
@media (max-width: 700px) { .control-list { grid-template-columns: 1fr; } }

/* ── Notice / info boxes ──────────────────────────────────── */
.notice { background: var(--brand-soft); border-radius: var(--radius); padding: 20px 24px; margin: 24px 0; }
.notice p { margin: 0; color: var(--ink); font-size: 0.98rem; }
.notice-plain { background: var(--surface); border: 1px solid var(--line); }

/* ── FAQ ──────────────────────────────────────────────────── */
.faq { max-width: var(--measure); }
.faq details { border-top: 1px solid var(--line); }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary {
  cursor: pointer; padding: 18px 40px 18px 0; font-weight: 600; color: var(--ink);
  list-style: none; position: relative; font-size: 1.02rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; position: absolute; right: 4px; top: 50%; transform: translateY(-50%);
  font-size: 1.4rem; font-weight: 400; color: var(--brand-link);
}
.faq details[open] summary::after { content: "\2212"; }
.faq details > div { padding: 0 0 20px; }
.faq p:last-child { margin-bottom: 0; }

/* ── Forms ────────────────────────────────────────────────── */
.form-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 32px; max-width: 620px; }
.form-row { margin-bottom: 20px; }
.form-row label { display: block; font-weight: 600; color: var(--ink); margin-bottom: 6px; font-size: 0.95rem; }
.form-row .optional { font-weight: 400; color: var(--muted); }
.form-row input, .form-row textarea, .form-row select {
  width: 100%; padding: 12px 14px; font: inherit; color: var(--ink);
  border: 1px solid var(--line); border-radius: 6px; background: var(--surface);
}
.form-row input:focus, .form-row textarea:focus, .form-row select:focus {
  border-color: var(--focus); outline: 2px solid var(--focus); outline-offset: 0;
}
.form-hint { font-size: 0.85rem; color: var(--muted); margin-top: 5px; }
.form-privacy { font-size: 0.875rem; color: var(--muted); margin: 18px 0; }
.form-status { border-radius: 6px; padding: 14px 16px; margin-bottom: 18px; font-size: 0.95rem; display: none; }
.form-status.is-ok { display: block; background: #e8f5ec; color: var(--ok); }
.form-status.is-error { display: block; background: #fdecea; color: var(--error); }
/* honeypot — hidden from humans, present for bots */
.hp-field { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }

/* ── App badges ───────────────────────────────────────────── */
.store-badges { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; margin: 18px 0; }
.store-badges img { height: 44px; width: auto; }

/* ── Contact / offices ────────────────────────────────────── */
.office-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; margin-top: 32px; }
.office h3 { font-size: 1.02rem; margin-bottom: 0.4em; }
.office p { font-size: 0.95rem; margin-bottom: 0.3em; }
@media (max-width: 800px) { .office-grid { grid-template-columns: 1fr; } }

/* ── Final CTA band ───────────────────────────────────────── */
.cta-band { background: var(--ink); }
.cta-band .section { padding: 64px 0; }
.cta-band h2, .cta-band p { color: #fff; }
.cta-band p { color: #d6d5d0; }
.cta-band .btn-secondary { color: #fff; border-color: #4a4a48; }
.cta-band .btn-secondary:hover { border-color: #fff; color: #fff; }

/* ── Footer ───────────────────────────────────────────────── */
.site-footer { background: var(--surface); border-top: 1px solid var(--line); padding: 48px 0 32px; font-size: 0.9rem; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; }
.footer-brand img { height: 34px; margin-bottom: 14px; }
.footer-trust { color: var(--muted); font-size: 0.85rem; max-width: 34ch; }
.site-footer h4 { font-size: 0.8125rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--slate); margin-bottom: 12px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 8px; }
.site-footer a { color: var(--text); text-decoration: none; }
.site-footer a:hover { color: var(--brand-link); text-decoration: underline; }
.footer-legal { border-top: 1px solid var(--line); margin-top: 40px; padding-top: 20px;
  color: var(--muted); font-size: 0.8125rem; display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; }
.footer-legal p { margin: 0; max-width: none; }
@media (max-width: 800px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 500px) { .footer-grid { grid-template-columns: 1fr; } }

/* ── Legal / long-form pages ──────────────────────────────── */
.prose { max-width: var(--measure); }
.prose h2 { font-size: 1.4rem; margin-top: 2em; }
.prose h3 { font-size: 1.1rem; margin-top: 1.6em; }
.page-meta { font-size: 0.875rem; color: var(--muted); }

/* ── Diagram ──────────────────────────────────────────────── */
.diagram-panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; overflow-x: auto; }
