/* parmenides.dev — the floor: dark ground, stone and terracotta tesserae */
:root {
  --ground: #1c1814;
  --ground-2: #241f1a;
  --ground-3: #2e2720;
  --stone: #ece2cf;
  --stone-2: #d9ccb2;
  --mute: #a99a84;
  --terra: #b5452d;
  --terra-2: #cf5b40;
  --gold: #d6a13c;
  --display: "Marcellus", "Trajan Pro", Georgia, serif;
  --body: "Spectral", Georgia, serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --pad: clamp(20px, 3.8vw, 56px);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { overflow-x: clip; }
body { margin: 0; background: var(--ground); color: var(--stone); font: 19px/1.55 var(--body); -webkit-font-smoothing: antialiased; }
a { color: inherit; }
img { display: block; max-width: 100%; height: auto; }
code { font-family: var(--mono); font-size: .82em; color: var(--stone-2); }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
::selection { background: var(--terra); color: var(--stone); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 16px; top: -60px; z-index: 50; background: var(--stone); color: var(--ground); padding: 10px 14px; }
.skip:focus { top: 12px; }

/* ---------- shared ---------- */
.wordmark { font: 22px/1 var(--display); letter-spacing: .16em; text-decoration: none; }
.h2 { font: clamp(36px, 4.6vw, 64px)/1.02 var(--display); letter-spacing: .01em; margin: 0 0 28px; text-wrap: balance; }
.lede { font-size: 21px; line-height: 1.5; max-width: 46ch; margin: 0; color: var(--stone-2); }
.sec { padding: clamp(80px, 10vw, 140px) var(--pad); }
.sec:nth-of-type(even) { background: var(--ground-2); }

.cmd { display: inline-flex; align-items: stretch; max-width: 100%; border: 2px solid var(--stone); }
.cmd code { display: block; font: 16px/1 var(--mono); color: var(--stone); padding: 15px 18px; white-space: nowrap; overflow-x: auto; scrollbar-width: none; }
.cmd code::-webkit-scrollbar { display: none; }
.copy { font: 16px/1 var(--display); letter-spacing: .08em; border: 0; background: var(--terra); color: var(--stone); padding: 0 20px; cursor: pointer; flex: none; transition: background-color .15s; }
.copy:hover, .copy.is-done { background: var(--terra-2); }

.btn { display: inline-flex; align-items: center; font: 18px/1 var(--display); letter-spacing: .06em; text-decoration: none; padding: 17px 24px; border: 2px solid var(--terra); transition: background-color .15s, color .15s, transform .15s; }
.btn:hover { transform: translateY(-2px); }
.btn--terra { background: var(--terra); color: var(--stone); }
.btn--terra:hover { background: var(--terra-2); border-color: var(--terra-2); }
.btn--line { color: var(--stone); border-color: var(--stone-2); }
.btn--line:hover { background: var(--stone); color: var(--ground); }
.ctas { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 32px; }

/* tiled headings: the text stays for readers and search; the canvas is the mosaic */
.tiled { margin: 0; }
.tiled canvas { display: block; width: 100%; height: auto; }
.portrait { position: relative; }
.portrait.is-laying img { visibility: hidden; }
.portrait__lay { position: absolute; left: 0; top: 0; pointer-events: none; }
.tiled.is-tiled .tiled__text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.tiled__text { font: clamp(56px, 7vw, 104px)/1 var(--display); letter-spacing: .04em; text-transform: uppercase; }

/* ---------- hero ---------- */
.hero { padding: 0 var(--pad) clamp(70px, 8vw, 110px); }
.nav { display: flex; justify-content: space-between; align-items: center; padding: 28px 0; }
.nav ul { display: flex; gap: 28px; list-style: none; margin: 0; padding: 0; font-size: 17px; }
.nav a { text-decoration: none; color: var(--stone-2); }
.nav a:hover { color: var(--stone); }
.star { border: 1px solid var(--stone-2); padding: 6px 12px; }
.star:hover { background: var(--stone); color: var(--ground) !important; }
.hero__grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: clamp(32px, 5vw, 72px); align-items: center; margin-top: clamp(20px, 5vw, 70px); }
.hero__copy { min-width: 0; }
.hero__copy .tiled { max-width: 640px; }
.hero__sub { font-size: 22px; line-height: 1.45; max-width: 34ch; margin: 28px 0 28px; }
.hero__meta { color: var(--mute); font-size: 16px; margin: 14px 0 0; }
.portrait { margin: 0; justify-self: end; width: min(100%, 520px); }
.portrait img { outline: 10px solid var(--ground-3); }
.portrait figcaption { color: var(--mute); font-style: italic; font-size: 15px; margin-top: 18px; text-align: right; }

