@font-face { font-family: "Inter"; src: url("fonts/inter.woff2") format("woff2"); font-weight: 400 700; font-display: swap; }
@font-face { font-family: "Outfit"; src: url("fonts/outfit.woff2") format("woff2"); font-weight: 600; font-display: swap; }

:root {
  --primary-dark: #160A1F;
  --magenta: #D10075;
  --purple: #7E26C1;
  --glow: #B979ED;
  --cyan: #2EB7D8;
  --silver: #F4F5F8;
  --text: #221C26;
  --muted: #6F6B75;
  --border: #E3E4EA;
  --white: #FFFFFF;
  --font-head: "Outfit", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --font-body: "Inter", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

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

:focus-visible { outline: 3px solid var(--cyan); outline-offset: 3px; }
main:focus { outline: 0; }
.skip { position: absolute; left: -9999px; z-index: 20; padding: 12px 20px; background: var(--white); color: var(--primary-dark); font-weight: 600; }
.skip:focus { left: 16px; top: 16px; }

body {
  margin: 0;
  background: var(--silver);
  color: var(--text);
  font: 400 1.0625rem/1.6 var(--font-body);
}

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 24px; }

h1, h2, h3, h4, .num, .eyebrow { font-family: var(--font-head); font-weight: 600; }
h1 strong, h2 strong { color: var(--magenta); font-weight: 600; }
.hero h1 strong { color: var(--glow); } /* magenta on the dark gradient is below 3:1 */

/* Hero */
.hero {
  background:
    radial-gradient(ellipse at 85% 10%, rgba(126, 38, 193, .45), transparent 55%),
    radial-gradient(ellipse at 10% 100%, rgba(209, 0, 117, .25), transparent 50%),
    var(--primary-dark);
  color: var(--silver);
  padding-bottom: 96px;
}
.nav { display: flex; align-items: center; justify-content: space-between; padding-top: 24px; padding-bottom: 24px; }
.brand { display: flex; align-items: center; gap: 12px; color: var(--silver); text-decoration: none; font: 600 1.25rem var(--font-head); }
.nav-links { display: flex; align-items: center; gap: 24px; }
.nav-link { color: var(--silver); text-decoration: none; font-weight: 600; padding: 10px 0; }
.nav-link:hover { text-decoration: underline; }
.lang-switch { border: 1px solid var(--glow); border-radius: 4px; padding: 8px 14px; font-size: .875rem; letter-spacing: .06em; }
.lang-switch:hover { border-color: var(--silver); }
.hero-body { padding-top: 64px; }
.hero-body > * { max-width: 880px; }
.eyebrow { color: var(--glow); text-transform: uppercase; letter-spacing: .12em; font-size: .875rem; margin: 0 0 16px; }
.hero h1 { font-size: clamp(2rem, 5vw, 3.25rem); line-height: 1.15; margin: 0 0 24px; }
.lead { color: var(--silver); font-size: 1.1875rem; max-width: 680px; margin: 0 0 40px; }
.btn {
  display: inline-block; background: var(--magenta); color: var(--white);
  padding: 14px 28px; border-radius: 6px; text-decoration: none; font-weight: 600;
}
.btn:hover { background: var(--purple); }

/* Sections */
.section { padding-top: 88px; padding-bottom: 24px; }
.section h2 { font-size: clamp(1.625rem, 3vw, 2.125rem); color: var(--primary-dark); margin: 0 0 32px; padding-left: 16px; border-left: 4px solid var(--magenta); }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; }
.group-title { margin: 0 0 16px; color: var(--primary-dark); font-size: 1.25rem; }
.grid + .group-title { margin-top: 40px; }
@media (min-width: 601px) { .grid-4 { grid-template-columns: repeat(2, 1fr); } }
.card { background: var(--white); border: 1px solid var(--border); border-radius: 10px; padding: 28px; }
.card .num { color: var(--magenta); font-size: 1.125rem; }
.card h4 { color: var(--primary-dark); font-size: 1.25rem; margin: 8px 0 8px; }
.card p { color: var(--muted); margin: 0; }

