/* SCENE website. Colours mirror the app's Palette.swift. */
:root {
  color-scheme: dark;
  --background: #090b10;
  --surface: #151923;
  --elevated: #202633;
  --text-primary: #f7f8fa;
  --text-secondary: #9ca4b4;
  --accent: #e94f64;
  --accent-support: #7b83ff;
  --success: #4cc38a;
  --radius: 16px;
  --gutter: 20px;
  --measure: 44rem;
}

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

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

body {
  margin: 0;
  background: var(--background);
  color: var(--text-primary);
  font: 400 1.0625rem/1.6 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: var(--accent); text-underline-offset: 3px; }
a:hover { color: #ff7487; }
:focus-visible { outline: 3px solid var(--accent-support); outline-offset: 3px; border-radius: 6px; }

.skip-link {
  position: absolute; left: var(--gutter); top: -100px;
  background: var(--accent); color: var(--background); padding: 8px 14px; border-radius: 8px; font-weight: 700; z-index: 10;
}
.skip-link:focus { top: 12px; }

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

/* Header */
.site-header { border-bottom: 1px solid var(--elevated); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; flex-wrap: wrap; }
.brand {
  color: var(--text-primary); text-decoration: none;
  font-weight: 900; font-stretch: condensed; letter-spacing: 0.18em; font-size: 1.25rem;
}
.brand span { color: var(--accent); }
.nav { display: flex; gap: 4px; flex-wrap: wrap; }
.nav a {
  color: var(--text-secondary); text-decoration: none; font-weight: 600; font-size: 0.95rem;
  padding: 10px 12px; border-radius: 10px; min-height: 44px; display: inline-flex; align-items: center;
}
.nav a:hover { color: var(--text-primary); background: var(--surface); }
.nav a[aria-current="page"] { color: var(--text-primary); background: var(--surface); }

main { flex: 1; }

/* Type */
h1, h2, h3 { line-height: 1.15; font-stretch: condensed; letter-spacing: -0.01em; }
h1 { font-size: clamp(2.2rem, 6vw, 3.6rem); font-weight: 900; margin: 0 0 16px; }
h2 { font-size: 1.5rem; font-weight: 800; margin: 40px 0 12px; }
h3 { font-size: 1.1rem; font-weight: 700; margin: 0 0 6px; }
p { margin: 0 0 14px; }
.lead { font-size: 1.2rem; color: var(--text-secondary); max-width: 36rem; }
.muted { color: var(--text-secondary); }
.eyebrow { color: var(--accent); font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; font-size: 0.8rem; margin-bottom: 12px; }

/* Home */
.hero { padding: 72px 0 48px; position: relative; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: -40% -10% auto auto; width: 60vw; height: 60vw; max-width: 640px; max-height: 640px;
  background: radial-gradient(closest-side, rgba(233, 79, 100, 0.22), transparent 70%);
  pointer-events: none;
}
.hero .wrap { position: relative; }
.badge {
  display: inline-flex; align-items: center; gap: 8px; margin-top: 12px;
  background: var(--surface); border: 1px solid var(--elevated); border-radius: 999px;
  padding: 10px 16px; font-weight: 600; color: var(--text-secondary);
}
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: 14px; padding-bottom: 32px; }
.card { background: var(--surface); border: 1px solid var(--elevated); border-radius: var(--radius); padding: 22px; }
.card p { color: var(--text-secondary); margin: 0; }
.card .icon { font-size: 1.5rem; margin-bottom: 10px; display: block; }
.links { display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: 14px; padding: 8px 0 56px; }
.link-card { display: block; text-decoration: none; color: inherit; transition: border-color .15s, transform .15s; }
.link-card:hover { border-color: var(--accent); color: inherit; transform: translateY(-2px); }
.link-card h3::after { content: " →"; color: var(--accent); }

/* Documents */
.doc { max-width: var(--measure); padding: 48px 0 64px; }
.doc ul { padding-left: 1.2rem; margin: 0 0 14px; }
.doc li { margin-bottom: 6px; }
.summary { background: var(--surface); border: 1px solid var(--elevated); border-left: 4px solid var(--accent); border-radius: var(--radius); padding: 18px 22px; margin: 24px 0 8px; }
.summary ul { margin: 0; }
.toc { color: var(--text-secondary); font-size: 0.95rem; }
.toc ol { padding-left: 1.2rem; columns: 2 14rem; }

/* Form */
.form { display: grid; gap: 18px; margin-top: 24px; }
.field { display: grid; gap: 6px; }
label, .label { font-weight: 600; }
.hint { color: var(--text-secondary); font-size: 0.9rem; font-weight: 400; }
input, select, textarea {
  font: inherit; color: var(--text-primary); background: var(--surface);
  border: 1px solid var(--elevated); border-radius: 12px; padding: 12px 14px; min-height: 48px; width: 100%;
}
textarea { min-height: 10rem; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent-support); box-shadow: 0 0 0 3px rgba(123, 131, 255, 0.35); }
[aria-invalid="true"] { border-color: var(--accent); }
.error-text { color: #ff8a9a; font-size: 0.9rem; min-height: 1em; }
.trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.counter { color: var(--text-secondary); font-size: 0.85rem; text-align: right; }
.button {
  font: inherit; font-weight: 800; cursor: pointer; border: 0; border-radius: 14px; min-height: 52px; padding: 0 24px;
  background: var(--accent); color: var(--background); justify-self: start;
}
.button:hover { background: #ff6378; }
.button[disabled] { opacity: .6; cursor: progress; }
.status { border-radius: var(--radius); padding: 16px 20px; display: none; }
.status.show { display: block; }
.status.ok { background: rgba(76, 195, 138, 0.12); border: 1px solid var(--success); }
.status.fail { background: rgba(233, 79, 100, 0.12); border: 1px solid var(--accent); }

/* Footer */
.site-footer { border-top: 1px solid var(--elevated); color: var(--text-secondary); font-size: 0.9rem; padding: 28px 0 36px; }
.site-footer .wrap { display: grid; gap: 10px; }
.site-footer nav { display: flex; gap: 18px; flex-wrap: wrap; }
.site-footer a { color: var(--text-secondary); }
.site-footer a:hover { color: var(--text-primary); }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
