/* CharacterOS landing page: a director's notebook, not a software dashboard.
   Warm paper, one ink, one red pencil, a yellow highlighter. Serif headlines, taped prints, stamps, hand-drawn marks.
   Flat colour only: no glow, no gradients, no neon. Motion is small and stops for people who asked for less. */
:root {
  --paper: #f3ede1; --paper2: #ebe3d3; --sheet: #fffaf0; --ink: #1f1b16; --muted: #5a5246; --rule: #cfc4ae;
  --red: #b93c0e; --red-dark: #8f2d08; --mark: #f2d05a; --green: #2f5d3a;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, "Times New Roman", serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --hand: "Bradley Hand", "Segoe Print", "Chalkboard SE", "Marker Felt", cursive;
  --w: 1120px;
  --grain: url("/characteros/assets/grain.svg");
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body.landing { margin: 0; background: var(--paper) var(--grain); color: var(--ink); font: 400 19px/1.65 var(--serif); -webkit-font-smoothing: antialiased; }
.landing a { color: inherit; }
.landing img, .landing video { display: block; max-width: 100%; height: auto; }
.wrap { max-width: var(--w); margin: 0 auto; padding: 0 24px; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 12px; background: var(--mark); color: var(--ink); padding: 10px 14px; z-index: 20; }
:focus-visible { outline: 3px solid var(--red); outline-offset: 3px; }
/* a small note above a heading, like a chapter mark written in the margin */
.mono { display: block; font: italic 400 18px/1.2 var(--serif); color: var(--red); letter-spacing: 0; text-transform: none; }

/* top bar */
.bar { position: sticky; top: 0; z-index: 10; background: var(--paper); border-bottom: 2px solid var(--ink); }
.bar .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; font: 700 21px/1 var(--serif); text-decoration: none; letter-spacing: -.01em; }
.brand svg { width: 28px; height: 28px; }
.bar nav { display: flex; align-items: center; gap: 2px 24px; flex-wrap: wrap; }
.bar nav a { text-decoration: none; color: var(--muted); font: 500 15px/1 var(--sans); padding: 12px 0; }
.bar nav a:hover { color: var(--ink); text-decoration: underline; text-decoration-color: var(--red); text-decoration-thickness: 2px; text-underline-offset: 6px; }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 52px; padding: 0 26px; border-radius: 3px; font: 600 16px/1 var(--sans); text-decoration: none; border: 2px solid var(--ink); background: transparent; color: var(--ink); cursor: pointer; }
.btn:hover { background: var(--mark); }
.btn.primary { background: var(--red); border-color: var(--ink); color: var(--sheet); box-shadow: 3px 3px 0 var(--ink); }
.btn.primary:hover { background: var(--red-dark); transform: translate(1px, 1px); box-shadow: 2px 2px 0 var(--ink); }
.bar nav .btn { min-height: 42px; padding: 0 18px; font-size: 14px; color: var(--sheet); }
.bar nav .btn:hover { color: var(--sheet); text-decoration: none; }

