/*
 * dana-ui.css: the DanaSites component layer. Our own code. Pair with dana-ui.js.
 * Every colour, radius and curve is a token: override the :root block per project, never edit the rules below it.
 * Hidden starting states only apply under html.js, so the page reads with scripts off.
 */
:root {
  /* palette by job: one ink at four strengths, one accent with one meaning */
  --bg: #08080a; --band: #0e0e11; --ink: #f0ede6; --accent: #d8c7a0; --on-accent: #131210;
  --muted: color-mix(in srgb, var(--ink) 62%, transparent);
  --dim: color-mix(in srgb, var(--ink) 38%, transparent);
  --line: color-mix(in srgb, var(--ink) 12%, transparent);
  --glass: color-mix(in srgb, var(--bg) 58%, transparent);
  /* type: a display face with character, a quiet body face, a mono for labels (system stacks until fonts are chosen) */
  --display: "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --body: ui-sans-serif, system-ui, "Segoe UI", sans-serif;
  --mono: ui-monospace, "Cascadia Mono", Consolas, monospace;
  --h1: clamp(3rem, 1.1rem + 6.6vw, 6.9rem);
  --h2: clamp(2.4rem, 1.2rem + 4.6vw, 5rem);
  --h3: clamp(1.4rem, 1.2rem + 0.8vw, 2rem);
  /* motion: two curves do almost everything */
  --ease: cubic-bezier(0.16, 1, 0.3, 1);          /* long-tailed ease-out: reveals, lifts */
  --ease-mask: cubic-bezier(0.77, 0, 0.175, 1);   /* in-out: masked text, wipes */
  --spring: cubic-bezier(0.34, 1.56, 0.64, 1);    /* overshoot: playful brands only */
  --t-hover: 300ms; --t-reveal: 1000ms;
  /* layout */
  --wrap: 1240px; --gutter: clamp(20px, 5vw, 48px); --section: clamp(96px, 13vw, 176px); --radius: 22px; --nav-h: 64px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 1.0625rem/1.6 var(--body);
  -webkit-font-smoothing: antialiased; overflow-x: clip; }
h1, h2, h3, p, ol, ul, dl, dd, figure, blockquote { margin: 0; } ol, ul { padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; } img, video, canvas, svg { display: block; max-width: 100%; }
button, input { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
.skip { position: absolute; left: 12px; top: -64px; padding: 10px 16px; background: var(--ink); color: var(--bg); z-index: 60; border-radius: 8px; }
.skip:focus { top: 12px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.paused *, .paused *::before, .paused *::after { animation-play-state: paused !important; }

/* ---------- layout ---------- */
.wrap { width: min(var(--wrap), 100% - 2 * var(--gutter)); margin-inline: auto; }
.section { padding-block: var(--section); position: relative; }
.band { background: var(--band); border-block: 1px solid var(--line); }
/* section head: tiny label on the left, large heading on the right */
.head { display: grid; grid-template-columns: 1fr 1.5fr; gap: 24px 48px; align-items: end; margin-bottom: clamp(40px, 6vw, 80px); }
.head > p:last-child { grid-column: 2; color: var(--muted); max-width: 46ch; }

/* ---------- type ---------- */
.h1 { font: 400 var(--h1)/0.92 var(--display); letter-spacing: -0.03em; text-wrap: balance; }
.h2 { font: 400 var(--h2)/0.98 var(--display); letter-spacing: -0.025em; text-wrap: balance; }
.h3 { font: 400 var(--h3)/1.1 var(--display); letter-spacing: -0.01em; }
.h1 em, .h2 em, .h3 em { font-style: italic; color: var(--accent); }                  /* the two-tone heading */
.lede { font-size: clamp(1.06rem, 1rem + 0.35vw, 1.25rem); color: var(--muted); max-width: 44ch; }
.label { display: inline-flex; align-items: center; gap: 12px; font: 500 0.7rem/1.3 var(--mono); letter-spacing: 0.17em;
  text-transform: uppercase; color: var(--accent); }
.label.rule::before { content: ""; width: 36px; height: 1px; background: currentColor; opacity: 0.6; }
.label .dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; animation: pulse 2.4s var(--ease) infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, currentColor 55%, transparent); } 70%, 100% { box-shadow: 0 0 0 9px transparent; } }
/* text over a live background: a soft dark halo keeps edges crisp without looking like an outline */
.on-live .h1, .on-live .h2 { filter: drop-shadow(0 0 28px color-mix(in srgb, var(--bg) 85%, transparent)); }
.on-live .lede, .on-live .label { text-shadow: 0 0 22px var(--bg), 0 0 4px color-mix(in srgb, var(--bg) 60%, transparent); }

