/* The Betty website. Colours and typefaces come from tokens.css (the app's own betty-tokens.css, copied at build).
   Built to grow: nothing holding words has a fixed height or a fixed width, every row wraps, and headings scale with
   the screen, so a translation that runs a quarter longer than English still fits. Check with build.py --pseudo. */

/* ---- base ---- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 88px; }
body {
  margin: 0;
  background: var(--background);
  color: var(--foreground);
  font-family: var(--font-display);
  font-size: clamp(17px, 1.05rem + 0.25vw, 20px);
  line-height: var(--line-height);
  overflow-wrap: break-word;
  hyphens: manual;
}
img { display: block; max-width: 100%; height: auto; }
a { color: var(--primary); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { color: var(--accent-strong); }
:focus-visible { outline: 3px solid var(--ring); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3 { font-weight: 400; line-height: 1.12; margin: 0; color: var(--primary); text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
ul:where([role="list"]), ol:where([role="list"]) { list-style: none; margin: 0; padding: 0; }
figure { margin: 0; }
em { font-style: italic; }

.wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 clamp(16px, 4vw, 40px); }

.skip { position: absolute; left: -9999px; top: 8px; background: var(--card); padding: 12px 16px; z-index: 10;
  font-family: var(--font-functional); }
.skip:focus { left: 16px; }

.kicker {
  font-family: var(--font-functional); font-size: 0.78rem; font-weight: 600; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--muted-foreground); margin-bottom: 14px;
}
.display { font-size: clamp(2.5rem, 1.6rem + 4vw, 4.6rem); letter-spacing: -0.01em; }
h2 { font-size: clamp(2rem, 1.4rem + 2.4vw, 3.2rem); }
.lead { font-size: clamp(1.1rem, 1rem + 0.5vw, 1.35rem); color: var(--foreground); max-width: 36em; margin-top: 18px; }
.caption { font-family: var(--font-functional); font-size: 0.92rem; color: var(--muted-foreground); margin-top: 22px; }
.caption-centre { text-align: center; max-width: 40em; margin-left: auto; margin-right: auto; }

/* ---- buttons ---- */
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; text-align: center;
  min-height: 52px; padding: 12px 26px; border-radius: 999px;
  background: var(--primary); color: var(--primary-foreground); border: 1.5px solid var(--primary);
  font-family: var(--font-functional); font-weight: 600; font-size: 1rem; line-height: 1.25; text-decoration: none;
}
.btn:hover { background: var(--primary-soft); border-color: var(--primary-soft); color: var(--primary-foreground); }
.btn-quiet { background: transparent; color: var(--primary); border: 1.5px dashed var(--ring); }
.btn-quiet:hover { background: var(--card); color: var(--primary); border-color: var(--primary); }
.btn-small { min-height: 42px; padding: 8px 18px; font-size: 0.92rem; }
.centre-action { text-align: center; margin-top: 40px; }

/* ---- masthead ---- */
.masthead {
  position: sticky; top: 0; z-index: 5;
  background: color-mix(in srgb, var(--background) 92%, transparent);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  border-bottom: 1px solid color-mix(in srgb, var(--border) 60%, transparent);
}
.masthead-in { display: flex; align-items: center; gap: 16px 28px; min-height: 68px; flex-wrap: wrap; padding-top: 8px; padding-bottom: 8px; }
.wordmark { font-family: var(--font-display); font-size: 1.9rem; color: var(--primary); text-decoration: none; line-height: 1; }
.nav { display: flex; flex-wrap: wrap; gap: 6px 22px; margin-left: auto; font-family: var(--font-functional); font-size: 0.95rem; }
.nav a { color: var(--foreground); text-decoration: none; padding: 8px 0; }
.nav a:hover { color: var(--primary); text-decoration: underline; }
@media (max-width: 760px) {
  .nav { order: 3; width: 100%; margin-left: 0; gap: 4px 18px; padding-bottom: 4px; }
  .masthead .btn-small { margin-left: auto; }
  .masthead { position: static; }
}

/* ---- sections ---- */
.section { padding: clamp(64px, 9vw, 120px) 0; }
.section-tight { padding: clamp(48px, 6vw, 80px) 0; }
.section-paper { background: var(--card); border-top: 1px solid var(--secondary); border-bottom: 1px solid var(--secondary); }
.section-clinical { background: var(--clinical-tint); }
.section-clinical h2 { color: var(--clinical); }
.section-head { max-width: 46em; margin-bottom: clamp(36px, 5vw, 60px); }

