/* ============================================================
   editorial.css — Pageant Alert
   The house editorial look, in the same language as bombyhead.com:
   cream / wine / gold, Fraunces + Instrument Sans, hairline rules,
   generous whitespace, and a film-grain overlay.

   Loaded by the landing page, the guides, the director surface,
   and the contestant app so the whole product reads as one thing.
   ============================================================ */

:root {
  color-scheme: light;
  --cream:     #fbf9f3;
  --cream-2:   #f4efe1;
  --paper:     #ffffff;
  --ink:       #1a0e1d;
  --ink-soft:  #6b5f70;
  --ink-faint: #a59aa9;
  --wine:      #5d1e3a;
  --wine-deep: #3d0d24;
  --gold:      #b48a44;
  --gold-soft: #d8b97a;
  --rule:      #d8d0bf;
  --rule-soft: #ebe4d2;
  --green:     #2f6b46;
  --red:       #a3282a;
  --shadow:    18px 24px 64px -32px rgba(26, 14, 29, 0.45);
  --shadow-sm: 6px 10px 24px -14px rgba(26, 14, 29, 0.35);
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

body {
  background: var(--cream);
  color: var(--ink);
  font-family: "Instrument Sans", system-ui, -apple-system, sans-serif;
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* Film grain — sits above everything, never interactive. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9000;
  opacity: 0.05;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.92' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
}

a { color: var(--ink); text-decoration: none; }
a:hover { color: var(--wine); }
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
::selection { background: var(--wine); color: var(--cream); }

.skip-link {
  position: absolute; left: -9999px; top: 0; background: var(--ink); color: var(--cream);
  padding: 10px 18px; z-index: 9999;
}
.skip-link:focus { left: 0; }

:focus-visible { outline: 2px solid var(--wine); outline-offset: 3px; }

/* ---- Layout shell ---- */
.page { max-width: 1180px; margin: 0 auto; padding: 0 32px; }
@media (max-width: 720px) { .page { padding: 0 20px; } body { font-size: 16px; } }

.serif {
  font-family: "Fraunces", Georgia, serif;
  font-variation-settings: "opsz" 144;
}

/* ---- Ticker ---- */
.ticker {
  background: var(--ink); color: var(--cream); overflow: hidden; padding: 9px 0;
  font-size: 0.7rem; letter-spacing: 0.22em; text-transform: uppercase;
  border-bottom: 1px solid var(--wine-deep);
}
.ticker__track { display: flex; gap: 3em; white-space: nowrap; width: max-content; animation: tick 52s linear infinite; }
.ticker__track .dot { color: var(--gold); }
@keyframes tick { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .ticker__track { animation: none; } }

/* ---- Masthead / site header ---- */
.masthead, .site-head > .page {
  display: flex; align-items: center; justify-content: space-between;
  padding: 26px 0 20px; border-bottom: 1px solid var(--rule); gap: 20px;
}
.site-head { background: var(--cream); }
.masthead__brand, .brand { display: flex; align-items: baseline; gap: 14px; }
.brand__mark {
  font-family: "Fraunces", Georgia, serif;
  font-variation-settings: "opsz" 144, "SOFT" 100, "WONK" 1;
  font-style: italic; font-weight: 400; font-size: 1.7rem;
  letter-spacing: -0.015em; line-height: 1; color: var(--ink);
  white-space: nowrap;
}
.brand__sub { font-size: 0.68rem; letter-spacing: 0.22em; text-transform: uppercase; color: var(--ink-soft); }
@media (max-width: 780px) { .brand__sub { display: none; } }

.masthead__nav, .site-nav {
  display: flex; align-items: center; gap: 26px;
  font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-soft);
  white-space: nowrap;
}
.masthead__nav a, .site-nav a { color: var(--ink-soft); transition: color 0.2s; }
.masthead__nav a:hover, .site-nav a:hover { color: var(--ink); }
@media (max-width: 780px) {
  .masthead__nav .nav-link:not(.keep), .site-nav a:not(.site-nav__cta) { display: none; }
  .masthead__nav, .site-nav { gap: 14px; }
}