/* ---------- reveals (one-time, staggered with --i) ---------- */
.js [data-reveal] { opacity: 0; transform: translateY(28px);
  transition: opacity var(--t-reveal) var(--ease), transform var(--t-reveal) var(--ease); transition-delay: calc(var(--i, 0) * 100ms); }
.js [data-reveal="blur"] { transform: translateY(14px); filter: blur(10px);
  transition: opacity var(--t-reveal) var(--ease), transform var(--t-reveal) var(--ease), filter var(--t-reveal) var(--ease); }
.js [data-reveal].is-in { opacity: 1; transform: none; filter: none; }
/* masked rise: hand-broken lines, or words made by data-split="words" */
.mask .line, .mask .w { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: 0.12em; margin-bottom: -0.12em; }
.mask .line { display: block; }
.js .mask .line > span, .js .mask .w > span { display: inline-block; transform: translateY(108%);
  transition: transform 1100ms var(--ease); transition-delay: calc(var(--base, 0ms) + var(--i, 0) * 90ms); }
.js .mask.is-in .line > span, .js .mask.is-in .w > span { transform: none; }
/* words that arrive out of a blur (data-split="blur") */
.js .blurin .w { display: inline-block; opacity: 0; transform: translateY(10px); filter: blur(10px);
  transition: opacity 900ms var(--ease), transform 900ms var(--ease), filter 900ms var(--ease);
  transition-delay: calc(var(--base, 0ms) + var(--i, 0) * 50ms); }
.js .blurin.is-in .w { opacity: 1; transform: none; filter: none; }

/* ---------- nav: a floating glass capsule that steps aside while you read ---------- */
.nav { position: fixed; inset: 14px 0 auto 0; z-index: 40; transition: transform 500ms var(--ease); }
.nav.is-hidden { transform: translateY(calc(-100% - 20px)); }
.nav__bar { width: min(var(--wrap), 100% - 2 * var(--gutter)); margin-inline: auto; height: var(--nav-h); display: flex; align-items: center;
  justify-content: space-between; gap: 20px; padding: 0 10px 0 22px; border: 1px solid var(--line); border-radius: 999px;
  background: var(--glass); -webkit-backdrop-filter: blur(18px) saturate(1.3); backdrop-filter: blur(18px) saturate(1.3); }
.nav__brand { font: 500 1.05rem/1 var(--display); letter-spacing: 0.01em; min-height: 44px; display: inline-flex; align-items: center; }
.nav__links { display: flex; gap: clamp(18px, 2.6vw, 38px); }
.nav__links a { position: relative; font-size: 0.9rem; color: var(--muted); padding: 12px 0; transition: color var(--t-hover); }
.nav__links a::after { content: ""; position: absolute; left: 0; right: 0; bottom: 6px; height: 1px; background: var(--accent);
  transform: scaleX(0); transform-origin: right; transition: transform 450ms var(--ease); }
.nav__links a:hover { color: var(--ink); } .nav__links a:hover::after { transform: scaleX(1); transform-origin: left; }
.nav__end { display: flex; align-items: center; gap: 8px; }
.icon-btn { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--line);
  background: transparent; cursor: pointer; transition: background var(--t-hover), border-color var(--t-hover); }