.manifesto p { max-width: 760px; font-size: 1.1875rem; margin: 0; }

.cta { background: var(--primary-dark); color: var(--silver); margin-top: 88px; padding: 72px 0; }
.cta h2 { font-size: clamp(1.625rem, 3vw, 2.125rem); margin: 0 0 12px; }
.cta p { color: var(--silver); margin: 0 0 12px; }
.cta .btn { margin-top: 12px; max-width: 100%; overflow-wrap: anywhere; }

.cta a:not(.btn) { color: var(--glow); overflow-wrap: anywhere; }
.contact-form { max-width: 640px; margin: 24px 0; }
.contact-form[hidden] { display: none; }
.contact-form label { display: block; margin: 0 0 6px; font-weight: 600; }
.contact-form input, .contact-form textarea {
  display: block; width: 100%; margin: 0 0 20px; padding: 12px 14px;
  background: var(--white); color: var(--text); border: 1px solid var(--border); border-radius: 6px; font: inherit;
}
.contact-form textarea { resize: vertical; }
.contact-form .btn { border: 0; font: inherit; font-weight: 600; cursor: pointer; }
.form-note { font-size: .875rem; }
.form-status { min-height: 1.6em; padding-top: 16px; }
.trap { position: absolute; left: -9999px; }

.footer { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px 24px; color: var(--muted); font-size: .875rem; padding-top: 24px; padding-bottom: 24px; }
.footer p { margin: 0; }
.footer-links { display: flex; align-items: center; gap: 20px; }
.footer a, .link { color: var(--purple); text-decoration: underline; padding: 10px 0; }
.link { background: none; border: 0; font: inherit; cursor: pointer; }

/* Text pages: privacy and 404 */
.page { max-width: 760px; padding-top: 48px; padding-bottom: 48px; }
.page h1 { margin: 0 0 24px; color: var(--primary-dark); font-size: clamp(1.75rem, 4vw, 2.5rem); line-height: 1.2; }
.page h2 { margin: 40px 0 12px; color: var(--primary-dark); font-size: 1.375rem; }
.page a:not(.btn) { color: var(--purple); }
.bar { background: var(--primary-dark); }

@media (max-width: 600px) {
  .wrap { padding-left: 16px; padding-right: 16px; }
  .nav-links { gap: 16px; }
  .brand { gap: 8px; font-size: 1.125rem; }
  .nav-extra { display: none; }
  .section { padding-top: 56px; }
  .hero { padding-bottom: 64px; }
  .grid { grid-template-columns: 1fr; }
  .hero-body { padding-top: 32px; }
}

/* Cookie consent banner */
.consent {
  position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 10;
  max-width: 720px; margin: 0 auto; padding: 20px 24px;
  display: flex; flex-wrap: wrap; align-items: center; gap: 16px;
  background: var(--primary-dark); color: var(--silver);
  border: 1px solid var(--purple); border-radius: 10px;
}
.consent a { color: var(--glow); }
.consent[hidden] { display: none; }
.consent p { margin: 0; flex: 1 1 280px; }
.consent-actions { display: flex; gap: 12px; }
.consent .btn { padding: 10px 20px; border: 0; font: inherit; font-weight: 600; cursor: pointer; }
.btn-ghost {
  background: transparent; color: var(--silver); border: 1px solid var(--glow);
  padding: 10px 20px; border-radius: 6px; font: inherit; font-weight: 600; cursor: pointer;
}
.btn-ghost[hidden] { display: none; }
.btn-ghost:hover { border-color: var(--silver); }

