/* =========================================================================
   SlideTimerApp — "Keynote / Stage" editorial design system
   Warm paper + ink + signal-red. Fraunces (display) / Hanken Grotesk (body) /
   Space Mono (timer digits). Light, distinctive, fast.
   ========================================================================= */

:root {
  --paper:    #f5efe3;   /* warm cream background */
  --paper-2:  #fbf7ef;   /* raised surfaces / cards */
  --paper-3:  #efe7d6;   /* subtle fill */
  --ink:      #181512;   /* near-black, warm */
  --ink-soft: #5c554a;   /* muted body text */
  --ink-faint:#8b8275;   /* captions */
  --line:     #ddd3bf;   /* hairlines */
  --line-2:   #cabfa6;   /* stronger rule */
  --red:      #e23b22;   /* signal red — "time's almost up" */
  --red-deep: #b82a14;
  --amber:    #e29400;   /* mid warning */
  --green:    #2f7a52;   /* on-time / yes */
  --ink-band: #1d1a16;   /* dark band sections */

  --maxw: 1080px;
  --measure: 720px;      /* reading column */
  --radius: 10px;

  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans:  "Hanken Grotesk", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono:  "Space Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 18px;
  line-height: 1.65;
  border-top: 4px solid var(--red);          /* editorial signature bar */
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
/* faint paper grain */
body::after {
  content: "";
  position: fixed; inset: 0; z-index: 9999; pointer-events: none; opacity: .035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
::selection { background: var(--red); color: #fff; }

img { max-width: 100%; height: auto; }

/* ---------- Layout ---------- */
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
main { display: block; }
main .wrap > section,
main .wrap > article > section { margin: 64px 0; }
article { max-width: var(--measure); }
article > h1, article > .author, article > .answer, article > .toc, article > p:first-of-type { max-width: var(--measure); }

/* ---------- Typography ---------- */
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 600; font-optical-sizing: auto; color: var(--ink); letter-spacing: -.015em; line-height: 1.08; }
h1 { font-size: clamp(2.5rem, 6vw, 4.1rem); margin: 0 0 .5em; }
h1 em { font-style: italic; color: var(--red); font-weight: 500; }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.35rem); margin: 1.6em 0 .5em; line-height: 1.12; }
h3 { font-size: 1.3rem; line-height: 1.2; margin: 1.4em 0 .4em; }
h4 { font-size: 1.05rem; }
p { margin: 0 0 1.1em; color: var(--ink-soft); }
article p, .answer p, section > p { max-width: var(--measure); }
strong, b { color: var(--ink); font-weight: 700; }
a { color: var(--ink); text-decoration: none; background-image: linear-gradient(var(--red), var(--red)); background-size: 100% 1.5px; background-position: 0 1.08em; background-repeat: no-repeat; transition: background-size .2s ease; }
a:hover { background-size: 100% 2px; }
ul, ol { padding-left: 1.2em; color: var(--ink-soft); }
li { margin: .35em 0; }
li::marker { color: var(--red); }
code { font-family: var(--mono); font-size: .9em; background: var(--paper-3); padding: .12em .4em; border-radius: 4px; }

/* kicker / eyebrow + badge */
.kicker, .badge {
  font-family: var(--mono); font-size: .72rem; font-weight: 700; letter-spacing: .14em;
  text-transform: uppercase; color: var(--red); background: none;
}
.kicker { display: inline-block; margin-bottom: 1.2em; padding-left: 30px; position: relative; }
.kicker::before { content: ""; position: absolute; left: 0; top: .55em; width: 22px; height: 2px; background: var(--red); }
.badge { display: inline-block; border: 1px solid var(--line-2); color: var(--ink-soft); padding: 7px 14px; border-radius: 999px; margin-bottom: 22px; }

