/* whatiflab.ai — exercise-book aesthetic
   ivory grid paper · ink navy · marigold highlighter · coral margin line */

:root {
  --paper: #FAF6EC;
  --paper-deep: #F3EDDD;
  --ink: #1C2B4A;
  --ink-soft: #45506B;
  --marigold: #E8A13D;
  --marigold-soft: rgba(232, 161, 61, 0.32);
  --coral: #E0654B;
  --grid-line: rgba(28, 43, 74, 0.055);
  --serif: "Fraunces", Georgia, serif;
  --sans: "Atkinson Hyperlegible", Verdana, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  color: var(--ink);
  background-color: var(--paper);
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 34px 34px;
  line-height: 1.65;
  font-size: 1.06rem;
  overflow-x: hidden;
}

/* the exercise-book margin line */
.margin-line {
  position: fixed;
  top: 0; bottom: 0;
  left: clamp(1.2rem, 4vw, 3.4rem);
  width: 2px;
  background: var(--coral);
  opacity: 0.5;
  z-index: 1;
  pointer-events: none;
}

.wrap { max-width: 1060px; margin: 0 auto; padding: 0 clamp(1.4rem, 6vw, 3rem); }
.narrow { max-width: 780px; margin: 0 auto; padding: 0 clamp(1.4rem, 6vw, 3rem); }

/* ---------- header ---------- */
header {
  position: sticky; top: 0; z-index: 20;
  background: rgba(250, 246, 236, 0.92);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid rgba(28, 43, 74, 0.1);
}
nav {
  max-width: 1060px; margin: 0 auto;
  padding: 0.85rem clamp(1.4rem, 6vw, 3rem);
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
}
.brand { display: flex; align-items: center; gap: 0.6rem; text-decoration: none; color: var(--ink); }
.brand-mark {
  display: grid; place-items: center;
  width: 2rem; height: 2rem;
  background: var(--ink); color: var(--paper);
  font-family: var(--serif); font-weight: 700; font-size: 1.25rem;
  border-radius: 50% 50% 50% 6px;
}
.brand-name { font-family: var(--serif); font-weight: 700; font-size: 1.35rem; letter-spacing: -0.01em; }
.brand-name em { font-style: italic; font-weight: 400; color: var(--coral); }
.navlinks { display: flex; gap: 1.6rem; list-style: none; }
.navlinks a {
  color: var(--ink-soft); text-decoration: none; font-weight: 700; font-size: 0.95rem;
}
.navlinks a:hover { color: var(--coral); }
@media (max-width: 640px) { .navlinks { display: none; } }

/* ---------- type ---------- */
.eyebrow {
  font-size: 0.82rem; font-weight: 700; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--coral);
}
h1 {
  font-family: var(--serif);
  font-size: clamp(2.5rem, 6.4vw, 4.3rem);
  font-weight: 600; line-height: 1.12; letter-spacing: -0.015em;
  margin: 1rem 0 1.4rem;
}
h2 {
  font-family: var(--serif);
  font-size: clamp(1.75rem, 3.8vw, 2.5rem);
  font-weight: 600; line-height: 1.18; letter-spacing: -0.01em;
  margin-top: 0.75rem;
}
h3 { font-family: var(--serif); font-weight: 600; font-size: 1.3rem; line-height: 1.3; }

.rule {
  width: 76px; height: 5px; margin: 1.3rem 0 1.8rem;
  background: repeating-linear-gradient(90deg, var(--marigold) 0 10px, transparent 10px 16px);
}

.hl {
  background: linear-gradient(104deg,
    transparent 0.4%, var(--marigold-soft) 2.4%,
    var(--marigold-soft) 97.6%, transparent 99.6%);
  padding: 0.05em 0.15em; box-decoration-break: clone; -webkit-box-decoration-break: clone;
}

/* ---------- hero ---------- */
.hero { padding: clamp(4.5rem, 11vh, 8rem) 0 clamp(3.5rem, 8vh, 6rem); }
.hero .whatif { display: block; }
.hero .whatif::after { content: "\2026"; color: var(--marigold); }
.blank {
  display: block;
  font-style: italic; font-weight: 400;
  color: var(--ink-soft);
  font-size: 0.62em; line-height: 1.3;
  margin-top: 0.55em;
  border-bottom: 2px dashed rgba(28, 43, 74, 0.35);
  padding-bottom: 0.45em;
  min-height: 2.9em;
}
.rotator { transition: opacity 0.45s ease, transform 0.45s ease; display: inline-block; }
.rotator.out { opacity: 0; transform: translateY(0.4em); }
.lede { font-size: 1.18rem; max-width: 44rem; color: var(--ink-soft); }
.lede-sm { font-size: 1.1rem; max-width: 40rem; color: var(--ink-soft); }

.cta-row { display: flex; flex-wrap: wrap; gap: 0.9rem; margin-top: 2rem; }
.btn {
  display: inline-block;
  background: var(--ink); color: var(--paper);
  font-family: var(--sans); font-weight: 700; font-size: 1rem;
  text-decoration: none;
  padding: 0.8rem 1.6rem;
  border: 2px solid var(--ink);
  border-radius: 4px 4px 4px 14px;
  box-shadow: 4px 4px 0 var(--marigold);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  cursor: pointer;
}
.btn:hover { transform: translate(-2px, -2px); box-shadow: 7px 7px 0 var(--marigold); }
.btn:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--marigold); }
.btn.ghost { background: transparent; color: var(--ink); box-shadow: 4px 4px 0 rgba(28, 43, 74, 0.15); }
.btn.ghost:hover { box-shadow: 7px 7px 0 rgba(28, 43, 74, 0.15); }

/* ---------- sections ---------- */
section { padding: clamp(3rem, 8vh, 5.5rem) 0; }

