/* Daheim landing page. Colors from the app's design system (AGENTS.md table), no shadows, mobile first. */
@font-face {
  font-family: "Fraunces";
  src: url("fonts/fraunces.woff2") format("woff2");
  font-weight: 500 800;
  font-style: normal;
  font-display: swap;
}
:root {
  color-scheme: light dark;
  --canvas: #F8F1E6; --surface: #FFFBF5; --text: #2C2E2A; --muted: #5D6158;
  --primary: #4F5E3C; --secondary: #65683A; --terracotta: #A4532F; --sand: #EAD5B5; --beige: #F1E4D0;
  --on-primary: #FFFBF5;
  --display: "Fraunces", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --body: ui-rounded, "SF Pro Rounded", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --canvas: #1B1C19; --surface: #262823; --text: #F3EDE3; --muted: #BDB6AA;
    --primary: #A8BB8B; --secondary: #C2BE86; --terracotta: #E2946D; --sand: #4A3E2F; --beige: #3A342B;
    --on-primary: #1B1C19;
  }
}
:root[data-theme="light"] { color-scheme: light; }
:root[data-theme="dark"] {
  color-scheme: dark;
  --canvas: #1B1C19; --surface: #262823; --text: #F3EDE3; --muted: #BDB6AA;
  --primary: #A8BB8B; --secondary: #C2BE86; --terracotta: #E2946D; --sand: #4A3E2F; --beige: #3A342B;
  --on-primary: #1B1C19;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; overflow-x: hidden; overflow-x: clip; }
body {
  margin: 0; background: var(--canvas); color: var(--text);
  font: 17px/1.55 var(--body);
  overflow-x: hidden; overflow-x: clip;
}
img { display: block; max-width: 100%; height: auto; }
a { color: var(--primary); text-underline-offset: 3px; }
a:focus-visible, button:focus-visible { outline: 3px solid var(--primary); outline-offset: 3px; border-radius: 8px; }
.skip { position: absolute; left: 16px; top: -100px; background: var(--surface); color: var(--text); padding: 12px 16px; border-radius: 12px; z-index: 10; }
.skip:focus { top: 16px; }
.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 20px; }

/* Header */
header.top { display: flex; gap: 12px; align-items: center; justify-content: space-between; padding: 12px 0; }
.brand { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; color: var(--text); font: 700 1.25rem/1 var(--display); text-decoration: none; }
.brand img { width: 32px; height: 32px; border-radius: 8px; }
.seg { display: inline-flex; background: var(--beige); border-radius: 14px; padding: 3px; }
.seg a, .seg button {
  min-height: 44px; min-width: 44px; padding: 0 12px; display: inline-flex; align-items: center; justify-content: center;
  border: 0; background: transparent; color: var(--text); font: inherit; font-size: 15px; font-weight: 600;
  border-radius: 11px; cursor: pointer; text-decoration: none;
}
.seg [aria-pressed="true"], .seg [aria-current="true"] { background: var(--primary); color: var(--on-primary); }
.theme[hidden] { display: none; }

/* Type */
h1, h2, h3 { font-family: var(--display); font-weight: 700; letter-spacing: -0.015em; }
h2 { font-size: clamp(2rem, 7vw, 3.1rem); line-height: 1.05; margin: 0 0 16px; text-wrap: balance; }
h3 { font-size: 1.3rem; line-height: 1.2; margin: 0 0 4px; }
p { margin: 0 0 16px; }
.eyebrow { font: 700 0.85rem/1.2 var(--body); letter-spacing: 0.08em; text-transform: uppercase; color: var(--secondary); margin: 0 0 12px; }
.badge {
  display: inline-flex; align-items: center; gap: 8px; background: var(--sand); color: var(--text);
  font-weight: 700; padding: 7px 16px; border-radius: 999px; font-size: 15px;
}
.badge::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--terracotta); }