/* ---------- Header ---------- */
header.site { position: sticky; top: 0; z-index: 50; background: rgba(245,239,227,.86); backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--line); }
header.site .wrap { display: flex; align-items: center; justify-content: space-between; height: 66px; }
.brand { font-family: var(--serif); font-weight: 600; font-size: 1.3rem; letter-spacing: -.02em; color: var(--ink); display: inline-flex; align-items: center; gap: 10px; background: none; }
.brand .dot { width: 14px; height: 14px; border-radius: 50%; background: var(--red); position: relative; box-shadow: 0 0 0 3px rgba(226,59,34,.18); flex: none; }
nav.main { display: flex; align-items: center; gap: 4px; }
nav.main a { font-family: var(--sans); font-size: .92rem; font-weight: 600; color: var(--ink-soft); padding: 8px 12px; border-radius: 7px; background: none; }
nav.main a:hover { color: var(--ink); background: var(--paper-3); }
@media (max-width: 720px) { nav.main a:not(:last-child) { display: none; } nav.main a:last-child { color: var(--red); } }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px; font-family: var(--sans); font-weight: 700;
  font-size: 1.02rem; line-height: 1; padding: 15px 26px; border-radius: 8px; cursor: pointer;
  background: var(--red); color: #fff; border: 1px solid var(--red-deep); background-image: none;
  box-shadow: 0 2px 0 var(--red-deep); transition: transform .12s ease, box-shadow .12s ease, background .2s;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 4px 0 var(--red-deep); background: var(--red-deep); }
.btn:active { transform: translateY(0); box-shadow: 0 1px 0 var(--red-deep); }
.btn.secondary { background: transparent; color: var(--ink); border: 1px solid var(--line-2); box-shadow: none; }
.btn.secondary:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); transform: translateY(-2px); }
.btn-row { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; margin: 6px 0; }
.btn-sub { display: block; color: var(--ink-faint); font-family: var(--mono); font-size: .78rem; letter-spacing: .03em; margin-top: 16px; }
.btn-sub a { background-image: linear-gradient(var(--red), var(--red)); background-size: 100% 1px; background-position: 0 1.05em; }

/* ---------- HERO ---------- */
.hero { padding: 70px 0 30px; }
.hero .lead, .lead { font-size: 1.28rem; line-height: 1.55; color: var(--ink-soft); max-width: 36ch; }
.hero-home { display: grid; grid-template-columns: 1.05fr .95fr; gap: 56px; align-items: center; padding: 64px 0 48px; }
.hero-home .lead { max-width: 46ch; }
.hero-copy { animation: rise .7s cubic-bezier(.2,.7,.2,1) both; }
.hero-copy .kicker { animation: rise .7s .02s both; }
.hero-copy h1 { animation: rise .7s .06s both; }

