/* House Control site. One theme family (follows the system: light or dark), one accent
   (the app's blue), one radius scale: 28px panels, 18px tiles, full pill for buttons. */
:root {
  --bg: #f5f5f7;
  --surface: #ffffff;
  --surface-2: #ececf0;
  --text: #1d1d1f;
  --muted: #5e5e66;
  --faint: #86868e;
  --line: rgb(0 0 0 / 0.08);
  --accent: #1f6fe5;
  --accent-ink: #ffffff;
  --shadow: 0 30px 80px -30px rgb(18 32 64 / 0.35);
  --phone-bezel: #16171b;
  --r-panel: 28px;
  --r-tile: 18px;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b0c10;
    --surface: #15171d;
    --surface-2: #1e2028;
    --text: #f2f2f5;
    --muted: #a3a6b2;
    --faint: #7b7e8a;
    --line: rgb(255 255 255 / 0.08);
    --accent: #4d94ff;
    --accent-ink: #06101f;
    --shadow: 0 30px 90px -30px rgb(0 0 0 / 0.8);
    --phone-bezel: #2a2c33;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.5 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
.icon { width: 1.15em; height: 1.15em; flex: none; fill: currentColor; }

.wrap { width: min(1180px, 100% - 40px); margin-inline: auto; }
h1, h2, h3 {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Helvetica Neue", system-ui, sans-serif;
  letter-spacing: -0.025em;
  line-height: 1.06;
  margin: 0;
}
h2 { font-size: clamp(32px, 4.6vw, 54px); font-weight: 700; }
h3 { font-size: 22px; font-weight: 650; letter-spacing: -0.015em; line-height: 1.2; }
.lede { color: var(--muted); font-size: clamp(18px, 1.6vw, 21px); max-width: 60ch; margin: 18px 0 0; }
section { padding: 110px 0; }

/* Navigation */
.nav {
  position: sticky; top: 0; z-index: 10;
  backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px);
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  border-bottom: 1px solid var(--line);
}
.nav .wrap { display: flex; align-items: center; gap: 28px; height: 60px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); font-weight: 650; letter-spacing: -0.01em; }
.brand:hover { text-decoration: none; }
.brand img { width: 30px; height: 30px; border-radius: 8px; }
.nav-links { display: flex; gap: 26px; margin-left: auto; font-size: 14px; }
.nav-links a { color: var(--muted); }
.nav-links a:hover { color: var(--text); text-decoration: none; }
@media (max-width: 760px) { .nav-links .optional { display: none; } .nav-links { gap: 18px; } }

/* Buttons: one pill system */
.btn {
  display: inline-flex; align-items: center; gap: 10px; white-space: nowrap;
  height: 50px; padding: 0 24px; border-radius: 999px;
  font-size: 16px; font-weight: 600; letter-spacing: -0.01em;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.2s;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: scale(0.97); }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: color-mix(in srgb, var(--accent) 88%, var(--text)); }
.btn-quiet { background: var(--surface-2); color: var(--text); }
.btn-quiet:hover { background: color-mix(in srgb, var(--surface-2) 85%, var(--text)); }
.btn[aria-disabled="true"] { cursor: default; color: var(--muted); }
.btn[aria-disabled="true"]:active { transform: none; }
.ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }
.app-store-badge img { height: 50px; width: auto; }