/* =========================================================
   Below the hero: the floor continues. Tone steps, tiles and
   type do the separating. No rules, no small caps labels.
   ========================================================= */

.h2 { margin-bottom: 0; }
.lede { margin-top: 22px; }

/* ---------- agents: a tone band ---------- */
.agents { background: var(--ground-2); padding: 34px var(--pad); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px 40px; }
.agents__h { margin: 0; font: italic 400 18px/1.3 var(--body); color: var(--mute); }
.agents ul { display: flex; flex-wrap: wrap; gap: 10px 34px; list-style: none; margin: 0; padding: 0; font: 24px/1 var(--display); letter-spacing: .04em; }
.agents li::before { content: ""; display: inline-block; width: 10px; height: 10px; background: var(--terra); margin-right: 12px; vertical-align: 4px; transform: rotate(4deg); }

/* ---------- the floors: staging and prod, the same mosaic twice ---------- */
.floors { padding: clamp(96px, 11vw, 160px) var(--pad); }
.floors__head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 24px 48px; margin-bottom: 52px; }
.floors__head .h2 { max-width: 15ch; }
.floors__count { margin: 0; font: clamp(22px, 1rem + .8vw, 28px)/1.3 var(--display); color: var(--stone-2); text-align: right; max-width: 18ch; }
.floors__count b { display: block; font-weight: 400; color: var(--terra-2); transition: color .3s; }
.floors.is-one .floors__count b { color: var(--gold); }
.floors__pair { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(20px, 3vw, 44px); }
.floor { margin: 0; min-width: 0; }
.floor canvas { display: block; width: 100%; height: auto; background: var(--ground-3); }
.floor--prod canvas { cursor: pointer; }
.floor figcaption { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; margin-top: 16px; font: 28px/1 var(--display); letter-spacing: .03em; }
.floor figcaption span { font: italic 17px var(--body); color: var(--mute); }

