/* Climy site. One stylesheet, no framework. The page "weather" follows [data-mode] on <html>. */
:root {
  --deep: #05142f;
  --mid: #0d5299;
  --glow: #73e0ff;
  --ink: #f4f8ff;
  --ink-2: rgba(244, 248, 255, .72);
  --ink-3: rgba(244, 248, 255, .48);
  --line: rgba(255, 255, 255, .12);
  --glass: rgba(255, 255, 255, .07);
  --radius: 28px;
  --ease: cubic-bezier(.2, .7, .1, 1);
  --display: "Inter Tight", ui-sans-serif, system-ui, -apple-system, sans-serif;
  --round: ui-rounded, "SF Pro Rounded", "Nunito", system-ui, sans-serif;
  color-scheme: dark;
}
html[data-mode="heat"] { --deep: #2e0806; --mid: #b2381a; --glow: #ffb85a; }

* { box-sizing: border-box; margin: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font: 17px/1.55 var(--display);
  color: var(--ink);
  background: #04070d;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
::selection { background: var(--glow); color: #000; }

/* Weather: two drifting blobs behind everything, recolored by mode */
.sky { position: fixed; inset: 0; z-index: -1; background: radial-gradient(120% 80% at 50% -10%, var(--mid), var(--deep) 55%, #04070d 100%); transition: background 1.2s var(--ease); }
.sky::before, .sky::after { content: ""; position: absolute; border-radius: 50%; filter: blur(90px); opacity: .55; transition: background 1.2s var(--ease); }
.sky::before { width: 60vmax; height: 60vmax; left: -15vmax; top: 10vh; background: var(--mid); animation: drift 22s ease-in-out infinite alternate; }
.sky::after { width: 45vmax; height: 45vmax; right: -10vmax; top: 35vh; background: var(--glow); opacity: .22; animation: drift 28s ease-in-out infinite alternate-reverse; }
.grain { position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: .06; background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>"); }
@keyframes drift { to { transform: translate(8vmax, -6vmax) scale(1.1); } }

.wrap { width: min(1160px, 100% - 40px); margin-inline: auto; }

/* Nav */
nav { position: sticky; top: 0; z-index: 10; backdrop-filter: blur(18px) saturate(1.4); -webkit-backdrop-filter: blur(18px) saturate(1.4); background: rgba(4, 7, 13, .62); border-bottom: 1px solid var(--line); }
nav .wrap { display: flex; align-items: center; gap: 28px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 19px; letter-spacing: -.02em; text-decoration: none; }
.brand img { width: 30px; height: 30px; border-radius: 8px; }
nav .links { display: flex; gap: 24px; margin-left: auto; font-size: 15px; }
nav .links a { color: var(--ink-2); text-decoration: none; }
nav .links a:hover { color: var(--ink); }
.lang { font-size: 13px; padding: 5px 10px; border: 1px solid var(--line); border-radius: 99px; text-decoration: none; color: var(--ink-2); }

/* Buttons */
.btn { display: inline-flex; align-items: center; gap: 10px; padding: 14px 22px; border-radius: 99px; font-weight: 600; font-size: 16px; text-decoration: none; border: 0; cursor: pointer; font-family: inherit; }
.btn-primary { background: var(--ink); color: #05070c; box-shadow: 0 10px 40px -10px var(--glow); transition: box-shadow 1s, transform .2s; }
.btn-primary:hover { transform: translateY(-1px); }
.btn-ghost { color: var(--ink); background: var(--glass); border: 1px solid var(--line); }
.btn small { font-weight: 500; opacity: .6; }

/* Hero */
.hero { padding: 72px 0 40px; }
.hero .wrap { display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: center; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: var(--glow); transition: color 1s; font-weight: 600; }
h1 { font-size: clamp(46px, 7.4vw, 96px); line-height: .95; letter-spacing: -.045em; font-weight: 650; margin: 18px 0 22px; }
h1 em { font-style: normal; background: linear-gradient(100deg, var(--ink) 20%, var(--glow)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lede { font-size: clamp(18px, 1.6vw, 21px); color: var(--ink-2); max-width: 34ch; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.note { margin-top: 14px; font-size: 13px; color: var(--ink-3); }

/* Mode switch — the page's own little climate control */
.mode-switch { display: inline-flex; padding: 5px; gap: 4px; border-radius: 99px; background: var(--glass); border: 1px solid var(--line); margin-top: 28px; position: relative; }
.mode-switch button { all: unset; cursor: pointer; display: flex; align-items: center; gap: 8px; padding: 10px 18px; border-radius: 99px; font-weight: 600; font-size: 15px; color: var(--ink-2); position: relative; z-index: 1; transition: color .4s; }
.mode-switch button[aria-pressed="true"] { color: #05070c; }
.mode-switch .thumb { position: absolute; top: 5px; bottom: 5px; left: 5px; border-radius: 99px; background: var(--ink); transition: transform .5s var(--ease), width .5s var(--ease); }
.mode-switch svg { width: 16px; height: 16px; flex: none; }
.mode-switch button:focus-visible { outline: 2px solid var(--glow); outline-offset: 2px; }

/* Phone */
.phone { position: relative; width: min(360px, 82vw); aspect-ratio: 1206 / 2622; margin-inline: auto; border-radius: 54px; padding: 11px; background: linear-gradient(145deg, #3a3f48, #121418 40%, #2a2e35); box-shadow: 0 0 0 1px rgba(255,255,255,.08) inset, 0 60px 120px -30px rgba(0,0,0,.8), 0 0 120px -20px var(--glow); transition: box-shadow 1.2s; }
.phone .screen { position: relative; width: 100%; height: 100%; border-radius: 44px; overflow: hidden; background: #000; }
.phone .screen img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: opacity .9s var(--ease); }
.phone .screen img.heat { opacity: 0; }
html[data-mode="heat"] .phone .screen img.heat { opacity: 1; }
.phone .island { position: absolute; top: 22px; left: 50%; translate: -50% 0; width: 31%; height: 30px; border-radius: 20px; background: #000; z-index: 2; }

/* Strip */
.strip { border-block: 1px solid var(--line); margin-top: 56px; }
.strip .wrap { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px 36px; padding: 22px 0; color: var(--ink-3); font-size: 14px; letter-spacing: .02em; }
.strip span { display: inline-flex; align-items: center; gap: 8px; }
.strip svg { width: 16px; height: 16px; opacity: .8; }

/* Sections */
section { padding: 110px 0; }
h2 { font-size: clamp(36px, 5vw, 64px); line-height: 1; letter-spacing: -.04em; font-weight: 650; max-width: 16ch; }
.section-lede { color: var(--ink-2); font-size: 19px; max-width: 52ch; margin-top: 18px; }

/* Bento */
.bento { display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px; margin-top: 56px; }
.card { position: relative; overflow: hidden; border-radius: var(--radius); padding: 28px; background: linear-gradient(160deg, rgba(255,255,255,.09), rgba(255,255,255,.03)); border: 1px solid var(--line); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); min-height: 280px; display: flex; flex-direction: column; }
.card h3 { font-size: 22px; letter-spacing: -.02em; font-weight: 620; }
.card p { color: var(--ink-2); font-size: 15px; margin-top: 6px; max-width: 38ch; }
.card .stage { margin-top: auto; padding-top: 26px; display: flex; gap: 14px; align-items: flex-end; flex-wrap: wrap; }
.c-widgets { grid-column: span 4; }
.c-control { grid-column: span 2; }
.c-siri { grid-column: span 2; }
.c-energy { grid-column: span 2; }
.c-live { grid-column: span 2; }

/* Widget replicas (same layout as the WidgetKit views) */
.w { border-radius: 24px; padding: 16px; color: #fff; background: linear-gradient(145deg, var(--mid), var(--deep)); box-shadow: 0 20px 50px -20px rgba(0,0,0,.7); transition: background 1.2s; font-family: var(--display); }
.w-small { width: 158px; height: 158px; display: flex; flex-direction: column; }
.w-medium { width: 338px; height: 158px; display: flex; gap: 14px; }
.w-medium .left { flex: 1; display: flex; flex-direction: column; }
.w-top { display: flex; justify-content: space-between; align-items: flex-start; font-size: 13px; font-weight: 600; }
.w-power { width: 30px; height: 30px; border-radius: 50%; background: #fff; display: grid; place-items: center; }
.w-power svg { width: 14px; height: 14px; }
.w-temp { font: 300 44px/1 var(--round); margin-top: auto; letter-spacing: -.02em; }
.w-room { font-size: 11px; opacity: .8; margin-top: 4px; }
.w-steps { width: 96px; display: grid; gap: 8px; }
.w-steps span { display: grid; place-items: center; border-radius: 16px; background: rgba(255,255,255,.16); font-size: 22px; font-weight: 500; }
.lock { width: 168px; padding: 10px 14px; border-radius: 18px; background: rgba(255,255,255,.12); backdrop-filter: blur(10px); font-size: 13px; line-height: 1.3; }
.lock b { display: block; font-size: 15px; }

.cc { display: grid; grid-template-columns: repeat(2, 76px); gap: 12px; }
.cc .tile { width: 76px; height: 76px; border-radius: 22px; background: rgba(255,255,255,.12); display: grid; place-items: center; }
.cc .tile.on { background: #fff; color: var(--mid); }
.cc .tile svg { width: 28px; height: 28px; }
.cc .wide { grid-column: span 2; width: auto; height: 76px; border-radius: 22px; background: rgba(255,255,255,.12); display: flex; align-items: center; gap: 12px; padding: 0 16px; font-size: 14px; }
.cc .wide .dot { width: 44px; height: 44px; border-radius: 50%; background: #fff; display: grid; place-items: center; color: var(--mid); flex: none; }
.cc .wide small { display: block; color: var(--ink-3); }

.siri { font-size: 22px; line-height: 1.25; letter-spacing: -.02em; font-weight: 560; }
.siri .orb { width: 44px; height: 44px; border-radius: 50%; background: conic-gradient(from 0deg, #ff5ea8, #7b6cff, #29d3ff, #ffcf5c, #ff5ea8); filter: blur(.5px); animation: spin 6s linear infinite; margin-bottom: 18px; }
@keyframes spin { to { transform: rotate(1turn); } }
.siri .reply { display: block; margin-top: 10px; font-size: 15px; color: var(--ink-2); font-weight: 450; }

.bars { display: flex; align-items: flex-end; gap: 8px; height: 110px; width: 100%; }
.bars i { flex: 1; border-radius: 6px 6px 3px 3px; background: rgba(255,255,255,.22); height: var(--h); transform-origin: bottom; animation: rise 1.2s var(--ease) both; animation-delay: calc(var(--i) * 70ms); }
.bars i:last-child { background: var(--glow); transition: background 1s; }
@keyframes rise { from { transform: scaleY(0); } }
.kwh { font: 600 40px/1 var(--round); letter-spacing: -.02em; }
.kwh small { font-size: 15px; color: var(--ink-3); font-weight: 500; }

.pulse { display: flex; align-items: center; gap: 12px; font-size: 15px; color: var(--ink-2); }
.pulse i { width: 10px; height: 10px; border-radius: 50%; background: #3ef08f; box-shadow: 0 0 0 0 rgba(62,240,143,.6); animation: ping 2s infinite; }
@keyframes ping { 70% { box-shadow: 0 0 0 14px rgba(62,240,143,0); } 100% { box-shadow: 0 0 0 0 rgba(62,240,143,0); } }
.log { font: 13px/1.7 ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--ink-3); }
.log b { color: var(--ink); font-weight: 500; }

/* Mac */
.mac { display: grid; grid-template-columns: .9fr 1.1fr; gap: 56px; align-items: center; }
.desk { position: relative; border-radius: 22px; overflow: hidden; border: 1px solid var(--line); background: linear-gradient(140deg, #24314b, #0f1626 50%, #3b2443); aspect-ratio: 4 / 3.4; box-shadow: 0 50px 120px -40px rgba(0,0,0,.9); }
.menubar { height: 30px; background: rgba(20, 24, 33, .55); backdrop-filter: blur(20px); display: flex; align-items: center; justify-content: flex-end; gap: 18px; padding: 0 16px; font-size: 13px; font-weight: 500; }
.menubar .item { display: flex; align-items: center; gap: 5px; padding: 2px 8px; border-radius: 5px; background: rgba(255,255,255,.18); }
.menubar svg { width: 13px; height: 13px; }
.desk img { position: absolute; top: 38px; right: 7%; width: min(44%, 290px); height: auto; filter: drop-shadow(0 30px 40px rgba(0,0,0,.6)); -webkit-mask-image: linear-gradient(to bottom, #000 72%, transparent 98%); mask-image: linear-gradient(to bottom, #000 72%, transparent 98%); }
.ticks { list-style: none; padding: 0; margin-top: 28px; display: grid; gap: 14px; }
.ticks li { display: flex; gap: 12px; color: var(--ink-2); }
.ticks li::before { content: ""; flex: none; width: 20px; height: 20px; margin-top: 3px; border-radius: 50%; background: var(--glow) url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'><path d='M5.5 10.5l3 3 6-7' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/></svg>") center / 14px no-repeat; transition: background-color 1s; }

/* Privacy */
.privacy { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 48px; }
.privacy div { padding: 26px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--glass); }
.privacy b { display: block; font-size: 19px; letter-spacing: -.01em; margin-bottom: 6px; }
.privacy p { color: var(--ink-2); font-size: 15px; }

/* FAQ */
.faq { margin-top: 40px; border-top: 1px solid var(--line); }
details { border-bottom: 1px solid var(--line); padding: 22px 0; }
summary { cursor: pointer; list-style: none; font-size: 19px; font-weight: 560; display: flex; justify-content: space-between; gap: 20px; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; font-weight: 300; font-size: 26px; line-height: 1; color: var(--ink-3); transition: transform .3s; }
details[open] summary::after { transform: rotate(45deg); }
details p { color: var(--ink-2); margin-top: 12px; max-width: 70ch; }

/* Closing */
.closing { text-align: center; padding: 140px 0 120px; }
.closing h2 { margin-inline: auto; max-width: 14ch; }
.closing .cta { justify-content: center; }
.closing img { width: 96px; height: 96px; border-radius: 22px; margin: 0 auto 28px; box-shadow: 0 20px 60px -10px var(--glow); }

footer { border-top: 1px solid var(--line); padding: 34px 0 50px; color: var(--ink-3); font-size: 13px; }
footer .wrap { display: flex; flex-wrap: wrap; gap: 14px 28px; justify-content: space-between; }
footer nav, footer .f-links { position: static; display: flex; gap: 20px; background: none; border: 0; backdrop-filter: none; }
footer a { text-decoration: none; color: var(--ink-2); }
footer .legal { flex-basis: 100%; }

/* Document pages (privacy, support) */
.doc { padding: 80px 0 100px; }
.doc .wrap { max-width: 760px; }
.doc h1 { font-size: clamp(40px, 6vw, 64px); }
.doc h2 { font-size: 26px; letter-spacing: -.02em; margin: 42px 0 10px; max-width: none; }
.doc p, .doc li { color: var(--ink-2); margin-top: 12px; }
.doc ul { padding-left: 20px; }
.doc .updated { color: var(--ink-3); font-size: 14px; }

/* Reveal on scroll */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

@media (max-width: 960px) {
  .hero .wrap, .mac { grid-template-columns: 1fr; }
  .hero { padding-top: 48px; text-align: left; }
  .bento { grid-template-columns: 1fr 1fr; }
  .c-widgets { grid-column: span 2; }
  .c-control, .c-siri, .c-energy, .c-live { grid-column: span 1; }
  .privacy { grid-template-columns: 1fr; }
  nav .links { display: none; }
  .lang { margin-left: auto; }
}
@media (max-width: 640px) {
  section { padding: 80px 0; }
  .bento { grid-template-columns: 1fr; }
  .c-widgets, .c-control, .c-siri, .c-energy, .c-live { grid-column: span 1; }
  .w-medium { width: 100%; }
  .desk { aspect-ratio: 3 / 4; }
  .desk img { width: 62%; right: 5%; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}