/* Hero: text left, phone right */
.hero { padding: 72px 0 40px; overflow: hidden; }
.hero .wrap { display: grid; grid-template-columns: 1.05fr 0.95fr; align-items: center; gap: 40px; min-height: min(780px, calc(100dvh - 60px)); }
.hero h1 { font-size: clamp(48px, 6.6vw, 84px); font-weight: 750; letter-spacing: -0.035em; line-height: 1; }
.hero .lede { max-width: 30ch; }
.hero-art { position: relative; display: flex; justify-content: center; }
.hero-art::before {
  content: ""; position: absolute; inset: 8% 4% 4%; z-index: -1; border-radius: 50%;
  background: radial-gradient(closest-side, color-mix(in srgb, #ff9d4d 34%, transparent), transparent);
  filter: blur(30px);
}
@media (max-width: 860px) {
  .hero .wrap { grid-template-columns: 1fr; min-height: 0; text-align: left; }
  .hero-art .phone { width: min(300px, 78vw); }
}

/* Phone frame around real screenshots */
.phone {
  width: 330px; padding: 9px; border-radius: 58px; background: var(--phone-bezel);
  box-shadow: var(--shadow), inset 0 0 0 1px rgb(255 255 255 / 0.08);
}
.phone img { border-radius: 49px; width: 100%; }
.phone.small { width: 250px; border-radius: 46px; padding: 7px; }
.phone.small img { border-radius: 39px; }

/* Menu bar showcase */
.showcase h2, .showcase .lede { text-align: center; margin-inline: auto; }
.showcase figure { margin: 56px 0 0; }
.showcase figure img { width: 100%; filter: drop-shadow(0 30px 50px rgb(10 20 40 / 0.25)); }
.platform-note { display: flex; justify-content: center; gap: 8px; align-items: center; color: var(--faint); font-size: 14px; margin-top: 18px; }

/* Bento */
.bento { display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px; margin-top: 56px; }
.tile {
  position: relative; overflow: hidden; border-radius: var(--r-panel);
  background: var(--surface); border: 1px solid var(--line);
  padding: 32px; display: flex; flex-direction: column; gap: 10px; min-height: 340px;
}
.tile p { margin: 0; color: var(--muted); max-width: 40ch; }
.tile .art { margin-top: auto; padding-top: 24px; }
.tile-lights { grid-column: span 3; grid-row: span 2; background: linear-gradient(160deg, #2a1a12, #120d0b 60%); color: #f6efe9; border: 0; }
.tile-lights p { color: #c9b8ab; }
.tile-ac { grid-column: span 3; grid-row: span 2; background: linear-gradient(160deg, #0f1d36, #0a0f1c 60%); color: #eef3fb; border: 0; }
.tile-ac p { color: #a9b8d0; }
.tile-lights .art, .tile-ac .art { display: flex; justify-content: center; margin-bottom: -150px; }
.tile-scenes { grid-column: span 2; }
.tile-widgets { grid-column: span 4; }
.tile-widgets .art img { border-radius: var(--r-tile); }
.tile-island { grid-column: span 6; min-height: 0; display: grid; grid-template-columns: 0.8fr 1.2fr; align-items: center; gap: 32px; background: linear-gradient(120deg, #1a1033, #0d1430 55%, #3a1d55); color: #f1effa; border: 0; }
.tile-island p { color: #b9b3d6; }
.tile-island .art { margin: 0; padding: 0; }
.tile-island .art img { border-radius: var(--r-tile); }
.chip-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: auto; padding-top: 24px; }
.chip {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 16px 0 14px; border-radius: var(--r-tile);
  background: var(--surface-2); color: var(--muted); font-size: 13px; font-weight: 600;
}
.chip .icon { width: 22px; height: 22px; }
.chip.on { background: color-mix(in srgb, var(--accent) 18%, var(--surface)); color: var(--accent); box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--accent) 55%, transparent); }
.tag { display: inline-flex; align-self: flex-start; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--faint); }
.tile-island .tag, .tile-lights .tag, .tile-ac .tag { color: rgb(255 255 255 / 0.55); }
@media (max-width: 900px) {
  .bento { grid-template-columns: 1fr; }
  .tile-lights, .tile-ac, .tile-scenes, .tile-widgets, .tile-island { grid-column: auto; grid-row: auto; }
  .tile-island { grid-template-columns: 1fr; }
  .tile-lights .art, .tile-ac .art { margin-bottom: -120px; }
}

/* Editor: Mac window with a phone overlapping it */
.editor-stage { position: relative; margin-top: 56px; padding-right: 120px; }
.editor-stage > img { border-radius: 14px; box-shadow: var(--shadow); }
.editor-stage .phone { position: absolute; right: 0; bottom: -60px; }
@media (max-width: 760px) {
  .editor-stage { padding-right: 0; }
  .editor-stage .phone { position: relative; right: auto; bottom: auto; margin: -80px auto 0; }
}

/* Platforms */
.platforms { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 48px; }
.platform { border-radius: var(--r-tile); background: var(--surface); border: 1px solid var(--line); padding: 24px; display: flex; flex-direction: column; gap: 8px; }
.platform .badge { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; color: #fff; margin-bottom: 8px; }
.platform .badge .icon { width: 24px; height: 24px; }
.platform p { margin: 0; color: var(--muted); font-size: 15px; }
.platform small { color: var(--faint); font-size: 13px; margin-top: auto; padding-top: 6px; }
@media (max-width: 900px) { .platforms { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .platforms { grid-template-columns: 1fr; } }
.simulated { margin-top: 26px; color: var(--muted); }

/* AI Access: text left, tall window right */
.ai .wrap { display: grid; grid-template-columns: 1fr 380px; gap: 64px; align-items: center; }
.ai figure { margin: 0; }
.ai figure img { border-radius: 18px; box-shadow: var(--shadow); max-height: 640px; width: auto; margin-inline: auto; }
.ai ul { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 14px; }
.ai li { display: flex; gap: 12px; color: var(--muted); }
.ai li .icon { color: var(--accent); margin-top: 3px; }
@media (max-width: 860px) { .ai .wrap { grid-template-columns: 1fr; } .ai figure img { max-height: 520px; } }

/* Privacy band */
.privacy-band { padding: 90px 0; }
.privacy-band .panel {
  border-radius: var(--r-panel); padding: clamp(32px, 6vw, 72px);
  background: var(--surface); border: 1px solid var(--line);
  display: grid; grid-template-columns: auto 1fr; gap: 36px; align-items: center;
}
.privacy-band .shield { width: 88px; height: 88px; border-radius: 26px; display: grid; place-items: center; background: color-mix(in srgb, #2fbf71 16%, var(--surface)); color: #23a862; }
.privacy-band .shield .icon { width: 44px; height: 44px; }
@media (max-width: 640px) { .privacy-band .panel { grid-template-columns: 1fr; } }

/* Download */
.download h2 { text-align: center; }
.download .lede { text-align: center; margin-inline: auto; }
.cards { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 48px; }
.cards > * { min-width: 0; }
@media (max-width: 420px) { .card { padding: 28px 22px; } .card .btn { white-space: normal; height: auto; min-height: 50px; padding-block: 12px; } }
.card { border-radius: var(--r-panel); background: var(--surface); border: 1px solid var(--line); padding: 36px; display: flex; flex-direction: column; gap: 12px; }
.card .meta { color: var(--faint); font-size: 14px; }
.card p { margin: 0; color: var(--muted); }
.card .btn { align-self: flex-start; margin-top: 10px; }
.card details { margin-top: 8px; color: var(--muted); font-size: 15px; }
.card summary { cursor: pointer; color: var(--text); font-weight: 600; }
@media (max-width: 760px) { .cards { grid-template-columns: 1fr; } }

/* Footer */
footer { border-top: 1px solid var(--line); padding: 40px 0 60px; color: var(--faint); font-size: 14px; }
footer .wrap { display: flex; flex-wrap: wrap; gap: 18px 28px; align-items: center; }
footer nav { display: flex; flex-wrap: wrap; gap: 22px; margin-left: auto; }
footer a { color: var(--muted); display: inline-flex; align-items: center; gap: 6px; }

/* Reveal on scroll: content is visible without JavaScript and with reduced motion */
@media (prefers-reduced-motion: no-preference) {
  .js .reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.9s cubic-bezier(0.16, 1, 0.3, 1), transform 0.9s cubic-bezier(0.16, 1, 0.3, 1); }
  .js .reveal.in { opacity: 1; transform: none; }
  .js .hero .reveal { transition-delay: calc(var(--i, 0) * 90ms); }
}

/* Document pages (privacy, support) */
.doc { padding: 72px 0 110px; }
.doc .wrap { max-width: 760px; }
.doc h1 { font-size: clamp(38px, 5vw, 56px); font-weight: 750; letter-spacing: -0.03em; }
.doc .updated { color: var(--faint); margin-top: 12px; }
.doc h2 { font-size: 26px; margin: 52px 0 12px; letter-spacing: -0.02em; }
.doc h3 { font-size: 19px; margin: 30px 0 8px; }
.doc p, .doc li { color: var(--muted); }
.doc li + li { margin-top: 6px; }
.doc strong { color: var(--text); font-weight: 600; }
.doc .summary { margin-top: 32px; border-radius: var(--r-tile); background: var(--surface); border: 1px solid var(--line); padding: 26px 28px; }
.doc .summary p { margin: 0; color: var(--text); }
.faq details { border-bottom: 1px solid var(--line); padding: 18px 0; }
.faq summary { cursor: pointer; font-weight: 600; color: var(--text); font-size: 18px; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--faint); font-weight: 400; font-size: 22px; line-height: 1; }
.faq details[open] summary::after { content: "\2212"; }
.faq details > *:not(summary) { margin-top: 12px; }
.contact { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 18px; }
.contact a { border-radius: var(--r-tile); background: var(--surface); border: 1px solid var(--line); padding: 22px; color: var(--text); display: flex; flex-direction: column; gap: 4px; }
.contact a:hover { text-decoration: none; border-color: color-mix(in srgb, var(--accent) 50%, var(--line)); }
.contact span { color: var(--muted); font-size: 15px; }
@media (max-width: 560px) { .contact { grid-template-columns: 1fr; } }
@media (max-width: 760px) { section { padding: 72px 0; } .hero { padding: 40px 0 20px; } }