/* hero */
.hero { padding: 72px 0 48px; border-bottom: 2px solid var(--ink); }
.hero h1 { font: 700 clamp(38px, 6.4vw, 82px)/1.02 var(--serif); letter-spacing: -.025em; margin: 14px 0 26px; max-width: 13em; }
.hero h1 em { font-style: italic; position: relative; white-space: nowrap; }
.hero h1 em .scribble { position: absolute; left: -2%; bottom: -.16em; width: 104%; height: .32em; overflow: visible; }
.hero h1 em .scribble path { fill: none; stroke: var(--red); stroke-width: 5; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.lead { font-size: clamp(19px, 2vw, 23px); color: var(--ink); max-width: 36em; margin: 0 0 30px; line-height: 1.55; }
.cta { display: flex; gap: 16px; flex-wrap: wrap; margin: 0 0 22px; align-items: center; }
.fine { font: 400 15px/1.55 var(--sans); color: var(--muted); margin: 0; max-width: 46em; border-left: 3px solid var(--mark); padding-left: 14px; }
.tagline { font: 400 clamp(22px, 3vw, 30px)/1.2 var(--hand); color: var(--red); margin: 44px 0 0; transform: rotate(-1.5deg); transform-origin: left center; }

/* what goes in, what comes out: notes and prints pinned to a table */
.split { display: grid; gap: 40px 24px; margin-top: 64px; grid-template-columns: minmax(0, 1fr); align-items: start; }
@media (min-width: 980px) { .split { grid-template-columns: minmax(0, 1fr) 150px minmax(0, 1.35fr); gap: 0 12px; } }
.col { display: grid; gap: 22px; align-content: start; }
.col > .mono { margin: 0; font-size: 22px; }
.card { background: var(--sheet); border: 1px solid var(--rule); padding: 16px 18px; box-shadow: 0 1px 0 rgba(31,27,22,.12), 0 10px 18px -12px rgba(60,40,10,.45); }
.col .card:nth-of-type(1) { transform: rotate(-1.6deg); }
.col .card:nth-of-type(2) { transform: rotate(1.1deg); margin-left: 14px; }
.col .card:nth-of-type(3) { transform: rotate(-.7deg); }
.card h3 { font: 700 18px/1.2 var(--serif); margin: 0 0 4px; }
.card p { margin: 0; font: 400 15px/1.5 var(--sans); color: var(--muted); }
.photo { display: grid; grid-template-columns: 88px minmax(0, 1fr); gap: 16px; align-items: center; position: relative; }
.photo img { width: 88px; aspect-ratio: 3 / 4; object-fit: cover; border: 4px solid #fff; box-shadow: 0 1px 4px rgba(31,27,22,.35); }
.photo::before, .entity::before, .taped::before { content: ""; position: absolute; width: 74px; height: 24px; background: rgba(228,205,120,.72); top: -12px; left: 18px; transform: rotate(-5deg); }
.wave { display: flex; align-items: center; gap: 3px; height: 40px; margin-top: 8px; }
.wave i { display: block; width: 3px; border-radius: 2px; background: var(--red); height: 8px; }
.wave.live i { animation: pulse 1.15s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { transform: scaleY(.35); } 50% { transform: scaleY(1.7); } }
.bars { display: grid; gap: 10px; margin-top: 10px; }
.bars span { display: grid; grid-template-columns: 104px minmax(0, 1fr); align-items: center; font: 400 14px/1.2 var(--sans); color: var(--muted); gap: 10px; }
.bars b { display: block; height: 7px; border-bottom: 2px solid var(--rule); position: relative; }
.bars b::after { content: ""; position: absolute; left: 0; bottom: -2px; width: var(--v); height: 5px; background: var(--ink); border-radius: 3px 8px 6px 3px; }

/* the arrow between them, drawn by hand */
.brain { display: grid; place-items: center; padding: 8px 0; }
.brain svg { width: 100%; max-width: 170px; height: auto; overflow: visible; transform: rotate(90deg); }
@media (min-width: 980px) { .brain { padding-top: 90px; } .brain svg { transform: none; } }
.brain path { fill: none; stroke: var(--red); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.brain text { fill: var(--ink); font: 400 20px var(--hand); text-anchor: middle; }

.outputs { display: grid; gap: 22px 18px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.outputs figure { margin: 0; background: var(--sheet); padding: 10px 10px 8px; border: 1px solid var(--rule); box-shadow: 0 1px 0 rgba(31,27,22,.12), 0 10px 18px -12px rgba(60,40,10,.45); }
.outputs figure:nth-child(1) { transform: rotate(.8deg); }
.outputs figure:nth-child(2) { transform: rotate(-1.4deg); }
.outputs figure:nth-child(3) { transform: rotate(1.2deg); }
.outputs img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.outputs figcaption { font: italic 400 16px/1.3 var(--serif); color: var(--muted); margin-top: 8px; }
.outputs .wide { grid-column: 1 / -1; }

/* sections */
section.band { padding: 96px 0; border-bottom: 2px solid var(--ink); }
.band h2 { font: 700 clamp(32px, 4.8vw, 56px)/1.05 var(--serif); letter-spacing: -.02em; margin: 10px 0 18px; max-width: 14em; }
.band .sub { color: var(--muted); max-width: 38em; margin: 0 0 48px; font-size: 20px; }
/* a rubber stamp */
.tag { display: inline-block; font: 700 11px/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; padding: 6px 8px 5px; border: 2px solid; border-radius: 3px; transform: rotate(-3deg); white-space: nowrap; }
.tag.live { color: var(--green); border-color: var(--green); }
.tag.soon { color: var(--muted); border-color: var(--muted); border-style: dashed; }

/* character sheet */
.dna { display: grid; gap: 44px; grid-template-columns: minmax(0, 1fr); align-items: start; }
@media (min-width: 900px) { .dna { grid-template-columns: minmax(0, .75fr) minmax(0, 1.25fr); } }
.entity { position: relative; justify-self: center; background: var(--sheet); padding: 16px 16px 14px; border: 1px solid var(--rule); transform: rotate(-2deg); box-shadow: 0 1px 0 rgba(31,27,22,.12), 0 14px 22px -14px rgba(60,40,10,.5); max-width: 340px; }
.entity::before { left: calc(50% - 37px); top: -13px; transform: rotate(3deg); }
.entity img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; }
.entity .mono { margin-top: 10px; text-align: center; color: var(--muted); }
.genes { display: grid; gap: 0; grid-template-columns: minmax(0, 1fr); border-top: 2px solid var(--ink); }
.gene { display: grid; grid-template-columns: 138px minmax(0, 1fr); gap: 2px 18px; align-items: baseline; padding: 14px 4px; border-bottom: 1px dashed var(--rule); }
.gene .tag { grid-row: 1 / 3; justify-self: start; align-self: center; }
.gene b { font: 700 21px/1.2 var(--serif); }
.gene p { margin: 0; font: 400 16px/1.45 var(--sans); color: var(--muted); }
.gene.is-soon b { color: var(--muted); font-weight: 400; font-style: italic; }
@media (max-width: 520px) { .gene { grid-template-columns: minmax(0, 1fr); } .gene .tag { grid-row: auto; } }

/* lifecycle: four index-card tabs and a card */
.life { }
.life [role=tablist] { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; align-items: end; }
.life [role=tab] { text-align: left; background: var(--paper2); border: 2px solid var(--ink); border-bottom: 0; border-radius: 6px 6px 0 0; color: var(--muted); padding: 10px 20px 12px; font: inherit; cursor: pointer; min-height: 64px; flex: 0 1 auto; position: relative; top: 2px; }
.life [role=tab] .mono { font: italic 400 14px/1.1 var(--serif); color: inherit; }
.life [role=tab] b { display: block; font: 700 22px/1.1 var(--serif); color: var(--ink); margin-top: 4px; }
.life [role=tab][aria-selected=true] { background: var(--sheet); color: var(--red); padding-top: 14px; min-height: 72px; z-index: 1; }
.life [role=tab]:hover { background: var(--mark); }
.life [role=tabpanel] { background: var(--sheet); border: 2px solid var(--ink); padding: 30px 28px 34px; min-height: 170px; background-image: repeating-linear-gradient(to bottom, transparent 0 33px, rgba(185,60,14,.16) 33px 34px); }
.life [role=tabpanel] h3 { font: 700 30px/1.15 var(--serif); margin: 12px 0 10px; letter-spacing: -.01em; }
.life [role=tabpanel] p { margin: 0; color: var(--ink); max-width: 40em; line-height: 34px; }

/* worlds */
.worlds-tabs { display: flex; gap: 12px; flex-wrap: wrap; margin: 0 0 24px; }
.chipbtn { border: 2px solid var(--ink); background: transparent; color: var(--ink); border-radius: 3px; padding: 10px 18px; font: 600 15px/1 var(--sans); cursor: pointer; min-height: 46px; }
.chipbtn:hover { background: var(--mark); }
.chipbtn[aria-pressed=true] { background: var(--ink); color: var(--paper); }
.graph { position: relative; background: var(--sheet); border: 2px solid var(--ink); padding: 24px; }
.graph svg { display: block; width: 100%; height: auto; }
.graph .edge { stroke: var(--ink); stroke-width: 2; stroke-linecap: round; }
.graph .node { fill: var(--paper); stroke: var(--ink); stroke-width: 2; }
.graph .node.me { stroke: var(--red); stroke-width: 5; }
.graph text { fill: var(--ink); font: 700 21px var(--serif); text-anchor: middle; }
.graph .ini { fill: var(--red); font: 700 25px var(--serif); }
.graph-title { margin: 0 0 12px; font: italic 400 19px/1.3 var(--serif); color: var(--muted); }
.graph text.el { fill: var(--red); font: italic 400 18px var(--serif); paint-order: stroke; stroke: var(--sheet); stroke-width: 9px; stroke-linejoin: round; }
.graph-note { margin-top: 20px; border-top: 1px dashed var(--rule); padding-top: 16px; display: grid; gap: 10px; }
.graph-note p { margin: 0; font: 400 16px/1.55 var(--sans); color: var(--muted); }
.graph-note strong { color: var(--ink); font-weight: 700; }

/* demo */
.demo { display: grid; gap: 32px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 960px) { .demo { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); } }
.demo figure { margin: 0; background: var(--sheet); border: 2px solid var(--ink); padding: 12px 12px 10px; box-shadow: 6px 6px 0 var(--ink); }
.demo video { width: 100%; aspect-ratio: 16 / 9; background: #000; }
.demo figcaption { font: italic 400 16px/1.4 var(--serif); color: var(--muted); margin-top: 10px; }
.made { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; align-content: start; }
.made li { display: flex; justify-content: space-between; gap: 14px; align-items: center; padding: 14px 0; border-bottom: 1px dashed var(--rule); font-size: 19px; }
.made li:first-child { border-top: 2px solid var(--ink); }
.shots { display: grid; gap: 26px 18px; margin-top: 48px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 860px) { .shots { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.shots figure { margin: 0; background: var(--sheet); padding: 8px 8px 6px; border: 1px solid var(--rule); box-shadow: 0 1px 0 rgba(31,27,22,.12), 0 10px 18px -12px rgba(60,40,10,.45); }
.shots figure:nth-child(odd) { transform: rotate(-1.2deg); } .shots figure:nth-child(even) { transform: rotate(1deg); }
.shots img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.shots figcaption { font: italic 400 15px/1.3 var(--serif); color: var(--muted); margin-top: 6px; }

/* safety: five plain promises written down */
.safe { display: grid; gap: 22px; grid-template-columns: repeat(2, minmax(0, 1fr)); counter-reset: s; }
@media (min-width: 900px) { .safe { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
.safe div { border-top: 2px solid var(--ink); padding-top: 12px; font: 700 18px/1.3 var(--serif); counter-increment: s; }
.safe div::before { content: counter(s) "."; display: block; font: italic 400 16px var(--serif); color: var(--red); margin-bottom: 4px; }
.safe span { display: block; color: var(--muted); font: 400 15px/1.5 var(--sans); margin-top: 6px; }

/* the closing call: a solid red page */
.band.close { background: var(--red); color: var(--sheet); border-bottom: 2px solid var(--ink); }
.close h2 { font-size: clamp(40px, 7vw, 92px); max-width: 10em; color: var(--sheet); }
.close .sub { color: #fff1e8; }
.close .btn.primary { background: var(--sheet); color: var(--ink); box-shadow: 4px 4px 0 var(--ink); }
.close .btn.primary:hover { background: var(--mark); }

/* footer: about, product, help, company */
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
footer.foot { background: var(--ink); color: #cfc6b4; padding: 60px 0 44px; font: 400 16px/1.5 var(--sans); }
footer.foot .brand { color: var(--paper); }
.foot-grid { display: grid; gap: 38px 28px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 900px) { .foot-grid { grid-template-columns: minmax(0, 1.6fr) repeat(3, minmax(0, 1fr)); } }
.foot-about { grid-column: 1 / -1; }
@media (min-width: 900px) { .foot-about { grid-column: auto; } }
.foot-about p { margin: 14px 0 0; max-width: 30em; }
.foot-grid h3 { font: italic 400 19px/1 var(--serif); color: var(--mark); margin: 0 0 10px; }
.foot-grid nav { display: flex; flex-direction: column; }
.foot-grid nav a { text-decoration: none; color: #cfc6b4; padding: 8px 0; min-height: 40px; display: flex; align-items: center; }
.foot-grid nav a:hover { color: #fff; text-decoration: underline; text-decoration-color: var(--mark); text-underline-offset: 5px; }
.legal { margin: 44px 0 0; padding-top: 20px; border-top: 1px solid #4a423a; font-size: 14px; }

/* help page (long text) */
.doc { max-width: 780px; margin: 0 auto; padding: 56px 24px 56px; }
.doc h1 { font: 700 clamp(36px, 5vw, 56px)/1.05 var(--serif); letter-spacing: -.02em; margin: 12px 0 18px; }
.doc h2 { font: 700 30px/1.15 var(--serif); letter-spacing: -.01em; margin: 56px 0 12px; padding-top: 12px; border-top: 2px solid var(--ink); }
.doc h3 { font: 700 21px/1.3 var(--serif); margin: 28px 0 6px; color: var(--ink); }
.doc p, .doc li { color: var(--ink); font-size: 18px; }
.doc li { margin: 6px 0; } .doc ol, .doc ul { padding-left: 24px; }
.doc strong { font-weight: 700; }
.doc a { color: var(--red); text-underline-offset: 3px; }
.doc table { width: 100%; border-collapse: collapse; margin: 16px 0; font-size: 17px; }
.doc th, .doc td { text-align: left; padding: 12px 10px; border-bottom: 1px dashed var(--rule); vertical-align: top; }
.doc th { font-weight: 700; width: 38%; }
.doc td { color: var(--muted); }
.toc { display: flex; flex-wrap: wrap; gap: 10px; margin: 22px 0 0; padding: 0; list-style: none; }
.toc a { display: inline-block; border: 2px solid var(--ink); border-radius: 3px; padding: 9px 16px; font: 600 14px var(--sans); text-decoration: none; color: var(--ink); }
.toc a:hover { background: var(--mark); }

/* the five choices: a call sheet, one line each */
.five { display: grid; gap: 0; border-top: 2px solid var(--ink); counter-reset: f; }
.five .item { display: grid; grid-template-columns: 74px minmax(0, 1.1fr) minmax(0, 1.4fr) 34px; gap: 4px 20px; align-items: baseline; padding: 22px 6px; text-decoration: none; border-bottom: 1px dashed var(--ink); }
.five .item .mono { font: 700 44px/1 var(--serif); color: var(--red); font-style: italic; }
.five h3 { font: 700 clamp(22px, 2.6vw, 30px)/1.15 var(--serif); margin: 0; letter-spacing: -.01em; }
.five p { font: 400 17px/1.45 var(--sans); color: var(--muted); margin: 0; }
.five .item::after { content: "\2192"; font: 400 28px/1 var(--serif); color: var(--red); justify-self: end; transition: transform .15s; }
.five .item:hover, .five .item:focus-visible { background: var(--mark); }
.five .item:hover::after { transform: translateX(6px); }
@media (max-width: 760px) { .five .item { grid-template-columns: 52px minmax(0, 1fr) 24px; } .five .item p { grid-column: 2 / 3; } .five .item::after { grid-row: 1; grid-column: 3; } .five .item .mono { font-size: 34px; } }

/* a hidden thing stays hidden even when another rule gives it a display (this was why both example worlds showed at once) */
[hidden] { display: none !important; }

/* the header picture */
.banner { margin: 0; border: 2px solid var(--ink); box-shadow: 8px 8px 0 var(--ink); background: var(--ink); }
.banner img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.hero-text { display: grid; gap: 28px 48px; margin-top: 52px; grid-template-columns: minmax(0, 1fr); align-items: start; }
@media (min-width: 900px) { .hero-text { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); } .hero-text .cta { justify-content: flex-end; padding-top: 6px; } }
.hero-text .lead { margin-bottom: 20px; }

@media (max-width: 640px) {
  .wrap { padding: 0 18px; }
  body.landing { font-size: 18px; }
  .hero { padding: 44px 0 32px; }
  .banner { box-shadow: 5px 5px 0 var(--ink); }
  .hero-text { margin-top: 36px; }
  section.band { padding: 64px 0; }
  .bar nav a.hide-sm { display: none; }
  .life [role=tab] { padding: 8px 6px 10px 8px; min-height: 56px; }
  .life [role=tab] .mono { font-size: 12px; }
  .life [role=tab] b { font-size: 15px; }
  .life [role=tabpanel] { padding: 22px 18px 26px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .wave.live i { animation: none; }
  .btn.primary:hover { transform: none; }
}

/* questions and answers: plain open/close lines, no script needed */
.qa { border-top: 2px solid var(--ink); max-width: 820px; }
.qa details { border-bottom: 1px dashed var(--ink); }
.qa summary { cursor: pointer; list-style: none; padding: 20px 40px 20px 4px; font: 700 clamp(19px, 2.2vw, 24px)/1.3 var(--serif); position: relative; min-height: 44px; }
.qa summary::-webkit-details-marker { display: none; }
.qa summary::after { content: "+"; position: absolute; right: 6px; top: 14px; font: 400 32px/1 var(--serif); color: var(--red); }
.qa details[open] summary::after { content: "\2212"; }
.qa summary:hover { background: var(--mark); }
.qa details p { margin: 0 0 22px; padding: 0 40px 0 4px; max-width: 40em; color: var(--ink); }

/* the five choices in two steps: set up the character first, then make a video */
.five .five-k { font: italic 400 19px/1.3 var(--serif); color: var(--ink); margin: 0; padding: 18px 6px 10px; display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; }
.five .five-k span { font: 700 11px/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; background: var(--ink); color: var(--paper); padding: 6px 9px 5px; border-radius: 3px; }
.five .five-k em { color: var(--red); }
.five .five-k:not(:first-child) { margin-top: 10px; border-top: 2px solid var(--ink); }