.icon-btn:hover { background: color-mix(in srgb, var(--ink) 8%, transparent); }
.icon-btn svg { fill: currentColor; }
[data-pause] .tri, [data-pause][aria-pressed="true"] .bars { display: none; } [data-pause][aria-pressed="true"] .tri { display: block; }
.menu-btn { display: none; } .menu-btn span { display: block; width: 18px; height: 1.5px; background: currentColor; transition: transform 450ms var(--ease); }
.menu-btn span + span { margin-top: 6px; }
.menu-btn[aria-expanded="true"] span:first-child { transform: translateY(3.75px) rotate(45deg); }
.menu-btn[aria-expanded="true"] span:last-child { transform: translateY(-3.75px) rotate(-45deg); }
.menu { position: fixed; inset: 0; z-index: 39; display: grid; align-content: center; gap: 6px; padding: 96px var(--gutter) 48px;
  background: color-mix(in srgb, var(--bg) 92%, transparent); -webkit-backdrop-filter: blur(24px); backdrop-filter: blur(24px); }
.menu[hidden] { display: none; }
.menu a { font: 400 clamp(2.2rem, 9vw, 3.4rem)/1.15 var(--display); letter-spacing: -0.02em; padding: 8px 0;
  opacity: 0; transform: translateY(18px); animation: menu-in 700ms var(--ease) forwards; animation-delay: calc(var(--i, 0) * 60ms + 80ms); }
@keyframes menu-in { to { opacity: 1; transform: none; } }

/* ---------- buttons ---------- */
.btn { --lift: -2px; position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px;
  padding: 0 26px; border-radius: 999px; border: 1px solid transparent; font-weight: 600; font-size: 0.95rem; cursor: pointer;
  transition: transform 500ms var(--ease), background var(--t-hover), border-color var(--t-hover), color var(--t-hover), box-shadow 500ms var(--ease); }
.btn:hover { transform: translateY(var(--lift)); } .btn:active { transform: scale(0.97); transition-duration: 120ms; }
.btn--solid { background: var(--accent); color: var(--on-accent);
  box-shadow: inset 0 -2px 0 rgb(0 0 0 / 0.18), 0 18px 40px -18px color-mix(in srgb, var(--accent) 70%, transparent); }
.btn--solid:hover { background: color-mix(in srgb, var(--accent) 86%, white); }
.btn--ghost { border-color: var(--line); background: color-mix(in srgb, var(--ink) 4%, transparent); }
.btn--ghost:hover { background: color-mix(in srgb, var(--ink) 10%, transparent); border-color: var(--dim); }
.btn--sm { min-height: 44px; padding: 0 20px; font-size: 0.88rem; }
/* arrow swap: the arrow leaves to the right while its twin arrives from the left */
.btn .arr { position: relative; width: 16px; height: 16px; overflow: hidden; }
.btn .arr svg { position: absolute; inset: 0; transition: transform 500ms var(--ease); fill: none; stroke: currentColor; stroke-width: 1.6; }
.btn .arr svg + svg { transform: translateX(-140%); }
.btn:hover .arr svg:first-child { transform: translateX(140%); } .btn:hover .arr svg + svg { transform: none; }
/* fill wipe: the label flips colour as a panel sweeps in from the left */
.btn--wipe { border-color: var(--dim); overflow: hidden; isolation: isolate; }
.btn--wipe::before { content: ""; position: absolute; inset: -1px; background: var(--ink); z-index: -1; transform: scaleX(0); transform-origin: right;
  transition: transform 550ms var(--ease-mask); }
