/* Basework home page. System fonts only: the site loads nothing from any other server.
   Colours match the app's Theme.swift. */
:root {
  --bg: #FBFAF6;
  --white: #FFFFFF;
  --warm: #F1EBE2;
  --dark: #14231C;
  --ink: #1C1C1E;
  --muted: #4A4A50;
  --line: rgba(60, 60, 67, 0.14);
  --green: #0BA36E;
  --green-deep: #087A52;
  --green-tint: rgba(11, 163, 110, 0.12);
  --max: 1200px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 17px/1.55 -apple-system, BlinkMacSystemFont, "SF Pro Text", Inter, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
/* Links (Lou, 9 Nov 2026): never underlined, semibold, deep green on hover and keyboard focus.
   The body prefix lifts the hover above section rules like .site-footer a. */
a { color: var(--ink); font-weight: 600; text-decoration: none; }
body a:hover, body a:focus-visible { color: var(--green-deep); }
img { display: block; max-width: 100%; height: auto; }
:focus-visible { outline: 3px solid var(--green); outline-offset: 3px; border-radius: 6px; }
.skip { position: absolute; top: 12px; left: 16px; transform: translateY(-200%); background: var(--white); padding: 8px 12px; z-index: 2; }
.skip:focus { transform: none; }
.wrap { max-width: var(--max); margin: 0 auto; padding-inline: 24px; }

h1, h2, h3 { margin: 0; font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", Inter, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; font-weight: 700; letter-spacing: -0.025em; }
h1 { font-size: clamp(38px, 4.4vw, 64px); line-height: 1.04; }
h2 { font-size: clamp(34px, 4vw, 56px); line-height: 1.05; }
.h2-small { font-size: clamp(30px, 3.2vw, 44px); }
p { margin: 0; }
.eyebrow { font-size: 15px; font-weight: 600; color: var(--green-deep); }
.lede { font-size: 20px; color: var(--muted); max-width: 32rem; }
.body { margin-top: 20px; font-size: 19px; color: var(--muted); max-width: 32rem; }

/* Header and footer */
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-block: 22px; }
.brand { display: flex; align-items: center; gap: 14px; text-decoration: none; font-weight: 600; font-size: 24px; }
.brand img { width: 44px; height: 44px; border-radius: 11px; }
.site-nav { display: flex; gap: 28px; font-size: 15px; flex-wrap: wrap; }
.site-nav a { color: var(--muted); text-decoration: none; }
body .site-nav a[aria-current="page"]:hover, body .site-nav a[aria-current="page"]:focus-visible { color: var(--green-deep); }
/* Dark bands and cards: light green, so the hover stays readable. */
body .band-dark a:hover, body .band-dark a:focus-visible, body .yours a:hover, body .yours a:focus-visible { color: #8FE6B8; }
.site-footer { border-top: 1px solid var(--line); }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 16px; justify-content: space-between; padding-block: 28px 44px; font-size: 15px; color: var(--muted); }
.site-footer nav { display: flex; gap: 20px; flex-wrap: wrap; }
.site-footer a { color: var(--muted); }

/* App Store badge: Apple's official black artwork (en-GB), unaltered, 54 px high. */
.badge { display: inline-block; line-height: 0; border-radius: 10px; }
.badge img { display: block; width: auto; height: 54px; }
.cta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 20px; }
.note { font-size: 15px; color: var(--muted); }

/* Hero */
.hero { display: flex; flex-wrap: wrap; gap: 64px; align-items: center; padding-block: 40px 96px; }
.hero-text { flex: 1.25 1 500px; min-width: 0; display: flex; flex-direction: column; gap: 28px; }
.hero-art { flex: 1 1 440px; min-width: 0; position: relative; height: 640px; }
.hero-photo { position: absolute; right: 0; top: 0; width: 88%; height: 620px; object-fit: cover; border-radius: 6px; }
.ring-card { position: absolute; left: 0; bottom: 0; width: 300px; background: var(--white); border-radius: 24px; padding: 22px; box-shadow: 0 24px 48px rgba(28, 28, 30, 0.16); display: flex; align-items: center; gap: 16px; }
.ring-card svg { flex: none; font-family: inherit; }
.ring-card div { display: flex; flex-direction: column; gap: 2px; }
.ring-of { font-size: 14px; color: var(--muted); }
.ring-go { font-size: 20px; font-weight: 600; color: var(--green-deep); }

