/* =========================================================
   THE TODDLER TRIALS
   Static website stylesheet
   ========================================================= */

:root {
  --paper: #f3ecdd;
  --paper-deep: #e9dfcb;
  --ink: #282522;
  --muted: #665f57;
  --wine: #6f2630;
  --wine-dark: #4d1720;
  --line: rgba(40, 37, 34, 0.22);
  --light-line: rgba(255,255,255,0.25);
  --max: 1180px;
  --narrow: 760px;
  --serif: "EB Garamond", Georgia, serif;
  --display: "Libre Baskerville", Georgia, serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 20px;
  line-height: 1.55;
}

img { max-width: 100%; display: block; }
a { color: inherit; }
button { font: inherit; }

.container {
  width: min(calc(100% - 48px), var(--max));
  margin: 0 auto;
}

.narrow { width: min(calc(100% - 48px), var(--narrow)); }
.centred { text-align: center; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(243, 236, 221, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.nav-wrap {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
}

.wordmark {
  text-decoration: none;
  letter-spacing: 0.12em;
  font-family: var(--display);
  font-size: 14px;
}

nav {
  display: flex;
  gap: 26px;
  align-items: center;
}

nav a {
  text-decoration: none;
  font-size: 16px;
  color: var(--muted);
}

nav a:hover, nav a.active { color: var(--wine); }

.hero {
  padding: 82px 0 72px;
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  align-items: center;
  gap: 80px;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--wine);
  font-family: var(--display);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  line-height: 1.5;
  text-transform: uppercase;
}

.eyebrow.light { color: #eadcc9; }

h1, h2, h3 {
  font-family: var(--display);
  line-height: 1.18;
  font-weight: 400;
}

h1 {
  margin: 0 0 28px;
  font-size: clamp(42px, 5vw, 76px);
  letter-spacing: -0.035em;
}

h2 {
  margin: 0 0 26px;
  font-size: clamp(34px, 4vw, 54px);
  letter-spacing: -0.025em;
}

h3 {
  margin: 0 0 10px;
  font-size: 25px;
  color: var(--wine);
}

p { margin: 0 0 18px; }

.hero-intro {
  font-size: 24px;
  line-height: 1.45;
}

.hero-strong, .lead-line {
  font-size: 25px;
  font-weight: 600;
}

.legal-list {
  color: var(--wine);
  font-size: 21px;
  font-style: italic;
}

.because {
  margin-top: 24px;
  font-size: 20px;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
  margin-top: 32px;
}

.centred-row { justify-content: center; }

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 13px 24px;
  border: 1px solid transparent;
  border-radius: 0;
  text-decoration: none;
  font-family: var(--display);
  font-size: 14px;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease;
}

.button:hover { transform: translateY(-1px); }

.button-primary {
  background: var(--wine);
  color: #fff9ef;
  border-color: var(--wine);
}

.button-primary:hover { background: var(--wine-dark); }

.button-secondary {
  border-color: var(--wine);
  color: var(--wine);
  background: transparent;
}

.button-secondary:hover {
  background: rgba(111,38,48,0.07);
}

.button-light {
  background: #f5eddf;
  color: var(--wine-dark);
  border-color: #f5eddf;
}

.button-outline-light {
  background: transparent;
  border-color: #f5eddf;
  color: #f5eddf;
}

.hero-cover-wrap {
  display: flex;
  justify-content: center;
  position: relative;
}

.book-cover {
  width: min(100%, 430px);
  box-shadow: 0 20px 50px rgba(37, 27, 20, 0.22);
}

.hero-cover { transform: rotate(1deg); }

.quote-band {
  padding: 76px 0;
  background: var(--paper-deep);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  text-align: center;
}

blockquote {
  margin: 0;
  font-size: clamp(28px, 3.4vw, 44px);
  line-height: 1.28;
  font-style: italic;
}

cite {
  display: block;
  margin-top: 20px;
  font-size: 17px;
  color: var(--muted);
  font-style: normal;
}

.section { padding: 100px 0; }
.section-tinted { background: #ece2d0; }
.section-dark { background: var(--wine-dark); color: #f7eee1; }
.section-dark .large-quote { color: #f7eee1; }

.advice-line {
  font-size: 24px;
  font-style: italic;
  color: var(--wine);
}

.split-copy {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 100px;
}

.section-heading {
  max-width: 760px;
  margin: 0 auto 50px;
}

.principles-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.principles-grid article {
  padding: 34px 28px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.principles-grid article p {
  margin-bottom: 0;
  font-size: 18px;
  color: var(--muted);
}

.split-book {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 90px;
  align-items: center;
}

.book-visual { display: flex; justify-content: center; }
.text-link {
  color: var(--wine);
  font-family: var(--display);
  font-size: 17px;
  text-decoration: none;
}
.text-link:hover { text-decoration: underline; }

.assessment-banner {
  padding: 88px 0;
  background: #d9cbb5;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.assessment-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.9fr;
  gap: 50px 80px;
  align-items: start;
}

.assessment-results-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  font-size: 17px;
  color: var(--wine-dark);
}

.assessment-results-list span {
  padding: 10px 0;
  border-bottom: 1px solid rgba(77,23,32,0.2);
}

.assessment-action { grid-column: 1 / -1; }
.assessment-action .small { margin-top: 14px; color: var(--muted); }

.faq-section details {
  border-top: 1px solid var(--line);
  padding: 20px 0;
}

.faq-section details:last-child { border-bottom: 1px solid var(--line); }

.faq-section summary {
  cursor: pointer;
  list-style: none;
  font-family: var(--display);
  font-size: 23px;
  padding-right: 40px;
  position: relative;
}

.faq-section summary::after {
  content: "+";
  position: absolute;
  right: 0;
  color: var(--wine);
}

.faq-section details[open] summary::after { content: "−"; }
.faq-section details p:first-of-type { margin-top: 18px; }

.author-lead {
  font-size: 25px;
  line-height: 1.45;
}

.final-cta {
  padding: 95px 0;
  background: var(--wine-dark);
  color: #f7eee1;
}

.final-cta h2 { color: #f7eee1; }

.site-footer {
  background: #1f1c1a;
  color: #e9dfd1;
  padding: 55px 0 28px;
}

.footer-grid {
  display: flex;
  justify-content: space-between;
  gap: 50px;
  padding-bottom: 40px;
  border-bottom: 1px solid var(--light-line);
}

.footer-title {
  font-family: var(--display);
  letter-spacing: 0.1em;
  font-size: 17px;
}

.footer-note { color: #b9afa2; font-size: 17px; }

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  align-content: flex-start;
}

.footer-links a, .footer-bottom a {
  color: #e9dfd1;
  text-decoration: none;
  font-size: 16px;
}

.footer-links a:hover, .footer-bottom a:hover { color: #fff; text-decoration: underline; }

.footer-bottom {
  padding-top: 25px;
  color: #aaa095;
  font-size: 14px;
}

.footer-bottom p:last-child { max-width: 820px; }
.single-footer { text-align: center; }

/* QUIZ */
.quiz-main { min-height: calc(100vh - 72px); }

.quiz-intro {
  min-height: calc(100vh - 72px);
  display: grid;
  align-items: center;
  padding: 80px 0;
}

.quiz-lead {
  font-size: 29px;
  font-style: italic;
  color: var(--wine);
}

.italic { font-style: italic; }
.small { font-size: 16px; }
.hidden { display: none !important; }

.quiz-shell, .result-shell {
  padding: 80px 0 110px;
}

.quiz-container {
  width: min(calc(100% - 48px), 820px);
}

.quiz-progress-label {
  display: flex;
  justify-content: space-between;
  margin-bottom: 9px;
  font-family: var(--display);
  font-size: 15px;
  color: var(--muted);
}

.quiz-progress {
  height: 5px;
  background: rgba(40,37,34,0.12);
  margin-bottom: 54px;
}

.quiz-progress div {
  width: 0;
  height: 100%;
  background: var(--wine);
  transition: width 0.25s ease;
}

.question-card {
  background: rgba(255,255,255,0.22);
  padding: clamp(28px, 5vw, 56px);
  border: 1px solid var(--line);
}

.question-card h1 {
  font-size: clamp(32px, 4.4vw, 56px);
  margin-bottom: 36px;
}

.answers {
  display: grid;
  gap: 12px;
}

.answer-button {
  width: 100%;
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 14px;
  text-align: left;
  padding: 17px 18px;
  background: transparent;
  border: 1px solid var(--line);
  color: var(--ink);
  cursor: pointer;
  transition: border-color .15s, background .15s, transform .15s;
  font-size: 19px;
  line-height: 1.35;
}

.answer-button:hover {
  border-color: var(--wine);
  background: rgba(111,38,48,0.05);
  transform: translateX(3px);
}

.answer-letter {
  color: var(--wine);
  font-family: var(--display);
  font-weight: 700;
}

.back-button {
  margin-top: 24px;
  background: transparent;
  border: 0;
  padding: 0;
  color: var(--muted);
  cursor: pointer;
  font-size: 17px;
}

.back-button:hover { color: var(--wine); }

.result-shell { padding-top: 100px; }
.result-label {
  font-family: var(--display);
  font-size: 14px;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.result-subtitle {
  font-size: 27px;
  font-style: italic;
  color: var(--wine);
}

.result-card {
  margin: 44px auto;
  padding: 38px;
  border-top: 1px solid var(--wine);
  border-bottom: 1px solid var(--wine);
  text-align: left;
}

.result-card p { font-size: 22px; }
.result-classification {
  margin-top: 28px !important;
  color: var(--wine);
  font-family: var(--display);
  font-size: 17px !important;
}

.result-share-card {
  margin: 50px auto 28px;
  padding: 40px;
  background: var(--wine-dark);
  color: #f7eee1;
  border: 8px double #d9cbb5;
}

.result-share-card .eyebrow { color: #e7d7c1; }
.share-result-title {
  margin: 10px 0;
  font-family: var(--display);
  font-size: clamp(30px, 4vw, 48px);
}
.share-url {
  margin: 28px 0 0;
  color: #d9cbb5;
  font-size: 15px;
}


.share-instruction {
  margin: -8px 0 22px;
  color: var(--muted);
  font-style: italic;
}

#shareCanvas {
  display: none;
}

.share-actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
}

.result-next {
  margin-top: 55px;
}
.result-next .text-link {
  display: block;
  margin-top: 20px;
}

/* Responsive */
@media (max-width: 900px) {
  .hero-grid,
  .split-copy,
  .split-book,
  .assessment-grid {
    grid-template-columns: 1fr;
    gap: 42px;
  }

  .hero { padding-top: 60px; }
  .hero-cover-wrap { order: -1; }
  .hero-cover { width: min(70vw, 400px); }
  .assessment-action { grid-column: auto; }

  .principles-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  body { font-size: 19px; }
  .container, .narrow { width: min(calc(100% - 32px), var(--max)); }

  .nav-wrap { min-height: 64px; }
  .wordmark { font-size: 11px; }
  nav { gap: 14px; }
  nav a { font-size: 14px; }

  .hero { padding: 46px 0 58px; }
  .section { padding: 72px 0; }
  .quote-band { padding: 58px 0; }

  .hero-intro { font-size: 22px; }
  .principles-grid { grid-template-columns: 1fr; }
  .principles-grid article { padding: 28px 22px; }

  .assessment-results-list { grid-template-columns: 1fr; }
  .footer-grid { flex-direction: column; gap: 24px; }

  .cta-row { align-items: stretch; }
  .cta-row .button { width: 100%; }
  .cta-row .text-link { padding: 8px 0; }

  .quiz-intro, .quiz-shell, .result-shell { padding: 55px 0 75px; }
  .question-card { padding: 26px 20px; }
  .answer-button { font-size: 18px; }
}
