/* =====================================================================
   Kotikoulu — myyntisivun itsenäinen tyyli.
   Tokenit ja fontit kirjan css/book.css:n :root-lohkosta (salvianvihreä,
   Fraunces + Spectral). Web-natiivi, ei B5-print-layoutia.
   LEMPEÄ ja lämmin: vaalea hero (ei tummaa), pehmeät kirjalliset fontit,
   ei keinotekoista kiirettä, ei emojeja. Kansi on koukku, teksti on todiste.
   ===================================================================== */

:root {
  --paper: #f6f1e7;        /* lämmin kerma */
  --ink: #33302a;          /* pehmeä tummanruskea, ei kylmää mustaa */
  --accent: #6f8a6b;       /* salvianvihreä (kasvu, metsä, siemen) */
  --accent-deep: #46583f;  /* syvä salvia (otsikot, tummat lohkot) */
  --accent-2: #c08a5e;     /* lämmin savi/okra, säästeliäästi */
  --muted: #756f63;        /* lämmin harmaa */
  --rule: #e2dacb;         /* pehmeä viiva */
  --paper-2: #eef1e8;      /* vaalea salvian sävy (kortit) */
  --paper-3: #e6ebdd;      /* hieman tummempi salvia */

  --serif: "Spectral", Georgia, "Times New Roman", serif;
  --display: "Fraunces", Georgia, serif;
  --mono: "JetBrains Mono", ui-monospace, "Courier New", monospace;

  /* Hero ja osanvälilehtien lempeä salvia-gradientti (kirjasta) */
  --soft-grad: linear-gradient(165deg, #eef1e8 0%, #e2e8da 55%, #dbe2d0 105%);
  /* Syvä salvia tummalle lohkolle (cross-sell) */
  --deep-grad: linear-gradient(155deg, #46583f 0%, #50664a 55%, #3c4e36 105%);

  --maxw: 1080px;
  --maxw-text: 720px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; }
a { color: var(--accent-deep); }

/* ---------- Layout ---------- */
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.section { padding: 72px 0; border-top: 1px solid var(--rule); }
.section:first-of-type { border-top: 0; }
.section--narrow .wrap { max-width: var(--maxw-text); }

.eyebrow {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 14px;
}
.section-title {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(26px, 4vw, 38px);
  line-height: 1.14;
  letter-spacing: -0.005em;
  color: var(--accent-deep);
  margin: 0 0 24px;
}
.lead {
  font-size: clamp(19px, 2.4vw, 22px);
  color: var(--ink);
}

/* ---------- Yläpalkki: vain wordmark, ei navia ---------- */
.topbar {
  border-bottom: 1px solid var(--rule);
  background: var(--paper);
}
.topbar__inner {
  max-width: var(--maxw); margin: 0 auto; padding: 16px 24px;
  display: flex; align-items: baseline; gap: 12px;
}
.wordmark {
  font-family: var(--display); font-weight: 600; font-size: 18px;
  letter-spacing: 0.005em; color: var(--accent-deep); text-decoration: none;
}
.wordmark__sub {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.22em;
  text-transform: uppercase; color: var(--muted);
}

/* ---------- Hero (lempeä, vaalea) ---------- */
.hero {
  background: var(--soft-grad);
  color: var(--ink);
  padding: 64px 0 72px;
  border-bottom: 1px solid var(--rule);
}
.hero__inner {
  max-width: var(--maxw); margin: 0 auto; padding: 0 24px;
  display: grid; grid-template-columns: 1fr; gap: 40px; align-items: center;
}
.hero__cover {
  order: -1;
  margin: 0 auto;
  max-width: 320px;
  width: 100%;
}
.hero__cover img {
  width: 100%; height: auto; border-radius: 3px;
  box-shadow: 0 18px 44px rgba(70, 88, 63, 0.32);
}
.hero__kicker {
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.28em;
  text-transform: uppercase; color: var(--accent); margin: 0 0 18px;
}
.hero__title {
  font-family: var(--display); font-weight: 600;
  font-size: clamp(38px, 6.2vw, 64px); line-height: 1.02;
  letter-spacing: -0.01em; color: var(--accent-deep); margin: 0 0 10px;
}
.hero__sub {
  font-family: var(--serif); font-style: italic;
  font-size: clamp(18px, 2.6vw, 24px); color: var(--ink); margin: 0 0 26px;
}
.hero__quote {
  font-family: var(--serif); font-size: clamp(19px, 2.7vw, 25px);
  line-height: 1.5; color: var(--accent-deep); margin: 0 0 28px;
  padding-left: 18px; border-left: 3px solid var(--accent);
}
.hero__seals {
  display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 26px;
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--muted);
}
.hero__seals span { display: inline-flex; align-items: center; gap: 8px; }
.hero__seals span::before { content: "•"; color: var(--accent); }

/* ---------- Painikkeet ---------- */
.cta-row { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.btn {
  display: inline-block; font-family: var(--display); font-weight: 600;
  font-size: 16px; letter-spacing: 0.005em; text-decoration: none;
  padding: 15px 28px; border-radius: 3px; border: 1px solid transparent;
  cursor: pointer; transition: transform .08s ease, background .15s ease;
}
.btn:active { transform: translateY(1px); }
.btn--accent { background: var(--accent); color: #fff; border-color: var(--accent-deep); }
.btn--accent:hover { background: var(--accent-deep); }
.btn--ghost { background: transparent; color: var(--accent-deep); border-color: var(--accent); }
.btn--ghost:hover { background: rgba(111, 138, 107, 0.10); }
.btn--dark { background: var(--accent-deep); color: var(--paper); border-color: #2f3d2a; }
.btn--block { display: block; width: 100%; text-align: center; }

/* ---------- 3 lupausta ---------- */
.promises { display: grid; grid-template-columns: 1fr; gap: 24px; }
.promise {
  background: var(--paper-2); border: 1px solid var(--rule);
  border-top: 3px solid var(--accent); padding: 28px 26px; border-radius: 3px;
}
.promise__num {
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.2em;
  color: var(--accent); margin: 0 0 12px;
}
.promise h3 {
  font-family: var(--display); font-weight: 600; font-size: 21px;
  color: var(--accent-deep); margin: 0 0 10px; line-height: 1.2;
}
.promise p { margin: 0; font-size: 16.5px; color: var(--ink); }

/* ---------- Mitä kirja sisältää: osat ---------- */
.arc {
  font-family: var(--mono); font-size: clamp(12px, 1.7vw, 15px);
  letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent-2);
  margin: 0 0 32px;
}
.arc b { color: var(--accent); font-weight: 500; }
.parts { display: block; }
.part {
  padding: 16px 0; border-bottom: 1px solid var(--rule);
}
.part:first-child { padding-top: 0; }
.part__label {
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--accent); margin: 0 0 6px;
}
.part__title { font-family: var(--display); font-weight: 600; font-size: 20px; color: var(--accent-deep); margin: 0 0 4px; }
.part__desc { margin: 0; color: var(--muted); font-size: 16px; }

/* ---------- Esipuhe ---------- */
.foreword .wrap { max-width: var(--maxw-text); }
.foreword__body { font-size: 19px; line-height: 1.8; }
.foreword__body > p:first-of-type::first-letter {
  font-family: var(--display); font-weight: 600; float: left;
  font-size: 3.4em; line-height: 0.82; padding: 6px 10px 0 0; color: var(--accent);
}
.signoff { font-style: italic; color: var(--muted); text-align: right; margin-top: 28px; }

/* ---------- Sisällysluettelo ---------- */
.toc__part {
  font-family: var(--mono); font-size: 13px; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--accent);
  margin: 34px 0 14px; padding-bottom: 8px; border-bottom: 2px solid var(--accent);
}
.toc__part:first-child { margin-top: 0; }
.toc__chapter {
  display: grid; grid-template-columns: 2.4em 1fr; gap: 12px;
  padding: 12px 0; border-bottom: 1px solid var(--rule);
}
.toc__num { font-family: var(--mono); color: var(--accent-2); font-size: 15px; }
.toc__title { font-family: var(--display); font-weight: 600; font-size: 18px; color: var(--accent-deep); margin: 0; }
.toc__anchor { margin: 5px 0 0; color: var(--muted); font-style: italic; font-size: 16px; }
.toc__chapter--sample .toc__title::after {
  content: "Näyte"; font-family: var(--mono); font-style: normal;
  font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase;
  color: #fff; background: var(--accent); padding: 2px 7px;
  border-radius: 2px; margin-left: 10px; vertical-align: middle;
}

/* ---------- Tilaus ---------- */
.order { background: var(--paper-2); }
.order__grid {
  display: grid; grid-template-columns: 1fr; gap: 40px; align-items: start;
}
.price__offer {
  display: inline-block; font-family: var(--mono); font-weight: 500;
  font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase;
  color: #2b2620; background: var(--accent-2);
  padding: 5px 12px; border-radius: 2px; margin: 0 0 14px;
}
.price { margin: 0 0 22px; }
.price__now { font-family: var(--display); font-weight: 600; font-size: 44px; color: var(--accent-deep); }
.price__old { font-size: 22px; color: var(--muted); text-decoration: line-through; margin-left: 12px; }
.price__note { font-family: var(--mono); font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent-2); margin: 8px 0 0; }
.includes { list-style: none; padding: 0; margin: 22px 0; }
.includes li { padding: 8px 0 8px 30px; position: relative; border-bottom: 1px dashed var(--rule); }
.includes li::before {
  content: ""; position: absolute; left: 4px; top: 16px; width: 10px; height: 10px;
  background: var(--accent); border-radius: 50%;
}

