/* Tiny Skies — site styles. No build step: edit and deploy. */

:root {
  color-scheme: light dark;
  --sky-top: #b9d8ee;
  --sky-mid: #d7e9f6;
  --bg: #f4f8fc;
  --bg-alt: #eaf2f9;
  --surface: #ffffff;
  --surface-2: #f0f5fa;
  --ink: #0f2238;
  --ink-2: #344b66;
  --muted: #536a85;
  --accent: #1f64a6;
  --accent-ink: #ffffff;
  --line: rgba(15, 34, 56, 0.10);
  --shadow: 0 1px 2px rgba(15, 34, 56, 0.06), 0 12px 32px -12px rgba(25, 60, 100, 0.22);
  --shadow-lg: 0 2px 4px rgba(15, 34, 56, 0.06), 0 30px 60px -24px rgba(25, 60, 100, 0.35);
  --cloud: rgba(255, 255, 255, 0.85);
  --phone-bezel: #10151d;
  --radius: 22px;
  --gutter: 16px;
  --max: 1120px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", system-ui, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --sky-top: #0f1c33;
    --sky-mid: #0d182b;
    --bg: #0a1322;
    --bg-alt: #0e1a2c;
    --surface: #132238;
    --surface-2: #182a43;
    --ink: #eaf2fb;
    --ink-2: #bfd0e3;
    --muted: #97abc3;
    --accent: #8dc4f4;
    --accent-ink: #08182b;
    --line: rgba(234, 242, 251, 0.12);
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 12px 32px -12px rgba(0, 0, 0, 0.6);
    --shadow-lg: 0 2px 4px rgba(0, 0, 0, 0.3), 0 30px 60px -24px rgba(0, 0, 0, 0.7);
    --cloud: rgba(170, 195, 230, 0.10);
    --phone-bezel: #02060c;
  }
}

:root[data-theme="dark"] {
  --sky-top: #0f1c33;
  --sky-mid: #0d182b;
  --bg: #0a1322;
  --bg-alt: #0e1a2c;
  --surface: #132238;
  --surface-2: #182a43;
  --ink: #eaf2fb;
  --ink-2: #bfd0e3;
  --muted: #97abc3;
  --accent: #8dc4f4;
  --accent-ink: #08182b;
  --line: rgba(234, 242, 251, 0.12);
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 12px 32px -12px rgba(0, 0, 0, 0.6);
  --shadow-lg: 0 2px 4px rgba(0, 0, 0, 0.3), 0 30px 60px -24px rgba(0, 0, 0, 0.7);
  --cloud: rgba(170, 195, 230, 0.10);
  --phone-bezel: #02060c;
}

/* ---------- App Store call to action ----------
   One switch on <html>: data-store="soon" shows the "Coming soon" pill, data-store="live" the download link. */
[data-store="soon"] .store-live,
[data-store="live"] .store-soon { display: none !important; }

*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--accent); text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 2px; }

:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

.skip {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--surface); color: var(--ink); padding: 10px 14px; border-radius: 10px; box-shadow: var(--shadow);
}
.skip:focus { top: 12px; }

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }

h1, h2, h3 { line-height: 1.12; letter-spacing: -0.022em; margin: 0 0 0.5em; font-weight: 700; }
h1 { font-size: clamp(2.4rem, 7vw, 4.1rem); letter-spacing: -0.035em; }
h2 { font-size: clamp(1.9rem, 4.6vw, 2.9rem); letter-spacing: -0.03em; }
h3 { font-size: 1.2rem; letter-spacing: -0.012em; }
p { margin: 0 0 1em; }

.eyebrow {
  display: inline-block; font-size: 0.8rem; font-weight: 650; letter-spacing: 0.09em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 0.8rem;
}
.lede { font-size: clamp(1.08rem, 2.2vw, 1.28rem); color: var(--ink-2); max-width: 36em; }
.muted { color: var(--muted); }
.small { font-size: 0.88rem; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--sky-top) 72%, transparent);
  -webkit-backdrop-filter: saturate(160%) blur(16px);
  backdrop-filter: saturate(160%) blur(16px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s, background-color 0.2s;
}
.site-header.scrolled { border-bottom-color: var(--line); background: color-mix(in srgb, var(--bg) 82%, transparent); }
.site-header .wrap { display: flex; align-items: center; gap: 20px; height: 60px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 700; font-size: 1.08rem; letter-spacing: -0.01em; }
.brand img { width: 32px; height: 32px; border-radius: 8px; }
.nav { display: none; margin-left: auto; gap: 22px; }
.nav a { color: var(--ink-2); text-decoration: none; font-size: 0.93rem; font-weight: 500; }
.nav a:hover { color: var(--ink); }
.header-cta { margin-left: auto; }
@media (min-width: 900px) {
  .nav { display: flex; }
  .header-cta { margin-left: 8px; }
}

