/* yonse.org: page parts on top of kit.css. The YonSeGram settings rows and the YonSeDNS resolver
   are copied from gram.yonse.org and dns.yonse.org so the sites draw their products the same way. */

/* ---------------------------------------------------------------- Y mark
   The YonSe logo built live instead of a bitmap: the gradient tile, its faint ribbon and the Y in
   Unbounded 800, the same recipe as the logo source (research/org-logo/logo.html, variant "a").
   Live layers let the ribbon draw itself through the tile. */

.y-tile {
  container-type: inline-size;
  transform: none;
  background:
    radial-gradient(55% 65% at 76% 30%, rgba(168, 140, 255, 0.42), transparent 70%),
    linear-gradient(180deg, var(--field-hi) 0%, var(--field-mid) 52%, var(--field-lo) 100%);
}
.y-tile .y-rib { position: absolute; inset: 0; overflow: visible; }
.y-rib path { fill: none; stroke: rgba(255, 255, 255, 0.085); stroke-width: 9; stroke-linecap: round; }
.y-glyph {
  position: absolute; inset: 0; display: grid; place-items: center; padding-top: 4cqi;
  color: #fff; font: 800 62cqi/1 var(--font-display); letter-spacing: 0;
  transform: translateX(-0.9cqi);
}
/* The tile only fades up; the kit's version also scales and turns it. */
@keyframes tile-in { from { opacity: 0; transform: translateY(16px); } }

/* The ribbon from the mark, drawn once across the hero and through its tile. site.js lays the
   path so the part under the tile is exactly the tile's own ribbon. */