/* Lomake */
.order-form {
  background: var(--paper); border: 1px solid var(--rule);
  border-top: 4px solid var(--accent); border-radius: 3px; padding: 28px 26px;
}
.order-form h3 { font-family: var(--display); font-weight: 600; color: var(--accent-deep); margin: 0 0 6px; font-size: 22px; }
.field { margin: 0 0 16px; }
.field label { display: block; font-family: var(--display); font-weight: 600; font-size: 14px; margin: 0 0 6px; }
.field .hint { font-weight: 400; color: var(--muted); font-family: var(--serif); font-size: 13px; }
.field input[type=text],
.field input[type=email],
.field input[type=tel],
.field textarea {
  width: 100%; font-family: var(--serif); font-size: 16px; color: var(--ink);
  padding: 12px 14px; border: 1px solid var(--rule); border-radius: 3px;
  background: #fdfbf5;
}
.field input:focus, .field textarea:focus { outline: 2px solid var(--accent); border-color: var(--accent); }
.field textarea { min-height: 90px; resize: vertical; }
.checkrow { display: flex; gap: 10px; align-items: flex-start; margin: 0 0 16px; }
.checkrow input { margin-top: 5px; }
.checkrow label { font-family: var(--serif); font-weight: 400; font-size: 15px; color: var(--ink); }
.honeypot { position: absolute; left: -5000px; }
.gift-fields { display: none; padding: 16px; margin: 0 0 16px; background: var(--paper-3); border-left: 3px solid var(--accent); border-radius: 0 3px 3px 0; }
.gift-fields.is-open { display: block; }
.form-error {
  display: none; background: #f3e6dd; border: 1px solid var(--accent-2);
  color: #8a5a32; padding: 12px 14px; border-radius: 3px; margin: 0 0 16px; font-size: 15px;
}
.form-error.is-visible { display: block; }
.form-note { font-size: 13px; color: var(--muted); margin: 14px 0 0; }