/* ---------- Buttons / store CTA ---------- */
.store {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 22px; border-radius: 999px;
  font-weight: 650; font-size: 1rem; text-decoration: none; white-space: nowrap;
}
.store-live { background: var(--ink); color: var(--bg); }
.store-live:hover { opacity: 0.9; }
.store-soon {
  background: var(--surface); color: var(--ink); border: 1px solid var(--line); box-shadow: var(--shadow);
  cursor: default;
}
.store-soon::before {
  content: ""; width: 8px; height: 8px; border-radius: 50%; background: #3fb36b;
  box-shadow: 0 0 0 4px rgba(63, 179, 107, 0.18);
}
.store.compact { min-height: 38px; padding: 0 16px; font-size: 0.9rem; box-shadow: none; }
/* When the official badge image is used (see README), size it per Apple's guidelines. */
.store-badge img { height: 48px; width: auto; }

.btn-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  background: linear-gradient(180deg, var(--sky-top) 0%, var(--sky-mid) 45%, var(--bg) 100%);
  padding: 32px 0 40px;
}
.hero .wrap { position: relative; z-index: 1; display: grid; gap: 40px; align-items: center; }
@media (min-width: 900px) {
  .hero { padding: 64px 0 64px; }
  .hero .wrap { grid-template-columns: 1.05fr 0.95fr; gap: 56px; }
}
.hero h1 { margin-bottom: 0.35em; }
.hero .lede { margin-bottom: 1.6rem; }
.hero-meta { margin-top: 1rem; font-size: 0.92rem; color: var(--muted); }

.clouds { position: absolute; inset: 0; pointer-events: none; z-index: 0; }
.cloud {
  position: absolute; border-radius: 50%; background: var(--cloud); filter: blur(28px); opacity: 0.9;
  animation: drift 70s linear infinite;
}
.cloud.c1 { width: 340px; height: 110px; top: 9%; left: -360px; }
.cloud.c2 { width: 240px; height: 80px; top: 30%; left: -260px; animation-duration: 95s; animation-delay: -40s; }
.cloud.c3 { width: 420px; height: 130px; top: 62%; left: -440px; animation-duration: 120s; animation-delay: -75s; opacity: 0.6; }
@keyframes drift { to { transform: translateX(calc(100vw + 480px)); } }

