/* Protag coming soon site. Tokens match the Protag app (src/lib/theme.ts in accessmaps-consulting):
   paper and ink in light, warm charcoal in dark, vermilion as the one accent. */

:root {
  --paper: #F3F0E8;
  --paper-deep: #ECE6DA;
  --surface: #FFFDF8;
  --ink: #2A2826;
  --ink2: #4A4640;
  --muted: #5F5A52;
  --line: #DFD8CA;
  --control-line: #857E73;
  --invalid: #B3261E;
  --accent: #B5553C;
  --accent-ink: #FFFFFF;
  --accent-tint: #F6E0D6;
  --link: #8C3F2B;
  --deep: #1F1E1C;
  --deep-ink: #ECE7DD;
  --art-filter: none;
  --radius: 20px;
  --gutter: 20px;
  --display: 'Shippori Mincho', 'Times New Roman', serif;
  --body: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #1F1E1C;
    --paper-deep: #262422;
    --surface: #2A2826;
    --ink: #ECE7DD;
    --ink2: #CFC9BE;
    --muted: #A8A297;
    --line: #4A4741;
    --control-line: #857F74;
    --invalid: #F2B8B5;
    --accent: #D47454;
    --accent-ink: #1F1E1C;
    --accent-tint: #4A2A21;
    --link: #E39A84;
    --deep: #161514;
    --deep-ink: #ECE7DD;
    /* A faint light edge keeps the ink lines of the drawings readable on the dark page. */
    --art-filter: drop-shadow(0 0 1px rgba(236, 231, 221, .55)) drop-shadow(0 0 6px rgba(236, 231, 221, .12));
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--link); }
a:hover { color: var(--ink); }
h1, h2, h3 { margin: 0; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; }

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

.skip { position: absolute; left: 12px; top: -60px; z-index: 10; background: var(--ink); color: var(--paper); padding: 10px 16px; border-radius: 10px; }
.skip:focus { top: 12px; }

.wrap { max-width: 1160px; margin: 0 auto; padding: 0 var(--gutter); }
.narrow { max-width: 760px; }
@media (min-width: 760px) { :root { --gutter: 40px; } }

