/* Betterwood website. Colours and type follow the app (HabitGarden/Garden/Palette.swift, DM Mono). */

@font-face { font-family: "DM Mono"; src: url("fonts/DMMono-Regular.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "DM Mono"; src: url("fonts/DMMono-Medium.ttf") format("truetype"); font-weight: 500; font-display: swap; }

:root {
  --surface: #fbfdf9; --fg: #1b2a21; --muted: #5a6b60; --line: #d5dfd6;
  --accent: #2f7343; --accent-ink: #f4faf4;
  --sky-top: #bfdce8; --sky-bot: #e9f2df;
  --grass: #8dbb6b; --soil: #8a6142;
  --mono: "DM Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --surface: #151f19; --fg: #e2ece4; --muted: #94a89b; --line: #29372e;
    --accent: #79c48b; --accent-ink: #0e1511;
    --sky-top: #0c1824; --sky-bot: #1b2a2b;
    --grass: #3f6b3a; --soil: #5a3f2b;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; color: var(--fg); background: var(--surface);
  font: 17px/1.6 var(--sans);
}
a { color: var(--accent); }
img { max-width: 100%; display: block; }

.wrap { max-width: 1040px; margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 720px; }

/* Header and footer */
.site-header { padding: 18px 0; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--fg); text-decoration: none; font-family: var(--mono); font-weight: 500; font-size: 18px; letter-spacing: -0.2px; }
.brand img { width: 34px; height: 34px; border-radius: 8px; }
.nav { display: flex; gap: 6px; }
.nav a {
  color: var(--fg); text-decoration: none; font-size: 15px;
  padding: 7px 14px; border-radius: 999px; border: 1px solid transparent;
}
.nav a:hover { border-color: var(--line); }
.nav a[aria-current="page"] { background: var(--surface); border-color: var(--line); }

.site-footer { border-top: 1px solid var(--line); margin-top: 72px; padding: 28px 0 40px; color: var(--muted); font-size: 14px; }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 8px 20px; align-items: center; justify-content: space-between; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.site-footer a { color: var(--muted); }

/* Sky band: the top of every page, like the app's sky */
.sky { background: linear-gradient(180deg, var(--sky-top), var(--sky-bot)); }

.label { font-family: var(--mono); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin: 0 0 10px; }

/* Home */
.hero { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 48px; align-items: center; padding-top: 40px; }
.hero h1 { font-family: var(--mono); font-weight: 500; font-size: clamp(38px, 6vw, 60px); line-height: 1.05; letter-spacing: -1.5px; margin: 0 0 18px; }
.hero p.lede { font-size: 20px; color: var(--muted); margin: 0 0 28px; max-width: 30ch; }
.pill {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--mono); font-size: 15px; text-decoration: none;
  padding: 12px 20px; border-radius: 999px;
  background: var(--accent); color: var(--accent-ink);
}
.pill.ghost { background: var(--surface); color: var(--fg); border: 1px solid var(--line); }
.hero .actions { display: flex; flex-wrap: wrap; gap: 10px; }

.phone {
  width: min(300px, 100%); margin: 0 auto -1px; align-self: end;
  border-radius: 44px 44px 0 0; padding: 10px 10px 0;
  background: #101612; box-shadow: 0 30px 60px -30px rgba(20, 40, 30, 0.45);
}
.phone img { border-radius: 34px 34px 0 0; aspect-ratio: 1206 / 2000; object-fit: cover; object-position: top; width: 100%; height: auto; }

/* The soil edge under the hero, like the side of the garden */
.soil { height: 18px; background: repeating-linear-gradient(180deg, var(--soil) 0 5px, color-mix(in srgb, var(--soil) 80%, black) 5px 6px); }

.section { padding: 64px 0 0; }
.section h2 { font-family: var(--mono); font-weight: 500; font-size: 28px; letter-spacing: -0.5px; margin: 0 0 8px; }
.section > .wrap > p.intro { color: var(--muted); margin: 0 0 28px; max-width: 56ch; }

.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.card { border: 1px solid var(--line); border-radius: 20px; padding: 22px; background: var(--surface); }
.card h3 { margin: 10px 0 6px; font-size: 18px; }
.card p { margin: 0; color: var(--muted); font-size: 16px; }
.card .icon { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--accent); }
.card .icon svg { width: 20px; height: 20px; }

.plus { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; align-items: center; border: 1px solid var(--line); border-radius: 24px; padding: 28px; background: linear-gradient(135deg, color-mix(in srgb, var(--sky-top) 55%, var(--surface)), var(--surface)); }
.plus ul { margin: 0; padding-left: 20px; }
.plus li { margin-bottom: 8px; }
.price { font-family: var(--mono); font-size: 15px; color: var(--muted); }

/* Document pages (privacy, support) */
.page-head { padding-top: 28px; padding-bottom: 36px; }
.page-head h1 { font-family: var(--mono); font-weight: 500; font-size: clamp(32px, 5vw, 44px); line-height: 1.1; letter-spacing: -1px; margin: 0 0 8px; }
.page-head p { margin: 0; color: var(--muted); }
.doc h2 { font-size: 21px; margin: 40px 0 8px; }
.doc p, .doc li { margin: 0 0 12px; }
.doc ul { padding-left: 22px; margin: 0 0 12px; }
.note { background: color-mix(in srgb, var(--sky-bot) 50%, var(--surface)); border: 1px solid var(--line); border-radius: 18px; padding: 18px 20px; margin: 28px 0 8px; }
.note ul { margin: 0; }
.note p:last-child, .note li:last-child { margin-bottom: 0; }

details { border-bottom: 1px solid var(--line); padding: 14px 0; }
.doc h2 + details { border-top: 1px solid var(--line); }
summary { cursor: pointer; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; font-family: var(--mono); color: var(--muted); font-weight: 400; font-size: 20px; line-height: 1.3; flex: none; }
details[open] summary::after { content: "–"; }
details > div { padding-top: 8px; }
details > div p:last-child, details > div ul:last-child { margin-bottom: 0; }

@media (max-width: 760px) {
  .hero { grid-template-columns: 1fr; gap: 32px; padding-top: 16px; }
  .cards { grid-template-columns: 1fr; }
  .plus { grid-template-columns: 1fr; padding: 22px; }
  .nav a { padding: 6px 10px; }
  .brand span { display: none; }
}