.scene-stage { justify-self: center; width: 100%; max-width: 460px; }
.scene-card {
  position: relative; aspect-ratio: 4 / 5; border-radius: 32px; overflow: hidden;
  background: #c8e2f1; box-shadow: var(--shadow-lg);
  transition: background-color 0.6s ease;
}
.scene-card img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 55%;
  transition: opacity 0.45s ease;
}
.scene-card img.fading { opacity: 0; }
.scene-label {
  position: absolute; left: 18px; top: 16px; z-index: 1;
  font-size: 0.85rem; font-weight: 600; padding: 6px 12px; border-radius: 999px;
  background: rgba(255, 255, 255, 0.72); color: #0f2238;
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
.scene-card.dark .scene-label { background: rgba(10, 18, 32, 0.55); color: #eaf2fb; }

.weather-toggle {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-top: 18px;
  border: 0; padding: 0;
}
.weather-toggle legend { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.weather-toggle button {
  font: inherit; font-size: 0.86rem; font-weight: 600; cursor: pointer;
  min-height: 40px; padding: 0 13px; border-radius: 999px;
  color: var(--ink-2); background: var(--surface); border: 1px solid var(--line);
}
.weather-toggle button:hover { color: var(--ink); }
.weather-toggle button[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.no-js .weather-toggle { display: none; }
@media (max-width: 420px) {
  .weather-toggle { gap: 5px; }
  .weather-toggle button { padding: 0 10px; font-size: 0.82rem; min-height: 36px; }
}

/* ---------- Sections ---------- */
section { padding: 76px 0; scroll-margin-top: 60px; }
@media (min-width: 900px) { section { padding: 110px 0; } }
.section-alt { background: var(--bg-alt); }
#how { padding-top: 48px; }
@media (min-width: 900px) { #how { padding-top: 64px; } }
.section-head { max-width: 40em; margin-bottom: 44px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head.center .lede { margin-left: auto; margin-right: auto; }

/* Steps */
.steps { display: grid; gap: 18px; counter-reset: step; margin: 0 0 56px; padding: 0; list-style: none; }
@media (min-width: 760px) { .steps { grid-template-columns: repeat(3, 1fr); gap: 22px; } }
.steps li {
  counter-increment: step; background: var(--surface); border-radius: var(--radius); padding: 26px 24px 22px;
  box-shadow: var(--shadow); border: 1px solid var(--line);
}
.steps li::before {
  content: counter(step); display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%;
  background: var(--surface-2); color: var(--accent); font-weight: 700; margin-bottom: 14px;
}
.steps p { color: var(--ink-2); margin: 0; }

/* Phones */
.phones {
  display: flex; gap: 18px; justify-content: center; align-items: flex-start;
  overflow-x: auto; scroll-snap-type: x mandatory; padding: 10px var(--gutter) 30px;
  margin: 0 calc(-1 * var(--gutter));
  scrollbar-width: none;
}
.phones::-webkit-scrollbar { display: none; }
@media (max-width: 899px) { .phones { justify-content: flex-start; } }
.phone { flex: 0 0 auto; width: 220px; margin: 0; scroll-snap-align: center; }
@media (min-width: 900px) { .phone { width: 236px; } .phone:nth-child(even) { margin-top: 40px; } }
.phone img {
  width: 100%; aspect-ratio: 1320 / 2868; border-radius: 34px; border: 7px solid var(--phone-bezel);
  box-shadow: var(--shadow-lg); background: var(--phone-bezel);
}
.phone figcaption { text-align: center; font-size: 0.9rem; color: var(--muted); margin-top: 12px; }

/* Features */
.features { display: grid; gap: 14px; margin-top: 8px; }
@media (min-width: 640px) { .features { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .features { grid-template-columns: repeat(4, 1fr); } }
.feature { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.feature .icon { width: 30px; height: 30px; color: var(--accent); margin-bottom: 12px; }
.feature h3 { font-size: 1.05rem; margin-bottom: 0.35em; }
.feature p { color: var(--ink-2); margin: 0; font-size: 0.96rem; }

/* Weather gallery */
.gallery { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin: 0; padding: 0; list-style: none; }
@media (min-width: 760px) { .gallery { grid-template-columns: repeat(4, 1fr); gap: 18px; } }
.gallery figure { margin: 0; position: relative; border-radius: 20px; overflow: hidden; box-shadow: var(--shadow); }
.gallery img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: 50% 58%; }
.gallery figcaption {
  position: absolute; left: 10px; bottom: 10px; font-size: 0.82rem; font-weight: 600;
  padding: 5px 10px; border-radius: 999px; background: rgba(255, 255, 255, 0.78); color: #0f2238;
}
.gallery .night figcaption { background: rgba(10, 18, 32, 0.6); color: #eaf2fb; }
.dayparts { margin-top: 28px; text-align: center; }

/* Widgets */
.split { display: grid; gap: 44px; align-items: center; }
@media (min-width: 900px) { .split { grid-template-columns: 1fr 1fr; gap: 64px; } .split.flip > :first-child { order: 2; } }
.checks { list-style: none; margin: 0 0 1.2em; padding: 0; }
.checks li { position: relative; padding-left: 30px; margin-bottom: 10px; color: var(--ink-2); }
.checks li::before {
  content: ""; position: absolute; left: 0; top: 0.45em; width: 16px; height: 9px;
  border-left: 2.5px solid var(--accent); border-bottom: 2.5px solid var(--accent); transform: rotate(-45deg) scale(0.85);
}

.homescreen {
  position: relative; border-radius: 40px; padding: 26px 22px 30px;
  background: linear-gradient(160deg, #7fb3df 0%, #a7c8e8 40%, #e2c9d9 100%);
  box-shadow: var(--shadow-lg); max-width: 440px; width: 100%; justify-self: center;
}
.homescreen .lock {
  display: flex; align-items: center; gap: 10px; margin: 0 auto 20px; width: max-content; max-width: 100%;
  padding: 8px 14px; border-radius: 16px; background: rgba(15, 34, 56, 0.38); color: #fff;
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); font-size: 0.85rem; line-height: 1.25;
}
.homescreen .lock strong { font-size: 1.25rem; }
.widgets { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.widget {
  position: relative; border-radius: 24px; overflow: hidden; background: #c8e2f1; color: #0f2238;
  box-shadow: 0 10px 24px -12px rgba(20, 40, 80, 0.45); aspect-ratio: 1;
}
.widget img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 52%; transform: translateY(16%) scale(1.12); }
.widget .w-text { position: absolute; left: 12px; top: 10px; line-height: 1.15; }
.widget .w-temp { font-size: 1.6rem; font-weight: 600; letter-spacing: -0.03em; }
.widget .w-city { font-size: 0.78rem; font-weight: 600; }
.widget.night { background: #101c32; color: #eaf2fb; }
.widget.medium { grid-column: 1 / -1; aspect-ratio: 2.12; }
.widget.medium img { left: 34%; width: 66%; transform: translateY(4%) scale(1.25); }
.widget.medium .w-text { top: 14px; left: 16px; }
.widget.medium .w-cond { font-size: 0.82rem; margin-top: 4px; opacity: 0.85; }
.widget.medium .w-hl { font-size: 0.78rem; position: absolute; left: 16px; bottom: 12px; opacity: 0.8; }
.mock-note { text-align: center; font-size: 0.8rem; color: var(--muted); margin-top: 14px; }

/* Community */
.community-phones { display: flex; gap: 18px; justify-content: center; }
.community-phones .phone { width: min(44vw, 230px); }
@media (min-width: 900px) { .community-phones .phone:nth-child(even) { margin-top: 48px; } }
.plaque {
  display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--line); font-size: 0.92rem; color: var(--ink-2); margin-bottom: 18px;
}
.plaque svg { width: 16px; height: 16px; color: var(--accent); }

/* Pricing */
.plans { display: grid; gap: 18px; max-width: 880px; margin: 0 auto; }
@media (min-width: 760px) { .plans { grid-template-columns: 1fr 1fr; gap: 22px; } }
.plan {
  background: var(--surface); border-radius: 26px; padding: 30px 26px; border: 1px solid var(--line);
  box-shadow: var(--shadow); display: flex; flex-direction: column;
}
.plan.plus { border: 2px solid var(--accent); }
.plan h3 { font-size: 1.35rem; margin-bottom: 0.2em; }
.price { font-size: 2.2rem; font-weight: 700; letter-spacing: -0.03em; margin: 6px 0 2px; }
.price small { font-size: 1rem; font-weight: 500; color: var(--muted); letter-spacing: 0; }
.plan .alt-price { color: var(--muted); margin-bottom: 18px; }
.plan .checks { margin-top: 8px; }
.fine { max-width: 880px; margin: 26px auto 0; font-size: 0.85rem; color: var(--muted); text-align: center; }

/* FAQ */
.faq { max-width: 780px; margin: 0 auto; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  cursor: pointer; list-style: none; padding: 20px 40px 20px 0; position: relative;
  font-weight: 620; font-size: 1.06rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; position: absolute; right: 8px; top: 50%; width: 10px; height: 10px; margin-top: -7px;
  border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg);
  transition: transform 0.2s;
}
.faq details[open] summary::after { transform: rotate(-135deg); margin-top: -2px; }
.faq details > div { padding: 0 0 20px; color: var(--ink-2); }
.faq details > div p:last-child { margin-bottom: 0; }

/* Closing band */
.closing { text-align: center; background: linear-gradient(180deg, var(--bg) 0%, var(--sky-mid) 100%); padding-bottom: 40px; }
.closing img { width: min(520px, 92%); margin: 0 auto 10px; filter: drop-shadow(0 30px 30px rgba(25, 60, 100, 0.22)); }
.closing .btn-row { justify-content: center; }

/* Footer */
.site-footer { background: var(--sky-mid); padding: 36px 0 48px; font-size: 0.92rem; color: var(--ink-2); }
.site-footer .wrap { display: grid; gap: 18px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 10px 22px; list-style: none; padding: 0; margin: 0; }
.footer-links a { color: var(--ink-2); }
.legal { font-size: 0.8rem; color: var(--muted); margin: 0; }

/* Small pages (404, redirects) */
.simple { min-height: 100vh; display: grid; place-items: center; text-align: center; padding: 40px var(--gutter);
  background: linear-gradient(180deg, var(--sky-top) 0%, var(--bg) 100%); }
.simple img.icon { width: 88px; height: 88px; border-radius: 20px; margin: 0 auto 20px; box-shadow: var(--shadow); }
.simple h1 { font-size: clamp(1.9rem, 6vw, 2.6rem); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .cloud { animation: none; }
  .cloud.c1 { left: 6%; } .cloud.c2 { left: 58%; } .cloud.c3 { left: 20%; }
  .scene-card, .scene-card img, .faq summary::after { transition: none; }
}