.masthead__cta, .site-nav__cta, .btn {
  white-space: nowrap;
  font-family: "Fraunces", Georgia, serif; font-style: italic; font-weight: 400;
  font-size: 0.95rem; color: var(--ink); border: 1px solid var(--ink);
  border-radius: 999px; padding: 8px 20px; background: transparent; cursor: pointer;
  transition: background 0.25s, color 0.25s; letter-spacing: 0; text-transform: none;
}
.masthead__cta:hover, .site-nav__cta:hover, .btn:hover { background: var(--ink); color: var(--cream); }
.btn--wine { border-color: var(--wine); color: var(--cream); background: var(--wine); }
.btn--wine:hover { background: var(--wine-deep); border-color: var(--wine-deep); color: var(--cream); }
.btn--block { display: block; width: 100%; text-align: center; }
.btn--lg { font-size: 1.1rem; padding: 13px 30px; }
.btn[disabled] { opacity: 0.45; cursor: not-allowed; }

/* ---- Hero ---- */
.hero { padding: 6rem 0 6.5rem; border-bottom: 1px solid var(--rule); }
.hero__grid { display: grid; grid-template-columns: repeat(12, 1fr); column-gap: 32px; align-items: end; }
.hero__eyebrow {
  grid-column: 1 / -1; font-size: 0.7rem; letter-spacing: 0.28em; text-transform: uppercase;
  color: var(--ink-soft); margin-bottom: 4rem; display: flex; align-items: center; gap: 18px;
}
.hero__eyebrow::before { content: ""; width: 48px; height: 1px; background: var(--ink-soft); }
.hero__headline {
  grid-column: 1 / 9; margin: 0;
  font-family: "Fraunces", Georgia, serif;
  font-variation-settings: "opsz" 144, "SOFT" 100, "WONK" 1;
  font-weight: 350; font-size: clamp(2.2rem, 6vw, 5.1rem);
  line-height: 1.0; letter-spacing: -0.026em;
}
.hero__headline em, .swash { font-style: italic; font-weight: 400; color: var(--wine); }
.hero__lede { grid-column: 1 / 7; margin: 2.5rem 0 0; color: var(--ink-soft); font-size: 1.06rem; }
.hero__cta-row { grid-column: 7 / -1; margin: 2.5rem 0 0; }
@media (max-width: 900px) {
  .hero { padding: 3.5rem 0 4.5rem; }
  .hero__eyebrow { margin-bottom: 2.2rem; }
  .hero__headline, .hero__lede, .hero__cta-row { grid-column: 1 / -1; }
  .hero__cta-row { margin-top: 1.75rem; }
}

.link-cta {
  font-family: "Fraunces", Georgia, serif; font-style: italic; font-size: 1.5rem;
  background: none; border: none; padding: 0; cursor: pointer; color: var(--ink);
  border-bottom: 1px solid var(--gold); display: inline-flex; align-items: center; gap: 12px;
}
.link-cta:hover { color: var(--wine); border-color: var(--wine); }
.link-cta .arr { transition: transform 0.25s; }
.link-cta:hover .arr { transform: translateX(6px); }
.link-cta__sub { font-size: 0.76rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-faint); margin: 12px 0 0; }

/* ---- Chapters ---- */
section.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s, transform .7s; }
section.reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { section.reveal { opacity: 1; transform: none; } }

.chapter {
  display: grid; grid-template-columns: 140px 1fr; gap: 32px;
  padding-top: 6rem; margin-bottom: 3rem;
}
.chapter__num {
  font-family: "Fraunces", Georgia, serif; font-size: 4.2rem; line-height: 0.8;
  color: var(--gold-soft); font-weight: 300;
}
.chapter__num small {
  display: block; font-family: "Instrument Sans", sans-serif; font-size: 0.62rem;
  letter-spacing: 0.28em; text-transform: uppercase; color: var(--ink-faint); margin-bottom: 10px;
}
.chapter__head { border-top: 1px solid var(--ink); padding-top: 18px; }
.chapter__title {
  font-family: "Fraunces", Georgia, serif; font-weight: 350;
  font-size: clamp(1.9rem, 4vw, 3.1rem); line-height: 1.06; letter-spacing: -0.02em; margin: 0;
}
.chapter__title em { font-style: italic; color: var(--wine); }
.chapter__sub { color: var(--ink-soft); margin: 1rem 0 0; max-width: 60ch; }
@media (max-width: 720px) {
  .chapter { grid-template-columns: 1fr; row-gap: 1rem; padding-top: 3.5rem; margin-bottom: 2rem; }
  .chapter__num { font-size: 2.8rem; }
  .chapter__head { border-top: none; padding-top: 0; }
}