/* ---- hero ---- */
.hero { padding: clamp(40px, 7vw, 96px) 0 clamp(40px, 6vw, 72px); overflow: hidden; }
.hero-in { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: clamp(32px, 5vw, 72px); align-items: center; }
.hero-visual { position: relative; }
.hero-plant { position: absolute; right: -14%; top: -22%; width: 62%; opacity: 0.16; pointer-events: none; }
.hero-visual .device { position: relative; }
.purpose {
  margin: clamp(48px, 7vw, 88px) auto 0; max-width: 34em; text-align: center;
  font-size: clamp(1.3rem, 1.05rem + 1vw, 1.8rem); font-style: italic; color: var(--accent-strong); line-height: 1.4;
}
.purpose::before, .purpose::after { content: ""; display: block; width: 56px; height: 1px; background: var(--ring); margin: 0 auto 22px; }
.purpose::after { margin: 22px auto 0; }
@media (max-width: 860px) {
  .hero-in { grid-template-columns: 1fr; }
  .hero-plant { width: 70%; top: -30%; }
}

/* ---- device frames around screenshots ---- */
.device { background: var(--night); padding: clamp(8px, 1.4vw, 16px); border-radius: clamp(18px, 2.4vw, 30px);
  box-shadow: 0 30px 60px -30px color-mix(in srgb, var(--night) 55%, transparent), 0 2px 0 var(--ring) inset; }
.device img { border-radius: clamp(8px, 1vw, 14px); width: 100%; }
.device-small { padding: 7px; border-radius: 16px; box-shadow: 0 16px 30px -20px color-mix(in srgb, var(--night) 60%, transparent); }
.device-small img { border-radius: 8px; }
.device-centre { max-width: 860px; margin: clamp(36px, 5vw, 56px) auto 0; }
.device-phone { padding: 7px; border-radius: 30px; }
.device-phone img { border-radius: 24px; }

/* ---- the circle ---- */
.orbit {
  display: grid; align-items: center; gap: 0;
  grid-template-columns: minmax(130px, 1fr) minmax(70px, 0.5fr) minmax(0, 2.6fr) minmax(70px, 0.5fr) minmax(130px, 1fr);
}
.node-title { font-size: 1.2rem; color: var(--foreground); line-height: 1.25; }
.node-note { font-family: var(--font-functional); font-size: 0.88rem; color: var(--muted-foreground); line-height: 1.4; margin-top: 4px; }
.dot { display: inline-block; width: 12px; height: 12px; border-radius: 50%; margin-bottom: 10px; }
.dot-clinical { background: var(--clinical); }
.dot-brass { background: var(--ring); }
.dot-forest { background: var(--primary); }
.visitor { text-align: center; padding: 22px 16px; border: 1px dashed var(--border); border-radius: var(--radius-control); background: var(--card); }
.visitor-carers { border-color: var(--clinical-edge); background: var(--clinical-tint); }
.visitor-friends { border-color: var(--ring); background: var(--ring-soft); }
.flow { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 0 6px; }
.flow-line { display: block; width: 100%; height: 2px; position: relative;
  background: repeating-linear-gradient(90deg, var(--ring) 0 6px, transparent 6px 11px); }
.flow-line::after { content: ""; position: absolute; top: 50%; width: 0; height: 0; border: 7px solid transparent; transform: translateY(-50%); }
.flow-left .flow-line::after { right: -6px; border-left-color: var(--ring); }
.flow-right .flow-line::after { left: -6px; border-right-color: var(--ring); }
.flow-label { font-family: var(--font-functional); font-size: 0.78rem; color: var(--muted-foreground); text-align: center; line-height: 1.3; }
.ring {
  border: 2px solid var(--primary); border-radius: clamp(40px, 9vw, 150px); background: var(--tint-soft);
  padding: clamp(28px, 4vw, 48px) clamp(20px, 3.5vw, 48px); text-align: center; position: relative;
}
.ring-label { font-family: var(--font-functional); font-weight: 600; font-size: 0.8rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--primary); }
.ring-in { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr) minmax(0, 1fr); gap: 18px; align-items: center; margin: 22px 0; }
.medallion { width: clamp(96px, 11vw, 132px); aspect-ratio: 1; margin: 0 auto 14px; border-radius: 50%;
  display: grid; place-items: center; background: var(--primary); color: var(--primary-foreground);
  box-shadow: 0 0 0 6px var(--tint-soft), 0 0 0 7px var(--ring); }
