/* Rainline — Liquid Glass landing page */

:root {
  --bg: #dbe9f8;
  --bg-2: #eef4fb;
  --text: #0d1b2e;
  --muted: #4b5d74;
  --accent: #2f7cf6;
  --accent-2: #0a5fd8;
  --blob-1: #7fb6ff;
  --blob-2: #c4e4ff;
  --blob-3: #8fe3ff;
  /* what Safari paints behind its status/tool bars: the blob blue near the edges */
  --bar-tint: #b4d3fa;

  --glass-bg: rgba(255, 255, 255, 0.42);
  --glass-border: rgba(255, 255, 255, 0.75);
  --glass-edge: rgba(255, 255, 255, 0.95);
  --glass-shadow: 0 10px 40px rgba(30, 60, 110, 0.14), 0 1px 2px rgba(30, 60, 110, 0.08);
  --rain: rgba(60, 110, 190, 0.18);

  --radius: 28px;
  --maxw: 1120px;
  font-synthesis: none;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #070d19;
    --bg-2: #0e1a2e;
    --text: #eef3fb;
    --muted: #9badc6;
    --accent: #5b9bff;
    --accent-2: #2f74e0;
    --blob-1: #1f4fa8;
    --blob-2: #173a6b;
    --blob-3: #0f6d8f;
    --bar-tint: #14305f;

    --glass-bg: rgba(255, 255, 255, 0.07);
    --glass-border: rgba(255, 255, 255, 0.16);
    --glass-edge: rgba(255, 255, 255, 0.35);
    --glass-shadow: 0 10px 40px rgba(0, 0, 0, 0.45), 0 1px 2px rgba(0, 0, 0, 0.3);
    --rain: rgba(160, 200, 255, 0.12);
  }
}

* { box-sizing: border-box; margin: 0; padding: 0; }

/* Clip (not hide) horizontal overflow on both roots: mobile browsers widen the
   layout viewport to fit decorative glows otherwise, which allows a sideways scroll. */
html, body { overflow-x: hidden; overflow-x: clip; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Inter", "Segoe UI", system-ui, sans-serif;
  color: var(--text);
  background: linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 100%);
  min-height: 100vh;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

img, video { display: block; max-width: 100%; }
a { color: inherit; }

/* ---------- Ambient sky ---------- */

.sky {
  position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none;
  /* Safari 26 tints its bars from the background-color of fixed elements at the
     screen edge; the gradient covers it, so only the bars see --bar-tint. */
  background: linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 100%), var(--bar-tint);
}

.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.75;
  animation: drift 26s ease-in-out infinite alternate;
}
.b1 { width: 55vmax; height: 55vmax; background: var(--blob-1); top: -20vmax; left: -15vmax; }
.b2 { width: 45vmax; height: 45vmax; background: var(--blob-2); top: 20vh; right: -20vmax; animation-duration: 32s; }
.b3 { width: 40vmax; height: 40vmax; background: var(--blob-3); bottom: -20vmax; left: 25vw; animation-duration: 38s; }

@keyframes drift {
  0%   { transform: translate(0, 0) scale(1); }
  50%  { transform: translate(6vw, 4vh) scale(1.08); }
  100% { transform: translate(-4vw, 8vh) scale(0.95); }
}

.rain {
  position: absolute;
  inset: -50% 0 0 0;
  background-image:
    repeating-linear-gradient(105deg, transparent 0 22px, var(--rain) 22px 23px, transparent 23px 60px),
    repeating-linear-gradient(105deg, transparent 0 41px, var(--rain) 41px 42px, transparent 42px 97px);
  background-size: 100% 140px, 100% 230px;
  mask-image: repeating-linear-gradient(180deg, #000 0 18px, transparent 18px 70px);
  -webkit-mask-image: repeating-linear-gradient(180deg, #000 0 18px, transparent 18px 70px);
  animation: fall 1.1s linear infinite;
  opacity: 0.8;
}
@keyframes fall { to { transform: translate(-19px, 70px); } }

/* ---------- Glass ---------- */

.glass {
  position: relative;
  background: var(--glass-bg);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow), inset 0 1px 0 var(--glass-edge), inset 0 -1px 0 rgba(255, 255, 255, 0.08);
}
/* specular sheen across the top edge */
.glass::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.45) 0%, rgba(255, 255, 255, 0) 38%);
  opacity: 0.55;
  pointer-events: none;
}
@media (prefers-color-scheme: dark) {
  .glass::before { opacity: 0.25; }
}

/* ---------- Nav ---------- */

