/* countmacula.app. The colours and type are the app's own look, Candlelight (CountMacula/UI/Candlelight.swift):
   wine panes on a near-black ground, ivory text, ivory paper for text you can highlight, and one crimson light.
   Pirata One for headings, Sora for everything else, both bundled with the app under the SIL Open Font License
   (fonts/OFL-*.txt). Served unmodified: Pirata is a Reserved Font Name, so the files aren't subset or converted. */

@font-face {
  font-family: "Pirata One";
  src: url("fonts/PirataOne-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Sora";
  src: url("fonts/Sora.ttf") format("truetype");
  font-weight: 100 800;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --ground: #1a0910;
  --pane: #27121a;
  --raised: #351b24;
  --line: rgba(244, 236, 220, 0.11);
  --ivory: #f4ecdc;
  --muted: #bca89f;
  --ink: #2a1018;
  --crimson: #e0223d;
  --crimson-text: #ff6b78;     /* crimson light enough for words on a pane (Candle.crimsonText) */
  --paper: #f6efe2;
  --paper-ink: #2b1a1e;
  --paper-selection: rgba(208, 20, 47, 0.24);
  --paper-label: #9a1027;
  --radius: 16px;
  --maxw: 68rem;
  --display: "Pirata One", "Iowan Old Style", Georgia, serif;
  --body: "Sora", system-ui, -apple-system, "Segoe UI", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--ground);
  color: var(--ivory);
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* The one crimson light: a low glow at the top of the page, pinned to the window, over the wine ground. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(60% 42% at 50% -6%, rgba(224, 34, 61, 0.16), transparent 70%),
    radial-gradient(70% 50% at 50% 108%, rgba(53, 27, 36, 0.7), transparent 72%),
    var(--ground);
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--crimson-text); text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 2px; }
::selection { background: rgba(224, 34, 61, 0.38); color: inherit; }
:focus-visible { outline: 2px solid var(--ivory); outline-offset: 3px; border-radius: 6px; }

.skip { position: absolute; left: -9999px; top: 0; }
.skip:focus {
  left: 16px; top: 16px; z-index: 20;
  background: var(--ivory); color: var(--ink);
  padding: 0.5rem 1rem; border-radius: 10px; font-weight: 600;
}
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

h1, h2, h3 {
  font-family: var(--display);
  font-weight: 400;
  line-height: 1.1;
  margin: 0;
  letter-spacing: 0.005em;
  text-wrap: balance;
}
p { margin: 0; text-wrap: pretty; }

.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 16px;
}
@media (min-width: 48rem) { .wrap { padding: 0 32px; } }

/* ── Buttons: flat, no gloss. Ivory for the main action, raised wine for the rest (CandleButtonStyle). ──────── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  font: 600 1rem/1 var(--body);
  border-radius: 14px;
  text-decoration: none;
  cursor: pointer;
  border: 0;
  transition: opacity 0.15s, transform 0.15s;
}
.btn:active { opacity: 0.75; }
.btn-primary {
  background: var(--ivory);
  color: var(--ink);
  min-height: 56px;
  padding: 0 1.5rem;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(255, 255, 255, 0.4) inset;
}
.btn-primary:hover { transform: translateY(-1px); }
.btn-primary svg { width: 20px; height: 20px; flex: none; }
@media (prefers-reduced-motion: reduce) {
  .btn { transition: none; }
  .btn-primary:hover { transform: none; }
}

/* ── Hero ───────────────────────────────────────────────────────────────────────────────────────────────── */

/* More room above and below than at first (Sam, 2026-11-19). */
.hero { padding: clamp(4rem, 13vh, 8.5rem) 0 clamp(4.5rem, 13vh, 8rem); }

.hero-grid {
  display: grid;
  gap: clamp(2.5rem, 6vw, 3.5rem);
  align-items: center;
}
@media (min-width: 60rem) {
  .hero-grid { grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: 4rem; }
}

