/* Levain — one stylesheet for all four pages.
   Colours are lifted from the app's own palette (Sources/SourdoughTimer/Design/Theme.swift)
   so the site and the app read as the same product. No framework, no build step, no
   external requests: editing this file is the whole design workflow. */

:root {
  --ink: #3D2B1C;
  --ink-soft: #4A3524;
  --secondary: #6B5340;
  --muted: #8A7563;
  --faint: #A08F7E;
  --hairline: #DCCEC0;
  --crust: #C8891F;
  --crust-deep: #A66E14;
  --crumb: #F2E3CE;
  --card: rgba(255, 255, 255, 0.62);
  --bg-top: #FBEEE2;
  --bg-mid: #F7F1EA;
  --bg-bot: #F4F2EF;
  --shadow: 0 1px 2px rgba(61, 43, 28, .05), 0 8px 24px rgba(61, 43, 28, .06);
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink: #F6EADC;
    --ink-soft: #EDDFCF;
    --secondary: #DCC9B4;
    --muted: #BCA895;
    --faint: #9C8B7A;
    --hairline: #504234;
    --crust: #E0A648;
    --crust-deep: #F0BE86;
    --crumb: #2A2018;
    --card: rgba(255, 255, 255, 0.045);
    --bg-top: #2A2018;
    --bg-mid: #211A14;
    --bg-bot: #1A1512;
    --shadow: 0 1px 2px rgba(0, 0, 0, .2), 0 8px 24px rgba(0, 0, 0, .25);
  }
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  /* SF Pro Rounded first: the app is drawn entirely in .rounded, and on Apple devices
     this is the same typeface. Everything after it is a graceful fallback. */
  font-family: ui-rounded, "SF Pro Rounded", -apple-system, BlinkMacSystemFont,
               "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink-soft);
  background: linear-gradient(180deg, var(--bg-top) 0%, var(--bg-mid) 46%, var(--bg-bot) 100%);
  background-attachment: fixed;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

.wrap {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 16px;
}

/* --- type ------------------------------------------------------------------ */

h1, h2, h3 { color: var(--ink); line-height: 1.2; letter-spacing: -0.02em; margin: 0 0 .5em; }
h1 { font-size: 2.6rem; font-weight: 800; }
h2 { font-size: 1.5rem; font-weight: 700; margin-top: 2.2em; }
h3 { font-size: 1.1rem; font-weight: 700; margin-top: 1.8em; }
p { margin: 0 0 1.1em; }
ul { padding-left: 1.3em; }
li { margin-bottom: .45em; }
strong { color: var(--ink); font-weight: 650; }

a { color: var(--crust-deep); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--crust); }

.lede { font-size: 1.2rem; color: var(--secondary); }
.small { font-size: .9rem; color: var(--muted); }

/* --- hero ------------------------------------------------------------------ */

.hero { text-align: center; padding: 72px 0 8px; }

.hero img.appicon {
  width: 112px; height: 112px;
  border-radius: 25px;
  box-shadow: var(--shadow);
  display: block; margin: 0 auto 22px;
}

.hero h1 { font-size: 3.1rem; margin-bottom: .18em; }
.hero .tagline { font-size: 1.35rem; color: var(--secondary); font-weight: 600; margin-bottom: 1.1em; }
.hero p { max-width: 560px; margin-left: auto; margin-right: auto; color: var(--muted); }

.cta {
  display: inline-flex; align-items: center; gap: .5em;
  background: var(--ink); color: var(--bg-top);
  padding: 14px 28px; border-radius: 999px;
  font-weight: 700; font-size: 1.05rem; text-decoration: none;
  box-shadow: var(--shadow);
  margin-top: .6em;
  transition: transform .15s ease;
}
.cta:hover { color: var(--bg-top); transform: translateY(-1px); }
.cta-note { display: block; margin-top: .9em; font-size: .88rem; color: var(--faint); }