/* ---- Comparison table ---- */
.compare { display: grid; grid-template-columns: repeat(12, 1fr); border-top: 1px solid var(--ink); }
.compare__row { display: contents; }
.compare__col { padding: 1.5rem 0; }
.compare__col.label { grid-column: 1 / 3; padding-right: 1rem; }
.compare__col.old { grid-column: 3 / 8; padding-right: 2rem; }
.compare__col.new { grid-column: 8 / -1; background: var(--cream-2); padding-left: 2rem; padding-right: 2rem; }
.compare__row + .compare__row .compare__col { border-top: 1px solid var(--rule); }
.compare__category { font-size: 0.68rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--ink-faint); }
.compare__head { font-size: 0.68rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--ink-faint); margin-bottom: 8px; }
.compare__head.head--new { color: var(--wine); }
.compare__text { margin: 0; font-size: 0.98rem; }
.compare__col.old .compare__text { color: var(--ink-soft); }
@media (max-width: 900px) {
  .compare { display: block; }
  .compare__row { display: block; padding: 1.4rem 0; border-top: 1px solid var(--rule); }
  .compare__col, .compare__col.label, .compare__col.old, .compare__col.new {
    display: block; padding: 0; margin-bottom: 0.9rem; background: transparent !important; border: none;
  }
  .compare__row + .compare__row .compare__col { border-top: none; }
}

/* ---- Method steps ---- */
.method { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; border-top: 1px solid var(--ink); padding-top: 2rem; }
.step__num {
  font-family: "Fraunces", Georgia, serif; font-size: 2.6rem; color: var(--gold-soft); line-height: 1;
}
.step__num span { font-family: "Instrument Sans", sans-serif; font-size: 0.64rem; letter-spacing: 0.22em; text-transform: uppercase; color: var(--ink-faint); margin-left: 8px; }
.step__title { font-family: "Fraunces", Georgia, serif; font-weight: 400; font-size: 1.32rem; margin: 0.8rem 0 0.5rem; }
.step__body { color: var(--ink-soft); margin: 0; font-size: 0.97rem; }
@media (max-width: 780px) { .method { grid-template-columns: 1fr; gap: 2rem; } }

/* ---- Cards, panels, forms ---- */
.card {
  background: var(--paper); border: 1px solid var(--rule); border-radius: 4px;
  padding: 24px; box-shadow: var(--shadow-sm);
}
.card--flat { box-shadow: none; }
.card__title { font-family: "Fraunces", Georgia, serif; font-weight: 400; font-size: 1.28rem; margin: 0 0 0.4rem; }
.card__sub { color: var(--ink-soft); font-size: 0.92rem; margin: 0 0 1rem; }

.field { margin-bottom: 1rem; }
.field > label {
  display: block; font-size: 0.7rem; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--ink-soft); margin-bottom: 6px;
}
.field input, .field select, .field textarea {
  width: 100%; padding: 11px 13px; border: 1px solid var(--rule);
  border-radius: 3px; background: var(--paper); font-size: 1rem;
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--wine); outline: none; }
.field__hint { font-size: 0.82rem; color: var(--ink-faint); margin: 5px 0 0; }
.field--inline { display: flex; align-items: center; gap: 10px; }
.field--inline input[type="checkbox"] { width: auto; }
.field--inline label { text-transform: none; letter-spacing: 0; font-size: 0.95rem; color: var(--ink); margin: 0; }