/* ---------- FAQ ---------- */
.faq__item { border-bottom: 1px solid var(--rule); }
.faq__item summary {
  cursor: pointer; list-style: none; padding: 18px 0; font-family: var(--display);
  font-weight: 600; font-size: 19px; color: var(--accent-deep);
  display: flex; justify-content: space-between; gap: 16px;
}
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary::after { content: "+"; color: var(--accent); font-weight: 700; }
.faq__item[open] summary::after { content: "–"; }
.faq__a { padding: 0 0 20px; color: var(--ink); margin: 0; max-width: var(--maxw-text); }

/* ---------- Kirjoittajat + ristiinmyynti ---------- */
.authors__bio { font-size: 18px; }
.cross-sell {
  margin-top: 36px; background: var(--deep-grad); color: var(--paper);
  padding: 30px 28px; border-radius: 3px;
  display: grid; grid-template-columns: 1fr; gap: 24px;
  align-items: center; justify-items: center; text-align: center;
}
.cross-sell__cover { width: 160px; border-radius: 3px; box-shadow: 0 12px 30px rgba(0,0,0,0.35); }
.cross-sell .eyebrow { color: #cdd9c4; }
.cross-sell h3 { font-family: var(--display); font-weight: 600; font-size: 24px; color: #fff; margin: 0 0 10px; }
.cross-sell p { color: #e4ebdd; margin: 0 0 18px; }
.cross-sell .btn--ghost { color: var(--paper); border-color: rgba(246,241,231,0.5); }
.cross-sell .btn--ghost:hover { background: rgba(246,241,231,0.12); border-color: var(--paper); }

/* ---------- Sitaatit / pull-quote ---------- */
blockquote { margin: 0; padding-left: 18px; border-left: 3px solid var(--accent); font-style: italic; color: var(--ink); }
.thesis { font-family: var(--serif); font-weight: 600; }

/* ---------- Footer ---------- */
.site-footer { background: var(--accent-deep); color: #d4ddcc; padding: 40px 0; font-size: 14px; }
.site-footer a { color: #e8efe1; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.site-footer__links { display: flex; flex-wrap: wrap; gap: 8px 22px; margin: 0 0 16px; font-family: var(--mono); font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; }
.site-footer__cred { font-family: var(--serif); font-style: italic; color: #b7c4ac; }

/* ---------- Reveal (esipuhe, sisällys): collapse vain JS:llä ---------- */
.reveal__btn { display: none; }
.reveal--js .reveal__btn {
  display: inline-flex; align-items: center; gap: 8px; margin-top: 22px;
  background: none; border: 1px solid var(--accent); color: var(--accent-deep);
  font-family: var(--display); font-weight: 600; font-size: 15px;
  padding: 11px 20px; border-radius: 3px; cursor: pointer;
}
.reveal--js .reveal__btn:hover { background: rgba(111, 138, 107, 0.10); }
.reveal__chev { font-size: 12px; line-height: 1; }
.reveal--js:not(.is-open) .reveal__more {
  position: relative; max-height: 3.4em; overflow: hidden;
}
.reveal--js:not(.is-open) .reveal__more::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3.4em;
  background: linear-gradient(transparent, var(--paper)); pointer-events: none;
}
.foreword .reveal--js:not(.is-open) .reveal__more::after {
  background: linear-gradient(transparent, var(--paper));
}

/* ---------- Responsiivisuus ---------- */
@media (min-width: 700px) {
  .cross-sell { grid-template-columns: auto 1fr; gap: 30px; justify-items: start; text-align: left; }
}
@media (min-width: 720px) {
  .promises { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 900px) {
  .hero__inner { grid-template-columns: 1.15fr 0.85fr; gap: 56px; }
  .hero__cover { order: 1; max-width: 360px; }
  .order__grid { grid-template-columns: 1fr 1fr; gap: 56px; }
}
