/* talewalker.com: the app's brand (parchment, ink, terracotta; Cormorant Garamond + Inter).
   Fonts are self-hosted: no requests to third parties. */

@font-face { font-family: 'Cormorant Garamond'; font-weight: 600; font-display: swap; src: url(../fonts/cormorant-garamond-latin-600-normal.woff2) format('woff2'); }
@font-face { font-family: 'Cormorant Garamond'; font-weight: 700; font-display: swap; src: url(../fonts/cormorant-garamond-latin-700-normal.woff2) format('woff2'); }
@font-face { font-family: 'Cormorant Garamond'; font-weight: 500; font-style: italic; font-display: swap; src: url(../fonts/cormorant-garamond-latin-500-italic.woff2) format('woff2'); }
@font-face { font-family: Inter; font-weight: 400; font-display: swap; src: url(../fonts/inter-latin-400-normal.woff2) format('woff2'); }
@font-face { font-family: Inter; font-weight: 500; font-display: swap; src: url(../fonts/inter-latin-500-normal.woff2) format('woff2'); }
@font-face { font-family: Inter; font-weight: 600; font-display: swap; src: url(../fonts/inter-latin-600-normal.woff2) format('woff2'); }

:root {
  --paper: #f3ead7;
  --paper-raised: #fbf6ea;
  --line: #dccfb3;
  --ink: #2b2118;
  --ink-soft: #4f3f2f;
  --muted: #6b5a47;
  --accent: #a23e22;
  --accent-dark: #7e2f19;
  --cream: #fbf1e2;
  --display: 'Cormorant Garamond', Georgia, serif;
  --body: Inter, system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--body); font-size: 17px; line-height: 1.6; -webkit-font-smoothing: antialiased; }
