/* SINKHOLE: On Call website. The game's night palette (its design tokens, Content/tokens/palette.json: "night"), and for light
   mode its Blueprint theme, lightened for long reading. System fonts, as the game uses (no web fonts), no scripts. */
:root {
  --bg: #070c16;            /* night bg2 */
  --band: #0a1220;          /* night bg1 */
  --surface: #101b2b;       /* night panel */
  --glow: #14253e;          /* night bg0 */
  --line: #22354c;
  --text: #e8eef7;
  --muted: #8fa3ba;
  --link: #f5b54a;          /* the amber accent */
  --accent: #f5b54a;
  --button: #ffb020;        /* night arm: the game's primary buttons */
  --button-ink: #1b1306;
  --blue: #78afff;
  --violet: #a99bff;
  --focus: #f5b54a;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.55);
  /* The width of every page's content: the home page's sections, the text pages and the header. */
  --content-width: 60rem;
  color-scheme: dark light;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #eef3f9;
    --band: #e4ecf6;
    --surface: #fbfcfe;
    --glow: #dbe6f4;
    --line: #b4c6de;
    --text: #0f2d57;        /* Blueprint fg */
    --muted: #415e86;
    --link: #8a4f00;        /* amber, dark enough to read on light */
    --accent: #c77700;
    --blue: #1d5fd1;        /* Blueprint accent */
    --violet: #6a3fc9;
    --focus: #b36b00;
    --shadow: 0 14px 40px rgba(15, 45, 87, 0.18);
  }
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font: 18px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  overflow-wrap: break-word;
}

a { color: var(--link); text-underline-offset: 0.15em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 4px; }
img { max-width: 100%; }

.skip { position: absolute; left: 16px; top: -100px; z-index: 10; padding: 8px 14px; border-radius: 10px; background: var(--button); color: var(--button-ink); font-weight: 700; text-decoration: none; }
.skip:focus { top: 12px; }

/* Header and footer: the same on every page (scripts/partials, `make pages`) */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px 20px;
  flex-wrap: wrap;
  width: 100%;
  max-width: calc(var(--content-width) + 32px);
  margin: 0 auto;
  padding: 12px 16px;
}
.brand { display: inline-flex; align-items: center; gap: 10px; padding: 6px 0; color: var(--text); text-decoration: none; }
.brand img { width: 36px; height: 36px; border-radius: 9px; box-shadow: 0 0 0 1px var(--line); }
.wordmark { font-size: 1.15rem; font-weight: 800; letter-spacing: 0.16em; }
.brand-sub { font-size: 0.8rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--link); }
.site-header nav { display: flex; flex-wrap: wrap; gap: 0 20px; }
.site-header nav a { display: inline-block; padding: 10px 0; color: var(--text); text-decoration: none; }
.site-header nav a:hover { text-decoration: underline; }
.site-header nav a[aria-current="page"] { color: var(--link); }

.site-footer { padding: 28px 16px 36px; border-top: 1px solid var(--line); text-align: center; font-size: 0.9rem; color: var(--muted); }
.site-footer nav { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px 22px; margin-bottom: 10px; }
.site-footer a { color: var(--muted); }
.site-footer a[aria-current="page"] { color: var(--text); text-decoration: none; }
.site-footer p { max-width: 46rem; margin: 0 auto 6px; }
.site-footer .marks { font-size: 0.8rem; }

/* Home: full-width sections, the content kept to one column width */
.home > section { padding: 56px max(16px, calc((100% - var(--content-width)) / 2)); }
.home > .band { background: var(--band); }
.home h2 { margin: 0 0 12px; font-size: clamp(1.6rem, 4.5vw, 2.2rem); line-height: 1.2; letter-spacing: -0.01em; }
.home h3 { margin: 0 0 6px; font-size: 1.1rem; line-height: 1.35; }
.home p { margin: 0 0 12px; }
.section-lead { max-width: 40rem; color: var(--muted); font-size: 1.05rem; }

.hero {
  display: grid; gap: 40px; align-items: center; justify-items: center; text-align: center;
  background: radial-gradient(ellipse 80% 70% at 70% 40%, var(--glow) 0%, transparent 70%);
}
.hero h1 { margin: 0 0 18px; font-size: clamp(2.1rem, 7vw, 3.4rem); line-height: 1.08; letter-spacing: -0.02em; }
.lead { max-width: 34rem; margin: 0 auto 28px; font-size: 1.15rem; color: var(--muted); }
.lead strong { color: var(--text); }
.hero .phone { width: min(300px, 70vw); }