/* Example workflow animation */
.flow-intro { max-width: 760px; margin: -12px 0 32px; color: var(--text); }
.flow {
  background:
    radial-gradient(ellipse at 90% 0%, rgba(126, 38, 193, .35), transparent 60%),
    var(--primary-dark);
  color: var(--silver); border-radius: 14px; padding: 32px 28px 24px;
}
.flow-steps {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: 1fr 24px 1.1fr 24px 1.1fr 24px 1.1fr 24px 1.2fr;
  align-items: start;
}
.stage { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.stage-label { font: 600 .75rem var(--font-head); text-transform: uppercase; letter-spacing: .1em; color: var(--glow); }
.node {
  display: flex; flex-direction: column; gap: 2px;
  background: rgba(244, 245, 248, .04); border: 1px solid rgba(185, 121, 237, .4);
  border-radius: 8px; padding: 10px 12px; font-size: .8125rem; line-height: 1.4;
  transition: opacity .4s, border-color .4s, box-shadow .4s;
  transition-delay: calc(var(--d, 0) * .2s);
}
.node strong { color: var(--white); font-weight: 600; font-size: .875rem; }
.node > span:not(.out-note) { color: var(--silver); }
.doc { border-left: 3px solid var(--glow); }
.doc-line { font-family: ui-monospace, "SFMono-Regular", Menlo, monospace; font-size: .8125rem; }
.swap { font-family: ui-monospace, "SFMono-Regular", Menlo, monospace; font-size: .8125rem; }
.swap del { color: var(--silver); text-decoration: line-through; }
.swap ins { color: var(--cyan); text-decoration: none; font-weight: 600; }
.cites { list-style: none; margin: 6px 0 4px; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.cite { color: var(--silver); transition: opacity .4s, transform .4s; transition-delay: calc(var(--d) * .35s + .2s); }
.tag {
  display: inline-block; margin-right: 6px; padding: 0 6px; border-radius: 3px;
  background: rgba(46, 183, 216, .16); color: var(--cyan); font-size: .75rem; font-weight: 600;
}
.out-note { color: var(--silver); font-size: .8125rem; }
.flow-link { position: relative; align-self: center; height: 2px; margin: 0 4px; background: rgba(185, 121, 237, .35); transition: background .4s; }
.flow-bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 52px; margin-bottom: 20px; }
.flow:not(.is-animated) .flow-bar { display: none; }
.flow-caption { margin: 0; color: var(--silver); font-size: 1rem; }
.flow-toggle { flex: none; padding: 10px 16px; font-size: .875rem; }
.is-paused .flow-link::after { animation-play-state: paused !important; }
.flow-note { margin: 12px 0 0; color: var(--muted); font-size: .875rem; }

/* Animated mode: flow.js adds .is-animated and lights each part with .on */
.is-animated .node { opacity: .7; }
.is-animated .node.on { opacity: 1; border-color: var(--cyan); box-shadow: 0 0 18px rgba(46, 183, 216, .3); }
.is-animated .redact:not(.on) ins { visibility: hidden; }
.is-animated .redact:not(.on) del { text-decoration: none; opacity: 1; }
.is-animated .out:not(.on) .cite { opacity: 0; transform: translateY(4px); }
.is-animated .flow-link.on { background: var(--cyan); }
.is-animated .flow-link.on::after {
  content: ""; position: absolute; top: -3px; left: 0; width: 8px; height: 8px;
  border-radius: 50%; background: var(--cyan); animation: flow-dot 1.2s linear infinite;
}
@keyframes flow-dot { from { left: 0; } to { left: calc(100% - 8px); } }

@media (max-width: 900px) {
  .flow { padding: 24px 16px 20px; }
  .flow.is-animated { padding-top: 0; }
  .flow-bar { position: sticky; top: 0; z-index: 1; min-height: 88px; margin: 0 -16px 12px; padding: 12px 16px; background: var(--primary-dark); border-radius: 14px 14px 0 0; }
  .flow-steps { grid-template-columns: 1fr; }
  .flow-link { width: 2px; height: 24px; margin: 6px 0; justify-self: center; }
  .is-animated .flow-link.on::after { top: 0; left: -3px; animation-name: flow-dot-down; }
  @keyframes flow-dot-down { from { top: 0; } to { top: calc(100% - 8px); } }
}