/* Header */
.top { position: sticky; top: 0; z-index: 5; background: color-mix(in srgb, var(--paper) 92%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.top-row { display: flex; align-items: center; gap: 16px; min-height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; min-height: 44px; }
.wordmark { font-family: var(--display); font-weight: 800; font-size: 26px; letter-spacing: -.01em; line-height: 1; }
.wordmark em { color: var(--accent); }
nav { margin-left: auto; }
.nav { list-style: none; display: none; gap: 4px; }
.nav a { display: flex; align-items: center; min-height: 44px; padding: 0 12px; color: var(--ink2); text-decoration: none; font-weight: 500; font-size: 15px; border-radius: 10px; }
.nav a:hover { color: var(--ink); background: var(--paper-deep); }
@media (min-width: 900px) { .nav { display: flex; } }
@media (max-width: 899px) { .top .btn-small { margin-left: auto; } }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 24px; border-radius: 999px; border: 1.5px solid var(--accent);
  background: var(--accent); color: var(--accent-ink); font: 600 16px/1 var(--body); text-decoration: none; cursor: pointer;
  transition: transform .15s ease, background .15s ease;
}
.btn:hover { color: var(--accent-ink); transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn-ghost:hover { color: var(--ink); background: var(--paper-deep); }
.btn-ink { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.btn-ink:hover { color: var(--paper); }
.btn-small { min-height: 44px; padding: 0 18px; font-size: 15px; }
.btn-wide { width: 100%; }
.btn[disabled] { opacity: .6; cursor: progress; transform: none; }

/* Type */
.eyebrow { font-size: 13px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--link); margin-bottom: 12px; }
h1 { font-family: var(--display); font-weight: 800; font-size: clamp(40px, 6.4vw, 72px); line-height: 1.04; letter-spacing: -.015em; }
h2 { font-family: var(--display); font-weight: 800; font-size: clamp(30px, 4vw, 46px); line-height: 1.1; letter-spacing: -.01em; max-width: 22ch; }
h3 { font-size: 18px; font-weight: 700; line-height: 1.3; }
.lede { font-size: clamp(17px, 1.6vw, 20px); color: var(--ink2); max-width: 36em; }
.intro { font-size: 18px; color: var(--ink2); max-width: 40em; margin-top: 16px; }
.fine { font-size: 14px; color: var(--muted); }
.opt { font-weight: 400; color: var(--muted); }

/* Hero */
.hero { padding: 40px 0 0; }
.hero-grid { display: grid; gap: 32px; align-items: end; }
.hero-copy { display: flex; flex-direction: column; gap: 22px; padding-bottom: 8px; }
.pill { display: inline-flex; align-self: flex-start; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 999px; background: var(--accent-tint); color: var(--ink); font-size: 14px; font-weight: 600; }
.pill .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-art { position: relative; display: flex; flex-direction: column; gap: 12px; }
.stage { position: relative; aspect-ratio: 10 / 7; max-height: 440px; border-bottom: 1.5px solid var(--ink); }
.stage .c { position: absolute; bottom: 0; height: 88%; width: auto; filter: var(--art-filter); }
.stage .c1 { left: -2%; height: 74%; }
.stage .c2 { left: 16%; height: 82%; }
.stage .c3 { left: 50%; transform: translateX(-50%); height: 100%; z-index: 2; }
.stage .c4 { right: 16%; height: 82%; }
.stage .c5 { right: -2%; height: 74%; }
.bubble {
  align-self: flex-start; max-width: 280px; order: -1;
  display: flex; flex-direction: column; gap: 2px; padding: 12px 16px; border-radius: 16px 16px 16px 4px;
  background: var(--surface); border: 1px solid var(--line); box-shadow: 0 8px 24px rgba(42, 40, 38, .08); font-size: 15px; line-height: 1.45;
}
.bubble .who { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--link); }
@media (min-width: 960px) {
  .hero { padding-top: 64px; }
  .hero-grid { grid-template-columns: 1.05fr 1fr; gap: 48px; }
  .hero-copy { padding-bottom: 48px; }
}

/* Beta notice */
.beta { padding: 0 0 8px; }
.beta-box {
  display: grid; gap: 16px; align-items: center; margin-top: 0;
  padding-top: 28px; padding-bottom: 28px; background: var(--paper-deep); border-radius: 0 0 var(--radius) var(--radius);
}
.beta-title { font-family: var(--body); font-size: 20px; font-weight: 700; letter-spacing: 0; max-width: none; }
.beta-box p { color: var(--ink2); max-width: 46em; }
.beta-box .btn { justify-self: start; }
@media (min-width: 960px) { .beta-box { grid-template-columns: 1fr auto; } .beta-box .beta-title { grid-column: 1; } .beta-box p { grid-column: 1; } .beta-box .btn { grid-column: 2; grid-row: 1 / span 2; } }

/* Sections */
.section { padding: 72px 0; }
@media (min-width: 960px) { .section { padding: 104px 0; } }
.section-deep { background: var(--paper-deep); }
.three { list-style: none; display: grid; gap: 16px; margin-top: 40px; }
.three li, .features li { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; display: flex; flex-direction: column; gap: 8px; }
.three p, .features p { color: var(--ink2); }
@media (min-width: 860px) { .three { grid-template-columns: repeat(3, 1fr); } }

/* Cast */
.cast { list-style: none; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 40px; }
.cast li { display: flex; flex-direction: column; gap: 4px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 0 16px 20px; overflow: hidden; }
.cast img { width: 100%; aspect-ratio: 4 / 5; object-fit: contain; object-position: bottom; margin-bottom: 12px; border-bottom: 1px solid var(--line); filter: var(--art-filter); }
.cast h3 { font-family: var(--display); font-size: 22px; font-weight: 800; }
.cast .job { font-size: 13px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--link); margin-bottom: 6px; }
.cast p:not(.job) { font-size: 15px; color: var(--ink2); line-height: 1.5; }
@media (min-width: 760px) { .cast { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

/* Steps */
.steps { list-style: none; counter-reset: step; display: grid; gap: 16px; margin-top: 40px; }
.steps li { counter-increment: step; position: relative; padding: 24px 24px 24px 76px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); }
.steps li::before {
  content: counter(step); position: absolute; left: 24px; top: 24px; width: 36px; height: 36px; border-radius: 50%;
  display: grid; place-items: center; background: var(--ink); color: var(--paper); font-weight: 700; font-size: 15px;
}
.steps .when { font-size: 13px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--link); }
.steps h3 { font-family: var(--display); font-size: 22px; font-weight: 800; margin: 2px 0 6px; }
.steps p:not(.when) { color: var(--ink2); }
@media (min-width: 960px) {
  .steps { grid-template-columns: repeat(5, 1fr); gap: 12px; }
  .steps li { padding: 72px 20px 24px; }
  .steps h3 { font-size: 20px; }
  .steps li::before { left: 20px; }
}

