/* Breath — website. Design system v2: linen ground, ink text, one accent (Tide).
   Colours are roles, so dark mode (Night) is one override block. */
@import url(fonts/fonts.css);

:root {
  --bg: #F5F1EA;          /* linen */
  --surface: #FBF9F5;     /* paper */
  --sunk: #EAE4DA;        /* sand */
  --line: #E3DDD3;        /* mist */
  --border: #D4CCC0;
  --text: #1B1A18;        /* ink */
  --text-2: #45413C;      /* reading text */
  --muted: #5E5953;       /* stone */
  --accent: #2D6A78;      /* tide */
  --accent-strong: #1F4F5A;
  --accent-tint: #E2EDEF;
  --accent-ink: #3F5E66;
  --btn-bg: #1B1A18;
  --btn-fg: #F5F1EA;
  --night: #161514;
  --moon: #EFEAE0;
  --moon-muted: #B9B2A6;
  --tide-light: #8CC3CF;
  --shadow: rgba(27, 26, 24, 0.35);
  --display: 'Newsreader', Georgia, serif;
  --ui: 'Inter', system-ui, -apple-system, 'Segoe UI', 'Noto Sans Devanagari', sans-serif;
  --deva: 'Noto Serif Devanagari', 'Newsreader', serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #161514;
    --surface: #1E1D1B;
    --sunk: #24221F;
    --line: #2E2C29;
    --border: #3A3733;
    --text: #EFEAE0;
    --text-2: #D3CCC1;
    --muted: #B9B2A6;
    --accent: #8CC3CF;
    --accent-strong: #B5DAE2;
    --accent-tint: #1F2A2D;
    --accent-ink: #B5D2D8;
    --btn-bg: #EFEAE0;
    --btn-fg: #161514;
    --night: #0F0E0D;
    --shadow: rgba(0, 0, 0, 0.6);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--ui); font-size: 16px; line-height: 1.6; }