.detail { margin-top: clamp(28px, 3vw, 40px); display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 18px 30px; align-items: center; background: var(--stone); color: var(--ground); padding: clamp(20px, 2.4vw, 30px) clamp(20px, 2.6vw, 34px); }
.detail__tile { width: 38px; height: 38px; background: var(--terra-2); transform: rotate(6deg); transition: background-color .25s, transform .35s cubic-bezier(.34,1.4,.64,1); }
.detail__tile.is-med { background: var(--gold); }
.detail.is-swap .detail__tile { transform: rotate(-8deg) scale(.86); }
.detail__body { min-width: 0; }
.detail__what { margin: 0; font: clamp(26px, 1rem + 1.4vw, 36px)/1.1 var(--display); display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; }
.detail__risk { font: 15px/1 var(--body); background: #86240f; color: var(--stone); padding: 5px 9px; }
.detail__risk.is-med { background: #7a5413; }
.detail__vals { margin: 10px 0 0; display: flex; flex-wrap: wrap; gap: 6px 26px; font-style: italic; color: #5b4a37; }
.detail__vals code { font-style: normal; color: var(--ground); background: var(--stone-2); padding: 2px 7px; margin-left: 6px; }
.detail__vals span + span code { color: #86240f; }
.detail__fix { margin: 10px 0 0; font-size: 18px; max-width: 62ch; }
.detail__fix code { color: var(--ground); }
.detail__nav { display: flex; align-items: center; gap: 12px; font: 17px var(--display); white-space: nowrap; }
.detail__nav button { width: 46px; height: 46px; border: 0; background: var(--ground); color: var(--stone); font: 24px/1 var(--display); cursor: pointer; transition: background-color .15s, transform .15s; }
.detail__nav button:hover { background: var(--terra); }
.detail__nav button:active { transform: scale(.94); }

.picks { list-style: none; margin: 14px 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.picks button { width: 100%; display: flex; align-items: center; gap: 12px; text-align: left; border: 0; cursor: pointer; padding: 14px 16px; background: var(--ground-2); color: var(--stone-2); font: 18px/1.2 var(--display); letter-spacing: .02em; transition: background-color .15s, color .15s; }
.picks button::before { content: ""; flex: none; width: 12px; height: 12px; background: var(--terra-2); transform: rotate(5deg); transition: transform .3s; }
.picks button.is-med::before { background: var(--gold); }
.picks button:hover { background: var(--ground-3); color: var(--stone); }
.picks button[aria-current="true"] { background: var(--ground-3); color: var(--stone); }
.picks button[aria-current="true"]::before { transform: rotate(-12deg) scale(1.25); }
.floors.is-one .picks button { color: var(--mute); }
.floors.is-one .picks button::before { background: var(--stone-2); transform: none; }

.floors__foot { margin-top: 40px; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 20px 40px; align-items: start; }
.floors__foot .btn { cursor: pointer; font-family: var(--display); }
.floors__note { margin: 0; color: var(--mute); font-size: 17px; max-width: 70ch; }
.floors__note a { color: var(--gold); }

/* ---------- wrong everywhere: cracks ---------- */
.cracks { padding: clamp(96px, 11vw, 160px) var(--pad); background: var(--ground-2); }
.cracks__head { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: end; margin-bottom: 52px; }
.cracks__head .lede { margin: 0; }
.cracks__list { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(20px, 3vw, 44px); }
.crack { min-width: 0; background: var(--ground); padding: 0 0 clamp(24px, 2.6vw, 34px); }
.crack canvas { display: block; width: 100%; height: auto; margin-bottom: 26px; }
.crack > :not(canvas) { margin-left: clamp(22px, 2.6vw, 34px); margin-right: clamp(22px, 2.6vw, 34px); }
.crack__h { margin-top: 0; margin-bottom: 12px; font: clamp(26px, 1rem + 1vw, 34px)/1.1 var(--display); }
.crack p { margin-top: 0; margin-bottom: 0; color: var(--stone-2); max-width: 52ch; }
.crack__fix { margin-top: 14px !important; color: var(--gold) !important; font-style: italic; }
.crack__fix code { font-style: normal; color: var(--stone); }

/* ---------- secrets ---------- */
.secrets { padding: clamp(96px, 11vw, 160px) var(--pad); display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 96px); align-items: center; }
.vault { display: grid; gap: 6px; min-width: 0; }
.vault__row { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) auto; gap: 18px; align-items: center; padding: 16px 18px; background: var(--ground-2); }
.vault__key { font-size: 15px; color: var(--stone-2); overflow: hidden; text-overflow: ellipsis; }
.redact { display: block; height: 22px; }
.redact canvas { width: 100%; height: 22px; display: block; }
.vault__tag { font-style: italic; color: var(--mute); white-space: nowrap; }
.vault__tag--bad { color: #f08a72; }

/* ---------- questions ---------- */
.faq { padding: clamp(96px, 11vw, 160px) var(--pad); display: grid; grid-template-columns: 1fr 1.6fr; gap: clamp(32px, 6vw, 96px); align-items: start; }
.faq__h { position: sticky; top: 40px; }
.faq__list { display: grid; gap: 8px; }
.faq details { background: var(--ground-3); transition: background-color .2s; }
.faq summary { list-style: none; cursor: pointer; padding: 22px 60px 22px 24px; position: relative; font: 22px/1.25 var(--display); letter-spacing: .02em; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; position: absolute; right: 24px; top: 50%; width: 12px; height: 12px; margin-top: -6px; background: var(--terra-2); transition: transform .2s; }
.faq details[open] { background: #3a2a22; }
.faq details[open] summary::after { transform: rotate(45deg); background: var(--gold); }
.faq details:not([open]) summary:hover { background: #352d26; }
.faq details p { margin: 0; padding: 0 24px 24px; color: var(--stone-2); max-width: 60ch; }

/* ---------- close ---------- */
.close { padding: clamp(96px, 11vw, 160px) var(--pad); background: var(--ground-2); display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(32px, 6vw, 96px); align-items: center; }
.close__copy { min-width: 0; }
.tiled--close { max-width: 640px; }
.ask { width: 100%; max-width: 440px; min-width: 0; justify-self: end; background: var(--stone); color: var(--ground); padding: 26px; display: grid; gap: 10px; font: 16px/1.4 var(--body); box-shadow: 14px 14px 0 var(--terra); } /* taste-skill-ignore: open dialog in a data-ui fragment */
.ask__title { margin: 0 0 4px; font: 24px/1.1 var(--display); }
.ask__label { margin: 6px 0 0; font-size: 14px; font-style: italic; color: #5b4a37; }
.ask__input { font: 17px var(--body); padding: 11px 12px; min-width: 0; border: 0; background: #fbf6ec; color: var(--ground); }
.ask__input:focus { outline: 2px solid var(--terra); }
.ask__seg { display: grid; grid-template-columns: 1fr 1fr; background: var(--stone-2); padding: 3px; }
.ask__seg button { font: 16px var(--display); border: 0; background: none; padding: 8px 0; cursor: pointer; color: #5b4a37; }
.ask__seg button[aria-checked="true"] { background: var(--ground); color: var(--stone); }
.ask__cmd { scrollbar-width: none; font: 14px var(--mono); color: var(--ground); background: var(--stone-2); padding: 10px 12px; white-space: normal; overflow-wrap: anywhere; } /* taste-skill-ignore: literal command */
.ask__go { margin-top: 6px; min-height: 48px; border: 0; background: var(--terra); color: var(--stone); font: 17px var(--display); letter-spacing: .04em; cursor: pointer; transition: background-color .15s; }
.ask__go:hover, .ask__go.is-done { background: var(--terra-2); }

/* ---------- drift ticker ---------- */
.ticker { overflow: hidden; background: var(--ground-3); padding: 34px 0; }
.ticker__track { display: flex; width: max-content; animation: ticker 70s linear infinite; }
.ticker:hover .ticker__track, .ticker.is-off .ticker__track { animation-play-state: paused; }
.ticker p { margin: 0; padding-right: 36px; white-space: nowrap; font: clamp(30px, 1.2rem + 2.4vw, 54px)/1 var(--display); color: var(--stone); }
.ticker b { display: inline-block; width: .32em; height: .32em; background: var(--terra-2); margin: 0 .8em; vertical-align: .14em; transform: rotate(4deg); }
@keyframes ticker { to { transform: translateX(-50%); } }

/* ---------- curtain footer: the page lifts off it ---------- */
.hero, main { position: relative; z-index: 1; background: var(--ground); }
.foot { position: sticky; bottom: 0; z-index: 0; background: #14110e; padding: clamp(64px, 8vw, 110px) var(--pad) clamp(28px, 3vw, 40px); color: var(--mute); font-size: 17px; }
.foot__mark { width: 100%; }
.foot__row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 16px 28px; margin-top: clamp(36px, 4vw, 56px); padding-top: 24px; border-top: 3px solid var(--ground-3); }
.foot__row > span:first-child { font-style: italic; }
.foot__links { display: flex; gap: 10px 28px; flex-wrap: wrap; font: 18px/1 var(--display); letter-spacing: .04em; }
.foot a { color: var(--stone-2); text-decoration: none; transition: color .15s; }
.foot a:hover { color: var(--gold); }

/* ---------- motion ---------- */
.rise { opacity: 0; transform: translateY(24px); transition: opacity .45s ease, transform .45s cubic-bezier(.2,.7,.2,1); transition-delay: calc(var(--i, 0) * 60ms); }
.rise.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; } .rise { opacity: 1; transform: none; } .ticker__track { width: auto; } .ticker p { white-space: normal; } .ticker p + p { display: none; } }

@media (max-width: 1200px) {
  .picks { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ---------- tablet ---------- */
@media (max-width: 980px) {
  .hero__grid, .cracks__head, .cracks__list, .secrets, .faq, .close, .floors__foot { grid-template-columns: 1fr; }
  .floors__foot .btn { justify-self: start; }
  .portrait { justify-self: start; width: min(100%, 440px); }
  .faq__h { position: static; }
  .ask { justify-self: start; }
}

/* ---------- phone ---------- */
@media (max-width: 640px) {
  body { font-size: 17px; }
  .nav ul li:not(:last-child) { display: none; }
  .hero__sub { font-size: 19px; }
  .cmd code { font-size: 14px; padding: 14px; }
  .agents ul { font-size: 20px; gap: 10px 22px; }
  .floors__pair { gap: 12px; }
  .floor figcaption { flex-direction: column; gap: 6px; font-size: 22px; margin-top: 10px; }
  .floor figcaption span { font-size: 14px; }
  .floors__count { text-align: left; }
  .detail { grid-template-columns: minmax(0, 1fr); }
  .detail__tile { display: none; }
  .detail__nav { justify-content: space-between; }
  .picks { grid-template-columns: 1fr; }
  .picks button { font-size: 17px; padding: 12px 14px; }
  .vault__row { grid-template-columns: 1fr auto; }
  .vault__row .redact { grid-column: 1 / -1; grid-row: 2; }
  .foot__row { flex-direction: column; align-items: flex-start; }
  .foot__links { flex-direction: column; gap: 16px; }
}