.btn--wipe:hover { color: var(--bg); } .btn--wipe:hover::before { transform: scaleX(1); transform-origin: left; }
/* orbit border: one light travelling round the edge. Use once per page. */
@property --turn { syntax: "<angle>"; inherits: false; initial-value: 0deg; }
.btn--orbit { background: var(--band); border-color: transparent; }
.btn--orbit::before { content: ""; position: absolute; inset: -1px; border-radius: inherit; padding: 1px;
  background: conic-gradient(from var(--turn), transparent 0 62%, var(--accent) 78%, transparent 92%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude;
  animation: turn 5s linear infinite; }
@keyframes turn { to { --turn: 360deg; } }
.link { position: relative; display: inline-flex; align-items: center; min-height: 44px; }
.link::after { content: ""; position: absolute; left: 0; right: 0; bottom: 9px; height: 1px; background: currentColor; transform-origin: left;
  transition: transform 450ms var(--ease); }
.link:hover::after { transform: scaleX(0); transform-origin: right; }

/* ---------- surfaces ---------- */
.card { position: relative; padding: clamp(24px, 2.6vw, 34px); border: 1px solid var(--line); border-radius: var(--radius);
  background: linear-gradient(160deg, color-mix(in srgb, var(--ink) 5.5%, transparent), color-mix(in srgb, var(--ink) 1.2%, transparent));
  transition: transform 700ms var(--ease), border-color 400ms; }
.card:hover { transform: translateY(-6px); border-color: color-mix(in srgb, var(--accent) 40%, transparent); }
.card .label { margin-bottom: clamp(40px, 5vw, 64px); }                    /* the air between label and title is the design */
.card p:last-child { color: var(--muted); margin-top: 12px; font-size: 0.98rem; }
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
/* spotlight: a light that follows the pointer across the surface (dana-ui.js writes --x and --y) */
[data-spot]::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0; transition: opacity 500ms;
  background: radial-gradient(320px circle at var(--x, 50%) var(--y, 0%), color-mix(in srgb, var(--accent) 16%, transparent), transparent 70%); }
[data-spot]:hover::after { opacity: 1; }
[data-tilt] { transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); transition: transform 600ms var(--ease); will-change: transform; }
[data-tilt]:hover { transition-duration: 120ms; }
/* hairline grid: gaps over a line-coloured background draw the dividers with no border arithmetic */
.grid-lines { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden; }
.grid-lines > * { background: var(--bg); padding: clamp(22px, 3vw, 36px); }
.band .grid-lines > * { background: var(--band); }
.stat b { display: block; font: 400 clamp(2.6rem, 1.6rem + 3.2vw, 4.2rem)/1 var(--display); font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.stat b small { font: 500 0.42em/1 var(--body); color: var(--accent); margin-left: 0.3em; letter-spacing: 0; }
.stat span { display: block; margin-top: 10px; color: var(--muted); font-size: 0.92rem; }
/* rows: a numbered list that leans in on hover */
.rows > li { display: grid; grid-template-columns: 110px 1fr 1.25fr; gap: 24px; align-items: baseline; padding: 28px 0; border-top: 1px solid var(--line);
  transition: padding-left 600ms var(--ease), background 400ms; }
.rows > li:last-child { border-bottom: 1px solid var(--line); }
.rows > li:hover { padding-left: 18px; background: linear-gradient(90deg, color-mix(in srgb, var(--accent) 7%, transparent), transparent 60%); }
.rows .n { font: 400 1.05rem/1 var(--display); color: var(--accent); } .rows p { color: var(--muted); }

/* ---------- marquee ---------- */
.marquee { overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); }
.marquee__track { display: flex; width: max-content; gap: var(--gap, 56px); will-change: transform; }
.marquee__track > * { flex: none; }
.wordmark { font: 400 1.5rem/1 var(--display); color: var(--dim); white-space: nowrap; }
.chip { padding: 10px 18px; border: 1px solid var(--line); border-radius: 999px; font: 500 0.78rem/1 var(--mono); letter-spacing: 0.06em; color: var(--muted); white-space: nowrap; }

/* ---------- accordion ---------- */
.acc { border-top: 1px solid var(--line); } .acc:last-child { border-bottom: 1px solid var(--line); }
.acc__q { width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 24px 0; background: none; border: 0;
  text-align: left; font: 400 var(--h3)/1.2 var(--display); cursor: pointer; }
.acc__q i { position: relative; width: 16px; height: 16px; flex: none; }
.acc__q i::before, .acc__q i::after { content: ""; position: absolute; left: 0; top: 7.5px; width: 16px; height: 1px; background: currentColor;
  transition: transform 500ms var(--ease); }
.acc__q i::after { transform: rotate(90deg); } .acc__q[aria-expanded="true"] i::after { transform: none; }
.acc__a { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 600ms var(--ease); }
.acc__q[aria-expanded="true"] + .acc__a { grid-template-rows: 1fr; }
.acc__a > div { overflow: hidden; } .acc__a p { padding: 0 0 26px; color: var(--muted); max-width: 60ch; }