/* Features */
.features { list-style: none; display: grid; gap: 16px; margin-top: 40px; }
@media (min-width: 700px) { .features { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1040px) { .features { grid-template-columns: repeat(4, 1fr); } }
.works { margin-top: 48px; display: flex; flex-direction: column; gap: 16px; }
.logos { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; }
.logos li { padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); font-size: 15px; font-weight: 500; }

/* Register */
.register { background: var(--deep); color: var(--deep-ink); }
.register .eyebrow { color: #E39A84; }
.reg-grid { display: grid; gap: 40px; align-items: start; }
.reg-copy { display: flex; flex-direction: column; gap: 18px; }
.reg-copy > p { color: #D6D0C4; font-size: 18px; max-width: 32em; }
.reg-copy h2 { color: var(--deep-ink); }
.ticks { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.ticks li { position: relative; padding-left: 30px; color: #D6D0C4; }
.ticks li::before { content: ''; position: absolute; left: 2px; top: 6px; width: 14px; height: 8px; border-left: 2.5px solid #E39A84; border-bottom: 2.5px solid #E39A84; transform: rotate(-45deg); }
@media (min-width: 960px) { .reg-grid { grid-template-columns: 1fr 1.1fr; gap: 64px; } }
.card { background: var(--surface); color: var(--ink); border-radius: 24px; padding: 24px; border: 1px solid var(--line); }
@media (min-width: 600px) { .card { padding: 32px; } }
@media (prefers-color-scheme: light) { .register .card { border-color: transparent; } }
.form { display: flex; flex-direction: column; gap: 20px; }
.field { display: flex; flex-direction: column; gap: 8px; border: 0; padding: 0; margin: 0; min-width: 0; }
.field label, .field legend { font-weight: 600; font-size: 15px; padding: 0; }
.field legend { margin-bottom: 8px; }
input[type="text"], input[type="email"], input:not([type]) {
  width: 100%; min-height: 48px; padding: 0 14px; border-radius: 12px; border: 1.5px solid var(--control-line);
  background: var(--paper); color: var(--ink); font: 16px var(--body);
}
input:focus-visible { border-color: var(--accent); outline-offset: 1px; }
input[aria-invalid="true"] { border-color: var(--invalid); border-width: 2px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { position: relative; display: inline-flex; cursor: pointer; }
.chip input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.chip span { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border-radius: 999px; border: 1.5px solid var(--control-line); background: var(--paper); font-size: 15px; font-weight: 500; }
.chip:hover span { border-color: var(--ink2); }
.chip input:checked + span { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.chip input:checked + span::before { content: ''; width: 10px; height: 5px; margin-right: 8px; border-left: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(-45deg) translateY(-2px); }
.chip input:focus-visible + span { outline: 3px solid var(--accent); outline-offset: 2px; }
.more { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 4px 0; }
.more summary { cursor: pointer; min-height: 48px; display: flex; align-items: center; font-weight: 600; gap: 6px; flex-wrap: wrap; }
.more[open] { padding-bottom: 20px; }
.more .field { margin-top: 20px; }
.more summary + .field { margin-top: 8px; }
.check { display: flex; align-items: center; gap: 12px; min-height: 44px; cursor: pointer; font-size: 15px; }
.check input { width: 22px; height: 22px; accent-color: var(--accent); flex: none; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.msg:focus { outline: 3px solid var(--accent); outline-offset: 2px; }
.msg { padding: 12px 16px; border-radius: 12px; font-size: 15px; }
.msg-error { background: #F9DEDC; color: #8C1D18; }
.done { display: flex; flex-direction: column; gap: 12px; align-items: flex-start; }
.done[hidden] { display: none; }
.done h3 { font-family: var(--display); font-size: 32px; font-weight: 800; line-height: 1.15; }
.done p { color: var(--ink2); }

/* FAQ */
.faq h2 { margin-bottom: 24px; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; min-height: 56px; display: flex; align-items: center; font-weight: 600; font-size: 17px; padding: 8px 0; }
.faq details p { padding: 0 0 20px; color: var(--ink2); max-width: 40em; }

/* Footer */
.foot { border-top: 1px solid var(--line); padding: 28px 0 40px; }
.foot-row { display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: center; justify-content: space-between; }
.foot p { font-size: 14px; color: var(--muted); }
.foot a { display: inline-block; padding-block: 12px; }
.foot .wordmark { font-size: 22px; }

/* Simple pages (thanks, privacy, 404) */
.page { padding: 64px 0 96px; }
.page h1 { font-size: clamp(34px, 5vw, 52px); margin-bottom: 20px; }
.page h2 { font-size: 24px; margin: 32px 0 8px; }
.page p, .page li { color: var(--ink2); max-width: 40em; margin-bottom: 12px; }
.page ul { padding-left: 20px; }

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