.nav {
  position: sticky;
  top: 14px;
  z-index: 10;
  width: min(var(--maxw), calc(100% - 32px));
  margin: 14px auto 0;
  padding: 8px 8px 8px 16px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; letter-spacing: -0.01em; text-decoration: none; }
.brand img { border-radius: 8px; }

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 15px 26px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 1.02rem;
  text-decoration: none;
  color: #fff;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.35), rgba(255, 255, 255, 0) 55%),
    linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 8px 24px rgba(47, 124, 246, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.55);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.btn:hover { transform: translateY(-2px) scale(1.02); box-shadow: 0 14px 32px rgba(47, 124, 246, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.55); }
.btn:active { transform: scale(0.98); }
.btn-small { padding: 9px 18px; font-size: 0.92rem; }
.btn-ghost { color: var(--text); background: var(--glass-bg); box-shadow: var(--glass-shadow), inset 0 1px 0 var(--glass-edge); }
.btn-ghost:hover { box-shadow: var(--glass-shadow), inset 0 1px 0 var(--glass-edge); }

/* ---------- Layout ---------- */

main { width: min(var(--maxw), calc(100% - 32px)); margin: 0 auto; }
section { padding: 72px 0; }

.section-title {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  line-height: 1.1;
  letter-spacing: -0.03em;
  text-align: center;
  max-width: 18ch;
  margin: 0 auto;
}
.section-sub { text-align: center; color: var(--muted); margin-top: 12px; font-size: 1.1rem; }

/* ---------- Hero ---------- */

.hero {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  align-items: center;
  gap: 48px;
  padding-top: 64px;
}

.pill {
  display: inline-block;
  padding: 7px 14px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted);
}

h1 {
  font-size: clamp(2.8rem, 7.5vw, 5.4rem);
  line-height: 0.98;
  letter-spacing: -0.045em;
  margin: 20px 0 22px;
  font-weight: 800;
}
.grad {
  color: var(--accent);
}
.lead { font-size: clamp(1.1rem, 2vw, 1.3rem); color: var(--muted); max-width: 32ch; }

.cta { display: flex; flex-wrap: wrap; gap: 12px; margin: 32px 0 16px; }
.fine { font-size: 0.88rem; color: var(--muted); }

/* phone */
.phone { position: relative; justify-self: center; width: min(320px, 78vw); }
.phone-frame {
  position: relative;
  border-radius: 48px;
  padding: 10px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.7), rgba(255, 255, 255, 0.15));
  box-shadow:
    0 40px 80px rgba(20, 40, 90, 0.3),
    inset 0 0 0 1px rgba(255, 255, 255, 0.6),
    inset 0 2px 1px rgba(255, 255, 255, 0.9);
}
@media (prefers-color-scheme: dark) {
  .phone-frame {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0.04));
    box-shadow: 0 40px 80px rgba(0, 0, 0, 0.6), inset 0 0 0 1px rgba(255, 255, 255, 0.18), inset 0 2px 1px rgba(255, 255, 255, 0.3);
  }
}
.phone-frame video {
  width: 100%;
  aspect-ratio: 1206 / 2622;
  object-fit: cover;
  border-radius: 39px;
  background: #9fbfe0;
}
.phone-glow {
  position: absolute;
  inset: 10% -20%;
  background: radial-gradient(closest-side, var(--accent), transparent);
  opacity: 0.35;
  filter: blur(40px);
  z-index: -1;
}

.float-card {
  position: absolute;
  padding: 12px 16px;
  border-radius: 20px;
  display: flex;
  flex-direction: column;
  font-size: 0.85rem;
  white-space: nowrap;
  animation: bob 6s ease-in-out infinite;
}
@media (prefers-color-scheme: dark) {
  .float-card { background: rgba(12, 22, 40, 0.6); }
}
.float-card strong { font-size: 1rem; }
.float-card span { color: var(--muted); }
.c1 { top: 22%; left: -28%; }
.c2 { bottom: 16%; right: -22%; animation-delay: -3s; }
@keyframes bob { 50% { transform: translateY(-10px); } }

/* ---------- Widget spotlight ---------- */

.spotlight { display: flex; flex-direction: column; align-items: center; text-align: center; }
.spotlight .section-title { max-width: none; margin-top: 18px; }