/* The pager line: the game's opening, "The phone wakes you at 02:14" */
.pager {
  display: inline-flex; align-items: baseline; gap: 10px; max-width: 100%; margin: 0 0 22px; padding: 8px 14px;
  border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--muted);
  font-size: 0.95rem; line-height: 1.4; text-align: left;
}
.pager time { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-weight: 700; color: var(--link); }
.pager-dot { flex: none; width: 10px; height: 10px; border-radius: 50%; background: #ff3d5a; box-shadow: 0 0 0 0 rgba(255, 61, 90, 0.6); animation: pulse 2s infinite; align-self: center; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(255, 61, 90, 0.55); } 70% { box-shadow: 0 0 0 9px rgba(255, 61, 90, 0); } 100% { box-shadow: 0 0 0 0 rgba(255, 61, 90, 0); } }
@media (prefers-reduced-motion: reduce) { .pager-dot { animation: none; } }

/* Screenshots, shown as a phone */
.phone { display: block; height: auto; border: 1px solid var(--line); border-radius: 28px; background: #070c16; box-shadow: var(--shadow); }
figure { margin: 0; }
figcaption { margin-top: 12px; font-size: 0.95rem; color: var(--muted); text-align: center; }

/* How it plays: numbered like the game's attack order */
.steps { display: grid; gap: 22px; margin: 24px 0 0; padding: 0; list-style: none; counter-reset: step; }
.steps li { position: relative; padding-left: 52px; counter-increment: step; }
.steps li::before {
  content: counter(step); position: absolute; left: 0; top: 0; display: grid; place-items: center;
  width: 34px; height: 34px; border-radius: 50%; background: var(--button); color: var(--button-ink); font-weight: 800;
  box-shadow: 0 0 0 3px var(--band), 0 0 0 4px var(--accent);
}
.steps p { color: var(--muted); }

.with-phone { display: grid; gap: 36px; justify-items: center; }
.with-phone > :first-child { width: 100%; }
.with-phone .phone { width: min(260px, 64vw); }

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: 14px; margin: 24px 0 0; padding: 0; list-style: none; }
.cards li { padding: 20px; border: 1px solid var(--line); border-top: 3px solid var(--accent); border-radius: 18px; background: var(--surface); }
.cards .sector { border-top-color: var(--blue); }
.cards p { margin: 0; color: var(--muted); }

.shots { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin-top: 32px; justify-items: center; }
.shots .phone { width: 100%; max-width: 260px; border-radius: 22px; }
.shots figcaption { font-size: 0.9rem; }

.with-shots { display: grid; gap: 8px; }

.points { display: grid; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); align-items: start; gap: 18px 32px; margin: 24px 0 0; padding: 0; list-style: none; color: var(--muted); }
.points li { padding-left: 16px; border-left: 3px solid var(--accent); }
.points strong { display: block; color: var(--text); }

