/* Marketing site: one stylesheet, system fonts, no external anything.
   Accent colours follow the app (Presentation.swift): the deep "ink" of each routine
   for text and buttons in light mode, the brighter system colour in dark mode.
   Surfaces are the app's warm neutrals (docs/ceo-review-2026-09-26/warmth-and-type.md, option B):
   "Porch paper" in light, "Hearth" in dark, each with an Increase Contrast variant.
   Contrast ratios in the comments are WCAG 2.x, computed (docs/ceo-review-2026-09-26/site-warmth.md). */

:root {
  color-scheme: light dark;

  --bg: #F3EFE8;              /* Porch paper: page */
  --surface: #FFFDFA;         /* Porch paper: card (house.js reads it for the scene) */
  --text: #1C1C1E;            /* 14.9:1 on --bg */
  --text-2: #55555C;          /* 6.5:1 on --bg, 7.3:1 on --surface */
  --line: rgba(60, 60, 67, 0.16);
  --focus: #3730A3;

  --indigo: #3730A3;          /* Fasting ink */
  --orange: #943A00;          /* Morning Light ink */
  --green: #14632A;           /* Post-Meal Walk ink */
  --purple: #6A2C8E;          /* Dim Evening ink */
  --brown: #5C3A1E;           /* Caffeine ink */

  --indigo-soft: rgba(88, 86, 214, 0.12);
  --orange-soft: rgba(255, 149, 0, 0.14);
  --green-soft: rgba(52, 199, 89, 0.14);
  --purple-soft: rgba(175, 82, 222, 0.13);
  --brown-soft: rgba(162, 132, 94, 0.18);



  /* The crew's voice: SF Pro Rounded where the system has it (Safari: ui-rounded), else the body face. */
  --font-voice: ui-rounded, "SF Pro Rounded", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --radius: 22px;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 10px 30px rgba(0, 0, 0, 0.06);
  --measure: 38rem;
  --page: 68rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0E0D0C;            /* Hearth: page */
    --surface: #211E1C;       /* Hearth: card */
    --text: #F2F2F5;          /* 17.4:1 on --bg, 14.8:1 on --surface */
    --text-2: #A9A9B2;        /* 8.3:1 on --bg, 7.1:1 on --surface */
    --line: rgba(235, 235, 245, 0.14);
    --focus: #9D9BFF;

    --indigo: #9D9BFF;
    --orange: #FF9F0A;
    --green: #30D158;
    --purple: #D08AF5;
    --brown: #C9A67C;

    --indigo-soft: rgba(125, 122, 255, 0.16);
    --orange-soft: rgba(255, 159, 10, 0.14);
    --green-soft: rgba(48, 209, 88, 0.13);
    --purple-soft: rgba(191, 90, 242, 0.16);
    --brown-soft: rgba(172, 142, 104, 0.18);



    --shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
  }
}

/* Increase Contrast: a slightly deeper page, a pure card, stronger secondary text and lines. */
@media (prefers-contrast: more) {
  :root {
    --bg: #EDE8E0;
    --surface: #FFFFFF;
    --text: #000000;
    --text-2: #46464C;        /* 7.7:1 on --bg */
    --line: rgba(60, 60, 67, 0.4);
  }
}

@media (prefers-contrast: more) and (prefers-color-scheme: dark) {
  :root {
    --bg: #000000;
    --surface: #272422;
    --text: #FFFFFF;
    --text-2: #C4C4CC;        /* 8.9:1 on --surface */
    --line: rgba(235, 235, 245, 0.38);
  }
}

/* ---------- Base ---------- */

*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* The voice: headings, the pitch line, the hero subline and the chip-like labels. Never body text. */
h1, h2, h3, .brand, .eyebrow, .lede, .routine-tag, .price {
  font-family: var(--font-voice);
}

h1, h2, h3 {
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0 0 0.5em;
  text-wrap: balance;
}

h1 { font-size: clamp(2.1rem, 7vw, 3.6rem); font-weight: 750; }
h2 { font-size: clamp(1.6rem, 4.5vw, 2.3rem); font-weight: 700; }
h3 { font-size: 1.25rem; font-weight: 650; }

p { margin: 0 0 1em; text-wrap: pretty; }

a { color: var(--indigo); text-underline-offset: 0.15em; }
a:hover { text-decoration-thickness: 2px; }

