/* Rain Gauge website. Tokens follow the app's "Almanak" redesign
   (docs/redesign/tokens.json): navy, cream, gold in dark; cream, navy, teal in light. */

@font-face { font-family: "Fraunces"; src: url("/assets/fonts/Fraunces_600SemiBold.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Public Sans"; src: url("/assets/fonts/PublicSans_400Regular.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Public Sans"; src: url("/assets/fonts/PublicSans_600SemiBold.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Public Sans"; src: url("/assets/fonts/PublicSans_700Bold.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }

:root {
  --bg: #f5f1e6;
  --surface: #ffffff;
  --surface-2: #ebe5d5;
  --text: #0b1638;
  --muted: #5a6278;
  --accent: #3f7f7b;
  --accent-ink: #ffffff;
  --gold: #a8995f;
  --line: rgba(11, 22, 56, 0.1);
  --btn: #0b1638;
  --btn-ink: #f4efe2;
  --panel: #0b1638;
  --panel-ink: #f4efe2;
  --panel-muted: #b8bfd4;
  --panel-btn: #cfc493;
  --panel-btn-ink: #0b1638;
  --shadow: 0 30px 60px -30px rgba(11, 22, 56, 0.45);
  --glow: rgba(63, 127, 123, 0.16);
  --display: "Fraunces", Georgia, "Times New Roman", serif;
  --body: "Public Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b1638;
    --surface: #13224d;
    --surface-2: #091230;
    --text: #f4efe2;
    --muted: #b8bfd4;
    --accent: #cfc493;
    --accent-ink: #0b1638;
    --gold: #cfc493;
    --line: rgba(244, 239, 226, 0.12);
    --btn: #cfc493;
    --btn-ink: #0b1638;
    --panel: #13224d;
    --panel-ink: #f4efe2;
    --panel-muted: #b8bfd4;
    --panel-btn: #cfc493;
    --panel-btn-ink: #0b1638;
    --shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.7);
    --glow: rgba(95, 166, 160, 0.18);
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { overflow-x: clip; -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 1.0625rem/1.6 var(--body);
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
}
/* Greek has no glyphs in Fraunces or Public Sans; the system faces carry it at the right weight. */
.lang-el { --display: Georgia, "Times New Roman", serif; --body: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

h1, h2, h3 { font-family: var(--display); font-weight: 600; line-height: 1.15; letter-spacing: -0.01em; margin: 0 0 0.5em; text-wrap: balance; }
/* Fraunces descenders need room at tight line heights (see CLAUDE.md, the same fix as the app). */
h1 { font-size: clamp(2.2rem, 1.4rem + 3.6vw, 3.9rem); line-height: 1.06; padding-bottom: 0.08em; }
h2 { font-size: clamp(1.75rem, 1.3rem + 1.8vw, 2.6rem); }
h3 { font-size: 1.25rem; line-height: 1.25; }
p { margin: 0 0 1em; }

.wrap { width: 100%; max-width: 1140px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 700px) { .wrap { padding: 0 32px; } }
.narrow { max-width: 820px; }
.muted { color: var(--muted); }
.ico { width: 22px; height: 22px; flex: none; }

.skip { position: absolute; left: -999px; top: 8px; background: var(--btn); color: var(--btn-ink); padding: 8px 14px; border-radius: 8px; z-index: 50; }
.skip:focus { left: 8px; }

/* ---------------------------------------------------------------- header */
.top { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 86%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.top-in { display: flex; align-items: center; gap: 20px; height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-family: "Fraunces", Georgia, serif; font-weight: 600; font-size: 1.2rem; }
.brand img { border-radius: 8px; }
.nav { display: none; gap: 24px; margin-left: auto; font-size: 0.95rem; }
.nav a { text-decoration: none; color: var(--muted); }
.nav a:hover { color: var(--text); }
@media (min-width: 980px) { .nav { display: flex; } }

.lang { position: relative; margin-left: auto; }
@media (min-width: 980px) { .lang { margin-left: 0; } }
.lang summary { list-style: none; display: flex; align-items: center; gap: 6px; cursor: pointer; padding: 8px 10px; border: 1px solid var(--line); border-radius: 999px; font-size: 0.9rem; min-height: 40px; }
.lang summary::-webkit-details-marker { display: none; }
.lang summary .ico { width: 18px; height: 18px; }
.lang summary .ico:last-child { width: 14px; height: 14px; transition: transform .2s; }
.lang[open] summary .ico:last-child { transform: rotate(180deg); }
.lang ul { position: absolute; right: 0; top: calc(100% + 8px); margin: 0; padding: 8px; list-style: none; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); columns: 2; column-gap: 4px; width: max-content; max-width: calc(100vw - 32px); }
.lang li a { display: block; padding: 8px 12px; border-radius: 10px; text-decoration: none; font-size: 0.95rem; }
.lang li a:hover, .lang li a[aria-current] { background: var(--surface-2); color: var(--text); }
.lang li a[aria-current] { font-weight: 700; }

/* ---------------------------------------------------------------- buttons */
.stores { display: flex; flex-wrap: wrap; gap: 12px; margin: 28px 0 16px; }
.stores.center { justify-content: center; }
.store { display: inline-flex; align-items: center; gap: 12px; padding: 12px 20px 12px 16px; min-height: 56px; border-radius: 16px; background: var(--btn); color: var(--btn-ink); text-decoration: none; font-weight: 700; line-height: 1.2; transition: transform .15s ease, box-shadow .15s ease; }
.store small { display: block; font-weight: 400; font-size: 0.78rem; opacity: 0.8; }
.store:hover { color: var(--btn-ink); transform: translateY(-1px); box-shadow: var(--shadow); }
.store .ico { width: 24px; height: 24px; }
@media (max-width: 520px) { .stores:not(.center) .store { flex: 1 1 100%; } }
.link { font-weight: 700; color: var(--accent); text-decoration: none; }

/* ---------------------------------------------------------------- hero */
.hero { position: relative; padding: 48px 0 24px; overflow-x: clip; }
.hero::before { content: ""; position: absolute; inset: -20% -10% 20%; background: radial-gradient(60% 50% at 70% 40%, var(--glow), transparent 70%); pointer-events: none; }
.hero-in { position: relative; display: grid; gap: 40px; align-items: center; }
@media (min-width: 980px) { .hero { padding: 72px 0 40px; } .hero-in { grid-template-columns: 1fr 1.05fr; gap: 24px; } }
.lead { font-size: 1.2rem; color: var(--muted); max-width: 34em; }
.note { font-size: 0.95rem; color: var(--muted); }

.hero-phones { position: relative; display: flex; justify-content: center; align-items: center; min-height: 420px; }
.phone { margin: 0; position: relative; border-radius: 44px; padding: 9px; background: #0a0f1f; box-shadow: var(--shadow), inset 0 0 0 1.5px rgba(255, 255, 255, 0.14); }
.phone::before { content: ""; position: absolute; top: 17px; left: 50%; width: 30%; height: 20px; transform: translateX(-50%); background: #0a0f1f; border-radius: 12px; z-index: 1; }
.phone img { width: 100%; }
/* The screenshots have no status bar (they are rendered without a safe area), so the
   frame adds one: the island sits in it instead of on top of the app's first line. */
.phone .scr { border-radius: 35px; overflow: hidden; background: #0b1638; padding-top: 11%; }
.hero-phones .main { width: min(62vw, 300px); z-index: 2; }
.hero-phones .side { position: absolute; width: min(48vw, 236px); opacity: 0.92; }
.hero-phones .left { left: 50%; transform: translateX(-118%) rotate(-5deg); }
.hero-phones .right { left: 50%; transform: translateX(18%) rotate(5deg); }
@media (min-width: 980px) { .hero-phones { min-height: 640px; } .hero-phones .left { transform: translateX(-122%) rotate(-5deg) translateY(30px); } .hero-phones .right { transform: translateX(22%) rotate(5deg) translateY(30px); } }

/* Animation 1: the three phones rise into place once. */
@media (prefers-reduced-motion: no-preference) {
  .hero-phones .phone { animation: rise .9s cubic-bezier(.2, .8, .2, 1) both; }
  .hero-phones .left, .hero-phones .right { animation-name: rise-side; animation-delay: .12s; }
  .hero-text { animation: fade .7s ease both; }
}
@keyframes rise { from { opacity: 0; transform: translateY(40px); } }
@keyframes rise-side { from { opacity: 0; translate: 0 50px; } }
@keyframes fade { from { opacity: 0; } }

/* ---------------------------------------------------------------- sections */
.sec { padding: 56px 0; }
@media (min-width: 980px) { .sec { padding: 88px 0; } }
.intro { font-size: 1.15rem; color: var(--muted); max-width: 40em; margin-bottom: 36px; }
.fine { font-size: 0.92rem; color: var(--muted); max-width: 52em; margin-top: 24px; }

/* The app's section divider: a thin gold line with a drop. */
.rule { display: flex; align-items: center; gap: 14px; max-width: 1076px; margin: 0 auto; padding: 0 16px; color: var(--gold); }
.rule::before, .rule::after { content: ""; flex: 1; height: 1px; background: currentColor; opacity: 0.45; }
.rule svg { width: 12px; height: 16px; fill: currentColor; }

.grid { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 22px; padding: 24px; }
.features { grid-template-columns: 1fr; }
@media (min-width: 640px) { .features { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1000px) { .features { grid-template-columns: repeat(4, 1fr); } }
.feat .ico { width: 30px; height: 30px; color: var(--accent); margin-bottom: 14px; }
.feat h3 { font-size: 1.15rem; }
.feat p { color: var(--muted); font-size: 0.98rem; margin: 0; }

.spots { display: grid; gap: 56px; margin-top: 72px; }
.spot { display: grid; gap: 28px; align-items: center; }
.spot .phone { width: min(72vw, 290px); margin: 0 auto; }
.spot h3 { font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem); }
.spot p { color: var(--muted); font-size: 1.1rem; max-width: 30em; }
@media (min-width: 800px) {
  .spot { grid-template-columns: 1.1fr 1fr; gap: 56px; }
  .spot.flip .spot-text { order: 2; }
}

.how { display: grid; gap: 40px; align-items: center; }
@media (min-width: 900px) { .how { grid-template-columns: 1.4fr 1fr; } }
.steps { list-style: none; padding: 0; margin: 32px 0 0; display: grid; gap: 28px; }
.steps li { display: flex; gap: 20px; }
.num { flex: none; font-family: var(--display); font-weight: 600; font-size: 2.6rem; line-height: 1; color: var(--accent); width: 44px; }
.steps h3 { margin-bottom: 6px; }
.steps p { color: var(--muted); margin: 0; }

.glass-wrap { display: flex; justify-content: center; }
.glass { width: 150px; height: auto; overflow: visible; }
.glass-line { fill: none; stroke: var(--text); stroke-opacity: .55; stroke-width: 2.5; stroke-linejoin: round; }
.glass .ticks { stroke: var(--text); stroke-opacity: .4; stroke-width: 2; stroke-linecap: round; }
.glass .foot { fill: var(--gold); }
.glass .water { transform: translateY(120px); }
/* Animation 2: the glass fills once when it comes into view. */
@media (prefers-reduced-motion: no-preference) {
  .glass .water { transition: transform 2.4s cubic-bezier(.3, .7, .2, 1); }
  .glass.wait .water { transform: translateY(250px); transition: none; }
}

.plans { display: grid; gap: 16px; }
@media (min-width: 760px) { .plans { grid-template-columns: 1fr 1fr; } }
.plan { padding: 28px; }
.plan h3 { font-size: 1.4rem; margin-bottom: 4px; }
.plan .price { font-family: var(--display); font-weight: 600; font-size: 1.9rem; line-height: 1.2; color: var(--accent); margin-bottom: 12px; }
.plan.pro { border: 2px solid var(--accent); }
.checks { list-style: none; padding: 0; margin: 16px 0 0; display: grid; gap: 10px; }
.checks li { position: relative; padding-left: 30px; }
.checks li::before { content: ""; position: absolute; left: 0; top: 0.3em; width: 18px; height: 18px; border-radius: 50%; background: var(--accent); }
.checks li::after { content: ""; position: absolute; left: 6px; top: calc(0.3em + 4px); width: 5px; height: 9px; border: solid var(--accent-ink); border-width: 0 2px 2px 0; transform: rotate(45deg); }

.faq { border-top: 1px solid var(--line); }
.qa { border-bottom: 1px solid var(--line); }
.qa summary { list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 20px 0; cursor: pointer; }
.qa summary::-webkit-details-marker { display: none; }
.qa summary h3 { margin: 0; font-size: 1.15rem; }
.qa summary .ico { transition: transform .2s; color: var(--accent); }
.qa[open] summary .ico { transform: rotate(180deg); }
.qa p { color: var(--muted); padding-bottom: 20px; margin: 0; max-width: 46em; }

.posts { grid-template-columns: 1fr; }
@media (min-width: 760px) { .posts { grid-template-columns: repeat(3, 1fr); } }
.post a { display: flex; flex-direction: column; height: 100%; text-decoration: none; }
.post h3 { font-size: 1.2rem; }
.post p { color: var(--muted); font-size: 0.98rem; }
.post .more { margin-top: auto; color: var(--accent); font-weight: 700; font-size: 0.95rem; }

.final { background: var(--panel); color: var(--panel-ink); border-radius: 28px; padding: 56px 24px; text-align: center; }
.final img { margin: 0 auto 24px; border-radius: 16px; }
.final p { color: var(--panel-muted); max-width: 34em; margin-left: auto; margin-right: auto; font-size: 1.1rem; }
.final .store { background: var(--panel-btn); color: var(--panel-btn-ink); }
@media (prefers-color-scheme: dark) { .final { border: 1px solid var(--line); } }

/* ---------------------------------------------------------------- pages */
.page-head h1 { margin-top: 8px; }
.lang-list { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 20px; color: var(--muted); }

.prose { max-width: 720px; }
.prose h1 { font-size: clamp(2rem, 1.4rem + 2.4vw, 3rem); }
.prose .meta { color: var(--muted); font-size: 0.95rem; margin-bottom: 32px; }
.prose h2 { font-size: 1.6rem; margin-top: 1.8em; }
.prose h3 { font-size: 1.2rem; margin-top: 1.4em; }
.prose ul, .prose ol { padding-left: 1.3em; margin: 0 0 1em; }
.prose li { margin-bottom: 0.4em; }
.prose blockquote { margin: 1.4em 0; padding: 4px 0 4px 20px; border-left: 3px solid var(--gold); color: var(--muted); }
.prose code { font-size: 0.9em; background: var(--surface-2); padding: 1px 5px; border-radius: 5px; }
.legal h2 { font-size: 1.35rem; }

.cta { display: flex; gap: 18px; align-items: flex-start; margin: 36px 0; border: 2px solid var(--accent); }
.cta img { border-radius: 14px; flex: none; }
.cta-t { font-family: var(--display); font-weight: 600; font-size: 1.3rem; line-height: 1.25; margin-bottom: 6px; }
.cta p { margin-bottom: 0.5em; }
.cta .stores { margin: 16px 0 0; }
@media (max-width: 520px) { .cta { flex-direction: column; } }

/* ---------------------------------------------------------------- footer */
.foot { border-top: 1px solid var(--line); padding: 40px 0 48px; font-size: 0.92rem; color: var(--muted); }
.foot-in { display: grid; gap: 24px; }
@media (min-width: 860px) { .foot-in { grid-template-columns: 1.2fr 1fr 1.4fr; } }
.foot .brand { color: var(--text); margin-bottom: 10px; }
.foot p { margin: 0; }
.foot-links { display: flex; flex-direction: column; gap: 8px; }
.foot-links .muted { font-size: 0.85rem; margin-top: -6px; }
.foot-langs { display: flex; flex-wrap: wrap; gap: 6px 14px; align-content: flex-start; }
.foot a { text-decoration: none; }
.foot a:hover { text-decoration: underline; }

.more-link { display: inline-block; margin-left: 4px; font-weight: 700; color: var(--accent); text-decoration: none; white-space: nowrap; }
