/* ProAfter. Black, white type, and the logo's lilac. Each project keeps its own colour on its card. One typeface: Inter. */
@font-face { font-family: Inter; font-weight: 100 900; font-style: normal; font-display: swap; src: url('assets/inter-latin.woff2') format('woff2'); }

:root {
  --bg: #08080a; --raise: #111114; --raise-2: #18181c;
  --line: rgba(255, 255, 255, .08); --line-2: rgba(255, 255, 255, .14);
  --text: #f5f5f7; --body: #a0a0aa; --dim: #66666f;
  --lilac: #a99bff; --violet: #6a5cff;
  --max: 1200px; --ease: cubic-bezier(.3, .8, .3, 1);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; overflow-x: clip; scroll-behavior: smooth; scroll-padding-top: 100px; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: Inter, system-ui, 'Segoe UI', sans-serif; font-size: 16px; line-height: 1.6; -webkit-font-smoothing: antialiased; font-feature-settings: 'cv11', 'ss01'; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
p { margin: 0; color: var(--body); text-wrap: pretty; }
h1, h2, h3 { margin: 0; font-weight: 600; letter-spacing: -.04em; line-height: 1.05; text-wrap: balance; }
::selection { background: var(--lilac); color: #08080a; }
:focus-visible { outline: 2px solid var(--lilac); outline-offset: 3px; border-radius: 8px; }
.wrap { width: min(var(--max), calc(100% - 48px)); margin-inline: auto; }

/* ---------- top bar: one framed strip hanging from the top edge ---------- */
.bar { position: fixed; top: 14px; left: 50%; z-index: 50; transform: translateX(-50%); width: min(820px, calc(100% - 24px)); height: 56px; padding: 0 8px 0 10px; border-radius: 999px; background: rgba(20, 20, 25, .78); backdrop-filter: blur(18px) saturate(1.4); -webkit-backdrop-filter: blur(18px) saturate(1.4); box-shadow: 0 10px 40px -12px rgba(0, 0, 0, .7); }
.bar .wrap { display: flex; align-items: center; justify-content: space-between; gap: 30px; width: 100%; height: 100%; }
.bar .brand { margin-right: 0; }
.bar .light { border-radius: 999px; }
.bar { transition: background .3s, box-shadow .3s; }
.bar.scrolled { background: rgba(24, 24, 30, .9); box-shadow: 0 14px 44px -12px rgba(0, 0, 0, .85); }
.brand { display: flex; align-items: center; gap: 10px; margin-right: auto; font-size: 17px; font-weight: 600; letter-spacing: -.025em; }
.brand img { width: 28px; height: 28px; border-radius: 7px; }
.bar nav { display: flex; gap: 26px; color: var(--body); font-size: 14.5px; }
.bar nav a { transition: color .15s; }
.bar nav a:hover, .bar nav a[aria-current] { color: var(--text); }
.light { display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 16px; border-radius: 10px; background: #f1f1f3; color: #0b0b0d; font-size: 14px; font-weight: 600; box-shadow: inset 0 -2px 0 rgba(0, 0, 0, .12), 0 1px 2px rgba(0, 0, 0, .4); transition: background .15s; }
.light:hover { background: #fff; }
.light svg { width: 16px; height: 16px; }

/* ---------- hero: the logo's seven lines, huge and grainy, behind the headline ---------- */
.hero { -webkit-mask: linear-gradient(#000 78%, transparent); mask: linear-gradient(#000 78%, transparent); position: relative; overflow: hidden; display: grid; place-items: center; min-height: min(920px, 100vh); padding: 150px 24px 110px; text-align: center; isolation: isolate; }
.hero .art { position: absolute; z-index: -1; left: 50%; top: 50%; width: 1700px; max-width: none; transform: translate(-50%, -52%); pointer-events: none; }
.hero .art .line { animation: glide 9s var(--ease) infinite alternate; }
.hero .art .line:nth-child(2n) { animation-duration: 11s; }
.hero .art .line:nth-child(3n) { animation-duration: 13s; }
@keyframes glide { from { transform: translateX(-36px); } to { transform: translateX(36px); } }
.hero::after { content: ''; position: absolute; inset: 0; z-index: -1; background: radial-gradient(ellipse 38% 30% at 50% 50%, rgba(8, 8, 10, .55), transparent 70%), linear-gradient(transparent 70%, var(--bg)); pointer-events: none; }
.hero h1 { font-size: clamp(46px, 7.2vw, 88px); text-shadow: 0 2px 30px rgba(0, 0, 0, .45); }
.hero p { max-width: 540px; margin: 22px auto 0; color: #e2e0ee; font-size: 19px; line-height: 1.55; text-shadow: 0 1px 16px rgba(0, 0, 0, .6); }
.hero .light { height: 46px; margin-top: 40px; padding: 0 22px; font-size: 15px; }
.hero small { display: block; margin-top: 16px; color: var(--dim); font-size: 13.5px; }

/* ---------- section heads: Linear-style, big statement left, a quiet line right ---------- */
.section { padding: 140px 0 0; }
.head { display: flex; align-items: end; justify-content: space-between; gap: 32px; margin-bottom: 48px; }
.head h2 { max-width: 13ch; font-size: clamp(36px, 4.8vw, 58px); }
.head p { max-width: 380px; font-size: 16.5px; }

/* ---------- projects: one plain row each ---------- */
.rows { display: grid; gap: 10px; }
.row { display: grid; grid-template-columns: 40px 160px minmax(0, 1fr) 20px; align-items: center; gap: 18px; padding: 18px 22px; border-radius: 14px; background: var(--raise); transition: background .15s; }
.row:hover { background: var(--raise-2); }
.row img { width: 40px; height: 40px; border-radius: 10px; }
.row b { font-size: 17px; font-weight: 600; letter-spacing: -.02em; }
.row span { color: var(--body); font-size: 15px; }
.row svg { width: 18px; height: 18px; color: var(--dim); transition: color .15s, transform .2s var(--ease); }
.row:hover svg { color: var(--text); transform: translateX(3px); }

/* ---------- principles: three quiet columns ---------- */
.rules { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--line-2); }
.rules > div { padding: 28px 36px 0 0; }
.rules > div + div { padding-left: 36px; border-left: 1px solid var(--line); }
.rules b { display: block; margin-bottom: 10px; color: var(--lilac); font-size: 14px; font-weight: 600; }
.rules h3 { margin-bottom: 12px; font-size: 24px; letter-spacing: -.03em; }
.rules p { font-size: 15.5px; }

/* ---------- legal pages ---------- */
.legal { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 80px; padding-top: 160px; }
.legal aside { position: sticky; top: 112px; align-self: start; display: grid; gap: 4px; font-size: 14.5px; }
.legal aside a { padding: 8px 12px; border-radius: 9px; color: var(--body); transition: background .15s, color .15s; }
.legal aside a:hover { color: var(--text); background: var(--raise); }
.legal aside a[aria-current] { color: var(--text); background: var(--raise-2); font-weight: 600; }
.legal article { max-width: 700px; }
.legal h1 { font-size: clamp(44px, 6vw, 68px); }
.legal .date { margin-top: 18px; color: var(--dim); font-size: 14.5px; }
.legal .gist { margin: 40px 0 8px; padding: 24px 26px; border-radius: 18px; background: linear-gradient(135deg, rgba(169, 155, 255, .12), rgba(169, 155, 255, .03)); border: 1px solid rgba(169, 155, 255, .2); color: #e4e1f5; font-size: 17.5px; line-height: 1.55; }
.legal h2 { margin: 48px 0 12px; font-size: 21px; letter-spacing: -.02em; line-height: 1.3; }
.legal p + p, .legal ul + p { margin-top: 12px; }
.legal ul { margin: 12px 0 0; padding-left: 20px; color: var(--body); }
.legal li + li { margin-top: 8px; }
.legal li::marker { color: var(--dim); }
.legal article b { color: var(--text); font-weight: 600; }
.legal article p a, .legal article li a { color: var(--lilac); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }

/* ---------- footer ---------- */
.foot { margin-top: 140px; border-top: 1px solid var(--line); }
.foot .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px 32px; padding: 36px 0 48px; }
.foot .brand { margin-right: 0; font-size: 16px; }
.foot .brand img { width: 26px; height: 26px; }
.foot nav { display: flex; flex-wrap: wrap; gap: 8px 28px; color: var(--body); font-size: 14.5px; }
.foot nav a:hover { color: var(--text); }
.foot small { width: 100%; color: var(--dim); font-size: 13.5px; }

/* ---------- latest ---------- */
.news { position: relative; display: grid; gap: 0; margin: 0; padding: 0; list-style: none; }
.news li { display: grid; grid-template-columns: 160px minmax(0, 1fr); gap: 32px; padding: 26px 0; border-top: 1px solid var(--line); }
.news li:last-child { border-bottom: 1px solid var(--line); }
.news time { padding-top: 3px; color: var(--dim); font-size: 14.5px; font-variant-numeric: tabular-nums; }
.news .who { display: inline-block; margin-bottom: 8px; padding: 2px 9px; border-radius: 999px; background: rgba(169, 155, 255, .12); color: var(--lilac); font-size: 12.5px; font-weight: 600; }
.news h3 { font-size: 22px; letter-spacing: -.025em; }
.news p { margin-top: 6px; font-size: 15.5px; }

/* ---------- questions ---------- */
.faq { display: grid; gap: 10px; }
.faq details { border-radius: 14px; background: var(--raise); transition: background .15s; }
.faq details:hover, .faq details[open] { background: var(--raise-2); }
.faq summary { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 20px 24px; cursor: pointer; font-size: 17px; font-weight: 600; letter-spacing: -.015em; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary .plus { flex: none; width: 16px; height: 16px; fill: none; stroke: var(--body); stroke-width: 2; stroke-linecap: round; }
.faq summary .plus .v { transform-origin: 8px 8px; transition: transform .3s var(--ease); }
.faq details[open] summary .plus .v { transform: rotate(90deg); }
.faq .a { overflow: hidden; padding: 0 24px 22px; }
.faq .a p { max-width: 720px; font-size: 15.5px; }
.faq .a a { color: var(--lilac); text-decoration: underline; text-underline-offset: 3px; }

/* ---------- motion (script.js) ---------- */
/* Before the script runs, everything it will bring in starts hidden. Without the script nothing is hidden. */
.moving .hero .enter, .moving .hero p, .moving .hero .light, .moving .hero small,
.moving .hero h1:not(.split), .moving .section .head h2:not(.split), .moving .section .head p,
.moving .rows > *, .moving .rules > *, .moving .news > *, .moving .faq > * { opacity: 0; }
.word { display: inline-block; white-space: nowrap; }
.char { display: inline-block; will-change: transform, opacity, filter; }
.split .char { opacity: 0; }
.hero h1.split .char { text-shadow: inherit; }

/* a light sweeping across the small line under the hero button */
.shine { background: linear-gradient(100deg, var(--dim) 40%, #d9d2ff 50%, var(--dim) 60%) 0 0 / 250% 100%; -webkit-background-clip: text; background-clip: text; color: transparent !important; animation: sheen 4.5s linear infinite; }
@keyframes sheen { from { background-position: 125% 0; } to { background-position: -125% 0; } }

/* project rows: a soft light under the pointer, and each icon comes alive */
.row { position: relative; overflow: hidden; isolation: isolate; }
.row::before { content: ''; position: absolute; inset: 0; z-index: -1; background: radial-gradient(260px circle at var(--x, 50%) var(--y, 50%), rgba(169, 155, 255, .13), transparent 70%); opacity: 0; transition: opacity .3s; }
.row:hover::before { opacity: 1; }
.row .wave { width: 40px; height: 40px; border-radius: 10px; }
.row .wave g rect { transform-box: fill-box; transform-origin: center; }
.row:hover .wave g rect { animation: talk .9s var(--ease) infinite alternate; }
.row:hover .wave g rect:nth-child(2n) { animation-delay: -.3s; }
.row:hover .wave g rect:nth-child(3n) { animation-delay: -.6s; }
@keyframes talk { from { transform: scaleY(1); } to { transform: scaleY(.35); } }
.row .spin { transition: transform .8s var(--ease); }
.row:hover .spin { transform: rotate(180deg); }

/* ---------- smaller screens and motion ---------- */
@media (max-width: 960px) {
  .head { flex-direction: column; align-items: start; gap: 16px; }
  .row { grid-template-columns: 40px minmax(0, 1fr) 20px; row-gap: 2px; }
  .row span { grid-column: 2; grid-row: 2; }
  .row svg { grid-column: 3; grid-row: 1 / 3; }
  .row img { grid-row: 1 / 3; }
  .news li { grid-template-columns: 1fr; gap: 8px; }
  .rules { grid-template-columns: 1fr; }
  .rules > div, .rules > div + div { padding: 26px 0; border-left: 0; border-top: 1px solid var(--line); }
  .rules > div:first-child { border-top: 0; }
  .legal { grid-template-columns: 1fr; gap: 0; padding-top: 120px; }
  .legal aside { display: none; }
}
@media (max-width: 640px) {
  .wrap { width: calc(100% - 32px); }
  .bar .wrap { gap: 16px; }
  .bar nav { gap: 16px; }
  .bar nav .opt, .bar .light span { display: none; }
  .bar .light { padding: 0 11px; }
  .hero { min-height: 0; padding: 140px 16px 90px; }
  .hero .art { width: 1100px; }
  .hero p { font-size: 17px; }
  .section { padding-top: 100px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero .art .line, .shine, .row:hover .wave g rect { animation: none; }
  .shine { color: var(--dim) !important; background: none; }
  * { transition: none !important; }
}
