/* dacs.finance. One stylesheet, no framework: variables, base, layout, then components. */
@font-face { font-family: "Geist"; src: url("/fonts/geist-latin-wght-normal.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Geist Mono"; src: url("/fonts/geist-mono-latin-wght-normal.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }

:root {
  --night: #070B14; --night-line: #1C2333; --night-muted: #B7BFCE; --night-faint: #8C96AA;
  --paper: #FFFFFF; --paper-alt: #F6F7F9; --ink: #0A1020; --ink-2: #3A4354; --ink-3: #5A6478; --rule: #E3E6EB;
  --accent: #DC2626; --accent-night: #EF4444; --cash: #9FB4D8;
  --sans: "Geist", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Geist Mono", ui-monospace, Menlo, monospace;
  --wrap: 1200px; --gutter: 24px; --breath: 104px; --radius: 8px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root { --paper: #0B1120; --paper-alt: #0F1628; --ink: #E8ECF3; --ink-2: #B7BFCE; --ink-3: #8C96AA; --rule: #1C2333; --accent: #EF4444; color-scheme: dark; }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 17px/1.6 var(--sans); -webkit-font-smoothing: antialiased; }
img, svg, canvas { display: block; max-width: 100%; }
a { color: inherit; }
p { margin: 0; }
h1, h2, h3 { margin: 0; font-weight: 600; letter-spacing: -0.02em; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; z-index: 10; background: var(--paper); color: var(--ink); padding: 8px 12px; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.section { padding: var(--breath) 0; }
.section--alt { background: var(--paper-alt); }
.section--night { background: var(--night); color: #FFFFFF; }
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 56px; align-items: center; }
.band { display: flex; flex-wrap: wrap; gap: 32px; justify-content: space-between; align-items: flex-end; }
@media (max-width: 899px) { .split { grid-template-columns: 1fr; gap: 40px; } }
@media (max-width: 767px) { :root { --breath: 72px; } }

.eyebrow { font: 500 13px/1.4 var(--mono); letter-spacing: 0.09em; text-transform: uppercase; color: var(--ink-3); margin: 0 0 16px; }
.section--night .eyebrow, .hero .eyebrow { color: var(--night-faint); }
.display { font-size: clamp(40px, 7vw, 80px); line-height: 1.02; letter-spacing: -0.035em; max-width: 16ch; }
.title { font-size: clamp(30px, 4.2vw, 44px); line-height: 1.1; max-width: 22ch; }
.lead { font-size: clamp(18px, 2vw, 20px); line-height: 1.5; color: var(--ink-2); max-width: 60ch; margin-top: 20px; }
.section--night .lead, .hero .lead { color: var(--night-muted); }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.btn { display: inline-flex; align-items: center; font: 500 16px/1 var(--sans); text-decoration: none; padding: 14px 22px; border-radius: var(--radius); border: 1px solid transparent; cursor: pointer; transition: background-color 0.15s, border-color 0.15s, color 0.15s; }
.btn--primary { background: var(--ink); color: var(--paper); }
.btn--primary:hover { background: var(--ink-2); }
.btn--ghost { border-color: var(--rule); color: var(--ink); background: transparent; }
.btn--ghost:hover { border-color: var(--ink-3); }
.hero .btn--primary, .section--night .btn--primary { background: #FFFFFF; color: var(--night); }
.hero .btn--ghost, .section--night .btn--ghost { border-color: #3A4458; color: #FFFFFF; }
.hero .btn--ghost:hover, .section--night .btn--ghost:hover { border-color: var(--night-faint); }
.btn[disabled] { opacity: 0.6; cursor: wait; }
.more { display: inline-block; margin-top: 16px; font-weight: 500; color: var(--accent); text-decoration: none; }
.more::after { content: " \2192"; }
.more:hover { text-decoration: underline; }

/* Header and the logo's easter egg: the red dot unfolds DACS letter by letter. */
.site-header { position: sticky; top: 0; z-index: 5; background: var(--night); color: #FFFFFF; border-bottom: 1px solid var(--night-line); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 24px; height: 72px; }
.logo { display: inline-flex; align-items: baseline; min-width: 0; overflow: clip; overflow-clip-margin: 12px; font: 700 22px/1 var(--sans); letter-spacing: -0.02em; color: #FFFFFF; text-decoration: none; white-space: nowrap; }
.logo-dot { position: relative; display: inline-block; width: 7px; height: 7px; margin-left: 2px; border-radius: 50%; background: var(--accent-night); transition: transform 0.25s; }
.logo-dot::after { content: ""; position: absolute; inset: -12px; }
.logo:hover .logo-dot, .logo.is-open .logo-dot { transform: scale(1.5); }
.egg-rest { display: inline-block; max-width: 0; overflow: hidden; opacity: 0; white-space: pre; vertical-align: bottom; font-weight: 500; color: var(--night-muted); transition: max-width 0.45s cubic-bezier(0.2, 0.7, 0.2, 1), opacity 0.3s; }
.logo.is-open .egg-rest { max-width: 12em; opacity: 1; }
.logo.is-open .egg-rest:nth-of-type(4) { transition-delay: 0.08s; }
.logo.is-open .egg-rest:nth-of-type(6) { transition-delay: 0.16s; }
.logo.is-open .egg-rest:nth-of-type(8) { transition-delay: 0.24s; }
.nav { display: flex; align-items: center; gap: 32px; }
.nav ul { display: flex; gap: 28px; list-style: none; margin: 0; padding: 0; }
.nav ul a { color: var(--night-muted); text-decoration: none; font-size: 15px; }
.nav ul a:hover, .nav ul a[aria-current="page"] { color: #FFFFFF; }
.nav-signin { color: var(--night-muted); text-decoration: none; font-size: 15px; }
.nav-signin:hover { color: #FFFFFF; }
.nav .btn { font-size: 15px; padding: 11px 16px; background: #FFFFFF; color: var(--night); }
.nav-toggle { display: none; background: none; border: 1px solid #3A4458; color: #FFFFFF; border-radius: var(--radius); padding: 8px 12px; font: 500 14px var(--sans); }
@media (max-width: 899px) {
  .nav-toggle { display: inline-flex; }
  .nav { display: none; position: absolute; top: 72px; left: 0; right: 0; flex-direction: column; align-items: flex-start; gap: 20px; padding: 24px var(--gutter) 32px; background: var(--night); border-bottom: 1px solid var(--night-line); }
  .nav.is-open { display: flex; }
  .nav ul { flex-direction: column; gap: 16px; }
}
@media (max-width: 767px) {
  .egg-rest { font-size: 13px; }
  .site-header.is-egg-open .nav-toggle { visibility: hidden; }
}

/* Hero: the two legs are drawn on the canvas, under the text. */
.hero { position: relative; overflow: hidden; background: var(--night); color: #FFFFFF; }
.hero-canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-inner { position: relative; z-index: 1; padding: clamp(72px, 12vh, 140px) var(--gutter) 72px; }
.hero .display { max-width: 13ch; }
.hero-status { margin-top: 72px; font: 400 12px/1.9 var(--mono); letter-spacing: 0.02em; }
.hero-status-line { opacity: 0.22; transition: opacity 0.35s; }
.hero-status-line.is-on { opacity: 1; }
.hero-status-line[data-step="1"] { color: #E5E9F0; }
.hero-status-line[data-step="2"] { color: var(--cash); }
.hero-status-line[data-step="3"] { color: var(--accent-night); }
@media (min-width: 1100px) { .hero-status { position: absolute; left: 75%; top: 58%; margin: 0; } }
.words { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--night-line); background: rgba(7, 11, 20, 0.72); }
.word { display: flex; flex-direction: column; gap: 6px; padding: 28px var(--gutter) 32px; border-right: 1px solid var(--night-line); text-decoration: none; color: #8C96AA; transition: color 0.4s; }
.word:last-child { border-right: 0; }
.word.is-on, .word:hover { color: #FFFFFF; }
.word-n { font: 400 12px var(--mono); color: var(--night-faint); }
.word-label { font-size: 20px; font-weight: 600; }
@media (max-width: 767px) {
  .words { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .word:nth-child(2) { border-right: 0; }
  .word:nth-child(-n+2) { border-bottom: 1px solid var(--night-line); }
}

/* Inner pages: a light header; the red dot marks the eyebrow. */
.page-head { padding: clamp(64px, 10vw, 120px) 0 64px; border-bottom: 1px solid var(--rule); }
.page-head .eyebrow { display: flex; align-items: center; gap: 10px; }
.page-head .eyebrow::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); animation: dot-in 0.6s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
@keyframes dot-in { from { transform: scale(0); } to { transform: scale(1); } }

/* How it fits: four boxes, the last one where settlement happens. */
.flow { display: grid; grid-template-columns: 1fr auto 1fr auto 1fr auto 1fr; align-items: stretch; gap: 12px; margin-top: 56px; }
.flow-box { border: 1px solid var(--rule); border-radius: 12px; padding: 20px; background: var(--paper); }
.flow-box h3 { font-size: 17px; }
.flow-box p { margin-top: 6px; color: var(--ink-2); font-size: 15px; line-height: 1.45; }
.flow-box--dacs { border-color: var(--ink); }
.flow-box--settle h3::after { content: ""; display: inline-block; width: 7px; height: 7px; margin-left: 8px; border-radius: 50%; background: var(--accent); vertical-align: middle; }
.flow-arrow { align-self: center; justify-self: center; font: 400 18px var(--mono); color: var(--ink-3); }
@media (max-width: 899px) { .flow { grid-template-columns: 1fr; } .flow-arrow { transform: rotate(90deg); } }

.four { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: 56px; border-top: 1px solid var(--rule); }
.four-item { padding: 28px 24px 8px; border-right: 1px solid var(--rule); }
.four-item:first-child { padding-left: 0; }
.four-item:last-child { border-right: 0; }
.four-n { font: 400 12px var(--mono); color: var(--ink-3); }
.four-item h3 { font-size: 22px; margin-top: 8px; }
.four-item p { margin-top: 10px; color: var(--ink-2); }
@media (max-width: 899px) { .four { grid-template-columns: 1fr 1fr; } .four-item, .four-item:first-child { padding: 24px 16px 24px 0; border-right: 0; border-bottom: 1px solid var(--rule); } }
@media (max-width: 559px) { .four { grid-template-columns: 1fr; } }

/* The settlement card: one leg locks, then the other, then both settle. Final state by default. */
.settle-card { margin: 0; border: 1px solid var(--rule); border-radius: 14px; background: var(--paper); padding: 24px; font-size: 15px; }
.settle-head { display: flex; justify-content: space-between; gap: 12px; font: 500 12px var(--mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-3); padding-bottom: 8px; border-bottom: 1px solid var(--rule); }
.leg { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; padding: 16px 0; border-bottom: 1px solid var(--rule); }
.leg-mark { width: 10px; height: 10px; border-radius: 50%; border: 1.5px solid var(--ink-3); transition: background-color 0.3s, border-color 0.3s; }
.leg-what { display: flex; flex-direction: column; }
.leg-what small { color: var(--ink-3); font-size: 13px; }
.leg-state, .settle-status { font: 500 12px var(--mono); color: var(--ink-3); }
.leg-state span, .settle-status span { display: none; }
.settle-card[data-state="pending"] .leg-state [data-when="pending"],
.settle-card[data-state="sec"] .leg--cash .leg-state [data-when="pending"],
.settle-card[data-state="sec"] .leg--securities .leg-state [data-when="locked"],
.settle-card[data-state="both"] .leg-state [data-when="locked"],
.settle-card[data-state="settled"] .leg-state [data-when="settled"],
.settle-card:not([data-state="settled"]) .settle-status [data-when="pending"],
.settle-card[data-state="settled"] .settle-status [data-when="settled"] { display: inline; }
.settle-card[data-state="sec"] .leg--securities .leg-mark, .settle-card[data-state="both"] .leg-mark { background: var(--ink); border-color: var(--ink); }
.settle-card[data-state="settled"] .leg-mark { background: var(--accent); border-color: var(--accent); }
.settle-card[data-state="settled"] .settle-status { color: var(--accent); }
.settle-foot { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding-top: 16px; color: var(--ink-2); }

.rows { margin-top: 48px; border-top: 1px solid var(--rule); }
.row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr) auto; gap: 24px; align-items: baseline; padding: 28px 0; border-bottom: 1px solid var(--rule); text-decoration: none; color: inherit; }
.row h3 { font-size: 22px; }
.row p { color: var(--ink-2); }
.row .arrow { font-family: var(--mono); color: var(--accent); transition: transform 0.2s; }
.row:hover .arrow { transform: translateX(4px); }
@media (max-width: 767px) { .row { grid-template-columns: 1fr; gap: 8px; } }

.models { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-top: 48px; }
.model { border: 1px solid var(--rule); border-radius: 12px; padding: 28px; }
.model h3 { font-size: 22px; }
.model p { margin-top: 10px; color: var(--ink-2); }
@media (max-width: 767px) { .models { grid-template-columns: 1fr; } }

.points { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 48px 56px; }
.point h3 { font-size: 22px; }
.point p { margin-top: 10px; color: var(--ink-2); }
@media (max-width: 767px) { .points { grid-template-columns: 1fr; gap: 36px; } }

.facts { margin: 0; border-top: 1px solid var(--rule); }
.fact { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 24px; padding: 24px 0; border-bottom: 1px solid var(--rule); }
.fact dt { font-weight: 600; }
.fact dd { margin: 0; color: var(--ink-2); }
.fact a { color: var(--accent); }
@media (max-width: 767px) { .fact { grid-template-columns: 1fr; gap: 6px; } }

.prose { max-width: 72ch; }
.prose h2 { font-size: 24px; margin: 48px 0 12px; }
.prose h2:first-child { margin-top: 0; }
.prose p, .prose ul { margin: 0 0 14px; color: var(--ink-2); }
.prose ul { padding-left: 20px; }
.prose a { color: var(--accent); }
.lang-switch { display: flex; gap: 16px; margin-top: 24px; font: 500 14px var(--mono); }
.lang-switch a { color: var(--accent); }

.form { display: grid; gap: 20px; }
.field label { display: block; font-weight: 600; font-size: 14px; margin-bottom: 6px; }
.field input, .field select, .field textarea { width: 100%; font: 400 16px/1.4 var(--sans); color: var(--ink); background: var(--paper); border: 1px solid var(--rule); border-radius: var(--radius); padding: 12px 14px; }
.field textarea { min-height: 150px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: transparent; }
.form-status { min-height: 1.6em; font-size: 15px; color: var(--ink-2); }
.form-status.is-error { color: var(--accent); }
.contact-aside a { color: var(--accent); }

.site-footer { background: var(--paper); border-top: 1px solid var(--rule); padding: 64px 0 40px; font-size: 15px; }
.footer-grid { display: grid; grid-template-columns: 1.2fr repeat(4, 1fr); gap: 32px; }
.footer-grid h2 { font: 500 12px var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 14px; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.footer-grid a { color: var(--ink-2); text-decoration: none; }
.footer-grid a:hover { color: var(--ink); }
.footer-logo { display: inline-flex; align-items: baseline; font: 700 22px/1 var(--sans); letter-spacing: -0.02em; }
.footer-logo .logo-dot { background: var(--accent); }
.footer-note { margin-top: 14px; color: var(--ink-3); font-size: 14px; max-width: 32ch; }
.footer-base { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; margin-top: 56px; padding-top: 24px; border-top: 1px solid var(--rule); color: var(--ink-3); font-size: 14px; }
@media (max-width: 899px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-brand { grid-column: 1 / -1; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