.medallion svg { width: 46%; height: auto; }
.centre .node-title { font-size: 1.4rem; color: var(--primary); }
.both-ways { font-family: var(--font-functional); font-size: 0.82rem; color: var(--primary); margin-top: 14px; }
.both-ways span { font-size: 1.1rem; }
.ring-lock { display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-functional); font-size: 0.9rem; font-weight: 600; color: var(--primary); }
@media (max-width: 960px) {
  .orbit { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 14px; }
  .ring { grid-column: 1 / -1; grid-row: 3; }
  .visitor-carers { grid-column: 1; grid-row: 1; }
  .visitor-friends { grid-column: 2; grid-row: 1; }
  .flow-left { grid-column: 1; grid-row: 2; }
  .flow-right { grid-column: 2; grid-row: 2; }
  .flow { flex-direction: row; justify-content: center; padding: 12px 0; }
  .flow-line { width: 2px; height: 46px; flex: none;
    background: repeating-linear-gradient(180deg, var(--ring) 0 6px, transparent 6px 11px); }
  .flow-left .flow-line::after, .flow-right .flow-line::after { top: auto; bottom: -8px; left: 50%; right: auto;
    transform: translateX(-50%); border: 7px solid transparent; border-top-color: var(--ring); }
  .flow-label { text-align: left; }
}
@media (max-width: 620px) {
  .ring-in { grid-template-columns: 1fr; }
  .centre { order: -1; }
  .ring { border-radius: 40px; }
}

/* ---- split: picture beside words ---- */
.split { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: clamp(36px, 6vw, 80px); align-items: center; }
.split-reverse { grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); }
@media (max-width: 900px) {
  .split, .split-reverse { grid-template-columns: 1fr; }
  .split-reverse .split-copy { order: -1; }
}

.points { display: grid; gap: 22px; margin-top: 30px; }
.points li { display: grid; grid-template-columns: 48px minmax(0, 1fr); gap: 16px; align-items: start; }
.pip { width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--border); color: var(--primary); background: var(--background); }
.pip-talk { background: var(--primary); border-color: var(--primary); color: var(--primary-foreground); }
.pip-messages { background: var(--accent-strong); border-color: var(--accent-strong); color: var(--accent-foreground); }
.point-title { font-size: 1.25rem; color: var(--primary); line-height: 1.3; }
.points p:not(.point-title) { font-family: var(--font-functional); font-size: 0.98rem; color: var(--foreground); margin-top: 2px; }

.strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: clamp(20px, 3vw, 36px); margin-top: clamp(48px, 7vw, 88px); }
.strip-item figcaption, .phone figcaption { font-family: var(--font-functional); font-size: 0.9rem; color: var(--muted-foreground); margin-top: 14px; text-align: center; }

/* ---- the family: numbered list and three phones ---- */
.numbered { counter-reset: n; display: grid; gap: 20px; margin-top: 30px; }
.numbered li { counter-increment: n; display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 14px; align-items: baseline; font-size: 1.12rem; }
.numbered li::before { content: counter(n); font-size: 1.6rem; color: var(--accent-strong); line-height: 1; border-bottom: 1px solid var(--ring); padding-bottom: 6px; text-align: center; }
.phones { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(12px, 2vw, 22px); align-items: start; }
.phone-2 { margin-top: clamp(24px, 4vw, 56px); }
.phone-3 { margin-top: clamp(12px, 2vw, 28px); }
@media (max-width: 520px) {
  .phones { grid-template-columns: repeat(3, 72%); overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 12px; margin-right: -16px; padding-right: 16px; }
  .phone { scroll-snap-align: start; }
  .phone-2, .phone-3 { margin-top: 0; }
}

/* ---- visitors: three steps ---- */
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; counter-reset: s; }
.step { position: relative; background: var(--card); border: 1px solid var(--clinical-edge); border-radius: var(--radius-control); padding: 26px 22px 24px; }
.step-n { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; border: 1.5px solid var(--clinical); color: var(--clinical); font-size: 1.3rem; margin-bottom: 14px; }
.step p { font-size: 1.15rem; line-height: 1.4; }

