/* Phantom Scribes
   Idea: a ghostwriter's duplicate copy. Cool paper, purple duplicator ink,
   one yellow highlighter. The script is the hero; everything else stays quiet. */

:root {
  --desk: #e7e8ef;      /* page background, cool grey paper */
  --sheet: #fafaff;     /* the script page */
  --ink: #1a1630;       /* body text */
  --ditto: #4a2d8f;     /* duplicator purple: script text, links, buttons */
  --marker: #ffe55e;    /* highlighter */
  --pencil: #5f5c74;    /* secondary text */
  --rule: #c7c9d8;      /* lines */
  --display: "Bricolage Grotesque", "Segoe UI", system-ui, sans-serif;
  --script: "Courier Prime", "Courier New", Courier, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--desk);
  color: var(--ink);
  font: 400 18px/1.55 var(--display);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--ditto); text-underline-offset: 3px; }
:focus-visible { outline: 3px solid var(--ditto); outline-offset: 3px; border-radius: 2px; }

.wrap { width: min(1120px, 100% - 32px); margin-inline: auto; }

h1, h2, h3 { font-family: var(--display); margin: 0; letter-spacing: -0.02em; text-wrap: balance; }
h1 { font-weight: 800; font-size: clamp(2.6rem, 8.2vw, 6rem); line-height: 0.95; letter-spacing: -0.04em; }
h2 { font-weight: 700; font-size: clamp(1.7rem, 3.6vw, 2.6rem); line-height: 1.05; }
h3 { font-weight: 700; font-size: 1.25rem; line-height: 1.2; }
p { margin: 0; max-width: 62ch; }

/* ---------- header ---------- */
.top { border-bottom: 1px solid var(--rule); }
.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; }
.logo { font-weight: 800; font-size: 1.2rem; letter-spacing: -0.02em; color: var(--ink); text-decoration: none; }
.logo span { color: inherit; }
.top nav { display: flex; align-items: center; gap: 24px; }
.top nav a { color: var(--ink); text-decoration: none; font-size: 1rem; }
.top nav a:hover { text-decoration: underline; }