.widget-stage {
  position: relative;
  width: min(760px, 100%);
  margin: 56px auto 0;
  perspective: 1400px;
}
.widget-glow {
  position: absolute;
  inset: -12% -8%;
  background:
    radial-gradient(closest-side at 30% 50%, var(--accent), transparent),
    radial-gradient(closest-side at 75% 50%, var(--blob-3), transparent);
  opacity: 0.4;
  filter: blur(50px);
  z-index: -1;
}
.widget-wrap {
  position: relative;
  border-radius: 7% / 15.3%;
  box-shadow:
    0 40px 90px rgba(20, 40, 90, 0.3),
    0 0 0 1px var(--glass-border),
    0 0 0 10px rgba(255, 255, 255, 0.18);
  transform: rotateX(5deg);
  transition: transform 0.6s cubic-bezier(.2, .8, .2, 1);
  animation: float 8s ease-in-out infinite;
}
.widget-stage:hover .widget-wrap { transform: rotateX(0deg) scale(1.02); }
.widget-wrap picture { display: block; }
.widget-wrap img { width: 100%; height: auto; border-radius: 7% / 15.3%; }
@keyframes float { 50% { translate: 0 -8px; } }

.hotspot {
  position: absolute;
  width: 30px; height: 30px;
  margin: -15px 0 0 -15px;
  border-radius: 50%;
  display: grid; place-items: center;
  font-size: 0.85rem; font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 4px 14px rgba(47, 124, 246, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.6);
}
.hotspot::after {
  content: "";
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 2px solid var(--accent);
  animation: ping 2.4s ease-out infinite;
}
.hotspot:nth-of-type(2)::after { animation-delay: .6s; }
.hotspot:nth-of-type(3)::after { animation-delay: 1.2s; }
.hotspot:nth-of-type(4)::after { animation-delay: 1.8s; }
@keyframes ping { from { opacity: .8; transform: scale(.8); } to { opacity: 0; transform: scale(1.7); } }

.callouts {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-top: 56px;
  width: 100%;
  text-align: left;
}
.callouts li { border-radius: 22px; padding: 20px; display: flex; flex-direction: column; gap: 12px; }
.callouts li > span {
  width: 30px; height: 30px; border-radius: 50%;
  display: grid; place-items: center;
  font-weight: 700; font-size: 0.85rem; color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
}
.callouts b { display: block; margin-bottom: 4px; letter-spacing: -0.01em; }
.callouts p { color: var(--muted); font-size: 0.93rem; }

.outline-note {
  margin-top: 18px;
  border-radius: 999px;
  padding: 10px 22px 10px 10px;
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 0.95rem;
  color: var(--muted);
  text-align: left;
}
.outline-note b { color: var(--text); }
.outlines { display: flex; gap: 6px; flex: none; }
.outlines span {
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text);
  background: linear-gradient(135deg, rgba(47, 124, 246, 0.18), rgba(90, 200, 250, 0.18));
  box-shadow: inset 0 1px 0 var(--glass-edge);
}

/* ---------- Mascot ---------- */

.mascot-intro {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 36px;
  align-items: center;
  max-width: 820px;
  margin: 0 auto;
}
.mascot-hero {
  width: 180px; height: 180px;
  filter: drop-shadow(0 18px 30px rgba(30, 60, 110, 0.25));
  animation: walk 3.2s ease-in-out infinite;
}
@keyframes walk {
  0%, 100% { transform: translateY(0) rotate(-2deg); }
  50% { transform: translateY(-10px) rotate(2deg); }
}
.mascot-intro h2 {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin: 16px 0 12px;
}
.mascot-intro p { color: var(--muted); font-size: 1.05rem; max-width: 52ch; }

.conditions {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 12px;
  margin-top: 48px;
}
.conditions li {
  border-radius: 22px;
  padding: 12px 6px 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  text-align: center;
  transition: transform 0.3s cubic-bezier(.2, .8, .2, 1);
}
.conditions li:hover { transform: translateY(-6px) scale(1.04); }
.conditions img { width: 84px; height: 84px; filter: drop-shadow(0 6px 10px rgba(30, 60, 110, 0.18)); }
.conditions span { font-size: 0.8rem; font-weight: 600; color: var(--muted); }

/* ---------- Features ---------- */

.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-top: 48px;
}
.card {
  border-radius: var(--radius);
  padding: 28px;
  transition: transform 0.3s ease;
}
.card:hover { transform: translateY(-4px); }
.card .icon {
  width: 64px; height: 64px;
  margin: -6px 0 12px -6px;
  filter: drop-shadow(0 6px 10px rgba(30, 60, 110, 0.18));
}
.card h3 { font-size: 1.15rem; letter-spacing: -0.01em; margin-bottom: 8px; }
.card p { color: var(--muted); font-size: 0.98rem; }

/* ---------- Screenshots ---------- */