/* Two-column bands */
.band-white { background: var(--white); }
.band-dark { background: var(--dark); color: #FFFFFF; }
.band-dark .body { color: rgba(255, 255, 255, 0.78); }
.band-warm { background: var(--warm); }
.split { display: flex; flex-wrap: wrap; gap: 80px; align-items: center; padding-block: 112px; }
.split-text { flex: 1 1 420px; min-width: 0; }
.stack { display: flex; flex-direction: column; gap: 56px; }

/* Logging */
.log-art { flex: 1 1 460px; min-width: 0; position: relative; height: 600px; }
.log-photo { position: absolute; left: 0; top: 0; width: 78%; height: 560px; object-fit: cover; border-radius: 6px; }
.log-card { position: absolute; right: 0; bottom: 0; width: 330px; border-radius: 24px; box-shadow: 0 24px 48px rgba(28, 28, 30, 0.18); }
.ways { list-style: none; margin: 28px 0 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 1px solid var(--line); max-width: 32rem; }
.ways li { display: flex; align-items: center; gap: 14px; padding: 18px 0; border-bottom: 1px solid var(--line); font-weight: 500; }
.ways svg { fill: none; stroke: var(--green-deep); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

/* Macros */
.pie-wrap { flex: 1 1 420px; min-width: 0; display: flex; align-items: center; gap: 40px; flex-wrap: wrap; }
.pie-wrap svg { flex: none; max-width: 100%; height: auto; font-family: inherit; }
.legend { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.legend li { display: flex; align-items: center; gap: 10px; }
.legend span:last-child { color: rgba(255, 255, 255, 0.7); }
.dot { width: 10px; height: 10px; border-radius: 9px; }
.legend-note { font-size: 13px; color: rgba(255, 255, 255, 0.6); }

/* Meals */
.meals { padding-block: 112px; }
.meals-head { display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-end; justify-content: space-between; margin-bottom: 48px; }
.meals-head h2 { max-width: 36rem; }
.meals-head p { font-size: 19px; color: var(--muted); max-width: 28rem; }
.meal-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.meal { display: flex; flex-direction: column; gap: 14px; }
.meal img { width: 100%; height: 420px; object-fit: cover; border-radius: 6px; }
.meal-info { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.meal h3 { font-size: 18px; font-weight: 600; letter-spacing: -0.01em; }
.pill { flex: none; background: var(--green-tint); color: var(--green-deep); font-weight: 600; font-size: 15px; padding: 4px 12px; border-radius: 999px; }

/* Source tip and Today */
.tip { margin-top: 24px; background: var(--white); border-radius: 16px; padding: 20px 22px; max-width: 26rem; }
.tip p:first-child { font-size: 19px; }
.tip p + p { margin-top: 6px; font-size: 14px; color: var(--muted); text-decoration: underline; }
.today-art { flex: 1 1 360px; min-width: 0; display: flex; justify-content: center; }
.today-art img { width: 360px; border-radius: 28px; box-shadow: 0 24px 48px rgba(28, 28, 30, 0.14); }

/* Closing */
.closing { padding-block: 120px; display: flex; flex-direction: column; align-items: center; gap: 24px; text-align: center; }
.closing p { font-size: 18px; color: var(--muted); }

@media (max-width: 820px) {
  .hero { padding-block: 16px 64px; gap: 40px; }
  .hero-art { height: 500px; }
  .hero-photo { height: 470px; width: 90%; }
  .ring-card { width: 270px; padding: 18px; }
  .split, .meals { padding-block: 72px; gap: 48px; }
  .log-art { height: 520px; }
  .log-photo { height: 470px; width: 82%; }
  .log-card { width: 260px; }
  .meal-grid { grid-template-columns: 1fr; }
  .meal img { height: 360px; }
  .closing { padding-block: 88px; }
}
@media (max-width: 480px) {
  .wrap { padding-inline: 16px; }
  .hero-art { height: 440px; }
  .hero-photo { height: 400px; }
  .ring-card { width: 240px; gap: 12px; }
  .ring-card svg { width: 84px; height: 84px; }
  .log-art { height: 460px; }
  .log-photo { height: 400px; }
  .log-card { width: 220px; }
}

/* Count up (Lou, 9 Nov 2026). The line under the H1, three protein rings,
   the week of seals and calm dots, and the three points in the dark band.
   The ring and seal match ProteinRingView and the hitBadge in HistoryHomeView. */
.count-line { margin-top: -12px; font-size: clamp(24px, 2.2vw, 30px); line-height: 1.25; font-weight: 600; letter-spacing: -0.015em; color: var(--green); }
.defs { position: absolute; width: 0; height: 0; overflow: hidden; }
.count { padding-block: 112px; }
.count-head { max-width: 40rem; }
.count-cards { list-style: none; margin: 56px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.count-card { background: var(--bg); border-radius: 24px; padding: 36px 24px 32px; display: flex; flex-direction: column; align-items: center; text-align: center; }
.count-card svg { font-family: inherit; margin-bottom: 20px; }
.count-when { font-size: 16px; color: var(--muted); }
.count-go { margin-top: 2px; font-size: 22px; font-weight: 600; color: var(--green-deep); }
.week { margin-top: 72px; padding-top: 72px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 48px; align-items: center; justify-content: space-between; }
.week-text { flex: 1 1 380px; min-width: 0; }
.week h3 { font-size: clamp(26px, 2.6vw, 36px); line-height: 1.1; }
.week-days { list-style: none; margin: 0; padding: 0; flex: 0 1 auto; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 12px; }
.week-days li { display: flex; flex-direction: column; align-items: center; gap: 12px; min-width: 40px; }
.day { font-size: 14px; font-weight: 500; color: var(--muted); }
.seal { width: 30px; height: 30px; }
.week-days li > :last-child { flex: none; }
.calm-dot { width: 12px; height: 12px; margin-block: 9px; border-radius: 50%; background: rgba(60, 60, 67, 0.22); }
.points { padding-block: 96px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 48px; }
.point h3 { font-size: 22px; font-weight: 600; letter-spacing: -0.01em; }
.point p { margin-top: 12px; font-size: 17px; color: rgba(255, 255, 255, 0.78); }

@media (max-width: 820px) {
  .count { padding-block: 72px; }
  .count-cards { grid-template-columns: 1fr; margin-top: 40px; gap: 16px; }
  .count-card { flex-direction: row; align-items: center; text-align: left; gap: 20px; padding: 20px; }
  .count-card svg { width: 96px; height: 96px; margin: 0; flex: none; }
  .week { margin-top: 48px; padding-top: 48px; gap: 32px; }
  .points { padding-block: 72px; grid-template-columns: 1fr; gap: 36px; }
}
@media (max-width: 480px) {
  .week-days { width: 100%; gap: 4px; }
  .week-days li { min-width: 0; }
}