.hero-copy { text-align: center; }
@media (min-width: 60rem) { .hero-copy { text-align: left; } }

.hero-icon {
  width: clamp(88px, 22vw, 120px);
  height: auto;
  margin: 0 auto 1.1rem;
  /* The icon's own ground is nearly the page's, so a candlelit glow sets it apart (Sam, 2026-11-19: it
     disappeared). icon-app.png is Icon Composer's own macOS render (ictool), light rim and all. */
  filter: drop-shadow(0 0 26px rgba(224, 34, 61, 0.38)) drop-shadow(0 14px 22px rgba(0, 0, 0, 0.55));
}
@media (min-width: 60rem) { .hero-icon { margin-left: -6px; } }

.hero h1 {
  font-size: clamp(3.1rem, 12vw, 4.75rem);
  line-height: 1;
  text-shadow: 0 0 40px rgba(224, 34, 61, 0.22);
}
.tagline {
  margin-top: 0.75rem;
  font-size: clamp(1.15rem, 3.6vw, 1.4rem);
  font-weight: 500;
  line-height: 1.4;
}
.hero-sub {
  margin: 0.9rem auto 0;
  color: var(--muted);
  max-width: 34rem;
}
@media (min-width: 60rem) { .hero-sub { margin-left: 0; } }

.hero-cta {
  margin-top: 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.85rem;
}
/* The button with the requirement centred under it, the pair left-aligned with the copy on a wide screen. */
@media (min-width: 60rem) { .hero-cta { width: fit-content; } }
.req { font-size: 0.85rem; color: var(--muted); }

/* ── The demonstration: a slice of a Mac screen ─────────────────────────────────────────────────────────── */

.screen {
  position: relative;
  margin: 0;
  border-radius: 18px;
  overflow: hidden;
  background:
    radial-gradient(90% 80% at 85% 10%, rgba(224, 34, 61, 0.28), transparent 60%),
    radial-gradient(80% 90% at 0% 100%, rgba(120, 40, 70, 0.45), transparent 65%),
    linear-gradient(160deg, #3a1622 0%, #20090f 55%, #12050a 100%);
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(255, 255, 255, 0.08) inset;
  isolation: isolate;
}

.menubar {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 30px;
  padding: 0 10px 0 14px;
  font: 13px/1 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", system-ui, sans-serif;
  color: #fff;
  background: rgba(24, 10, 15, 0.42);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
  backdrop-filter: blur(20px) saturate(1.4);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.06);
}
.mb-left { display: flex; gap: 18px; white-space: nowrap; overflow: hidden; }
.mb-left b { font-weight: 700; }
.mb-left span { opacity: 0.92; }
.mb-right { display: flex; align-items: center; gap: 4px; white-space: nowrap; }
.mb-item {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 22px;
  border-radius: 5px;
  color: #fff;
}
.mb-item svg { width: 17px; height: 17px; }
.mb-count { background: none; border: 0; padding: 0; cursor: pointer; }
.mb-count:hover, .mb-count[aria-expanded="true"] { background: rgba(255, 255, 255, 0.2); }
.mb-clock { margin-left: 6px; font-variant-numeric: tabular-nums; }
@media (max-width: 30rem) {
  .mb-left span, .mb-date, .mb-cc { display: none; }
}