.shot-row {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 28px;
  margin-top: 48px;
}
.shot-row figure { width: min(280px, 30%); text-align: center; }
.shot-row figure:nth-child(2) { transform: translateY(-28px); }
.shot-row img {
  border-radius: 36px;
  box-shadow: 0 30px 60px rgba(20, 40, 90, 0.25), 0 0 0 1px var(--glass-border);
  transition: transform 0.4s ease;
}
.shot-row img:hover { transform: scale(1.03); }
figcaption { margin-top: 14px; font-weight: 600; color: var(--muted); font-size: 0.95rem; }

/* ---------- Coverage ---------- */

.coverage {
  border-radius: 36px;
  padding: 44px;
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 32px;
  align-items: center;
  margin: 40px 0;
}
.coverage h2 { font-size: 2rem; letter-spacing: -0.03em; margin-bottom: 10px; }
.coverage p { color: var(--muted); }
.regions { list-style: none; display: grid; gap: 12px; }
.regions li {
  border-radius: 20px;
  padding: 16px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.regions span { color: var(--muted); font-size: 0.9rem; }

/* ---------- Final CTA ---------- */

.final { text-align: center; display: flex; flex-direction: column; align-items: center; }
.final-icon { border-radius: 22px; box-shadow: 0 20px 40px rgba(47, 124, 246, 0.35); margin-bottom: 24px; }
.final h2 { font-size: clamp(2.2rem, 5vw, 3.4rem); letter-spacing: -0.04em; }
.final > p { color: var(--muted); max-width: 40ch; margin: 10px 0 28px; font-size: 1.1rem; }

.steps {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 44px;
  width: 100%;
  text-align: left;
}
.steps li { border-radius: 22px; padding: 18px 20px; display: flex; align-items: center; gap: 14px; font-weight: 500; }
.steps li > span {
  flex: none;
  width: 32px; height: 32px;
  border-radius: 50%;
  display: grid; place-items: center;
  font-weight: 700; font-size: 0.9rem;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
}
.steps a { color: var(--accent); }

/* ---------- Footer ---------- */

footer {
  width: min(var(--maxw), calc(100% - 32px));
  margin: 0 auto;
  padding: 40px 0 56px;
  text-align: center;
  font-size: 0.8rem;
  color: var(--muted);
  display: grid;
  gap: 6px;
}

/* ---------- Responsive ---------- */

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; text-align: center; padding-top: 40px; }
  .lead { margin: 0 auto; }
  .cta { justify-content: center; }
  .grid { grid-template-columns: repeat(2, 1fr); }
  .coverage { grid-template-columns: 1fr; padding: 28px; }
  .callouts { grid-template-columns: repeat(2, 1fr); }
  .conditions { grid-template-columns: repeat(4, 1fr); }
  .mascot-intro { grid-template-columns: 1fr; text-align: center; justify-items: center; gap: 16px; }
  .mascot-intro p { margin: 0 auto; }
  .outline-note { border-radius: 24px; flex-direction: column; padding: 16px; text-align: center; gap: 10px; }
  .c1 { left: -14%; }
  .c2 { right: -12%; }
}

@media (max-width: 600px) {
  section { padding: 52px 0; }
  .grid, .steps, .callouts { grid-template-columns: 1fr; }
  .callouts li { flex-direction: row; align-items: flex-start; }
  .callouts li > span { flex: none; }
  .widget-stage { margin-top: 40px; }
  .widget-wrap { box-shadow: 0 24px 50px rgba(20, 40, 90, 0.3), 0 0 0 1px var(--glass-border), 0 0 0 5px rgba(255, 255, 255, 0.18); }
  .hotspot { width: 22px; height: 22px; margin: -11px 0 0 -11px; font-size: 0.7rem; }
  .outlines span { font-size: 0.72rem; padding: 5px 9px; }
  .conditions { grid-template-columns: repeat(3, 1fr); gap: 10px; }
  .conditions img { width: 68px; height: 68px; }
  .mascot-hero { width: 140px; height: 140px; }
  .shot-row { gap: 12px; }
  .shot-row figure { width: 33%; }
  .shot-row figure:nth-child(2) { transform: translateY(-16px); }
  .shot-row img { border-radius: 16px; }
  .c1 { left: -8%; top: 12%; }
  .c2 { right: -6%; }
  .float-card { font-size: 0.75rem; padding: 9px 12px; }
  .float-card strong { font-size: 0.88rem; }
  .regions li { flex-direction: column; align-items: flex-start; gap: 2px; }
}

@media (prefers-reduced-motion: reduce) {
  .blob, .rain, .float-card, .widget-wrap, .hotspot::after, .mascot-hero { animation: none; }
  .rain { display: none; }
  html { scroll-behavior: auto; }
}