.btn {
  display: inline-block;
  background: var(--ditto);
  color: #fff;
  font: 700 1rem/1 var(--display);
  text-decoration: none;
  padding: 14px 22px;
  border: 2px solid var(--ditto);
  border-radius: 4px;
  cursor: pointer;
}
.btn:hover { background: #3a2273; border-color: #3a2273; }
.btn:active { transform: translateY(1px); }
.btn.quiet { background: transparent; color: var(--ditto); }
.btn.quiet:hover { background: rgba(74, 45, 143, 0.08); }
.top nav a.btn { color: #fff; padding: 10px 16px; }
.top nav a.btn:hover { text-decoration: none; }
@media (max-width: 620px) { .top nav a:not(.btn) { display: none; } }

/* ---------- hero ---------- */
.hero { padding: clamp(40px, 7vw, 88px) 0 0; }
.hero .pitch { font-size: clamp(1.1rem, 1.9vw, 1.35rem); color: var(--pencil); margin-top: 24px; max-width: 54ch; }
.hero .actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

/* ---------- the script sheet ---------- */
.player { margin-top: clamp(36px, 6vw, 64px); }
.tabs { display: flex; gap: 4px; flex-wrap: wrap; }
.tabs button {
  font: 700 0.95rem/1 var(--display);
  color: var(--pencil);
  background: transparent;
  border: 1px solid var(--rule);
  border-bottom: 0;
  border-radius: 6px 6px 0 0;
  padding: 12px 16px;
  cursor: pointer;
}
.tabs button[aria-selected="true"] { background: var(--sheet); color: var(--ditto); }
.tabs button:hover { color: var(--ditto); }

.sheet {
  background: var(--sheet);
  border: 1px solid var(--rule);
  border-radius: 0 6px 6px 6px;
  box-shadow: 0 18px 40px -24px rgba(26, 22, 48, 0.45);
  font-family: var(--script);
  color: var(--ditto);
}
.sheet-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  padding: 16px clamp(16px, 3vw, 32px);
  border-bottom: 1px solid var(--rule);
}
.sheet-head .title { font-weight: 700; font-size: 1.05rem; }
.transport { display: flex; align-items: center; gap: 14px; }
.clock { font-variant-numeric: tabular-nums; font-size: 1.05rem; min-width: 4ch; text-align: right; }
.play {
  font: 700 0.95rem/1 var(--display);
  background: var(--marker);
  color: var(--ink);
  border: 1px solid var(--ink);
  border-radius: 4px;
  padding: 9px 14px;
  min-width: 5.5em;
  cursor: pointer;
}
.play:hover { background: #ffdc2e; }

.cols, .row { display: grid; grid-template-columns: 5ch minmax(0, 1.7fr) minmax(0, 1fr); column-gap: clamp(12px, 2.4vw, 28px); }
.cols { padding: 10px clamp(16px, 3vw, 32px); border-bottom: 1px solid var(--rule); color: var(--pencil); font-size: 0.9rem; }
.rows { padding: 6px clamp(16px, 3vw, 32px) 18px; min-height: 22rem; }
.row { padding: 14px 0; border-bottom: 1px dashed var(--rule); }
.row:last-child { border-bottom: 0; }
.row .tc { color: var(--pencil); font-variant-numeric: tabular-nums; font-size: 0.9rem; padding-top: 3px; }
.row .vo { font-size: clamp(1rem, 1.5vw, 1.15rem); line-height: 1.6; margin: 0; max-width: none; }
.row .vis { font-size: 0.9rem; line-height: 1.5; color: var(--pencil); margin: 0; padding-top: 3px; }
.row .hl {
  background-image: linear-gradient(var(--marker), var(--marker));
  background-repeat: no-repeat;
  background-size: 0% 100%;
}
.sheet-foot { padding: 14px clamp(16px, 3vw, 32px); border-top: 1px solid var(--rule); font-family: var(--display); font-size: 1rem; color: var(--pencil); }

.more {
  display: block; width: 100%;
  font: 700 1rem/1 var(--display); color: var(--ditto);
  background: transparent; border: 0; border-top: 1px dashed var(--rule);
  padding: 16px; cursor: pointer; text-align: left;
  padding-inline: clamp(16px, 3vw, 32px);
}
.more:hover { background: rgba(74, 45, 143, 0.06); }
.more[hidden] { display: none; }
.rows.short { min-height: 0; padding-bottom: 6px; }
.rows.short .row:nth-child(n+3) { display: none; }
.rows.short .row:nth-child(2) { border-bottom: 0; }

@media (max-width: 720px) {
  .rows { min-height: 0; }
  .cols { display: none; }
  .row { grid-template-columns: 5ch minmax(0, 1fr); }
  .row .vis { grid-column: 2; margin-top: 8px; padding-left: 10px; border-left: 2px solid var(--rule); }
}

/* ---------- sections ---------- */
.band { padding: clamp(56px, 8vw, 104px) 0 0; }
.band > .wrap > p.intro { color: var(--pencil); margin-top: 14px; font-size: 1.1rem; }

/* rate card */
.rates { list-style: none; margin: 32px 0 0; padding: 0; border-top: 2px solid var(--ink); }
.rates li {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 2fr) minmax(0, 0.8fr) 12.5rem;
  gap: 8px 28px;
  align-items: baseline;
  padding: 24px 0;
  border-bottom: 1px solid var(--rule);
}
.rates .what { color: var(--pencil); max-width: 46ch; }
.rates .when { color: var(--pencil); }
.rates .cost { font-weight: 800; font-size: clamp(1.6rem, 3vw, 2.2rem); letter-spacing: -0.03em; text-align: right; white-space: nowrap; }
.rates .cost small { font-weight: 400; font-size: 1rem; letter-spacing: 0; color: var(--pencil); }
.fine { color: var(--pencil); font-size: 1rem; margin-top: 16px; }
@media (max-width: 820px) {
  .rates li { grid-template-columns: 1fr auto; }
  .rates h3 { grid-column: 1; grid-row: 1; align-self: center; }
  .rates .cost { grid-column: 2; grid-row: 1; }
  .rates .what, .rates .when { grid-column: 1 / -1; }
}

/* process: a real sequence, so it is numbered */
.steps { margin: 32px 0 0; padding: 0; list-style: none; counter-reset: step; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 28px; }
.steps li { counter-increment: step; border-top: 2px solid var(--ink); padding-top: 14px; color: var(--pencil); }
.steps li::before { content: counter(step); display: block; font-weight: 800; font-size: 2.2rem; line-height: 1; color: var(--ditto); margin-bottom: 10px; }
.steps strong { display: block; color: var(--ink); font-size: 1.15rem; margin-bottom: 4px; }
@media (max-width: 820px) { .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 460px) { .steps { grid-template-columns: 1fr; } }

/* sample index */
.reads { list-style: none; margin: 32px 0 0; padding: 0; border-top: 2px solid var(--ink); }
.reads a {
  display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) 12.5rem; gap: 6px 28px; align-items: baseline;
  padding: 20px 0; border-bottom: 1px solid var(--rule);
  color: var(--ink); text-decoration: none;
}
.reads a:hover h3 { color: var(--ditto); text-decoration: underline; }
.reads .kind, .reads .len { color: var(--pencil); }
.reads .len { text-align: right; }
@media (max-width: 620px) { .reads a { grid-template-columns: 1fr; } .reads .len { text-align: left; } }