/* Hero */
.hero { position: relative; display: grid; gap: 20px; padding: 12px 0 0; }
.hero-text { position: relative; z-index: 1; }
.hero h1 { font-size: clamp(3.4rem, 16vw, 6.5rem); line-height: 0.95; margin: 16px 0 8px; font-weight: 800; letter-spacing: -0.03em; }
.claim { font: 600 clamp(1.35rem, 5.4vw, 2rem)/1.2 var(--display); margin: 0 0 12px; }
.lead { color: var(--muted); max-width: 30em; margin: 0; }
.hero-shot { position: relative; margin: 0 auto; width: min(78vw, 330px); }
.hero-shot::before {
  content: ""; position: absolute; inset: 10% -22% -6% -22%; background: var(--sand);
  border-radius: 46% 54% 42% 58% / 52% 44% 56% 48%; z-index: 0;
}
.hero-shot .screen { position: relative; z-index: 1; }
.hero-crop { max-height: 58vh; overflow: hidden; border-radius: 34px 34px 0 0;
  -webkit-mask-image: linear-gradient(#000 82%, transparent); mask-image: linear-gradient(#000 82%, transparent); }

/* Screenshots: real app screens, rounded like the display, no device frame */
.screen img { width: 100%; border-radius: 34px; border: 1px solid var(--sand); background: var(--surface); }
.screen.tablet img { border-radius: 22px; }
.hero-crop img { border-radius: 34px 34px 0 0; }

/* Feature sections */
.feature { display: grid; gap: 28px; align-items: center; padding: 72px 0 0; }
.feature .copy { max-width: 32em; }
.feature .copy > p { color: var(--muted); font-size: 1.08rem; }
.facts { list-style: none; margin: 20px 0 0; padding: 0; display: grid; gap: 10px; }
.facts li { position: relative; padding-left: 28px; }
.facts li::before {
  content: ""; position: absolute; left: 4px; top: 0.45em; width: 12px; height: 12px;
  border-radius: 50% 50% 50% 20%; background: var(--primary);
}
.feature figure { margin: 0; position: relative; justify-self: center; width: min(72vw, 300px); }
.feature figure.wide { width: min(86vw, 460px); }
.feature figure::before {
  content: ""; position: absolute; inset: 12% -14% 8% -14%; background: var(--beige);
  border-radius: 58% 42% 50% 50% / 46% 56% 44% 54%; z-index: 0;
}
.feature:nth-of-type(even) figure::before { background: var(--sand); border-radius: 44% 56% 60% 40% / 52% 40% 60% 48%; }
.feature figure .screen { position: relative; z-index: 1; }
figcaption { position: relative; z-index: 1; text-align: center; color: var(--muted); font-size: 0.9rem; margin-top: 12px; }

/* More, as a calm list rather than a wall of tiles */
.more { padding: 80px 0 0; }
.more-list { list-style: none; margin: 24px 0 0; padding: 0; display: grid; gap: 0 40px; }
.more-list li { padding: 18px 0; border-top: 2px solid var(--sand); }
.more-list p { margin: 0; color: var(--muted); }

/* Principles band */
.principles { margin: 80px 0 0; background: var(--primary); color: var(--on-primary); border-radius: 40px 40px 40px 12px; padding: 36px 24px; }
.principles h2 { color: var(--on-primary); }
.principles ul { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 20px; }
.principles strong { display: block; font: 700 1.3rem/1.2 var(--display); margin-bottom: 2px; }
.principles span { opacity: 0.9; }

/* Closing */
.closing { text-align: center; padding: 80px 0 0; }
.closing img { margin: 0 auto 20px; width: 96px; height: 96px; border-radius: 22px; }
.closing p { color: var(--muted); max-width: 28em; margin: 16px auto 0; }

/* Legal pages */
main.doc { padding: 24px 0 8px; max-width: 720px; }
main.doc h1 { font-size: clamp(2.2rem, 9vw, 3rem); line-height: 1.05; margin: 16px 0 20px; }
main.doc h2 { font-size: 1.35rem; margin: 32px 0 8px; }

/* Footer */
footer { margin-top: 80px; padding: 24px 0 40px; border-top: 2px solid var(--sand); color: var(--muted); font-size: 0.95rem; display: grid; gap: 12px; }
footer p { margin: 0; }
footer nav { display: flex; flex-wrap: wrap; gap: 0 16px; }
footer nav a { display: inline-flex; align-items: center; min-height: 44px; }
.footer-row { display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: center; justify-content: space-between; }

/* Wider screens */
@media (min-width: 760px) {
  .wrap { padding: 0 32px; }
  .hero { grid-template-columns: 1.1fr 0.9fr; align-items: center; gap: 40px; padding: 32px 0 24px; }
  .hero-shot { width: 320px; }
  .hero-crop { max-height: none; -webkit-mask-image: none; mask-image: none; border-radius: 34px; }
  .hero-crop img { border-radius: 34px; }
  .feature { grid-template-columns: 1fr 1fr; gap: 56px; padding-top: 112px; }
  .feature:nth-of-type(even) figure { order: -1; }
  .feature figure { width: 290px; }
  .feature figure.wide { width: 420px; }
  .more-list { grid-template-columns: 1fr 1fr; }
  .principles { padding: 56px; }
  .principles ul { grid-template-columns: 1fr 1fr; gap: 28px 48px; }
}
@media (min-width: 1040px) {
  .principles ul { grid-template-columns: repeat(4, 1fr); }
  .more-list { grid-template-columns: repeat(3, 1fr); }
}
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
