/* Meteosense site style. Dark, system sans, large type, single 720px column. */

:root {
  color-scheme: dark;
  --bg: #1b1b1b;
  --fg: #ffffff;
  --muted: #8f8f8f;
  --rule: #2f2f2f;
  --accent: #e8955c;
}

* { box-sizing: border-box; }

body {
  margin: 0 auto;
  max-width: 720px;
  padding: clamp(40px, 8vw, 88px) 24px clamp(80px, 14vw, 140px);
  background: var(--bg);
  color: var(--fg);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: clamp(18px, 2.4vw, 24px);
  line-height: 1.5;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Wordmark row */
nav {
  font-size: clamp(15px, 1.7vw, 17px);
  color: var(--muted);
  margin-bottom: clamp(28px, 5vw, 48px);
}
nav a { color: var(--muted); margin-right: 20px; }
nav a:hover { color: var(--fg); }

h1 {
  font-size: clamp(40px, 7.2vw, 64px);
  line-height: 1.08;
  font-weight: 500;
  letter-spacing: -0.02em;
  margin: 0 0 clamp(20px, 3vw, 32px);
}

h2 {
  font-size: clamp(28px, 5vw, 48px);
  line-height: 1.15;
  font-weight: 400;
  letter-spacing: -0.01em;
  margin: clamp(56px, 9vw, 96px) 0 clamp(16px, 2.4vw, 28px);
}

h3 {
  font-size: clamp(19px, 2.4vw, 24px);
  font-weight: 500;
  margin: 2em 0 0.4em;
}

p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

.lede { font-size: clamp(20px, 3vw, 30px); line-height: 1.35; font-weight: 400; }
.muted { color: var(--muted); font-size: clamp(15px, 1.7vw, 17px); }

a { color: var(--fg); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 4px; }
a.plain { color: var(--muted); }
a.plain:hover { color: var(--fg); }

/* App Store call to action */
.cta { margin: clamp(32px, 5vw, 48px) 0 0; }
.cta a {
  display: inline-block;
  padding: 0.55em 1.1em;
  border: 1px solid var(--fg);
  border-radius: 999px;
  font-size: clamp(17px, 2vw, 21px);
  transition: background 0.15s ease, color 0.15s ease;
}
.cta a:hover { background: var(--fg); color: var(--bg); text-decoration: none; }
.cta .muted { margin-top: 0.9em; }

/* Hero: three app screens fanned out, centre one in front */
.hero {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 0 0 clamp(36px, 5.5vw, 60px);
}
.hero-shot {
  display: block;
  height: auto;
  width: 32%;
  filter: drop-shadow(0 22px 44px rgba(0, 0, 0, 0.55));
}
.hero-main {
  width: 38%;
  position: relative;
  z-index: 2;
}
.hero-side {
  z-index: 1;
  filter: drop-shadow(0 18px 36px rgba(0, 0, 0, 0.5)) brightness(0.78);
}
.hero-side:first-child { margin-right: -5%; }
.hero-side:last-child { margin-left: -5%; }

/* Light entrance: the centre screen rises, the two behind it fan outwards */
@keyframes heroRise {
  from { opacity: 0; transform: translateY(26px) scale(0.97); }
  to   { opacity: 1; transform: none; }
}
@keyframes heroFanLeft {
  from { opacity: 0; transform: translate(9%, 18px) scale(0.94); }
  to   { opacity: 1; transform: none; }
}
@keyframes heroFanRight {
  from { opacity: 0; transform: translate(-9%, 18px) scale(0.94); }
  to   { opacity: 1; transform: none; }
}
.hero-main { animation: heroRise 0.8s cubic-bezier(0.2, 0.7, 0.3, 1) 0.05s both; }
.hero-side:first-child { animation: heroFanLeft 0.8s cubic-bezier(0.2, 0.7, 0.3, 1) 0.22s both; }
.hero-side:last-child { animation: heroFanRight 0.8s cubic-bezier(0.2, 0.7, 0.3, 1) 0.32s both; }

h1, .lede, .cta { animation: heroRise 0.7s cubic-bezier(0.2, 0.7, 0.3, 1) both; }
h1 { animation-delay: 0.30s; }
.lede { animation-delay: 0.38s; }
.cta { animation-delay: 0.46s; }

@media (prefers-reduced-motion: reduce) {
  .hero-shot, h1, .lede, .cta { animation: none; }
}

/* One screen is enough on a phone; three would be unreadable */
@media (max-width: 600px) {
  .hero-side { display: none; }
  .hero-main { width: 58%; }
}

ul { padding-left: 1.1em; margin: 0 0 1em; }
li { margin-bottom: 0.45em; }
li:last-child { margin-bottom: 0; }

/* Accordion rows, one per line, chevron on the left */
details { border-bottom: 1px solid var(--rule); }
details:first-of-type { border-top: 1px solid var(--rule); }

summary {
  display: flex;
  align-items: baseline;
  gap: 0.55em;
  list-style: none;
  cursor: pointer;
  padding: clamp(14px, 2vw, 20px) 0;
  font-size: clamp(20px, 3.2vw, 32px);
  line-height: 1.35;
  font-weight: 400;
}
summary::-webkit-details-marker { display: none; }

summary::before {
  content: "";
  flex: none;
  width: 0.36em;
  height: 0.36em;
  margin-top: 0.16em;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: rotate(-45deg);
  transition: transform 0.18s ease;
}
details[open] summary::before { transform: rotate(45deg); }
summary:hover::before { border-color: var(--fg); }

details > div {
  padding: 0 0 clamp(20px, 3vw, 32px) 1.9em;
}

footer {
  margin-top: clamp(72px, 12vw, 120px);
  padding-top: 24px;
  border-top: 1px solid var(--rule);
  color: var(--muted);
  font-size: clamp(15px, 1.7vw, 17px);
}
footer p { margin: 0 0 0.7em; }
footer p:last-child { margin-bottom: 0; }
footer a { color: var(--muted); }
footer a:hover { color: var(--fg); }
body.doc footer a { text-decoration: none; }

/* Legal documents: same skin, document-scale type */
body.doc { font-size: clamp(16px, 1.9vw, 19px); line-height: 1.65; }
body.doc h1 { font-size: clamp(30px, 4.6vw, 40px); }
body.doc h2 { font-size: clamp(21px, 2.6vw, 26px); margin: 2.2em 0 0.5em; font-weight: 500; }
body.doc h3 { font-size: clamp(18px, 2.1vw, 20px); }
body.doc a { text-decoration: underline; text-underline-offset: 3px; }
body.doc nav a { text-decoration: none; }