/* ---- privacy ---- */
.section-forest { background: var(--primary); color: var(--primary-foreground); }
.section-forest h2, .section-forest .lead { color: var(--primary-foreground); }
.section-forest .kicker { color: var(--secondary); }
.vault { display: grid; grid-template-columns: minmax(0, 2.4fr) auto minmax(0, 1fr); gap: clamp(16px, 3vw, 32px); align-items: stretch; }
.server { border: 1.5px solid color-mix(in srgb, var(--primary-foreground) 55%, transparent); border-radius: 20px; padding: clamp(20px, 3vw, 32px);
  background: color-mix(in srgb, var(--primary-foreground) 6%, transparent); }
.server-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; margin-bottom: 22px; }
.server-head svg { align-self: center; color: var(--secondary); }
.server-name { font-size: 1.45rem; }
.server-where { font-family: var(--font-functional); font-size: 0.85rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--secondary); }
.engines { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 520px) { .engines { grid-template-columns: 1fr; } }
.engine { background: var(--background); color: var(--foreground); border-radius: var(--radius-control); padding: 18px 18px 20px; }
.engine-title { font-size: 1.2rem; color: var(--primary); margin-bottom: 4px; }
.engine p:not(.engine-title) { font-family: var(--font-functional); font-size: 0.92rem; line-height: 1.45; }
.wall { display: flex; align-items: center; justify-content: center; position: relative; width: 44px; }
.wall::before { content: ""; position: absolute; top: 0; bottom: 0; left: 50%; width: 3px; transform: translateX(-50%);
  background: repeating-linear-gradient(180deg, var(--secondary) 0 10px, transparent 10px 16px); }
.wall-x { position: relative; flex: none; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--secondary); color: var(--primary); font-family: var(--font-functional); font-size: 1.2rem; font-weight: 700; }
.outside { border: 1.5px dashed color-mix(in srgb, var(--primary-foreground) 40%, transparent); border-radius: 20px; padding: clamp(20px, 3vw, 32px);
  display: flex; flex-direction: column; justify-content: center; }
.outside-title { font-family: var(--font-functional); font-size: 0.85rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--secondary); margin-bottom: 10px; }
.outside-list { font-size: 1.2rem; line-height: 1.4; text-decoration: line-through; text-decoration-thickness: 1px; text-decoration-color: color-mix(in srgb, var(--primary-foreground) 50%, transparent); }
@media (max-width: 860px) {
  .vault { grid-template-columns: 1fr; }
  .wall { width: auto; height: 56px; }
  .wall::before { top: 50%; bottom: auto; left: 0; right: 0; width: auto; height: 3px; transform: translateY(-50%);
    background: repeating-linear-gradient(90deg, var(--secondary) 0 10px, transparent 10px 16px); }
}
.promises { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 28px; margin-top: clamp(40px, 6vw, 64px);
  border-top: 1px solid color-mix(in srgb, var(--primary-foreground) 25%, transparent); padding-top: 36px; }
.promises li { display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 12px; align-items: start; }
.promises svg { color: var(--secondary); margin-top: 2px; }
.promises p { font-size: 1.08rem; line-height: 1.4; }
.detail { margin-top: 40px; font-family: var(--font-functional); font-size: 0.95rem; max-width: 52em; }
.detail summary { cursor: pointer; color: var(--secondary); font-weight: 600; min-height: 44px; display: flex; align-items: center; }
.detail p { margin-top: 10px; color: color-mix(in srgb, var(--primary-foreground) 88%, transparent); line-height: 1.6; }
.section-forest :focus-visible { outline-color: var(--secondary); }

/* ---- plants ---- */
.plate, .sampler-plate img, .theme-plate img, .specimen-plate img, .story-plant img, .hero-specimen img { mix-blend-mode: multiply; }
.sampler { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: clamp(12px, 2.5vw, 32px); align-items: end; }
.sampler li { text-align: center; }
.sampler-plate { aspect-ratio: 3 / 4; display: flex; align-items: flex-end; justify-content: center; }
.sampler-plate img { max-height: 100%; width: auto; opacity: 0.82; }
.sampler p { font-size: 1rem; font-style: italic; color: var(--muted-foreground); margin-top: 14px; }
@media (max-width: 640px) {
  .sampler { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .sampler li:nth-child(n+4) { display: none; }
}

/* ---- story ---- */
.story { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.4fr); gap: clamp(32px, 6vw, 88px); align-items: center; }
.story-plant { opacity: 0.75; max-width: 360px; justify-self: center; }
.story-copy p:not(.kicker) { font-size: clamp(1.1rem, 1rem + 0.4vw, 1.3rem); margin-top: 18px; max-width: 32em; }
.story-copy h2 { margin-bottom: 8px; }
.signature { font-style: italic; color: var(--accent-strong); }
.signature::before { content: "— "; }
@media (max-width: 760px) {
  .story { grid-template-columns: 1fr; }
  .story-plant { max-width: 180px; order: 2; }
}

