/* The Stoic Owner: page CSS on top of the kit (assets/system.css). Cover D's world: the dark title band,
   the cover's paper, Anton for the title only, sun orange for actions. */

/* one codebase, two states (config.js sets html[data-state]) */
html[data-state="prelaunch"] [data-show]:not([data-show~="prelaunch"]),
html[data-state="launch"] [data-show]:not([data-show~="launch"]),
html[data-state="launch-after"] [data-show]:not([data-show~="launch-after"]) { display: none !important; }

::selection { background: var(--p-accent); color: var(--p-accent-ink); }
html { scrollbar-color: color-mix(in oklab, var(--p-ink) 40%, transparent) var(--p-bg); accent-color: var(--p-accent); caret-color: var(--p-accent); }

.logo-word { font-family: var(--font-title); font-size: 22px; letter-spacing: .02em; text-transform: uppercase; line-height: 1; }

/* hero: the cover's title band */
.hero--cover { --t-h1: clamp(64px, 8.6vw, 136px); }
.cover-title {
  font-family: var(--font-title); font-weight: 400; text-transform: uppercase;
  font-size: var(--t-h1); line-height: .9; letter-spacing: .005em; color: var(--ink);
}
.cover-title span { color: var(--p-accent); display: inline-block; }
.hero--cover .hero__lead { max-width: 34ch; font-size: clamp(18px, 1.1vw + 6px, 22px); line-height: 1.45; }
.hero-cover { display: flex; align-items: flex-start; justify-content: flex-end; }
.hero-cover picture { display: block; width: 100%; max-width: 400px; }
.cover-img { width: 100%; height: auto; box-shadow: 0 28px 56px -18px rgba(0,0,0,.65), 0 6px 14px rgba(0,0,0,.35); }
@media (max-width: 1023px) {
  .hero-cover { justify-content: flex-start; }
  .hero-cover picture { max-width: 220px; }
}
@media (max-width: 639px) {
  .hero-cover picture { max-width: none; height: 100%; }
  .hero-cover .cover-img { height: 100%; object-fit: cover; box-shadow: none; }
  .hero-cover { align-items: stretch; }
  .learn-rows > li { min-height: 0; }
  .learn-rows .rows__name { font-size: 16px; }
  .learn-rows > li { padding-block: 10px; }
  .logo-word { font-size: 18px; }
  .hero--cover { --t-h1: clamp(52px, 15vw, 64px); }
}

/* the Chapter 1 form, inline in the hero */
.form--inline { max-width: 560px; }
.form--inline .inline-row { display: flex; gap: var(--s-3); }
.form--inline .field { width: 100%; }
.form--inline .inline-row input { flex: 1 1 auto; width: auto; min-width: 0; }
.ground-inverse .form input { background: var(--p-bg); color: var(--p-ink); border-color: transparent; }
.form__note { color: var(--muted); margin-top: var(--s-2); }
@media (max-width: 639px) { .form--inline .inline-row { flex-direction: column; } }

/* rows used for bonuses, lessons and tiers */
.bonus-rows, .learn-rows { counter-reset: n; list-style: none; padding: 0; margin: 0; }
.learn-rows[start="6"] { counter-reset: n 5; }
.bonus-rows > li, .learn-rows > li { counter-increment: n; display: grid; grid-template-columns: 2.4em minmax(0, 1fr); align-items: baseline; }
.bonus-rows > li::before, .learn-rows > li::before { content: counter(n); font-family: var(--font-title); font-size: 26px; line-height: 1; color: var(--p-accent); }
.ground-brand .bonus-rows > li::before { color: var(--ink); }
.rows__name small { display: block; font-size: var(--t-body); color: var(--muted); font-weight: 400; margin-top: var(--s-1); line-height: 1.5; }
.learn-rows .rows__name { font-size: 18px; line-height: 1.45; font-weight: 400; }
.tier-rows .rows__value { font-family: var(--font-title); font-size: 30px; letter-spacing: .01em; }
.ground-inverse .tier-rows .rows__value, .tier-rows .rows__value { color: inherit; }

/* citadels */
.citadel-quote blockquote { font-size: clamp(30px, 2.6vw + 6px, 44px); line-height: 1.12; max-width: 24ch; }
.citadel h3 { font-size: var(--t-lead); line-height: 1.3; }
.citadel { border-top: 2px solid var(--p-accent); padding-top: var(--s-5); }
.citadel-both { color: var(--muted); }

/* pinned storms: the art keeps its own frame on the dark ground */
#storms .mo-pc__visual img, #storms .mo-pc__visuals img { object-fit: cover; object-position: center top; }
#storms[data-moment].is-live .mo-pc__visuals { aspect-ratio: 1 / 1; }
#storms[data-moment] .mo-pc__visual > img { aspect-ratio: 1 / 1; max-height: none; }
@media (max-width: 1023px) { #storms[data-moment].is-live .mo-pc__visuals { aspect-ratio: auto; } }

/* founders */
.founder blockquote { font-size: 22px; line-height: 1.4; }
.founder { border-top: 1px solid var(--line-strong); padding-top: var(--s-5); }
.founder .person__name { font-weight: 500; }
.founder .person__role { color: var(--muted); }

/* frames */
.sample-frame .frame__img { object-fit: cover; object-position: top; }
.workshop-frame, .sample-frame { aspect-ratio: 4 / 3.4; }
.frame--portrait { aspect-ratio: 4 / 5; }



#close-h { max-width: 22ch; }

/* citadel diagram */
.citadel-diagram svg { width: 100%; height: auto; overflow: visible; }
.ring-outer { fill: none; stroke: var(--ink); stroke-width: 1.5; }
.ring-inner { fill: none; stroke: var(--p-accent); stroke-width: 3; }
.ring-core { fill: var(--p-accent); }
.ring-t { font: 500 15px var(--font-text); fill: var(--ink); text-anchor: middle; }
.ring-t--acc { fill: #9a3d14; }
.storm-t { font: 400 20px var(--font-title); fill: var(--ink); letter-spacing: .04em; text-transform: uppercase; }
.storm-l { stroke: var(--muted); stroke-width: 1.5; stroke-dasharray: 4 5; fill: none; }

.founder-grid { grid-auto-rows: 1fr; }
.founder-grid > .founder { align-self: stretch; }
.learn-rows { align-self: stretch; }
.citadel-diagram svg { max-height: 280px; }
.legal-links { display: inline-flex; flex-wrap: wrap; gap: 4px 16px; }
.learn-rows > li { min-height: 76px; }
.faq { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: var(--gutter, 24px); }
@media (max-width: 1023px) { .faq { grid-template-columns: 1fr; } }
.btn:focus-visible, .link:focus-visible, .nav__link:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }

@media (max-width: 639px) {
  #citadels, #learn, #assessment, #founders, #workshop, #author, #faq { --hm: 2; }
  .citadel-quote blockquote { font-size: 22px; }
  .founder blockquote { font-size: 18px; }
  .nav__actions { display: none; }
  .hero--cover .hero__lead { font-size: 17px; }
  .form__note { display: none; }
}
.grid.fill { align-content: start; }
@media (max-width: 639px) {
  .citadel-diagram svg { max-height: 210px; }
  #citadels .grid { row-gap: var(--s-5); }
}
@media (max-width: 359px) {
  .learn-rows .rows__name { font-size: 15px; line-height: 1.4; }
  .learn-rows > li { padding-block: 6px; }
  .learn-rows > li::before { font-size: 20px; }
}