/* Count Macula's menu, dropped from its icon. */
.mb-menu {
  position: absolute;
  top: 28px;
  right: 70px;
  min-width: 240px;
  padding: 5px;
  border-radius: 10px;
  background: rgba(40, 28, 32, 0.86);
  -webkit-backdrop-filter: blur(24px) saturate(1.5);
  backdrop-filter: blur(24px) saturate(1.5);
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.5), 0 0 0 0.5px rgba(255, 255, 255, 0.22) inset;
  font-size: 13px;
  line-height: 1;
}
.mb-menu[hidden] { display: none; }
.mb-menu p, .mb-menu a {
  display: flex;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 5px 9px;
  border-radius: 5px;
}
.mb-menu p:hover, .mb-menu a:hover, .mb-menu a:focus-visible { background: rgba(10, 132, 255, 0.85); }
.mb-menu a { color: inherit; text-decoration: none; outline: none; }
.mb-menu kbd { font: inherit; opacity: 0.55; }
.mb-menu hr { border: 0; border-top: 1px solid rgba(255, 255, 255, 0.12); margin: 4px 9px; }
.mb-sub { opacity: 0.6; }
@media (max-width: 30rem) { .mb-menu { right: 8px; } }

.desk {
  position: relative;
  padding: clamp(2.6rem, 7vw, 3.4rem) clamp(16px, 5vw, 40px) clamp(1.8rem, 5vw, 2.6rem);
}

/* The app's ivory paper (DemoCard): small crimson capitals over a sentence in Sora. */
.paper {
  position: relative;
  width: 100%;
  background: var(--paper);
  color: var(--paper-ink);
  border-radius: 14px;
  padding: 16px 20px 20px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
}
.paper ::selection { background: var(--paper-selection); color: inherit; }
.paper-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.5rem;
  min-height: 1.4rem;
}
.paper-label {
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--paper-label);
}
.paper-text {
  font-size: clamp(1rem, 2.6vw, 1.12rem);
  line-height: 1.7;
  cursor: text;
}
.paper-text .hl, .hl-static { background: var(--paper-selection); }
.js .hl-static { background: none; }
.popup-fallback {
  position: absolute;
  right: 16px;
  top: -24px;
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(20, 5, 10, 0.97);
  box-shadow: inset 0 0 0 1px #c71f33, 0 5px 14px rgba(0, 0, 0, 0.35);
  color: var(--crimson-text);
  font: 600 13px/1.2 -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
}
.js .popup-fallback { display: none; }


.ibeam {
  position: absolute;
  z-index: 4;
  left: 0;
  top: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}
.ibeam.on { opacity: 1; }

/* ── The pop-up ──────────────────────────────────────────────────────────────────────────────────────────── */

.popup-svg {
  display: block;
  overflow: visible;
  filter: drop-shadow(0 5px 7px rgba(0, 0, 0, 0.35));
}
.popup-layer { position: absolute; left: 0; top: 0; width: 0; height: 0; z-index: 30; }
/* It takes the pointer, to stay while the pointer is on it, as the app's does; the demonstration's own runs don't. */
.popup { position: absolute; will-change: opacity, transform; }
.popup.passive { pointer-events: none; }
.popup.clickable { cursor: pointer; }
.demo-popup { position: absolute; z-index: 5; pointer-events: none; }

/* ── Sections ───────────────────────────────────────────────────────────────────────────────────────────── */

.band { position: relative; padding: clamp(3.5rem, 9vw, 6rem) 0; }
/* A thin candle-lit seam between sections. */
.band::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: min(760px, 84%);
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(224, 34, 61, 0.55), transparent);
  box-shadow: 0 0 14px rgba(224, 34, 61, 0.35);
}

.sec-head { text-align: center; max-width: 40rem; margin: 0 auto clamp(2rem, 5vw, 3rem); }
.sec-head h2 { font-size: clamp(2.3rem, 7vw, 3.1rem); }
.lede { margin-top: 0.8rem; color: var(--muted); font-size: clamp(1rem, 2.4vw, 1.1rem); }
.small { margin-top: 0.7rem; font-size: 0.86rem; color: var(--muted); }

/* Panes: wine on the ground, a hairline edge and a soft shadow (candlePane). */
.card, .faq details {
  background: var(--pane);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 9px 20px rgba(0, 0, 0, 0.45);
}