/* Stage mockup: a slide with the transparent timer floating on top */
.hero-stage { position: relative; animation: rise .8s .14s both; perspective: 1200px; }
.stage { position: relative; }
.slide {
  position: relative; aspect-ratio: 16/10; border-radius: 12px; overflow: hidden;
  background: linear-gradient(150deg, #2a2622, #423a31); color: #f3ece0;
  border: 1px solid rgba(0,0,0,.25); padding: 30px 32px;
  box-shadow: 0 30px 60px -24px rgba(40,30,18,.55), 0 2px 0 rgba(255,255,255,.04) inset;
  transform: rotate(-1.4deg);
}
.slide-kicker { font-family: var(--mono); font-size: .62rem; letter-spacing: .22em; text-transform: uppercase; color: #d8a24a; }
.slide-title { font-family: var(--serif); font-size: clamp(1.4rem, 2.6vw, 1.95rem); line-height: 1.05; margin: 10px 0 20px; color: #fdf8ee; }
.slide-bars { display: flex; align-items: flex-end; gap: 10px; height: 64px; margin-top: 6px; }
.slide-bars span { flex: 1; background: linear-gradient(var(--amber), #b9701f); border-radius: 3px 3px 0 0; opacity: .9; }
.slide-bars span:nth-child(1){height:40%} .slide-bars span:nth-child(2){height:68%} .slide-bars span:nth-child(3){height:52%} .slide-bars span:nth-child(4){height:90%} .slide-bars span:nth-child(5){height:74%}

.timerwin {
  position: absolute; right: -22px; bottom: -26px; width: 56%;
  background: rgba(251,247,239,.72); backdrop-filter: blur(6px);
  border: 1px solid rgba(255,255,255,.7); border-radius: 14px;
  box-shadow: 0 22px 40px -16px rgba(40,30,18,.5);
  padding: 14px 16px 12px; transform: rotate(1.6deg);
}
.timerwin-bar { display: flex; gap: 6px; margin-bottom: 8px; }
.timerwin-bar span { width: 9px; height: 9px; border-radius: 50%; background: var(--line-2); }
.timerwin-bar span:first-child { background: var(--red); }
.timerwin-digits { font-family: var(--mono); font-weight: 700; font-size: clamp(2.2rem, 6vw, 3.4rem); letter-spacing: .02em; color: var(--ink); text-align: center; line-height: 1; transition: color .4s; font-variant-numeric: tabular-nums; }
.timerwin-digits.warn { color: var(--amber); }
.timerwin-digits.alarm { color: var(--red); animation: blink .8s steps(2) infinite; }
.timerwin-dock { display: flex; align-items: center; justify-content: center; gap: 7px; font-family: var(--mono); font-size: .62rem; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-faint); margin-top: 8px; }
.timerwin-dock .dot-pin { width: 8px; height: 8px; border-radius: 50%; background: var(--green); }

@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes blink { 50% { opacity: .35; } }

/* ---------- Answer box (GEO) ---------- */
.answer { position: relative; background: var(--paper-2); border: 1px solid var(--line); border-left: 3px solid var(--red); border-radius: 0 var(--radius) var(--radius) 0; padding: 22px 26px 8px; margin: 28px 0; }
.answer::before { content: "The short answer"; display: block; font-family: var(--mono); font-size: .68rem; letter-spacing: .16em; text-transform: uppercase; color: var(--red); margin-bottom: 8px; }
.answer p { color: var(--ink); font-size: 1.06rem; }

/* ---------- Cards ---------- */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(232px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.card { background: var(--paper-2); padding: 26px 24px; position: relative; transition: background .2s; }
.card:hover { background: #fff; }
.card h3 { margin: 0 0 .35em; font-size: 1.18rem; }
.card h3 a { background: none; }
.card h3 a:hover { color: var(--red); }
.card p { margin: 0; color: var(--ink-soft); font-size: .96rem; }
.card .card-no { font-family: var(--mono); font-size: .72rem; font-weight: 700; color: var(--red); letter-spacing: .1em; display: block; margin-bottom: 14px; }

/* ---------- Steps ---------- */
ol.steps { counter-reset: step; list-style: none; padding: 0; margin: 1.4em 0; }
ol.steps > li { counter-increment: step; position: relative; padding: 2px 0 22px 64px; margin: 0; color: var(--ink-soft); }
ol.steps > li::before { content: counter(step, decimal-leading-zero); position: absolute; left: 0; top: -2px; font-family: var(--mono); font-weight: 700; font-size: 1rem; color: var(--red); border: 1.5px solid var(--line-2); border-radius: 9px; width: 44px; height: 38px; display: grid; place-items: center; background: var(--paper-2); }
ol.steps > li::after { content: ""; position: absolute; left: 22px; top: 40px; bottom: 6px; width: 1.5px; background: var(--line); }
ol.steps > li:last-child::after { display: none; }
ol.steps > li strong { display: block; color: var(--ink); margin-bottom: 2px; font-size: 1.05rem; }

/* ---------- Tables ---------- */
table { width: 100%; border-collapse: collapse; margin: 1.6em 0; font-size: .98rem; }
caption { text-align: left; }
th, td { text-align: left; padding: 14px 16px; border-bottom: 1px solid var(--line); vertical-align: top; color: var(--ink-soft); }
thead th { font-family: var(--mono); font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; color: var(--ink); font-weight: 700; border-bottom: 1.5px solid var(--ink); }
tbody tr:hover td { background: var(--paper-2); }
td:first-child, th:first-child { color: var(--ink); font-weight: 600; }
.tick, .cross { font-weight: 700; white-space: nowrap; }
.tick { color: var(--green); }
.cross { color: var(--red); }
.tick::before { content: "\2713\00a0"; }
.cross::before { content: "\00d7\00a0"; }

/* ---------- FAQ ---------- */
.faq { border-top: 1.5px solid var(--ink); }
.faq h2 { margin-top: .6em; }
.faq details { border-bottom: 1px solid var(--line); padding: 6px 0; }
.faq summary { cursor: pointer; font-family: var(--serif); font-weight: 600; font-size: 1.18rem; color: var(--ink); padding: 16px 40px 16px 0; list-style: none; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 4px; top: 12px; font-family: var(--sans); font-weight: 400; font-size: 1.7rem; color: var(--red); transition: transform .2s; }
.faq details[open] summary::after { content: "\2212"; }
.faq details p { color: var(--ink-soft); padding: 0 40px 16px 0; margin: 0; }

/* ---------- Callout (dark band) ---------- */
.callout { background: var(--ink-band); color: var(--paper); border-radius: 16px; padding: 44px 40px; margin: 56px 0; text-align: center; position: relative; overflow: hidden; }
.callout::before { content: ""; position: absolute; left: 0; top: 0; width: 100%; height: 4px; background: var(--red); }
.callout h2 { color: #fff; margin: 0 0 .4em; }
.callout p { color: rgba(245,239,227,.78); max-width: 52ch; margin: 0 auto 1.4em; }
.callout .btn.secondary { color: #fff; border-color: rgba(255,255,255,.4); }
.callout .btn.secondary:hover { background: #fff; color: var(--ink); border-color: #fff; }
.callout .btn-sub { color: rgba(245,239,227,.6); }

/* ---------- Note / TOC / Author / ProsCons ---------- */
.note { background: var(--paper-2); border: 1px solid var(--line); border-left: 3px solid var(--amber); border-radius: 0 8px 8px 0; padding: 16px 20px; margin: 1.6em 0; font-size: .98rem; }
.note strong { color: var(--ink); }

.toc { background: var(--paper-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 26px; margin: 28px 0; }
.toc h2 { margin: 0 0 10px; font-family: var(--mono); font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-faint); font-weight: 700; }
.toc ul { list-style: none; padding: 0; margin: 0; columns: 2; column-gap: 32px; }
.toc li { margin: 0; break-inside: avoid; }
.toc a { display: block; padding: 5px 0; font-size: .96rem; background: none; border-bottom: 1px solid transparent; }
.toc a:hover { color: var(--red); }
@media (max-width: 560px) { .toc ul { columns: 1; } }

.author { display: flex; align-items: center; gap: 14px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 16px 0; margin: 24px 0 32px; font-size: .92rem; color: var(--ink-soft); }
.author .avatar { width: 44px; height: 44px; border-radius: 50%; background: radial-gradient(circle at 30% 30%, var(--red), var(--red-deep)); box-shadow: 0 0 0 3px var(--paper-2), 0 0 0 4px var(--line); flex: none; }
.author strong { color: var(--ink); }
.author a { background-image: linear-gradient(var(--red), var(--red)); background-size: 100% 1px; background-position: 0 1.05em; }
.author .updated { font-family: var(--mono); font-size: .76rem; color: var(--ink-faint); }

.proscons { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin: 1.6em 0; }
.proscons > div { border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 24px; background: var(--paper-2); }
.proscons h3 { margin: 0 0 .4em; font-size: 1.12rem; }
.proscons > div:first-child h3 { color: var(--green); }
.proscons > div:last-child h3 { color: var(--red); }
.proscons ul { margin: 0; }
@media (max-width: 560px) { .proscons { grid-template-columns: 1fr; } }

/* ---------- Interactive countdown widget ---------- */
.ctimer { background: var(--ink-band); color: var(--paper); border-radius: 18px; padding: 30px 28px 26px; margin: 28px 0 36px; text-align: center; position: relative; overflow: hidden; box-shadow: 0 30px 60px -28px rgba(40,30,18,.5); }
.ctimer::before { content: ""; position: absolute; left: 0; top: 0; width: 100%; height: 4px; background: var(--red); }
.ctimer-presets { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-bottom: 18px; }
.ctimer-chip { font-family: var(--mono); font-size: .76rem; letter-spacing: .04em; color: rgba(245,239,227,.75); background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.16); padding: 8px 13px; border-radius: 999px; cursor: pointer; transition: .15s; }
.ctimer-chip:hover { color: #fff; border-color: rgba(255,255,255,.4); }
.ctimer-chip.on { background: var(--red); border-color: var(--red); color: #fff; }
.ctimer-display { font-family: var(--mono); font-weight: 700; font-size: clamp(4.5rem, 18vw, 9rem); line-height: .95; letter-spacing: .01em; color: #fdf8ee; font-variant-numeric: tabular-nums; transition: color .4s; }
.ctimer-display.warn { color: var(--amber); }
.ctimer-display.alarm { color: var(--red); animation: blink .7s steps(2) infinite; }
.ctimer-display.done { color: var(--red); }
.ctimer-controls { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 22px; }
.ctimer-controls .btn { padding: 12px 22px; font-size: .95rem; }
.ctimer-controls .btn.secondary { color: #fff; border-color: rgba(255,255,255,.32); background: transparent; box-shadow: none; }
.ctimer-controls .btn.secondary:hover { background: #fff; color: var(--ink); border-color: #fff; }
.ctimer:fullscreen { display: flex; flex-direction: column; align-items: center; justify-content: center; border-radius: 0; }
.ctimer:fullscreen .ctimer-display { font-size: 28vw; }

/* ---------- Breadcrumb ---------- */
.crumb { font-family: var(--mono); font-size: .74rem; letter-spacing: .04em; color: var(--ink-faint); padding: 26px 0 0; text-transform: uppercase; }
.crumb a { color: var(--ink-faint); background: none; }
.crumb a:hover { color: var(--red); }

/* ---------- Footer ---------- */
footer.site { border-top: 1.5px solid var(--ink); margin-top: 80px; padding: 48px 0 28px; background: var(--paper); font-size: .92rem; }
footer.site .footgrid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 30px; align-items: start; }
footer.site .brand { font-size: 1.2rem; }
footer.site .updated { color: var(--ink-faint); font-size: .86rem; margin-top: 12px; max-width: 30ch; font-family: var(--sans); letter-spacing: 0; }
footer.site h4 { font-family: var(--mono); font-weight: 700; font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-faint); margin: 0 0 14px; }
footer.site .footgrid a { display: block; margin: 0 0 9px; color: var(--ink-soft); background: none; font-size: .95rem; }
footer.site .footgrid a:hover { color: var(--red); }
footer.site .legal { border-top: 1px solid var(--line); margin-top: 32px; padding-top: 20px; color: var(--ink-faint); }
footer.site .legal p { color: var(--ink-faint); font-size: .82rem; margin: 0; max-width: none; }
.updated { color: var(--ink-faint); }
@media (max-width: 680px) { footer.site .footgrid { grid-template-columns: 1fr 1fr; } }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .hero-home { grid-template-columns: 1fr; gap: 40px; padding-top: 40px; }
  .hero-home .hero-stage { max-width: 460px; }
  body { font-size: 17px; }
}

/* ---------- MailerLite embedded form (restyled for the dark .callout) ---------- */
.ml-form-embedContainer { max-width: 460px; margin: 20px auto 4px; }
.ml-form-embedContainer .ml-form-embedContent { display: none; }
.ml-form-embedContainer .row-form form { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; align-items: stretch; }
.ml-form-embedContainer .ml-form-formContent { flex: 1; min-width: 220px; }
.ml-form-embedContainer .ml-form-fieldRow { margin: 0; }
.ml-form-embedContainer input[type="email"] {
  width: 100%; height: 100%; padding: 13px 16px; border-radius: 8px;
  border: 1px solid rgba(255,255,255,.32); background: rgba(255,255,255,.08);
  color: #fff; font-family: var(--sans); font-size: 1rem; box-sizing: border-box;
}
.ml-form-embedContainer input[type="email"]::placeholder { color: rgba(245,239,227,.6); }
.ml-form-embedContainer input[type="email"]:focus { outline: none; border-color: #fff; }
.ml-form-embedContainer .ml-form-embedSubmit { flex: none; position: relative; }
.ml-form-embedContainer .ml-form-embedSubmit button {
  padding: 13px 24px; border: none; border-radius: 8px; background: var(--red); color: #fff;
  font-family: var(--sans); font-weight: 700; font-size: 1rem; line-height: 1.4; cursor: pointer;
}
.ml-form-embedContainer .ml-form-embedSubmit button:hover { background: var(--red-deep); }
.ml-form-embedContainer .ml-form-embedSubmit button.loading { display: inline-flex; align-items: center; gap: 8px; }
.ml-form-embedContainer .ml-form-embedSubmitLoad { display: inline-block; width: 16px; height: 16px; border: 3px solid rgba(255,255,255,.5); border-top-color: #fff; border-radius: 50%; animation: rise 0s, mlspin .8s linear infinite; }
@keyframes mlspin { to { transform: rotate(360deg); } }
.ml-form-embedContainer .sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
.ml-form-embedContainer .row-success .ml-form-successContent { text-align: center; color: #fff; }
.ml-form-embedContainer .row-success h4 { color: #fff; margin: 0 0 6px; }
.ml-form-embedContainer .row-success p { color: rgba(245,239,227,.82); margin: 0 0 16px; }
.ml-form-embedContainer .ml-error input { border-color: var(--red) !important; }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}