.alert { padding: 12px 16px; border-radius: 3px; font-size: 0.94rem; margin-bottom: 1rem; }
.alert--error { background: #fbeeee; border: 1px solid #e6c4c4; color: var(--red); }
.alert--ok { background: #eef5f0; border: 1px solid #c2ddcc; color: var(--green); }
.alert--note { background: var(--cream-2); border: 1px solid var(--rule); color: var(--ink-soft); }

.muted { color: var(--ink-soft); }
.tiny { font-size: 0.8rem; }
.eyebrow { font-size: 0.68rem; letter-spacing: 0.24em; text-transform: uppercase; color: var(--ink-faint); }

/* ---- Status line — the always-visible alert state ---- */
.status-line {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 13px 16px; border-radius: 4px; margin-bottom: 1.2rem; font-weight: 600; font-size: 0.97rem;
}
.status-line--ok { background: #eef5f0; border: 1px solid #bcd8c8; color: var(--green); }
.status-line--bad { background: #fbeeee; border: 1px solid #e6c4c4; color: var(--red); }
.status-line button {
  border: 1px solid currentColor; background: transparent; color: inherit;
  border-radius: 999px; padding: 6px 15px; font-size: 0.83rem; cursor: pointer; white-space: nowrap;
}

/* ---- Roster states ---- */
.pill {
  display: inline-block; font-size: 0.68rem; letter-spacing: 0.12em; text-transform: uppercase;
  padding: 3px 10px; border-radius: 999px; border: 1px solid var(--rule); color: var(--ink-soft);
  white-space: nowrap;
}
.pill--armed { background: #eef5f0; border-color: #bcd8c8; color: var(--green); }
.pill--subscribed { background: #fdf4e6; border-color: #e6d3ac; color: #8a6512; }
.pill--invited { background: var(--cream-2); }
.pill--unreachable { background: #fbeeee; border-color: #e6c4c4; color: var(--red); }

/* ---- Funnel ---- */
.funnel { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--rule); border: 1px solid var(--rule); border-radius: 4px; overflow: hidden; }
.funnel__cell { background: var(--paper); padding: 16px 18px; }
.funnel__num { font-family: "Fraunces", Georgia, serif; font-size: 2.1rem; line-height: 1; }
.funnel__label { font-size: 0.68rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-faint); margin-top: 6px; }
@media (max-width: 560px) {
  .funnel__cell { padding: 12px 10px; }
  .funnel__num { font-size: 1.6rem; }
  .funnel__label { font-size: 0.6rem; letter-spacing: 0.08em; }
}
.funnel__cell--armed .funnel__num { color: var(--green); }

/* A director reads her roster on her phone at the check-in table, so a wide table scrolls
   inside its own box rather than pushing the whole page sideways. */
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table.data { width: 100%; border-collapse: collapse; font-size: 0.94rem; min-width: 560px; }
table.data th {
  text-align: left; font-size: 0.66rem; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--ink-faint); font-weight: 600; padding: 10px 12px; border-bottom: 1px solid var(--ink);
}
table.data td { padding: 12px; border-bottom: 1px solid var(--rule-soft); vertical-align: middle; }
table.data tr:hover td { background: var(--cream-2); }

/* ---- Modal (never alert/confirm/prompt) ---- */
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(26, 14, 29, 0.55); z-index: 9500;
  display: flex; align-items: center; justify-content: center; padding: 20px;
}
.modal {
  background: var(--paper); border-radius: 5px; max-width: 520px; width: 100%;
  padding: 28px; box-shadow: var(--shadow); max-height: 88vh; overflow-y: auto;
}
.modal__title { font-family: "Fraunces", Georgia, serif; font-weight: 400; font-size: 1.5rem; margin: 0 0 0.5rem; }
.modal__body { color: var(--ink-soft); margin-bottom: 1.4rem; }
.modal__actions { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; }

/* ---- Footer ---- */
.site-foot { border-top: 1px solid var(--rule); margin-top: 5rem; padding: 2.5rem 0 3.5rem; color: var(--ink-soft); font-size: 0.92rem; }
.site-foot__links { margin-top: 0.8rem; font-size: 0.8rem; letter-spacing: 0.1em; text-transform: uppercase; }

/* Four-across variant of the method grid, for the family section. */
.method--four { grid-template-columns: repeat(4, 1fr); }
.method--four .step__title a { color: var(--ink); border-bottom: 1px solid var(--gold); }
.method--four .step__title a:hover { color: var(--wine); border-color: var(--wine); }
@media (max-width: 1040px) { .method--four { grid-template-columns: 1fr 1fr; } }
@media (max-width: 780px) { .method--four { grid-template-columns: 1fr; } }

/* The rest of the family. Real, descriptive links — worth something to the sites they point
   at, unlike a row of bare logos. */
.site-foot__family { margin-top: 1.6rem; padding-top: 1.2rem; border-top: 1px solid var(--rule-soft); }
.site-foot__family .eyebrow { margin: 0 0 0.7rem; }
.site-foot__family ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.5rem; }
.site-foot__family li { font-size: 0.9rem; color: var(--ink-soft); }
.site-foot__family a { color: var(--ink); border-bottom: 1px solid var(--rule); }
.site-foot__family a:hover { color: var(--wine); border-color: var(--wine); }
@media (min-width: 760px) { .site-foot__family ul { grid-template-columns: 1fr 1fr; gap: 0.5rem 2rem; } }