/* Looks: a subheading over each row of tiles */
.sub { max-width: 44rem; margin: clamp(2.5rem, 6vw, 3.25rem) 0 1.1rem; }
.sec-head + .sub { margin-top: 0; }
.subhead { font-size: clamp(1.9rem, 5vw, 2.3rem); }
.sub p { margin-top: 0.3rem; color: var(--muted); font-size: 0.98rem; }

.looks {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
@media (min-width: 52rem) { .looks { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.look { margin: 0; }
.look-page {
  position: relative;
  height: 128px;
  border-radius: 14px;
  background: var(--paper);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  box-shadow: 0 9px 20px rgba(0, 0, 0, 0.45), 0 0 0 1px var(--line);
}
/* A highlighted line under each pop-up, as on the app's look tiles. */
.look-page::after {
  content: "";
  position: absolute;
  left: 18%;
  right: 18%;
  bottom: 26px;
  height: 9px;
  border-radius: 3px;
  background: var(--paper-selection);
}
.look-page .popup-svg { margin-bottom: 26px; }
.look-page-dark { background: #2b2326; }
.look-page-dark::after { background: rgba(255, 107, 120, 0.3); }
.look-page-photo {
  background:
    radial-gradient(60% 80% at 20% 30%, #f3b37a, transparent 70%),
    radial-gradient(60% 80% at 80% 70%, #b9d3f0, transparent 70%),
    #e9d8e6;
}
.look figcaption, .fangs figcaption { margin-top: 0.6rem; text-align: center; font-size: 0.92rem; }
.look figcaption span { display: block; color: var(--muted); font-size: 0.8rem; }

.fangs {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
@media (min-width: 52rem) { .fangs { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
/* One column on the narrowest phones (320 px): two tiles there are 136 px wide, and the example count needs 155. */
@media (max-width: 22rem) { .looks, .fangs { grid-template-columns: minmax(0, 1fr); } }
.fangs figure { margin: 0; }
.fangs figure > div {
  height: 84px;
  border-radius: 14px;
  background: var(--raised);
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
}
.fangs figcaption { color: var(--muted); }

/* Cards, with an icon chip in the crimson light */
.cards {
  margin-top: clamp(2.5rem, 6vw, 3.5rem);
  display: grid;
  gap: 1rem;
  grid-template-columns: minmax(0, 1fr);
}
@media (min-width: 44rem) { .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.sec-head + .cards { margin-top: 0; }
.card { padding: 1.5rem 1.4rem; }
/* The main card: the whole width, its edge in the crimson light, with a picture of the setting beside the copy. */
.card-main {
  grid-column: 1 / -1;
  display: grid;
  gap: 1.6rem;
  align-items: center;
  border-color: rgba(224, 34, 61, 0.32);
}
@media (min-width: 62rem) { .card-main { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); column-gap: 2.5rem; } }
.card-main h3 { font-size: clamp(1.8rem, 5vw, 2.2rem); }
.card-main-copy > p { max-width: 46rem; }
.choice {
  background: var(--raised);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 1rem 1.15rem 0.8rem;
  font-size: 0.92rem;
}
.choice-title { font-weight: 600; color: var(--ivory); margin-bottom: 0.45rem; }
.choice-row { display: flex; align-items: center; gap: 0.65rem; padding: 0.35rem 0; color: var(--muted); }
.choice-row.is-on { color: var(--ivory); }
.radio { position: relative; flex: none; width: 16px; height: 16px; border-radius: 50%; box-shadow: 0 0 0 1.5px rgba(244, 236, 220, 0.35) inset; }
.is-on .radio { background: var(--crimson); box-shadow: none; }
.is-on .radio::after { content: ""; position: absolute; inset: 5px; border-radius: 50%; background: #fff; }
/* Examples in the copy (can’t, blood-red): italic, in ivory. Sora has no italic, so the browser slants it; a
   hair of room keeps the slant off the next word. */
.ex { font-style: italic; color: var(--ivory); padding-right: 0.12em; }
.card h3 { font-size: 1.6rem; }
.card > p:not(.small), .card-main-copy > p:not(.small) { margin-top: 0.45rem; color: var(--muted); font-size: 0.95rem; }
.ico {
  width: 40px;
  height: 40px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  margin-bottom: 1rem;
  color: var(--crimson-text);
  background: rgba(224, 34, 61, 0.12);
  border: 1px solid rgba(224, 34, 61, 0.28);
}
.ico svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Menu bar icons: each on its own slice of a dark menu bar, white as macOS draws a template image. */
.icons {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1rem 0.6rem;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
@media (min-width: 52rem) { .icons { grid-template-columns: repeat(8, minmax(0, 1fr)); } }
.icons li {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.55rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.3;
}
.icon-bar {
  width: 100%;
  max-width: 6rem;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: #fff;
  background: rgba(255, 255, 255, 0.07);
  box-shadow: 0 0 0 1px var(--line) inset;
}
.icon-bar svg { width: 22px; height: 22px; }

/* Questions */
.faq { display: grid; gap: 0.7rem; max-width: 46rem; margin: 0 auto; }
.faq details { box-shadow: none; overflow: hidden; }
.faq details[open] { border-color: rgba(224, 34, 61, 0.35); }
.faq summary {
  list-style: none;
  cursor: pointer;
  padding: 1rem 1.25rem;
  font-weight: 600;
  display: flex;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
}
.faq summary::-webkit-details-marker { display: none; }
.chev {
  flex: none;
  width: 16px;
  height: 16px;
  fill: none;
  stroke: var(--crimson-text);
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 0.2s;
}
.faq details[open] .chev { transform: rotate(180deg); }
.ans { padding: 0 1.25rem 1.2rem; color: var(--muted); font-size: 0.95rem; max-width: 62ch; }
@media (prefers-reduced-motion: reduce) { .chev { transition: none; } }

/* Closing */
.closing .wrap { display: flex; flex-direction: column; align-items: center; text-align: center; }
.closing-icon { width: 88px; margin-bottom: 1rem; filter: drop-shadow(0 0 20px rgba(224, 34, 61, 0.38)) drop-shadow(0 10px 18px rgba(0, 0, 0, 0.55)); }
.closing h2 { font-size: clamp(2.6rem, 8vw, 3.6rem); }
.closing h2 { margin-bottom: 1.8rem; }
.closing .req { margin-top: 0.85rem; }

/* Footer */
footer {
  border-top: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.22);
  padding: 2.2rem 0 2.6rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.9rem;
}
.foot-name { font-family: var(--display); font-size: 1.5rem; color: var(--ivory); }
footer nav { margin-top: 0.6rem; display: flex; flex-wrap: wrap; justify-content: center; gap: 0.4rem 1.5rem; }
footer nav a { color: var(--muted); text-decoration: none; }
footer nav a:hover { color: var(--ivory); }
.copyright { margin-top: 0.9rem; font-size: 0.8rem; }

/* ── The privacy page (privacy.html) ──────────────────────────────────────────────────────────────────── */

.page-top { padding: 1.4rem 0 0; }
.home { display: inline-flex; align-items: center; gap: 0.7rem; color: var(--ivory); text-decoration: none; font-family: var(--display); font-size: 1.7rem; line-height: 1; }
.home img { width: 44px; height: 44px; }
.legal { padding: clamp(2.5rem, 7vw, 4.5rem) 0 clamp(3.5rem, 9vw, 6rem); }
.legal .wrap { max-width: 46rem; }
.legal h1 { font-size: clamp(2.8rem, 9vw, 3.8rem); line-height: 1; }
.legal h2 { font-size: clamp(1.7rem, 5vw, 2.1rem); margin-top: 2.4rem; }
.legal p { margin-top: 0.6rem; }
.legal .lede { margin-top: 1rem; }
.legal .updated { margin-top: 2.8rem; color: var(--muted); font-size: 0.86rem; }