/* --- screenshot strip ------------------------------------------------------ */

.shots {
  display: flex; gap: 18px;
  overflow-x: auto;
  padding: 32px 16px 24px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}
.shots::-webkit-scrollbar { height: 0; }
.shot-card {
  flex: 0 0 auto;
  width: 232px;
  scroll-snap-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.shot-card img {
  width: 232px; height: 502px;
  border-radius: 24px;
  box-shadow: var(--shadow);
  object-fit: cover;
  display: block;
}
.shot-caption {
  margin-top: 10px;
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--muted);
  text-align: center;
}

/* --- cards & sections ------------------------------------------------------ */

section { padding: 12px 0; }
.section-lead { font-size: 1.05rem; color: var(--secondary); margin-bottom: 1.6em; }

.problem-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  margin-top: 1.2em;
}

.problem-card {
  background: var(--card);
  border: 1px solid var(--hairline);
  border-radius: 20px;
  padding: 22px 24px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
}

.badge {
  display: inline-block;
  align-self: flex-start;
  font-size: 0.72rem;
  font-weight: 750;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  padding: 3px 8px;
  border-radius: 6px;
  margin-bottom: 0.5em;
}

.problem-badge {
  background: rgba(180, 70, 40, 0.1);
  color: #B44628;
}

.solution-badge {
  background: rgba(200, 137, 31, 0.12);
  color: var(--crust-deep);
  margin-top: 0.8em;
}

.card-problem {
  margin: 0 0 0.8em;
  color: var(--muted);
  font-size: 0.94rem;
  line-height: 1.5;
}

.problem-card h3 {
  margin: 0 0 0.35em;
  font-size: 1.18rem;
  color: var(--ink);
}

.card-solution {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.94rem;
  line-height: 1.5;
}

details {
  border-bottom: 1px solid var(--hairline);
  padding: 14px 0;
}
details summary {
  cursor: pointer; font-weight: 650; color: var(--ink);
  list-style: none; padding-right: 24px; position: relative;
}
details summary::-webkit-details-marker { display: none; }
details summary::after {
  content: "+"; position: absolute; right: 2px; top: -2px;
  font-size: 1.3rem; color: var(--faint); font-weight: 400;
}
details[open] summary::after { content: "\2013"; }
details p { margin: .8em 0 .2em; color: var(--muted); }

/* --- legal pages ----------------------------------------------------------- */

.legal { padding: 56px 0 24px; }
.legal h1 { font-size: 2.1rem; }
.legal .updated { color: var(--faint); font-size: .9rem; margin-bottom: 2.4em; }
.legal h2 { font-size: 1.22rem; margin-top: 2.4em; }
.legal p, .legal li { color: var(--ink-soft); }

.callout {
  background: var(--crumb);
  border-radius: 16px;
  padding: 18px 22px;
  margin: 1.6em 0;
}
.callout p:last-child { margin-bottom: 0; }

.backlink { display: inline-block; margin-bottom: 2em; font-size: .92rem; font-weight: 600; }

/* --- footer ---------------------------------------------------------------- */

footer {
  border-top: 1px solid var(--hairline);
  margin-top: 72px;
  padding: 34px 0 60px;
  text-align: center;
  font-size: .9rem;
  color: var(--faint);
}
footer nav { margin-bottom: 1em; }
footer nav a { margin: 0 .55em; font-weight: 600; }
footer p { margin: .35em 0; }

/* --- small screens --------------------------------------------------------- */

@media (max-width: 560px) {
  body { font-size: 16px; }
  .hero { padding-top: 48px; }
  .hero h1 { font-size: 2.4rem; }
  .hero .tagline { font-size: 1.15rem; }
  h1 { font-size: 2rem; }
  .shot-card { width: 190px; }
  .shot-card img { width: 190px; height: 411px; border-radius: 20px; }
  .problem-grid { grid-template-columns: 1fr; }
}