/* ---- the ways in ---- */
.ways-title { font-size: clamp(1.6rem, 1.3rem + 1.2vw, 2.2rem); margin-bottom: 26px; }
.ways { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px; }
.way { display: flex; flex-direction: column; gap: 6px; height: 100%; padding: 22px 22px 24px; border-radius: var(--radius-control);
  border: 1px solid var(--border); background: var(--card); text-decoration: none; color: var(--foreground); }
.way:hover { border-color: var(--primary); color: var(--foreground); }
.way-title { font-size: 1.25rem; color: var(--primary); }
.way-note { font-family: var(--font-functional); font-size: 0.92rem; color: var(--muted-foreground); }

/* ---- footer ---- */
.footer { background: var(--secondary); padding: 56px 0 40px; font-family: var(--font-functional); font-size: 0.9rem; }
.footer-in { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr) auto; gap: 28px 48px; align-items: start; }
.footer-tag { font-family: var(--font-display); font-style: italic; color: var(--muted-foreground); margin-top: 8px; }
.footer-small p + p { margin-top: 10px; }
.footer-end { display: flex; flex-direction: column; align-items: flex-end; gap: 14px; }
.footer-top { color: var(--primary); }
.langs { display: flex; gap: 14px; }
.langs span { font-weight: 600; }
@media (max-width: 760px) {
  .footer-in { grid-template-columns: 1fr; }
  .footer-end { align-items: flex-start; }
}

/* ---- Betty's world ---- */
.hero-specimen { max-width: 420px; justify-self: center; opacity: 0.85; }
.themes { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); gap: 0; border-top: 1px solid var(--secondary); border-left: 1px solid var(--secondary); }
.theme { padding: 28px 24px 30px; border-right: 1px solid var(--secondary); border-bottom: 1px solid var(--secondary); text-align: center; }
.theme-plate { aspect-ratio: 1; display: flex; align-items: center; justify-content: center; margin-bottom: 18px; }
.theme-plate img { max-height: 100%; width: auto; opacity: 0.85; }
.theme-motif { font-size: 1.35rem; color: var(--primary); }
.theme-place { font-family: var(--font-functional); font-size: 0.92rem; color: var(--muted-foreground); margin-top: 4px; }

.swatches { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 16px; }
.swatch { font-family: var(--font-functional); font-size: 0.92rem; text-align: center; }
.chip { display: block; aspect-ratio: 1; border-radius: 50%; margin: 0 auto 12px; max-width: 120px; border: 1px solid var(--border); }
.chip-parchment { background: var(--betty-parchment); }
.chip-linen { background: var(--betty-linen); }
.chip-ink { background: var(--betty-ink); }
.chip-forest { background: var(--betty-forest); }
.chip-terracotta { background: var(--betty-terracotta); }
.chip-brass { background: var(--betty-brass); }
.chip-sage { background: var(--betty-sage); }
.type-specimen { margin-top: clamp(40px, 6vw, 72px); text-align: center; font-size: clamp(2rem, 1.2rem + 3.6vw, 4.4rem); color: var(--primary); line-height: 1.1; text-wrap: balance; }

.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 170px), 1fr)); gap: clamp(20px, 3vw, 36px) clamp(14px, 2vw, 24px); }
.specimen { text-align: center; }
.specimen-plate { aspect-ratio: 3 / 4; display: flex; align-items: flex-end; justify-content: center; }
.specimen-plate img { max-height: 100%; width: auto; opacity: 0.85; }
.specimen-name { font-size: 1.02rem; margin-top: 12px; line-height: 1.3; }
.specimen-latin { font-size: 0.88rem; font-style: italic; color: var(--muted-foreground); }

@media print {
  .masthead, .skip, .actions, .ways, .footer-end { display: none; }
  .section-forest { background: none; color: var(--foreground); }
  .section-forest h2, .section-forest .lead { color: var(--primary); }
}