.ribbon-layer { position: absolute; inset: 0; z-index: -1; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.ribbon-layer path { fill: none; stroke: rgba(255, 255, 255, 0.085); stroke-linecap: round; stroke-linejoin: round; }
.ribbon-layer .ribbon-lead { stroke: none; }

/* -------------------------------------------------------------- rhythm */

/* Entrances stay small: a short rise, no blur. motion.js injects its styles after this file. */
html .ym-r-up:not(.ym-on) { transform: translateY(14px); }
html .ym-r-up { --ym-dur: 0.7s; }

.hero-title { margin-top: 0; letter-spacing: -0.04em; }
.hero-sub { max-width: 30ch; }
.hero-cta .ico-down { transform: rotate(90deg); }

/* Section titles one step below the mission statement, so the page has a top. */
.sec-head h2 { font-size: clamp(30px, 4.2vw, 54px); letter-spacing: -0.04em; }
.sec-head .intro { margin-top: 18px; }
.sec { padding-block: clamp(72px, 9vw, 120px); }
.sec + .sec { padding-top: clamp(16px, 3vw, 32px); }
/* A colour panel already brings its own margin. */
.sec:has(+ .panel) { padding-bottom: clamp(40px, 5vw, 64px); }
/* A panel is inset 12px from the page edge; below the max width its content would start 12px
   right of the sections around it. */
@media (min-width: 720px) { .panel > .wrap { padding-inline: calc(var(--gutter) - 12px); } }
/* With no meta line under the buttons, a full-height hero on a phone is mostly empty. */
@media (max-width: 900px) { .hero { min-height: 0; padding-bottom: 64px; } }

/* Card titles share one style across the page. */
.principle h3, .work-card h3, .prod .act-head h3, .person-body h3 {
  font: 700 clamp(20px, 1.9vw, 24px)/1.2 var(--font-display); letter-spacing: -0.03em;
}

/* A scene keeps its own type: .card p would otherwise set every line inside it to body size. */
.card .vig p { font-size: inherit; line-height: inherit; color: inherit; }

/* ---------------------------------------------------------------- about */

.about { padding-top: clamp(88px, 11vw, 150px); }
.about-h {
  max-width: 19em;
  font: 700 clamp(28px, 4.8vw, 64px)/1.06 var(--font-display); letter-spacing: -0.045em;
}
.about-text { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px clamp(28px, 4vw, 56px); max-width: 1000px; margin-top: clamp(32px, 4.4vw, 52px); }
.about-text p { color: var(--on-field-2); font-size: clamp(17px, 1.35vw, 19px); line-height: 1.6; }
.about-text a { color: #fff; font-weight: 600; text-underline-offset: 3px; }
@media (max-width: 760px) { .about-text { grid-template-columns: minmax(0, 1fr); } }

/* ----------------------------------------------------------- principles */

/* One white sheet split by hairlines: the gap shows the sheet's line colour between the cells. */
.principles {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px;
  margin-top: clamp(36px, 5vw, 56px); overflow: hidden;
  border-radius: var(--r-card); background: var(--vig-line);
  box-shadow: 0 30px 60px -36px rgba(10, 3, 50, 0.7);
}
.principle { display: grid; align-content: start; gap: 12px; padding: clamp(26px, 3.4vw, 44px); background: var(--card); color: var(--card-ink); }
.principle p { color: var(--card-sub); font-size: 16px; line-height: 1.6; }
.principle a { color: var(--ui-violet); font-weight: 600; text-underline-offset: 3px; }
/* Peach is invisible on the white sheet. */
.principle :focus-visible { outline-color: var(--ui-violet); }
@media (max-width: 760px) { .principles { grid-template-columns: minmax(0, 1fr); } }

/* --------------------------------------------------------------- projects */

.prod { gap: 0; padding: 12px; }
.prod .vig { flex: none; height: 330px; min-height: 0; }
.prod-body { flex: 1; display: flex; flex-direction: column; gap: 18px; padding: clamp(20px, 2.4vw, 28px) clamp(10px, 1.6vw, 18px) clamp(8px, 1vw, 12px); }
.prod .act-head { grid-template-columns: auto minmax(0, 1fr); }
.prod .act-head h3 { font-size: clamp(22px, 2.1vw, 28px); }
.prod-lead { color: var(--card-sub); font-size: 16px; line-height: 1.6; }
.act-mark { overflow: hidden; background: none; }
.act-mark img { width: 100%; height: 100%; }
.act-mark.mark-cat { background: var(--peach); }
.act-mark.mark-cat img { image-rendering: pixelated; }
/* YonSeDNS has no logo of its own: its tile carries the lock its site's resolver shows. */
.act-mark.mark-dns { display: grid; place-items: center; background: linear-gradient(180deg, var(--field-hi), var(--field-lo)); color: #fff; }
.act-mark.mark-dns svg { width: 52%; height: 52%; }

.facts { margin: 0; border-bottom: 1px solid var(--vig-line); }
.facts > div { display: grid; grid-template-columns: 116px minmax(0, 1fr); gap: 12px; padding: 12px 0; border-top: 1px solid var(--vig-line); font-size: 15px; line-height: 1.45; }
.facts dt { color: var(--card-sub); }
.facts dd { margin: 0; color: var(--card-ink); font-weight: 500; text-wrap: pretty; }
@media (max-width: 420px) { .facts > div { grid-template-columns: minmax(0, 1fr); gap: 2px; } }
.prod-link { margin-top: auto; justify-content: space-between; }
.prod-link .ico { width: 20px; height: 20px; color: var(--peach); }

/* A wide project card: the scene beside the text rather than above it. */
.prod-wide { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); align-items: stretch; }
.prod-wide .vig { height: auto; min-height: 330px; }
@media (max-width: 900px) { .prod-wide { grid-template-columns: minmax(0, 1fr); } .prod-wide .vig { min-height: 0; } }
/* The cat-status band, a real screenshot from the Claude Code desktop app (the repository's
   docs/assets/screenshot.png without its frame). */
.vig-cat { padding: clamp(16px, 2.4vw, 32px); }
.cat-band { width: 100%; height: auto; border-radius: 14px; box-shadow: 0 24px 48px -28px rgba(10, 3, 50, 0.6); }

/* The YonSeGram settings screen, peeking up from the bottom of the stage like a phone, with the
   privacy and connection sections in view. */
.vig-hub { grid-template-columns: minmax(0, 1fr); place-items: end center; padding: 26px 22px 0; }
@media (max-width: 420px) { .vig-hub { padding-inline: 12px; } }
.hub { width: min(100%, 360px); margin-inline: auto; padding: 14px 14px 0; border-radius: 30px 30px 0 0; background: #fff; color: var(--ui-text); box-shadow: 0 30px 60px -30px rgba(10, 3, 50, 0.55); }
.hub-top { display: flex; align-items: center; gap: 12px; padding: 6px 8px 12px; }
.hub-top svg { width: 20px; height: 20px; transform: rotate(180deg); color: var(--ui-sub); }
.hub-top b { font-size: 18px; }
.hub-search { display: flex; align-items: center; gap: 10px; padding: 11px 14px; border-radius: 14px; background: var(--vig); color: var(--ui-sub); font-size: 14px; }
.hub-search svg { width: 18px; height: 18px; flex: none; }
.hub-window { height: 200px; margin-top: 8px; overflow: hidden; }
.hub-row { display: flex; align-items: center; gap: 14px; height: 50px; padding: 0 8px; border-bottom: 1px solid var(--vig-line); font-size: 14.5px; }
.hub-row > svg { width: 20px; height: 20px; flex: none; color: var(--ui-violet); }
.hub-name { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hub-val { color: var(--ui-sub); font-size: 13px; }
.hub-row .chev { width: 16px; height: 16px; flex: none; color: #b9b0dd; }

/* The YonSeDNS resolver as dns.yonse.org shows it. Taller than the stage on a phone, where its
   texts wrap. */
.vig-rs { padding: 14px 22px; }
.prod .vig-rs { height: auto; min-height: 330px; }
.rs { width: min(100%, 420px); padding: 12px 14px 6px; border-radius: 18px; background: #fff; color: var(--ui-text); box-shadow: 0 24px 48px -28px rgba(10, 3, 50, 0.5); }
.rs-top { display: flex; align-items: center; gap: 12px; padding: 4px 2px 10px; border-bottom: 1px solid var(--vig-line); }
.rs-top p { display: grid; gap: 2px; margin: 0; line-height: 1.3; }
.rs-top b { font-size: 14px; }
.rs-top small { color: var(--ui-sub); font-size: 12px; }
.rs-lock { display: grid; place-items: center; flex: none; width: 36px; height: 36px; border-radius: 10px; background: var(--vig); color: var(--ui-violet); }
.rs-lock svg { width: 20px; height: 20px; }
.rs-head { display: flex; justify-content: space-between; padding: 8px 2px 0; color: var(--ui-sub); font-size: 11.5px; font-weight: 600; }
.rs-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 7px 2px; border-top: 1px solid var(--vig-line); }
.rs-row:first-child { border-top: 0; }
.rs-q, .rs-a { display: grid; gap: 1px; line-height: 1.3; }
.rs-a { text-align: right; }
.rs-q b { font-size: 14px; font-weight: 600; }
.rs-q small, .rs-a small { color: var(--ui-sub); font-size: 12px; }
.rs-st { color: var(--ok); font-size: 13px; font-weight: 600; }
.st-blocked .rs-st { color: var(--bad); }

/* --------------------------------------------------------------- practice */

.panel-ink .card.dark { background: var(--ink-2); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08); }
.work-card { gap: 14px; padding: clamp(22px, 2.6vw, 32px); }
.work-card h3 { color: #fff; }
.work-card p { font-size: 16px; line-height: 1.6; }
/* Long lines wrap at the column edge the way a terminal wraps them, not at hyphens, where a
   split like "grep -" / "c" reads as a typo. The window fills the rest of the card, so a shorter
   card in a row ends in empty terminal rather than in a gap above it. */
.work-term { flex: 1 0 auto; width: 100%; margin-top: 4px; background: var(--ink); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08); word-break: break-all; }
pre.work-term { margin-bottom: 0; }
/* A phone column is too narrow to wrap commands cleanly: the window scrolls sideways instead. */
@media (max-width: 600px) { .work-term { white-space: pre; overflow-x: auto; word-break: normal; } }

/* The signing card's footnote: what happens if the channel or the server is hijacked. */
.threat { margin: 6px 0 0; padding-top: 18px; border-top: 1px solid rgba(255, 255, 255, 0.14); }
.threat dt { font-weight: 700; color: var(--peach); }
.threat dd { margin: 6px 0 0; color: #c9bff5; font-size: 15.5px; line-height: 1.55; }

/* ---------------------------------------------------------------- history */

/* The heading stays beside the dated list on wide screens, Mullvad-style. */
.history { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.4fr); gap: 28px clamp(36px, 6vw, 96px); align-items: start; }
.history .sec-head { position: sticky; top: 112px; }
.timeline { border-bottom: 1px solid rgba(255, 255, 255, 0.16); }
.timeline li { display: grid; grid-template-columns: 190px minmax(0, 1fr); gap: 6px 28px; padding: 22px 0; border-top: 1px solid rgba(255, 255, 255, 0.16); }
.timeline time { color: #fff; font: 700 15.5px/1.5 var(--font-display); letter-spacing: -0.02em; white-space: nowrap; }
.timeline p { color: var(--on-field-2); font-size: 16.5px; line-height: 1.55; }
@media (max-width: 960px) {
  .history { grid-template-columns: minmax(0, 1fr); }
  .history .sec-head { position: static; }
}
@media (max-width: 560px) { .timeline li { grid-template-columns: minmax(0, 1fr); padding: 18px 0; } }

/* ------------------------------------------------------------------- team */

.panel-peach { padding-block: clamp(56px, 7vw, 96px); }
.panel-peach .sec-head h2 { color: var(--on-peach); }
.team { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.4fr); gap: 32px clamp(36px, 6vw, 96px); align-items: center; }
.people { display: grid; gap: 16px; }
@media (max-width: 1024px) { .team { grid-template-columns: minmax(0, 1fr); } }
@media (min-width: 720px) and (max-width: 1024px) { .people { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.person { flex-direction: row; align-items: center; gap: clamp(16px, 2.4vw, 26px); padding: clamp(18px, 2.4vw, 26px); }
@media (max-width: 420px) { .person { flex-direction: column; align-items: flex-start; } }
.person-av { flex: none; width: clamp(64px, 7vw, 84px); height: auto; aspect-ratio: 1; border-radius: 50%; box-shadow: 0 0 0 4px var(--vig), 0 18px 30px -18px rgba(23, 13, 69, 0.6); }
.person-body { display: grid; gap: 4px; min-width: 0; }
.person-body > p { color: var(--card-sub); font-size: 15.5px; }
.person-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.person-links .ico { width: 16px; height: 16px; color: var(--ui-text); }

/* -------------------------------------------------------------------- end */

.end-meta { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 22px; }
.end-meta a { text-decoration: none; }
@media (max-width: 480px) { .end-cta { grid-template-columns: minmax(0, 1fr); justify-content: stretch; } }
.end-meta a:hover { text-decoration: underline; }