img { max-width: 100%; height: auto; display: block; }

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  border-radius: 6px;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -100px;
  z-index: 10;
  padding: 0.6rem 1rem;
  background: var(--surface);
  color: var(--text);
  border-radius: 10px;
  box-shadow: var(--shadow);
}
.skip-link:focus { top: 12px; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0; border: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.wrap {
  width: 100%;
  max-width: var(--page);
  margin: 0 auto;
  padding: 0 16px;
}

@media (min-width: 640px) { .wrap { padding: 0 32px; } }

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

.site-header { padding: 18px 0; }

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.01em;
}

.brand img { width: 28px; height: 28px; border-radius: 7px; }

.site-nav ul {
  display: flex;
  gap: 1.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-nav a {
  color: var(--text-2);
  text-decoration: none;
  font-size: 0.95rem;
  padding: 0.5rem 0;         /* 44px-ish hit target with line height */
  display: inline-block;
}
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--text); }

.site-footer {
  margin-top: 5rem;
  padding: 2.5rem 0 3rem;
  border-top: 1px solid var(--line);
  color: var(--text-2);
  font-size: 0.95rem;
}

.site-footer ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.5rem;
  list-style: none;
  margin: 0 0 1rem;
  padding: 0;
}

.site-footer a { color: var(--text-2); display: inline-block; padding: 0.35rem 0; }
.site-footer a:hover { color: var(--text); }
.site-footer p { margin: 0.25rem 0; }

/* ---------- Hero ---------- */

.hero { padding: 2.5rem 0 3rem; }

.hero .wrap {
  display: grid;
  gap: 2.5rem;
  align-items: center;
}

@media (min-width: 900px) {
  .hero { padding: 4.5rem 0 5rem; }
  .hero .wrap { gap: 3rem; }
}

.hero-text { max-width: 46rem; }

.eyebrow {
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-2);
  margin-bottom: 0.75rem;
}

.lede {
  font-size: clamp(1.1rem, 2.6vw, 1.3rem);
  color: var(--text-2);
  max-width: var(--measure);
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1rem;
  margin-top: 1.75rem;
}

/* Placeholder for Apple's official "Download on the App Store" badge.
   Per Apple's marketing guidelines the real badge must be the unaltered artwork from
   developer.apple.com/app-store/marketing/guidelines/ — this is plain text, not an imitation. */