h1, h2, h3 { font-family: var(--display); font-weight: 700; line-height: 1.08; margin: 0 0 0.4em; }
h1 { font-size: clamp(40px, 6vw, 64px); }
h2 { font-size: clamp(32px, 4.5vw, 48px); }
h3 { font-size: 26px; }
p { margin: 0 0 1em; }
a { color: var(--accent); }
a:hover { color: var(--accent-dark); }
img { max-width: 100%; height: auto; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 24px; }
.narrow { max-width: 720px; }
.center { text-align: center; }
.eyebrow { font-size: 13px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); margin-bottom: 10px; }
.eyebrow.light { color: #f6d9c2; }
.meta { font-size: 14px; color: var(--muted); }
.small { font-size: 13px; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; z-index: 100; background: var(--ink); color: var(--cream); padding: 8px 14px; border-radius: 8px; }
mark { background: #f6e27a; color: var(--ink); padding: 0 4px; }

/* ---- buttons ---- */
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 24px; border-radius: 12px; border: 2px solid var(--accent); background: var(--accent); color: #fff; font: 600 16px/1 var(--body); text-decoration: none; cursor: pointer; transition: background 0.15s, border-color 0.15s; }
.button:hover { background: var(--accent-dark); border-color: var(--accent-dark); color: #fff; }
.button.ghost { background: transparent; border-color: rgb(251 241 226 / 0.85); color: var(--cream); }
.button.ghost:hover { background: rgb(251 241 226 / 0.12); }
.button.small { min-height: 40px; padding: 0 16px; font-size: 14px; }
.button:disabled { opacity: 0.6; cursor: default; }

/* ---- header ---- */
.site-header { position: sticky; top: 0; z-index: 20; background: rgb(243 234 215 / 0.94); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.header-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 68px; }
.logo { display: flex; }
.logo img { width: 168px; height: auto; }
.site-header nav { display: flex; align-items: center; gap: 22px; }
.site-header nav a:not(.button) { color: var(--ink-soft); text-decoration: none; font-size: 15px; font-weight: 500; }
.site-header nav a:not(.button):hover { color: var(--accent); }

/* ---- hero: the Dehesa at dusk, in parallax ---- */
.hero { position: relative; overflow: hidden; min-height: clamp(560px, 82vh, 860px); display: flex; color: var(--cream); }
.scene { position: absolute; inset: 0; background: linear-gradient(to bottom, #9c4e28 0%, #c98060 40%, #dfa285 70%, #ecbb9c 100%); }
/* darkens the upper sky a little so the text stays readable */
.scene::after { content: ''; position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(90deg, rgb(60 20 8 / 0.55) 0%, rgb(60 20 8 / 0.3) 38%, rgb(60 20 8 / 0) 62%),
    linear-gradient(180deg, rgb(70 25 10 / 0.35) 0%, rgb(70 25 10 / 0) 50%); }
.layer { position: absolute; top: 0; left: 0; height: 100%; width: calc(100% + var(--tile, 2000px) * 2); background-repeat: repeat-x; background-size: auto 100%; will-change: transform; }
.stars { width: 100%; background-image: url(../scene/1-stars.svg); opacity: 0.14; }
.l-clouds { background-image: url(../scene/2-clouds.svg); }
.l-sierra { background-image: url(../scene/3-sierra.svg); }
.l-ridge { background-image: url(../scene/4-ridge.svg); }
.l-hills { background-image: url(../scene/5-hills.svg); }
.l-grove { background-image: url(../scene/6-grove.svg); }
.l-pasture { background-image: url(../scene/7-pasture.svg); }
.l-foreground { background-image: url(../scene/8-foreground.svg); z-index: 1; }
.sun { position: absolute; left: 61.5%; top: 54%; width: calc(var(--h, 700px) * 0.38); aspect-ratio: 1; transform: translate(-50%, -50%); border-radius: 50%; background: radial-gradient(circle at 50% 58%, #fffaf2 0%, #fbede0 30%, #e9a779 100%); box-shadow: 0 0 60px #e9a779; }
.riders { position: absolute; z-index: 1; bottom: 0; left: 50%; height: 100%; width: auto; aspect-ratio: 390 / 300; max-width: none; transform: translateX(-58%); }
.hero-text { position: relative; z-index: 2; padding-top: clamp(40px, 9vh, 110px); padding-bottom: 40px; width: 100%; }
.hero-text h1 { font-size: clamp(48px, 8vw, 96px); max-width: 11ch; margin-bottom: 0.2em; text-shadow: 0 2px 18px rgb(70 25 10 / 0.35); }
.lede { font-size: clamp(18px, 2vw, 21px); max-width: 32em; text-shadow: 0 1px 10px rgb(70 25 10 / 0.45); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; }

/* ---- sections ---- */
.section { padding: clamp(64px, 10vw, 112px) 0; }
.section.alt { background: var(--paper-raised); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.steps { list-style: none; padding: 0; margin: 40px 0 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; }
.steps .num { display: inline-flex; width: 44px; height: 44px; border-radius: 50%; align-items: center; justify-content: center; background: var(--accent); color: #fff; font: 700 22px/1 var(--display); margin-bottom: 14px; }
.steps p, .features p { color: var(--ink-soft); }
.features { margin-top: 40px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.features article { background: var(--paper); border: 1px solid var(--line); border-radius: 18px; padding: 28px; }

/* ---- library ---- */
.shelf { list-style: none; padding: 0; margin: 40px 0 0; }
.book { display: flex; gap: 32px; align-items: flex-start; background: var(--paper-raised); border: 1px solid var(--line); border-radius: 20px; padding: 28px; }
.book h3 { font-size: 34px; margin-bottom: 4px; }
.badge { display: inline-block; font-size: 13px; font-weight: 600; color: var(--accent); background: #f6e0d3; border-radius: 999px; padding: 4px 12px; }
.cover { flex-shrink: 0; width: 140px; aspect-ratio: 2 / 3; border-radius: 4px 10px 10px 4px; background: var(--cover-bg, #a23e22); color: var(--cover-ink, #fbf1e2); box-shadow: inset 5px 0 0 rgb(0 0 0 / 0.18), 0 8px 20px rgb(43 33 24 / 0.25); display: flex; flex-direction: column; align-items: center; text-align: center; padding: 18px 10px; gap: 8px; }
.rule { width: 60%; height: 2px; background: var(--cover-accent, #f2c48d); }
.rule.bottom { margin-top: auto; }
.cover-title { font: 700 22px/1.05 var(--display); }
.cover-author { font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--cover-accent, #f2c48d); }
.soon-title { margin-top: 48px; font-size: 28px; }
.soon { list-style: none; padding: 0; margin: 16px 0 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 28px 20px; }
.soon .cover { width: 100%; opacity: 0.85; filter: saturate(0.85); }
.soon .cover-title { font-size: 19px; }
.soon-book { font-weight: 600; margin: 10px 0 0; line-height: 1.3; font-size: 15px; }

/* ---- waitlist ---- */
.waitlist { background: var(--accent); color: var(--cream); }
.waitlist h2 { color: #fff; }
.waitlist a { color: #fff; }
.waitlist-form { display: flex; flex-direction: column; gap: 16px; margin-top: 24px; }
.field { display: flex; flex-direction: column; gap: 6px; font-weight: 600; font-size: 15px; }
.field input { min-height: 52px; border: 2px solid transparent; border-radius: 12px; padding: 0 16px; font: 400 17px var(--body); color: var(--ink); background: var(--paper-raised); }
.field input:focus { border-color: var(--ink); outline: none; }
.check { display: flex; gap: 12px; align-items: flex-start; font-size: 15px; line-height: 1.5; }
.check input { width: 22px; height: 22px; margin-top: 2px; accent-color: var(--ink); flex-shrink: 0; }
.waitlist .button { align-self: flex-start; background: var(--ink); border-color: var(--ink); }
.waitlist .button:hover { background: #000; border-color: #000; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.notice, .form-status { font-weight: 600; margin: 0; }
.notice { padding: 14px 16px; border-radius: 12px; background: rgb(255 255 255 / 0.14); }
.form-status:empty { display: none; }
.form-status.error, .notice.error { color: #fff3c4; }

/* ---- FAQ ---- */
details { border-bottom: 1px solid var(--line); padding: 18px 0; }
summary { cursor: pointer; font: 700 24px/1.25 var(--display); list-style: none; display: flex; justify-content: space-between; gap: 16px; }
summary::-webkit-details-marker { display: none; }
summary::after { content: '+'; color: var(--accent); font-family: var(--body); font-weight: 400; }
details[open] summary::after { content: '−'; }
details p { margin: 12px 0 0; color: var(--ink-soft); }

/* ---- prose (privacy) ---- */
.prose h2 { font-size: 30px; margin-top: 1.6em; }
.prose li { margin-bottom: 0.6em; }

/* ---- footer ---- */
.site-footer { background: var(--ink); color: #e9dcc6; padding: 56px 0 48px; }
.footer-row { display: grid; gap: 12px; justify-items: start; }
.site-footer nav { display: flex; gap: 20px; }
.site-footer a { color: #f6d9c2; }
.site-footer .small { color: #b9a990; }

.site-footer .counter { font-variant-numeric: tabular-nums; }

/* ---- legal pages ---- */
.prose .aka { font-weight: 400; font-size: 0.75em; color: var(--muted); }
.prose address { font-style: normal; line-height: 1.6; }

/* ---- small screens ---- */
@media (max-width: 820px) {
  .steps, .features { grid-template-columns: 1fr; }
  .book { flex-direction: column; }
}
@media (max-width: 640px) {
  .site-header nav a:not(.button) { display: none; }
  .logo img { width: 140px; }
  /* Phones show little sky: put the text on its own band of evening sky, the scene below it. */
  .hero { flex-direction: column; min-height: 0; }
  .hero-text { order: 1; padding-top: 40px; padding-bottom: 24px; background: linear-gradient(to bottom, #6f3219, #9c4e28); }
  .scene { position: relative; order: 2; height: 340px; }
  .scene::after { background: none; }
  .riders { transform: translateX(-52%); }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