.gap { background: var(--paper-deep); border-top: 1px solid rgba(28,43,74,0.08); border-bottom: 1px solid rgba(28,43,74,0.08); }
.prose p { margin-bottom: 1.1rem; max-width: 46rem; }

.think-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.4rem;
  margin-top: 0.5rem;
}
@media (max-width: 760px) { .think-grid { grid-template-columns: 1fr; } }
.think-card {
  background: #FFFDF6;
  border: 1.5px solid rgba(28, 43, 74, 0.16);
  border-radius: 6px 6px 6px 22px;
  padding: 1.6rem 1.7rem 1.5rem;
  box-shadow: 5px 5px 0 rgba(28, 43, 74, 0.07);
}
.think-card h3 { margin-bottom: 0.7rem; }
.think-card .num {
  font-family: var(--sans); font-weight: 700; font-size: 0.8rem;
  color: var(--coral); letter-spacing: 0.08em; margin-right: 0.5rem;
  vertical-align: 0.35em;
}
.think-card p { color: var(--ink-soft); }
.think-card.honesty { border-color: var(--marigold); box-shadow: 5px 5px 0 var(--marigold-soft); }

/* ---------- resources ---------- */
.res-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4rem;
  margin-top: 1.8rem;
}
@media (max-width: 900px) { .res-grid { grid-template-columns: 1fr; } }
.res-card {
  background: #FFFDF6; color: var(--ink);
  border: 1.5px solid rgba(28, 43, 74, 0.16);
  border-radius: 6px 6px 6px 22px;
  padding: 1.6rem 1.7rem 1.5rem;
  box-shadow: 5px 5px 0 rgba(28, 43, 74, 0.07);
}
.res-card h3 { margin-bottom: 0.8rem; }
.res-card p { color: var(--ink-soft); margin-bottom: 0.9rem; }
.res-card.featured {
  grid-column: 1 / -1;
  background: var(--ink); color: var(--paper);
  border: none;
  border-radius: 8px 8px 8px 30px;
  padding: clamp(1.8rem, 4vw, 2.8rem);
  box-shadow: 8px 8px 0 var(--marigold-soft);
}
.res-card.featured h3 { font-size: clamp(1.5rem, 3vw, 2rem); margin-bottom: 0.9rem; }
.res-card.featured p { color: rgba(250, 246, 236, 0.85); max-width: 44rem; }
.res-tag {
  display: inline-block;
  font-size: 0.78rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--ink); background: var(--marigold);
  padding: 0.3rem 0.7rem; border-radius: 3px;
  margin-bottom: 1.1rem;
}
.res-tag.light {
  background: transparent;
  border: 1.5px dashed var(--marigold);
  color: var(--coral);
}
.res-list { margin: 1.2rem 0 1.7rem 1.2rem; color: rgba(250, 246, 236, 0.85); }
.res-list li { margin-bottom: 0.45rem; }
.res-card.featured .btn { background: var(--marigold); border-color: var(--marigold); color: var(--ink); box-shadow: 4px 4px 0 rgba(250, 246, 236, 0.25); }
.res-card.featured .btn:hover { box-shadow: 7px 7px 0 rgba(250, 246, 236, 0.25); }

/* ---------- notify ---------- */
.notify { background: var(--paper-deep); border-top: 1px solid rgba(28,43,74,0.08); }
.notify-grid {
  display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 2.5rem;
  margin-top: 0.5rem; align-items: start;
}
@media (max-width: 760px) { .notify-grid { grid-template-columns: 1fr; } }
form { display: flex; flex-direction: column; }
label { font-weight: 700; font-size: 0.95rem; margin: 0.9rem 0 0.3rem; }
label .opt { font-weight: 400; color: var(--ink-soft); }
input[type="text"], input[type="email"] {
  font-family: var(--sans); font-size: 1rem; color: var(--ink);
  background: #FFFDF6;
  border: 1.5px solid rgba(28, 43, 74, 0.3);
  border-radius: 4px;
  padding: 0.7rem 0.9rem;
}
input:focus { outline: 2px solid var(--marigold); outline-offset: 1px; }
form .btn { margin-top: 1.4rem; align-self: flex-start; }
.form-note { font-size: 0.88rem; color: var(--ink-soft); margin-top: 0.8rem; }
.hp { position: absolute; left: -9999px; }
.notify-aside p { margin-bottom: 1rem; color: var(--ink-soft); }
.notify-aside a { color: var(--coral); font-weight: 700; }

/* ---------- footer ---------- */
footer { background: var(--ink); color: rgba(250, 246, 236, 0.8); padding: 2.6rem 0; }
.foot-inner { max-width: 1060px; margin: 0 auto; padding: 0 clamp(1.4rem, 6vw, 3rem); }
.foot-brand { font-family: var(--serif); font-weight: 700; font-size: 1.4rem; color: var(--paper); margin-bottom: 0.5rem; }
.foot-brand em { font-style: italic; font-weight: 400; color: var(--marigold); }
footer a { color: rgba(250, 246, 236, 0.8); }
.foot-line { margin-top: 0.6rem; font-style: italic; color: var(--marigold); font-family: var(--serif); }

/* ---------- reveal ---------- */
.rv { opacity: 0; transform: translateY(18px); transition: opacity 0.6s ease, transform 0.6s ease; }
.rv.in { opacity: 1; transform: none; }
.rv.d1 { transition-delay: 0.1s; }
.rv.d2 { transition-delay: 0.2s; }
.rv.d3 { transition-delay: 0.3s; }
.rv.d4 { transition-delay: 0.4s; }
@media (prefers-reduced-motion: reduce) {
  .rv { opacity: 1; transform: none; transition: none; }
  .rotator { transition: none; }
  html { scroll-behavior: auto; }
}