/* The codex example */
.example { margin: 20px 0 0; padding: 18px 20px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); }
.example p { margin: 0 0 6px; }
.example p:last-child { margin: 0; }
.example-name { font-weight: 800; color: #ff4f9a; }
@media (prefers-color-scheme: light) { .example-name { color: #b5176a; } }
.example-label { display: block; font-size: 0.75rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }

.duo { display: grid; gap: 36px; }
.duo h2 { font-size: clamp(1.4rem, 4vw, 1.8rem); }
.duo p { color: var(--muted); }

.faq { max-width: 44rem; }
.faq h3 { margin-top: 28px; }
.faq h3:first-child { margin-top: 12px; }
.faq p { color: var(--muted); }
.more { margin-top: 24px; }

/* The closing call: always night, around the game's own art */
.home > .closing {
  text-align: center;
  background: radial-gradient(ellipse 60% 50% at 50% 30%, #0e1d33 0%, #060e1b 70%);
  color: #e8eef7;
  --text: #e8eef7; --muted: #a9bad0; --link: #f5b54a; --accent: #f5b54a; --line: #22354c; --focus: #f5b54a; --surface: #101b2b;
}
.closing-art {
  display: block; width: min(520px, 92vw); height: auto; margin: 0 auto 8px;
  -webkit-mask-image: radial-gradient(closest-side, #000 62%, transparent 100%);
          mask-image: radial-gradient(closest-side, #000 62%, transparent 100%);
}
.closing h2 { font-size: clamp(2rem, 6vw, 2.8rem); }
.closing > p { color: var(--muted); }

/* Store button (scripts/partials/stores.json): "Coming soon" until the App Store listing is live */
.stores { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 16px; }
.stores a { display: block; line-height: 0; border-radius: 10px; }
.stores img { display: block; height: 56px; width: auto; }
.store-soon {
  display: inline-flex; flex-direction: column; justify-content: center; min-height: 56px; margin: 0; padding: 6px 22px 7px;
  border: 2px solid var(--accent); border-radius: 12px; background: var(--surface);
  font-size: 1.3rem; font-weight: 800; line-height: 1.15; letter-spacing: -0.01em; text-align: left;
}
.store-soon span { font-size: 0.72rem; font-weight: 600; letter-spacing: 0.02em; color: var(--muted); }
.soon { margin: 10px 0 0; color: var(--muted); font-size: 0.95rem; }

@media (min-width: 860px) {
  .hero { grid-template-columns: 1fr auto; justify-items: start; text-align: left; }
  .lead { margin-left: 0; }
  .hero .stores { justify-content: flex-start; }
  .with-phone { grid-template-columns: 1fr auto; align-items: center; gap: 56px; }
  .with-shots { grid-template-columns: 1fr auto; align-items: start; gap: 48px; }
  .with-shots .shots { margin-top: 24px; grid-template-columns: repeat(2, 220px); gap: 24px; }
  .with-shots .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .duo { grid-template-columns: 1fr 1fr; gap: 56px; }
}

/* The holding home page (stores.json "home": "holding"): the name, "Coming soon to the App Store", one line */
.holding {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0;
  padding: 64px 16px; text-align: center;
  background: radial-gradient(ellipse 70% 55% at 50% 42%, var(--glow) 0%, transparent 72%);
}
.holding-icon { width: 120px; height: 120px; border-radius: 27px; box-shadow: 0 0 0 1px var(--line), var(--shadow); }
.holding-name { display: flex; flex-direction: column; align-items: center; gap: 10px; margin: 28px 0 0; line-height: 1; }
.holding-name .wordmark { font-size: clamp(2.2rem, 11vw, 3.6rem); letter-spacing: 0.16em; margin-right: -0.16em; }
.holding-name .brand-sub { font-size: clamp(1rem, 4vw, 1.3rem); letter-spacing: 0.12em; }
.holding-soon {
  margin: 36px 0 0; padding: 12px 24px; border: 2px solid var(--accent); border-radius: 12px; background: var(--surface);
  font-size: 1.2rem; font-weight: 800; line-height: 1.3;
}
.holding-line { margin: 16px 0 0; color: var(--muted); }
@media (prefers-color-scheme: dark) { .holding-name .wordmark { text-shadow: 0 0 24px rgba(61, 139, 255, 0.4); } }

.visually-hidden { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* Page not found */
.notfound { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 48px 16px; text-align: center; }
.notfound p { color: var(--muted); }

/* Text pages (support, privacy, terms, credits) */
.page { flex: 1; width: 100%; max-width: calc(var(--content-width) + 32px); margin: 0 auto; padding: 24px 16px 56px; }
.page h1 { font-size: clamp(1.8rem, 6vw, 2.2rem); line-height: 1.2; margin: 0 0 6px; }
.page h2 { font-size: 1.2rem; line-height: 1.35; margin: 32px 0 6px; }
.page p, .page li { color: var(--text); }
.page .meta { color: var(--muted); margin-top: 0; }
.page section { border-top: 1px solid var(--line); margin-top: 28px; }
.page .note { padding: 14px 18px; border-left: 3px solid var(--accent); border-radius: 0 12px 12px 0; background: var(--surface); color: var(--muted); }

/* Credits: each notice as the game shows it */
.notice { margin: 18px 0 0; padding: 18px 20px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); }
.notice h2 { margin: 0 0 8px; }
.notice p { margin: 0 0 10px; font-size: 0.95rem; }
.notice p:last-child { margin-bottom: 0; }
.notice .first { font-size: 1rem; }
.fine { font-size: 0.9rem; color: var(--muted); }