.store-badge {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 0.7rem 1.4rem;
  border-radius: 12px;
  background: #000000;
  color: #FFFFFF;
  border: 1px solid #A6A6A6;
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
}
.store-badge:hover { text-decoration: none; background: #1C1C1E; }

@media (prefers-color-scheme: dark) {
  .store-badge { background: #FFFFFF; color: #000000; border-color: #FFFFFF; }
  .store-badge:hover { background: #E5E5EA; }
}

.soon { color: var(--text-2); font-size: 0.95rem; }

.house-card {
  margin: 0;
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1rem 1rem 0.9rem;
}

/* The drawing fills the card by width; house.js fits the whole house into whatever box this is. */
.house-card canvas {
  display: block;
  width: 100%;
  aspect-ratio: 1130 / 360;
  border-radius: 14px;
}

.house-card figcaption {
  margin-top: 0.75rem;
  font-size: 0.9rem;
  color: var(--text-2);
}

#house-room { color: var(--text); font-weight: 600; }

/* ---------- Sections ---------- */

.section { padding: 3.5rem 0; }
@media (min-width: 900px) { .section { padding: 5rem 0; } }

.section-head { max-width: var(--measure); margin-bottom: 2.25rem; }
.section-head p { color: var(--text-2); font-size: 1.1rem; }

.pillars {
  display: grid;
  gap: 1rem;
  list-style: none;
  padding: 0;
  margin: 0;
}
@media (min-width: 760px) { .pillars { grid-template-columns: repeat(3, 1fr); gap: 1.25rem; } }

.pillar {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
}
.pillar p { color: var(--text-2); margin: 0; }

.glance {
  display: grid;
  gap: 1.75rem;
  align-items: start;
}
@media (min-width: 760px) {
  .glance { grid-template-columns: 1fr 2fr; }
  .glance .island { grid-column: 1 / -1; }
}

.glance figure { margin: 0; }
.glance img { border-radius: 18px; box-shadow: var(--shadow); }
.glance figcaption { margin-top: 0.6rem; font-size: 0.9rem; color: var(--text-2); }
.glance .watch img { max-width: 220px; border-radius: 36px; }
.widget-pair { display: flex; gap: 1rem; flex-wrap: wrap; }
.widget-pair img { width: min(170px, calc(50% - 0.5rem)); border-radius: 24px; }

/* Routines: one card each, the room as the tag */
.routines {
  display: grid;
  gap: 1rem;
  list-style: none;
  padding: 0;
  margin: 0 0 3rem;
}
@media (min-width: 760px) { .routines { grid-template-columns: repeat(2, 1fr); gap: 1.25rem; } }
@media (min-width: 1040px) { .routines { grid-template-columns: repeat(3, 1fr); } }

.routine-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
}
.routine-card p { color: var(--text-2); margin: 0; }

.routine-tag {
  display: inline-flex;
  align-items: center;
  padding: 0.3rem 0.8rem;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 0.9rem;
}

/* Screenshot pairs: two phones side by side from 640 px, stacked below */
.shots {
  display: grid;
  gap: 2rem;
  justify-items: center;
  align-items: start;
}
@media (min-width: 640px) { .shots { grid-template-columns: 1fr 1fr; } }
.shots figure { margin: 0; max-width: 300px; }
.shots img {
  width: 100%;
  border-radius: 28px;
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
}
.shots figcaption { margin-top: 0.75rem; font-size: 0.9rem; color: var(--text-2); text-align: center; }

.light   .routine-tag { background: var(--orange-soft); color: var(--orange); }
.fast    .routine-tag { background: var(--indigo-soft); color: var(--indigo); }
.walk    .routine-tag { background: var(--green-soft);  color: var(--green); }
.evening .routine-tag { background: var(--purple-soft); color: var(--purple); }
.coffee  .routine-tag { background: var(--brown-soft);  color: var(--brown); }

.note { font-size: 0.9rem; color: var(--text-2); }

/* "Email us": a button that reads as a link; assets/contact.js assembles the address on click. */
.email-link {
  font: inherit;
  color: var(--indigo);
  background: none;
  border: 0;
  padding: 0.35rem 0;
  margin: 0;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 0.15em;
}
.email-link:hover { text-decoration-thickness: 2px; }
.site-footer .email-link { color: var(--text-2); }
.site-footer .email-link:hover { color: var(--text); }
.site-footer .safety { max-width: 46rem; margin-bottom: 0.75rem; }

/* Private / Pay once */
.split {
  display: grid;
  gap: 1.25rem;
}
@media (min-width: 760px) { .split { grid-template-columns: 1fr 1fr; } }

.panel {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 1.75rem;
  box-shadow: var(--shadow);
}
.panel h2 { font-size: clamp(1.4rem, 3.5vw, 1.8rem); }

.checks { list-style: none; padding: 0; margin: 0 0 1rem; }
.checks li {
  position: relative;
  padding-left: 1.75rem;
  margin: 0.55rem 0;
}
.checks li::before {
  content: "";
  position: absolute;
  left: 0.2rem;
  top: 0.45em;
  width: 0.45rem;
  height: 0.8rem;
  border: solid var(--green);
  border-width: 0 2.5px 2.5px 0;
  transform: rotate(45deg);
}

.price {
  font-size: 2.4rem;
  font-weight: 750;
  letter-spacing: -0.02em;
  color: var(--indigo);
  margin: 0.25rem 0 0.25rem;
  font-variant-numeric: tabular-nums;
}

/* FAQ: native details/summary, no script */
.faq { max-width: 46rem; }
.faq details {
  border-top: 1px solid var(--line);
  padding: 0.25rem 0;
}
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 1.1rem;
  padding: 0.9rem 2rem 0.9rem 0;
  position: relative;
  list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  position: absolute;
  right: 0.25rem;
  top: 0.75rem;
  font-size: 1.4rem;
  font-weight: 400;
  color: var(--text-2);
}
.faq details[open] summary::after { content: "\2212"; }
.faq details p { color: var(--text-2); margin: 0 0 1rem; }

/* ---------- Document pages (privacy, support, impressum) ---------- */

.doc { max-width: 44rem; padding-top: 1.5rem; }
.doc h1 { font-size: clamp(2rem, 6vw, 2.8rem); }
.doc h2 { font-size: 1.45rem; margin-top: 2.5rem; }
.doc h3 { font-size: 1.1rem; margin-top: 1.5rem; }
.doc ul { padding-left: 1.25rem; }
.doc li { margin: 0.3rem 0; }
.doc .meta { color: var(--text-2); }
.doc address { font-style: normal; }

.doc table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
  margin: 1rem 0;
}
.doc th, .doc td {
  text-align: left;
  padding: 0.6rem 0.5rem;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

.lang-switch { margin: 0 0 1.5rem; font-size: 0.95rem; }

.phrases { list-style: none; padding: 0 !important; }
.phrases li {
  background: var(--surface);
  border-radius: 14px;
  padding: 0.7rem 1rem;
  margin: 0.5rem 0;
  box-shadow: var(--shadow);
}
.phrases .what { display: block; font-size: 0.85rem; color: var(--text-2); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}