/* ---------- segmented control: one highlight that travels ---------- */
.seg { position: relative; display: inline-flex; padding: 4px; border: 1px solid var(--line); border-radius: 999px; background: var(--glass); }
.seg button { position: relative; z-index: 1; min-height: 44px; padding: 0 18px; border: 0; background: none; border-radius: 999px; cursor: pointer;
  font-size: 0.88rem; color: var(--muted); transition: color var(--t-hover); }
.seg button[aria-pressed="true"] { color: var(--ink); }
.js .seg button[aria-pressed="true"] { color: var(--on-accent); }           /* the travelling pill only exists with scripts on */
.seg__pill { position: absolute; top: 4px; bottom: 4px; left: 0; width: var(--w, 0); transform: translateX(var(--x, 0)); border-radius: 999px;
  background: var(--accent); transition: transform 550ms var(--ease), width 550ms var(--ease); }

/* ---------- form: input and button share one capsule ---------- */
.field { display: flex; gap: 6px; padding: 6px; max-width: 520px; border: 1px solid var(--line); border-radius: 999px; background: var(--glass);
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); transition: border-color var(--t-hover); }
.field:focus-within { border-color: var(--accent); }
.field input { flex: 1; min-width: 0; min-height: 48px; padding: 0 18px; background: none; border: 0; outline: 0; }
.field input::placeholder { color: var(--dim); }
.field__msg { min-height: 1.6em; margin-top: 12px; font-size: 0.9rem; color: var(--muted); }

/* ---------- small instruments ---------- */
.cue { display: inline-flex; flex-direction: column; align-items: center; gap: 12px; font: 500 0.66rem/1 var(--mono); letter-spacing: 0.2em;
  text-transform: uppercase; color: var(--dim); }
.cue::after { content: ""; width: 1px; height: 44px; background: currentColor; transform-origin: top; animation: cue 2.2s var(--ease-mask) infinite; }
@keyframes cue { 0% { transform: scaleY(0); } 55% { transform: scaleY(1); transform-origin: top; } 56% { transform-origin: bottom; } 100% { transform: scaleY(0); transform-origin: bottom; } }
.readout { font: 500 0.72rem/1.5 var(--mono); letter-spacing: 0.08em; color: var(--muted); font-variant-numeric: tabular-nums; }
.readout b { color: var(--ink); font-weight: 500; }
.foot { padding: 64px 0 calc(40px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); color: var(--muted); font-size: 0.9rem; }
.foot__grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px; }
.foot a { display: inline-flex; align-items: center; min-height: 44px; transition: color var(--t-hover); } .foot a:hover { color: var(--ink); }

/* ---------- phone ---------- */
@media (max-width: 860px) {
  .nav__links, .nav__end .btn { display: none; } .menu-btn { display: grid; }
  .head { grid-template-columns: 1fr; } .head > p:last-child { grid-column: 1; }
  .cards { grid-template-columns: 1fr; }
  .rows > li { grid-template-columns: 48px 1fr; } .rows > li p { grid-column: 2; }
  .foot__grid { grid-template-columns: 1fr 1fr; }
  .field { flex-direction: column; border-radius: 26px; } .field .btn { width: 100%; }
}
@media (hover: none) { .card:hover, .btn:hover { transform: none; } .rows > li:hover { padding-left: 0; background: none; } }

/* ---------- reduced motion: the finished state, at once ---------- */
@media (prefers-reduced-motion: reduce) {
  .js [data-reveal], .js .mask .line > span, .js .mask .w > span, .js .blurin .w { opacity: 1; transform: none; filter: none; transition: none; }
  .menu a { opacity: 1; transform: none; animation: none; }
  .label .dot, .cue::after, .btn--orbit::before { animation: none; } .cue::after { transform: none; }
  .nav, .card, .btn, .rows > li, .acc__a, .seg__pill, [data-tilt] { transition-duration: 1ms; }
}