img { display: block; max-width: 100%; }
a { color: var(--accent); }
a:hover { color: var(--accent-strong); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
.skip { position: absolute; left: -9999px; top: 8px; background: var(--btn-bg); color: var(--btn-fg); padding: 10px 16px; border-radius: 8px; z-index: 10; }
.skip:focus { left: 16px; }

.wrap { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.eyebrow { font-size: 13px; font-weight: 600; letter-spacing: 1.4px; text-transform: uppercase; color: var(--accent); margin: 0 0 18px; }
h1, h2, h3 { font-family: var(--display); font-weight: 400; margin: 0; }

/* Header */
.top { display: flex; align-items: center; justify-content: space-between; gap: 12px 16px; flex-wrap: wrap; padding: 18px 0; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; }
.brand:hover { color: var(--text); }
.brand span { font-family: var(--display); font-style: italic; font-size: 26px; }
.top nav { display: flex; align-items: center; gap: 2px; flex-wrap: wrap; }
.top nav a { color: var(--muted); text-decoration: none; font-size: 15px; padding: 12px 10px; }
.top nav a:hover, .top nav a[aria-current="page"] { color: var(--text); }
.top nav a.btn, .top nav a.btn:hover { color: var(--btn-fg); padding: 10px 20px; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 52px; padding: 14px 26px; border-radius: 999px;
  font-family: var(--ui); font-size: 16px; font-weight: 600; text-decoration: none; background: var(--btn-bg); color: var(--btn-fg); border: 1px solid var(--btn-bg); }
.btn:hover { color: var(--btn-fg); filter: brightness(0.92); }
.btn.ghost { background: transparent; color: var(--text); border-color: var(--border); font-weight: 500; }
.btn.ghost:hover { background: var(--surface); color: var(--text); filter: none; }
.btn.small { min-height: 44px; padding: 10px 20px; font-size: 15px; }
.btn svg { flex: none; }

/* Phone frame around a real app screenshot */
.phone { background: var(--night); border-radius: 54px; padding: 12px; width: 100%; max-width: 348px; box-shadow: 0 40px 80px -40px var(--shadow); }
.phone img { border-radius: 43px; width: 100%; height: auto; aspect-ratio: 390 / 844; }

/* Hero */
.hero { display: flex; flex-wrap: wrap; align-items: center; gap: 48px; padding: 32px 0 88px; }
.hero-copy { flex: 999 1 460px; min-width: 0; }
.hero h1 { font-size: clamp(42px, 6vw, 76px); line-height: 1.04; letter-spacing: -1.5px; margin-bottom: 24px; }
.lede { font-size: 19px; line-height: 1.6; color: var(--muted); max-width: 520px; margin: 0 0 34px; }
.ctas { display: flex; gap: 12px; flex-wrap: wrap; }
.fine { margin-top: 20px; font-size: 14px; color: var(--muted); }
.hero-dial { flex: 1 1 340px; display: flex; justify-content: center; }

/* Live breathing dial (the same design as the app's lock-screen widget) */
.dial { width: min(440px, 88vw); aspect-ratio: 1; border-radius: 50%; background: var(--night); color: var(--moon); position: relative; box-shadow: 0 40px 90px -40px var(--shadow); }
.dial svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.dial .halo { position: absolute; left: 50%; top: 50%; width: 52%; height: 52%; margin: -26% 0 0 -26%; border-radius: 50%;
  background: radial-gradient(circle, rgba(140,195,207,0.28) 0%, rgba(140,195,207,0.10) 55%, rgba(140,195,207,0) 72%);
  border: 1px solid rgba(140,195,207,0.35); animation: breathe 4s ease-in-out infinite; }
.dial .center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.dial .cue { font-family: var(--display); font-style: italic; font-size: clamp(20px, 3vw, 26px); min-height: 1.4em; }
.dial .count { font-family: var(--display); font-weight: 300; font-size: clamp(34px, 5vw, 46px); letter-spacing: -1px; margin-top: 6px; line-height: 1.1; }
.dial .label { font-size: 13px; color: var(--moon-muted); }
.dial .dots .now { fill: var(--tide-light); animation: pulse 4s ease-in-out infinite; }
@keyframes breathe { 0% { transform: scale(0.82); opacity: .55 } 40% { transform: scale(1.06); opacity: 1 } 100% { transform: scale(0.82); opacity: .55 } }
@keyframes pulse { 0%, 100% { opacity: .45 } 50% { opacity: 1 } }
@media (prefers-reduced-motion: reduce) { .dial .halo, .dial .now { animation: none; } .dial .cue { display: none; } }
.dial-note { text-align: center; font-size: 13.5px; color: var(--muted); margin-top: 18px; }

/* Quote of the day */
.daily { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 56px 0; text-align: center; }
.daily blockquote { margin: 0 auto; max-width: 760px; }
.daily .orig { font-family: var(--deva); font-size: 22px; line-height: 1.7; color: var(--text); margin: 0 0 10px; }
.daily .orig.tibt { font-family: 'Noto Serif Tibetan', serif; font-size: 25px; }
.daily .orig.latn { font-family: var(--display); font-style: italic; }
.daily .q { font-family: var(--display); font-style: italic; font-size: clamp(24px, 3.4vw, 34px); line-height: 1.3; color: var(--text); margin: 0 0 14px; }
.daily cite { font-style: normal; font-size: 13.5px; color: var(--muted); }
.daily .more { display: inline-block; margin-top: 18px; font-size: 15px; }

/* The idea (night band) */
.idea { background: var(--night); color: var(--moon); }
.idea .inner { max-width: 860px; margin: 0 auto; padding: 112px 24px; text-align: center; display: flex; flex-direction: column; align-items: center; }
.idea h2 { font-weight: 300; font-size: clamp(34px, 4.6vw, 56px); line-height: 1.12; letter-spacing: -0.8px; margin: 36px 0 22px; }
.idea p { margin: 0; font-size: 18px; line-height: 1.7; color: var(--moon-muted); max-width: 620px; }
.idea .more { margin-top: 30px; color: var(--tide-light); font-size: 16px; text-decoration: none; border-bottom: 1px solid rgba(140, 195, 207, 0.4); padding-bottom: 2px; }
.idea .more:hover { color: var(--moon); }

/* How it works */
.how { padding: 112px 0 64px; }
.how h2 { font-size: clamp(32px, 4vw, 48px); line-height: 1.1; letter-spacing: -0.6px; max-width: 640px; margin-bottom: 56px; }
.steps { display: flex; flex-wrap: wrap; gap: 40px; }
.step { flex: 1 1 300px; min-width: 0; display: flex; flex-direction: column; gap: 22px; }
.step .stage { height: 440px; border-radius: 28px; background: var(--sunk); overflow: hidden; display: flex; justify-content: center; padding-top: 36px; }
.step .stage .phone { max-width: 254px; border-radius: 38px 38px 0 0; padding: 8px 8px 0; box-shadow: none; height: 420px; overflow: hidden; }
.step .stage .phone img { border-radius: 31px 31px 0 0; }
.step .text { display: flex; gap: 16px; }
.step .n { font-family: var(--display); font-size: 20px; color: var(--accent); }
.step h3 { font-family: var(--ui); font-size: 19px; font-weight: 600; margin-bottom: 8px; }
.step p { margin: 0; color: var(--muted); }

/* Principles */
.principles { padding: 64px 0 112px; }
.principles .grid { border-top: 1px solid var(--line); padding-top: 56px; display: flex; flex-wrap: wrap; gap: 40px; }
.principles .grid > div { flex: 1 1 280px; min-width: 0; }
.principles h3 { font-size: 26px; letter-spacing: -0.2px; margin-bottom: 10px; }
.principles p { margin: 0; color: var(--muted); line-height: 1.65; }

/* Download */
.download { padding: 0 0 96px; }
.download .box { border-radius: 32px; background: var(--accent-tint); padding: clamp(36px, 6vw, 80px); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 32px; }
.download .box > div:first-child { flex: 999 1 420px; min-width: 0; }
.download h2 { font-size: clamp(32px, 4vw, 48px); line-height: 1.1; letter-spacing: -0.6px; margin-bottom: 14px; }
.download p { margin: 0; font-size: 18px; color: var(--accent-ink); }
.download .get { flex: 1 1 260px; display: flex; flex-direction: column; gap: 12px; align-items: flex-start; }
.download .get small { font-size: 14px; color: var(--accent-ink); }

/* Footer */
footer { border-top: 1px solid var(--line); padding: 28px 0 56px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; font-size: 14px; color: var(--muted); }
footer .note { display: flex; align-items: center; gap: 10px; }
footer nav a { color: var(--muted); padding: 10px; }

/* Long-form pages: philosophy, privacy, FAQ */
.essay { max-width: 680px; margin: 0 auto; padding: 40px 24px 96px; }
.essay h1 { font-size: clamp(40px, 6vw, 64px); line-height: 1.05; letter-spacing: -1.2px; margin-bottom: 22px; }
.essay-lede { font-family: var(--display); font-size: 23px; line-height: 1.5; color: var(--text-2); margin: 0 0 16px; }
.essay section { border-top: 1px solid var(--line); margin-top: 48px; padding-top: 40px; }
.essay h2 { font-size: 30px; line-height: 1.15; letter-spacing: -0.3px; margin-bottom: 16px; }
.essay h3 { font-family: var(--ui); font-size: 18px; font-weight: 600; margin: 28px 0 8px; }
.essay p, .essay li { font-size: 18px; line-height: 1.75; color: var(--text-2); }
.essay p { margin: 0 0 16px; }
.essay ul, .essay ol { padding-left: 22px; margin: 0 0 16px; }
.essay table { width: 100%; border-collapse: collapse; margin: 8px 0 20px; font-size: 15px; }
.essay th, .essay td { text-align: left; vertical-align: top; padding: 10px 12px 10px 0; border-bottom: 1px solid var(--line); color: var(--text-2); }
.essay th { font-weight: 600; color: var(--text); }
.table-scroll { overflow-x: auto; }
.essay blockquote { margin: 26px 0; padding-left: 22px; border-left: 2px solid var(--accent); }
.essay blockquote p { margin: 0 0 10px; }
.essay blockquote .orig { font-style: normal; color: var(--text); margin: 0 0 6px; }
.essay blockquote .orig.deva { font-family: var(--deva); font-size: 23px; line-height: 1.7; }
.essay blockquote .orig.tibt { font-family: 'Noto Serif Tibetan', serif; font-size: 26px; line-height: 1.8; }
.essay blockquote .orig.latn { font-family: var(--display); font-style: italic; font-size: 20px; line-height: 1.55; }
.essay blockquote .translit { font-family: var(--ui); font-style: italic; font-size: 14.5px; line-height: 1.6; color: var(--muted); margin: 0 0 10px; }
.essay blockquote .translation { font-family: var(--display); font-style: italic; font-size: 26px; line-height: 1.35; color: var(--text); margin: 0 0 10px; }
.essay cite, .essay .cite-line { font-style: normal; font-size: 13px; letter-spacing: 0.4px; color: var(--muted); }
.essay section.founder { background: var(--surface); border: 1px solid var(--line); border-radius: 24px; padding: 36px clamp(22px, 4vw, 40px); }
.essay section.founder .eyebrow { margin-bottom: 10px; }
.essay .signature { font-family: var(--display); font-style: italic; font-size: 20px; color: var(--text); margin-top: 8px; }
.essay-note { margin-top: 48px; font-size: 14px !important; color: var(--muted) !important; }
.essay-end { margin-top: 64px; display: flex; flex-direction: column; align-items: center; gap: 24px; }
.updated { font-size: 14px; color: var(--muted); }

/* FAQ */
.faq details { border-top: 1px solid var(--line); padding: 4px 0; }
.faq details:last-of-type { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; list-style: none; font-family: var(--display); font-size: 22px; line-height: 1.35; padding: 18px 36px 18px 0; position: relative; color: var(--text); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; position: absolute; right: 4px; top: 16px; font-family: var(--ui); font-size: 24px; color: var(--muted); }
.faq details[open] summary::after { content: '–'; }
.faq details > div { padding: 0 0 18px; }

/* Invite link page */
.join { max-width: 440px; margin: 0 auto; padding: 8px 24px 40px; min-height: 100vh; display: flex; flex-direction: column; text-align: center; }
.join .top { justify-content: flex-start; }
.join .who { width: 116px; height: 116px; border-radius: 50%; background: var(--accent-tint); color: var(--accent); margin: 48px auto 0;
  display: flex; align-items: center; justify-content: center; font-family: var(--display); font-style: italic; font-size: 52px; }
.join h1 { font-size: 30px; line-height: 1.18; letter-spacing: -0.3px; margin: 28px 0 12px; }
.join p { margin: 0 auto; color: var(--muted); max-width: 320px; }
.join .actions { margin-top: auto; padding-top: 40px; display: flex; flex-direction: column; gap: 10px; }
.join .code-label { margin-top: 24px; font-size: 13px; color: var(--muted); }
.join .code { font-family: var(--display); font-size: 28px; letter-spacing: 8px; color: var(--accent); margin-top: 4px; }
.hide { display: none !important; }

@media (prefers-color-scheme: dark) { .dial { box-shadow: 0 0 0 1px var(--line), 0 40px 90px -40px var(--shadow); } }
@media (max-width: 560px) {
  .top nav a.hide-sm { display: none; }
}
@media (max-width: 720px) {
  .hero { padding-top: 12px; gap: 40px; }
  .hero .btn { flex: 1 1 100%; }
  .step .stage { height: 380px; }
  .top nav a { padding: 10px 8px; }
}
.essay > h2 { margin-top: 44px; }
