/* CadenceViz — psk-intellect.com.  One stylesheet, no framework, no fonts
   fetched from anywhere: the system face, set large, bright and bold, on a
   near-black ground.  Perry cannot read small or dim text, and neither should
   anyone have to. */

:root {
  --ground:    #0a0a0f;
  --panel:     #15151f;
  --line:      #2a2a3a;
  --text:      #ffffff;
  --muted:     #c9c9d8;
  --accent:    #ffcc4d;   /* the marquee gold: links, focus, UNLOCK */
  --danger:    #ff6b6b;
  --radius:    14px;
  --measure:   68ch;
}

* { box-sizing: border-box; }

html { color-scheme: dark; }

body {
  margin: 0;
  background: var(--ground);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 20px;
  line-height: 1.55;
  font-weight: 500;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

/* Everything sits above the drafting field, EXCEPT THE PANEL: a dialog opened as a modal must keep the browser's own
   position (fixed, in the middle of the screen).  Made relative, it opened at the top of the page, out of sight on a
   phone scrolled down to a tile (Perry, 2026-10-20: "when you click to watch a video, you see nothing because the
   video choice is further down the page and the video is only opening at the top of the page"). */
body > :not(.drafting-field, dialog) { position: relative; z-index: 1; }

/* ---- fixed drafting field ------------------------------------------ */
.drafting-field { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; background: var(--ground); }
.draft-grid { position: absolute; inset: -128px; }
.draft-grid.fine {
  background-image: linear-gradient(rgba(255,255,255,.08) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(255,255,255,.08) 1px, transparent 1px);
  background-size: 8px 8px;
}
.draft-grid.major {
  background-image: linear-gradient(rgba(255,255,255,.14) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(255,255,255,.14) 1px, transparent 1px);
  background-size: 64px 64px;
}

a { color: var(--accent); font-weight: 700; text-underline-offset: 0.18em; }
a:hover { color: #fff; }

:focus-visible { outline: 4px solid var(--accent); outline-offset: 3px; }

h1, h2, h3 { line-height: 1.15; font-weight: 800; letter-spacing: -0.01em; text-wrap: balance; margin: 0; }
h1 { font-size: clamp(2.4rem, 6vw, 4.2rem); }
h2 { font-size: clamp(1.7rem, 3.5vw, 2.4rem); }
h3 { font-size: 1.35rem; }
p  { margin: 0 0 1em; max-width: var(--measure); }
/* A BULLETED LIST written in a content.txt (assets/content.js, kBullet), set as
   the paragraphs around it are: the same measure and the same space after. */
ul { margin: 0 0 1em; padding-left: 1.4rem; max-width: var(--measure); }
li { margin-bottom: 0.4rem; }
p:last-child { margin-bottom: 0; }

.wrap { width: min(1180px, 100% - 2.5rem); margin: 0 auto; }

/* ---- header --------------------------------------------------------- */
.top {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 1.1rem 0; border-bottom: 1px solid var(--line);
}
.brand { font-weight: 900; font-size: 1.5rem; color: #fff; text-decoration: none; letter-spacing: -0.02em; }
.brand:hover { color: var(--accent); }
.nav { display: flex; gap: 1.4rem; flex-wrap: wrap; }
.nav a { text-decoration: none; font-size: 1.05rem; }
.nav a[aria-current="page"] { color: #fff; border-bottom: 3px solid var(--accent); }

/* ---- hero ----------------------------------------------------------- */
.hero { padding: 4rem 0 1rem; }
.hero .tagline { font-size: 1.35rem; color: var(--muted); margin: 0.8rem 0 1.6rem; max-width: var(--measure); }
.hero .intro p, .hero .intro li { font-size: 1.15rem; }
.cta { display: inline-flex; align-items: center; gap: 0.6rem; margin-top: 1.4rem;
       background: var(--accent); color: #111; text-decoration: none; font-weight: 800;
       padding: 0.85rem 1.4rem; border-radius: 999px; font-size: 1.1rem; }
.cta:hover { background: #fff; color: #111; }
.cta.soon { background: var(--panel); color: var(--muted); border: 2px solid var(--line); cursor: default; }
/* SEND TO MY MAC COMPUTER (phones only, nav.js): the second button, outlined, on its own line under the first. */
.cta.send { display: flex; width: fit-content; background: transparent; color: var(--accent); border: 2px solid var(--accent);
            font: inherit; font-weight: 800; font-size: 1.1rem; cursor: pointer; }
.cta.send:hover { background: transparent; color: var(--accent); }
.send-said { margin: 0.6rem 0 0; color: var(--muted); overflow-wrap: anywhere; }
.send-said:empty { display: none; }

/* WHAT A MAC COMPUTER MUST HAVE (a page's [requirement], a home card's requires:): boxed in the danger red, large,
   behind a warning sign, so nobody buys a volume their Mac computer cannot run (Perry, 2026-10-14, of Journeys'
   M3 chip: "It needs to be more obvious."). */
.requirement { display: flex; align-items: center; gap: 0.9rem; margin: 0 0 1.8rem; max-width: var(--measure);
               padding: 1rem 1.4rem; border: 4px solid var(--danger); border-radius: var(--radius);
               background: rgba(255, 107, 107, 0.16); color: #fff;
               font-size: clamp(1.35rem, 2.8vw, 2rem); font-weight: 900; line-height: 1.25; }
.requirement::before { content: "\26A0\FE0E"; color: var(--danger); font-size: 1.5em; line-height: 1; }
.requirement[hidden] { display: none; }
.requirement.at-store { margin: 1.2rem 0 0; font-size: 1.25rem; }
.card .requirement { margin: 0.6rem 0 0.8rem; padding: 0.6rem 0.9rem; border-width: 3px; font-size: 1.1rem; }


/* ---- grid ----------------------------------------------------------- */
.effects { padding: 2rem 0 4rem; }
.effects h2 { margin-bottom: 0.4rem; }
.effects .free-heading { color: var(--muted); font-size: 1.15rem; margin-bottom: 1.6rem; }
.grid { display: grid; gap: 1.4rem; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.card {
  background: rgba(21,21,31,.94); border: 1px solid rgba(255,255,255,.35); border-radius: 2px;
  padding: 0; overflow: hidden; text-align: left; color: var(--text); font: inherit; cursor: pointer;
  display: flex; flex-direction: column;
}
.card:hover, .card:focus-visible { border-color: var(--accent); }
.card img, .card video { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; display: block; background: #000; }
.card .body { padding: 1rem 1.1rem 1.2rem; display: flex; flex-direction: column; gap: 0.45rem; }
.card .row { display: flex; align-items: center; justify-content: space-between; gap: 0.8rem; }
.card .summary { color: var(--muted); font-size: 1rem; margin: 0; }
/* A PAGE OF ONE, THE POCKET WATCH'S (2026-10-20).  No effect area (Perry: "Since Pocket Watch has only a single, then
   it doesn't need the effect area at all."); its words left and its film right, the film at the top (Perry: "a two
   frame or two cell table"), on a narrow screen one over the other, the film first; under them its six faces, two
   rows of three stills (Perry: "2 rows of 3 stills"), one not yet made a dark place. */
.hero.split { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 2.4rem; align-items: start;
              padding-bottom: 2.4rem; }
.hero.split h1 { font-size: clamp(2.2rem, 3.6vw, 3.4rem); }
.film video { width: 100%; aspect-ratio: 16 / 9; display: block; background: #000; border: 1px solid rgba(255,255,255,.35);
              border-radius: 2px; }
@media (max-width: 900px) { .hero.split { grid-template-columns: minmax(0, 1fr); } .hero.split .film { order: -1; } }
/* A long word or a bare link never widens the page on a phone (the hound's audit, 2026-10-20: a 100-character link
   panned the page sideways and pushed the film off the screen). */
.hero.split .words { overflow-wrap: anywhere; }
.intro-wide { padding: 0 0 2.4rem; }
.intro-wide p, .intro-wide li { font-size: 1.15rem; max-width: none; }
.intro-wide[hidden] { display: none; }
.faces { padding: 0 0 4rem; }
.faces-grid { display: grid; gap: 1.4rem; grid-template-columns: repeat(3, 1fr); }
.faces-grid figure { margin: 0; aspect-ratio: 16 / 9; background: #000; border: 1px solid rgba(255,255,255,.35);
                     border-radius: 2px; overflow: hidden; }
.faces-grid img { width: 100%; height: 100%; object-fit: cover; display: block; }
@media (max-width: 720px) { .faces-grid { grid-template-columns: 1fr; } }
/* THE HOME PAGE'S PRODUCT CARDS are links, not buttons, and wider. */
a.card { text-decoration: none; }
.grid.products { grid-template-columns: repeat(auto-fill, minmax(420px, 1fr)); }
.grid.products .body p { margin: 0; }
/* THE CATALOG'S VOLUME NUMBER, over the volume's name on its home card (2026-10-16). */
.card .volume-number { color: var(--accent); font-size: 0.85rem; font-weight: 900; letter-spacing: 0.08em;
                       text-transform: uppercase; }
.badge { font-size: 0.85rem; font-weight: 900; letter-spacing: 0.08em; text-transform: uppercase;
         padding: 0.25rem 0.6rem; border-radius: 999px; white-space: nowrap; }
.badge.unlock { background: var(--accent); color: #1a1300; }

/* ---- the panel ------------------------------------------------------ */
dialog.panel {
  background: var(--panel); color: var(--text); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 0; width: min(1100px, 100% - 2rem); max-height: calc(100% - 2rem);
}
dialog.panel::backdrop { background: rgba(0, 0, 0, 0.8); }
.panel .media { position: relative; aspect-ratio: 16 / 9; background: #000; }
.panel .media iframe, .panel .media img, .panel .media video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; object-fit: cover; }
.panel .media .nomovie {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 0.8rem 1.2rem;
  background: rgba(0, 0, 0, 0.65); color: var(--muted); font-weight: 700;
}
.panel .text { padding: 1.4rem 1.6rem 1.8rem; }
.panel .text .row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 0.4rem; }
.panel .summary { color: var(--muted); margin-bottom: 1rem; }
/* THE CLOSE BUTTON STAYS IN SIGHT while a long panel is scrolled on a phone, where there is no Escape key (the hound's
   audit, 2026-10-20: scrolled to the panel's end, it sat above the top of the screen): it sticks to the panel's top. */
.panel .close {
  position: sticky; top: 0.8rem; float: right; margin: 0.8rem 0.8rem -4rem 0; z-index: 2;
  background: rgba(0, 0, 0, 0.7); color: #fff; border: 2px solid #fff; border-radius: 999px;
  font: inherit; font-weight: 900; font-size: 1.1rem; padding: 0.35rem 0.9rem; cursor: pointer;
}
.panel .close:hover { background: var(--accent); color: #111; border-color: var(--accent); }
.placeholder { color: var(--muted); font-style: italic; }
/* The Previews page: each product's heading and summary above its own grid. */
.product { margin-top: 2.6rem; }
.product h2 { margin-bottom: 0.4rem; }
.product .product-summary { color: var(--muted); font-size: 1.15rem; margin-bottom: 0.8rem; }
.product .product-text { max-width: var(--measure); margin-bottom: 1.4rem; }

/* ---- documents (privacy, support) ----------------------------------- */
.doc { padding: 3rem 0 4rem; }
.doc h1 { margin-bottom: 0.4rem; }
.doc .meta { color: var(--muted); margin-bottom: 2rem; }
.doc h2 { margin: 2.2rem 0 0.7rem; font-size: 1.6rem; }
.doc ul, .doc ol { max-width: var(--measure); padding-left: 1.4rem; }
.doc li { margin-bottom: 0.5rem; }
.doc dt { font-weight: 800; margin-top: 1.2rem; }
.doc dd { margin: 0.3rem 0 0; max-width: var(--measure); }
.contact { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
           padding: 1.2rem 1.4rem; max-width: var(--measure); font-size: 1.15rem; }
code { font-family: ui-monospace, Menlo, monospace; font-weight: 700; font-size: 0.95em; }
kbd { font: inherit; font-weight: 800; background: #000; border: 1px solid var(--line); border-radius: 6px; padding: 0.05em 0.45em; }

/* ---- footer --------------------------------------------------------- */
.foot { border-top: 1px solid rgba(255,255,255,.42); padding: 1.6rem 0 2.4rem; color: var(--muted); font-size: 1rem;
        display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
/* THE TRADEMARK LINE, on a row of its own under the rest (Perry, 2026-09-29:
   "Just include all the trademark attributions"). */
.foot .trademarks { flex-basis: 100%; font-size: .8rem; line-height: 1.5; }
.title-block { flex-basis: 100%; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
               border: 1px solid rgba(255,255,255,.48); font-family: ui-monospace, Menlo, monospace; }
.title-block > span { min-width: 0; padding: .55rem .7rem; border-right: 1px solid rgba(255,255,255,.42); }
.title-block > span:last-child { grid-column: 1 / -1; border-top: 1px solid rgba(255,255,255,.42); border-right: 0; }
.title-block b { display: block; color: var(--muted); font-size: .75rem; letter-spacing: .08em; text-transform: uppercase; }
.title-block span span { display: block; color: #fff; font-size: 1rem; font-weight: 700; overflow-wrap: anywhere; }

@media (prefers-reduced-motion: no-preference) {
  .card { transition: border-color 120ms ease; }
  .draft-grid.fine { animation: draft-drift-fine 70s linear infinite; }
  .draft-grid.major { animation: draft-drift-major 110s linear infinite; }
}
@keyframes draft-drift-fine { to { transform: translate(8px, 8px); } }
@keyframes draft-drift-major { to { transform: translate(-64px, 64px); } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
@media (max-width: 640px) {
  body { font-size: 20px; }
  .top { align-items: flex-start; flex-direction: column; }
  .nav { gap: .7rem 1rem; }
  .hero { padding: 2.5rem 0 1.5rem; }
  .title-block { grid-template-columns: 1fr 1fr; }
  .title-block > span:nth-child(2n) { border-right: 0; }
}

/* THE CAROUSEL on the home page: every poster in one row, scrolled by hand
   (swipe, wheel, arrow keys or the two buttons), settling on a poster. */
.carousel { position: relative; margin: 0.5rem 0 2.2rem; }
.carousel-viewport { overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding: 0 1rem; }
.carousel-viewport::-webkit-scrollbar { display: none; }
.carousel-viewport:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.carousel-track { display: flex; gap: 1rem; width: max-content; }
.slide { flex: 0 0 auto; width: clamp(240px, 28vw, 380px); scroll-snap-align: start; scroll-margin-left: 1rem;
         display: block; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
         background: var(--panel); color: var(--text); text-decoration: none; }
.slide:hover, .slide:focus-visible { border-color: var(--accent); }
.slide img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; display: block; background: #000; }
.slide .caption { display: flex; justify-content: space-between; align-items: baseline; gap: 0.6rem; padding: 0.6rem 0.8rem; }
.slide .caption strong { font-size: 1rem; }

/* A THING THAT MUST NOT BE MISSED: ***words*** in a content file (assets/content.js).  Perry, 2026-10-12, of
   Journeys' need of an M3 chip: "bold and in bright red". */
strong.must { color: #ff2d2d; font-weight: 800; }
.slide .caption span { color: var(--muted); font-size: 0.85rem; white-space: nowrap; }
.carousel-step { position: absolute; top: calc(50% - 1.6rem); z-index: 2; width: 3rem; height: 3rem; border-radius: 50%;
                 border: 1px solid var(--line); background: rgba(10, 10, 15, 0.8); color: var(--accent);
                 font-size: 2rem; line-height: 1; cursor: pointer; }
.carousel-step.prev { left: 0.5rem; }
.carousel-step.next { right: 0.5rem; }
.carousel-step:hover, .carousel-step:focus-visible { border-color: var(--accent); }
.carousel-step:disabled { opacity: 0.3; cursor: default; }

/* EVERY EFFECT'S WORDS, folded under the grid (assets/site.js): there for a
   reader that never clicks a tile, and for anyone who wants them all. */
.about-effects { margin: 2rem 0 0; border-top: 1px solid var(--line); padding-top: 1rem; }
.about-effects > summary { cursor: pointer; color: var(--accent); font-weight: 600; }
.about-effect { margin: 1.4rem 0; max-width: var(--measure); }
.about-effect h3 { margin: 0 0 0.3rem; }
.about-effect .summary { color: var(--muted); margin: 0 0 0.5rem; }

/* A moving poster in the panel fills the media box as the still did. */
.media video { width: 100%; height: 100%; display: block; background: #000; }