/* the edit sample */
.reel {
  display: block; width: 100%; max-width: 880px; height: auto; aspect-ratio: 16 / 9;
  margin-top: 32px; background: var(--ink);
  border: 1px solid var(--rule); border-radius: 6px;
  box-shadow: 0 18px 40px -24px rgba(26, 22, 48, 0.45);
}

/* not-found page */
.lost { padding: clamp(56px, 10vw, 140px) 0; }
.lost p { color: var(--pencil); margin-top: 20px; font-size: 1.15rem; }
.lost .actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

/* contact */
.ask { padding: clamp(64px, 9vw, 120px) 0; }
.ask .mail {
  display: inline-block; margin-top: 24px;
  font-weight: 800; font-size: clamp(1.5rem, 5.2vw, 3.6rem); letter-spacing: -0.03em; line-height: 1.1;
  color: var(--ink); text-decoration: none; overflow-wrap: anywhere;
  background: linear-gradient(var(--marker), var(--marker)) no-repeat 0 88% / 100% 34%;
}
.ask .mail:hover { background-size: 100% 100%; }
.reach { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; margin-top: 24px; }
.reach .mail { margin-top: 0; padding: 10px 0; }
.reach .copy { padding: 12px 18px; }
.reach .copied { color: var(--pencil); font-size: 1rem; min-width: 4ch; }
.ask p { color: var(--pencil); margin-top: 16px; font-size: 1.1rem; }

footer { border-top: 1px solid var(--rule); padding: 24px 0 40px; color: var(--pencil); font-size: 0.95rem; }
footer .wrap { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px 24px; }

/* ---------- full sample pages ---------- */
.script-head { padding: clamp(40px, 6vw, 72px) 0 28px; }
.script-head h1 { font-size: clamp(2.2rem, 6vw, 4.2rem); }
.script-head .back { display: none; margin-bottom: 20px; padding: 6px 0; }
@media (max-width: 620px) { .script-head .back { display: inline-block; } }
@media (max-width: 480px) { .tabs { flex-wrap: nowrap; } .tabs button { font-size: 0.85rem; padding: 12px 10px; white-space: nowrap; } }
.script-head .eyebrow { color: var(--ditto); font-weight: 700; margin-bottom: 12px; }
.script-head .meta { color: var(--pencil); margin-top: 18px; }
.script {
  background: var(--sheet); border: 1px solid var(--rule); border-radius: 6px;
  box-shadow: 0 18px 40px -24px rgba(26, 22, 48, 0.45);
  padding: 8px clamp(16px, 3vw, 36px) 24px; margin-bottom: 72px;
  font-family: var(--script); color: var(--ditto);
}
.beat { display: grid; grid-template-columns: 9ch minmax(0, 1fr); column-gap: clamp(12px, 2.4vw, 28px); padding: 20px 0; border-bottom: 1px dashed var(--rule); }
.beat .t { color: var(--pencil); font-size: 0.9rem; padding-top: 3px; }
.beat > div:last-child { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); column-gap: clamp(12px, 2.4vw, 28px); align-content: start; }
.beat .vo { grid-column: 1; font-size: clamp(1rem, 1.5vw, 1.15rem); line-height: 1.6; margin: 0 0 12px; max-width: none; }
.beat .vis { grid-column: 2; grid-row: 1 / span 4; font-size: 0.9rem; line-height: 1.5; color: var(--pencil); margin: 0; padding-top: 3px; }
.beat .vis b { color: var(--ink); }
.note { font-family: var(--display); color: var(--ink); background: var(--marker); border-radius: 4px; padding: 16px 18px; margin: 24px 0 0; max-width: none; }
@media (max-width: 720px) {
  .beat { grid-template-columns: 1fr; row-gap: 6px; }
  .beat > div:last-child { grid-template-columns: 1fr; }
  .beat .vis { grid-column: 1; grid-row: auto; padding-left: 10px; border-left: 2px solid var(--rule); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
