/* ==========================================================================
   Adom Kimi-Fable V2
   Premium editorial digital house health, with the house as the anchor.
   ========================================================================== */

:root {
  --canvas: #f8f7f2;
  --surface: #fdfcf8;
  --surface-soft: #eef3ee;
  --ink: #1d2b31;
  --body: #42535b;
  --muted: #5d6d74;
  --line: #dfe3dc;
  --line-strong: #cbd3ca;
  --green: #2f9a6c;
  --green-action: #1f7654;
  --green-action-hover: #185e43;
  --green-bright: #76d7aa;
  --green-soft: #dfeee4;
  --amber-soft: #f3ead9;
  --cream: #f7f3e9;
  --font: "DM Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --page: min(100% - 48px, 1240px);
  --gutter: max(24px, calc((100vw - 1240px) / 2));
  --section-space: clamp(104px, 10vw, 152px);
  --radius: 18px;
  --shadow: 0 24px 70px rgba(26, 43, 48, 0.12);
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
}

body {
  margin: 0;
  min-width: 320px;
  overflow-x: hidden;
  color: var(--body);
  background: var(--canvas);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img,
svg {
  display: block;
  max-width: 100%;
}

a { color: inherit; }

button,
input { font: inherit; }

h1,
h2,
h3,
p,
ol,
ul,
dl,
figure,
blockquote { margin: 0; }

h1,
h2,
h3 {
  color: var(--ink);
  font-weight: 600;
  letter-spacing: -0.045em;
  text-wrap: balance;
}

h1 {
  font-size: clamp(56px, 6vw, 84px);
  line-height: 0.98;
}

h2 {
  font-size: clamp(40px, 4.6vw, 64px);
  line-height: 1.03;
}

h3 {
  font-size: clamp(22px, 2vw, 29px);
  line-height: 1.22;
  letter-spacing: -0.03em;
}

:focus-visible {
  outline: 3px solid rgba(31, 118, 84, 0.46);
  outline-offset: 4px;
}

.eyebrow {
  margin-bottom: 24px;
  color: var(--green-action);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.section {
  padding-block: var(--section-space);
}

.section-intro {
  width: var(--page);
  max-width: 860px;
  margin: 0 auto clamp(64px, 7vw, 96px);
}

.section-intro h2 {
  max-width: 820px;
}

.section-intro > p {
  max-width: 640px;
  margin-top: 28px;
  font-size: 18px;
  line-height: 1.68;
}

.section-intro-centered {
  text-align: center;
}

.section-intro-centered h2,
.section-intro-centered > p {
  margin-inline: auto;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 54px;
  padding: 0 26px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.1;
  text-decoration: none;
  white-space: nowrap;
  transition:
    transform 180ms cubic-bezier(0.16, 1, 0.3, 1),
    background-color 180ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease;
}

.button-solid {
  border: 1px solid var(--green-action);
  color: var(--surface);
  background: var(--green-action);
  cursor: pointer;
}

.button-solid:hover {
  border-color: var(--green-action-hover);
  background: var(--green-action-hover);
  box-shadow: 0 14px 30px rgba(24, 94, 67, 0.22);
  transform: translateY(-2px);
}

.button-quiet {
  border: 1px solid rgba(247, 243, 233, 0.52);
  color: var(--cream);
  background: rgba(18, 33, 39, 0.28);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.button-quiet:hover {
  border-color: rgba(247, 243, 233, 0.84);
  background: rgba(18, 33, 39, 0.42);
  transform: translateY(-2px);
}

/* Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  min-height: 80px;
  padding-inline: var(--gutter);
  border-bottom: 1px solid rgba(29, 43, 49, 0.08);
  background: rgba(248, 247, 242, 0.9);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.brand img {
  width: auto;
  height: 32px;
}

.site-header nav {
  display: flex;
  gap: clamp(20px, 2.2vw, 32px);
}

.site-header nav a {
  color: var(--body);
  font-size: 13px;
  font-weight: 650;
  text-decoration: none;
  white-space: nowrap;
  transition: color 160ms ease;
}

.site-header nav a:hover {
  color: var(--green-action);
}

.header-cta {
  justify-self: end;
  min-height: 44px;
  padding-inline: 20px;
  font-size: 13px;
}

/* Hero */

.hero {
  position: relative;
  display: flex;
  align-items: center;
  min-height: max(700px, calc(100svh - 80px));
  overflow: hidden;
  isolation: isolate;
  background: #0e1c23;
}

.hero-media,
.hero-bg,
.hero-scrim,
.hero-atmosphere {
  position: absolute;
  inset: 0;
}

.hero-media { z-index: 1; }

.hero-bg {
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  object-position: 60% 50%;
  transform-origin: 64% 54%;
  animation: hero-settle 3.2s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.hero-atmosphere {
  z-index: 2;
  pointer-events: none;
  background:
    radial-gradient(30% 20% at 68% 55%, rgba(190, 216, 225, 0.14), transparent 72%),
    radial-gradient(60% 48% at 74% 16%, rgba(155, 187, 202, 0.09), transparent 74%);
  mix-blend-mode: screen;
  animation: atmosphere-drift 16s ease-in-out infinite alternate;
}

.hero-scrim {
  z-index: 3;
  background:
    linear-gradient(to top, rgba(10, 20, 25, 0.38), rgba(10, 20, 25, 0) 38%),
    linear-gradient(100deg, rgba(7, 18, 24, 0.78) 0%, rgba(7, 18, 24, 0.52) 34%, rgba(7, 18, 24, 0.08) 68%, rgba(7, 18, 24, 0) 86%);
}

.hero-inner {
  position: relative;
  z-index: 4;
  width: 100%;
  padding: 88px var(--gutter) 112px;
}

.hero .eyebrow {
  color: var(--green-bright);
}

.hero h1 {
  max-width: 1050px;
  color: var(--cream);
  text-shadow: 0 2px 28px rgba(5, 14, 18, 0.35);
}

.hero-lead {
  max-width: 560px;
  margin-top: 28px;
  color: rgba(247, 243, 233, 0.86);
  font-size: clamp(17px, 1.35vw, 19px);
  line-height: 1.62;
  text-shadow: 0 1px 16px rgba(5, 14, 18, 0.42);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 34px;
}

.hero-enter {
  animation: hero-enter 760ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.hero-inner .eyebrow { animation-delay: 60ms; }
.hero-inner h1 { animation-delay: 130ms; }
.hero-lead { animation-delay: 200ms; }
.hero-actions { animation-delay: 270ms; }

/* House */

.house {
  background: var(--canvas);
}

.house-figure {
  width: var(--page);
  margin: 0 auto;
}

.house-figure picture {
  display: block;
  overflow: hidden;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.house-figure img {
  width: 100%;
  height: auto;
}

.product-image figcaption {
  margin-top: 16px;
  color: var(--muted);
  font-size: 13px;
}

.house-context {
  display: grid;
  grid-template-columns: 0.78fr 1.22fr;
  gap: clamp(40px, 6vw, 92px);
  align-items: start;
  margin-top: 30px;
  padding-top: 26px;
  border-top: 1px solid var(--line-strong);
}

.house-context-intro strong,
.house-context-intro span {
  display: block;
}

.house-context-intro strong {
  color: var(--ink);
  font-size: 17px;
  font-weight: 700;
}

.house-context-intro span {
  max-width: 390px;
  margin-top: 8px;
  color: var(--muted);
  font-size: 14px;
}

.house-sensor-list {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin: 0;
}

.house-sensor-list > div {
  min-width: 0;
  padding-inline: clamp(16px, 2vw, 28px);
  border-left: 1px solid var(--line);
}

.house-sensor-list > div:first-child {
  padding-left: 0;
  border-left: 0;
}

.house-sensor-list dt {
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
}

.house-sensor-list dd {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

/* Two messages */

.messages {
  border-top: 1px solid var(--line);
  background: var(--surface);
}

.message-pair {
  display: grid;
  grid-template-columns: 1.06fr 0.94fr;
}

.message {
  display: flex;
  min-height: 430px;
  flex-direction: column;
  justify-content: center;
  padding: clamp(64px, 7vw, 104px);
}

.message-calm {
  padding-left: var(--gutter);
  background: var(--green-soft);
}

.message-change {
  padding-right: var(--gutter);
  background: var(--amber-soft);
}

.message-kicker {
  color: var(--green-action);
  font-size: 13px;
  font-weight: 700;
}

.message-change .message-kicker {
  color: #755421;
}

.message h3 {
  max-width: 560px;
  margin-top: 38px;
  font-size: clamp(28px, 2.7vw, 40px);
  line-height: 1.24;
}

.message > p:last-child {
  max-width: 480px;
  margin-top: 24px;
  font-size: 16px;
}

/* House Brain */

.brain {
  border-top: 1px solid var(--line);
  background: var(--surface-soft);
}

.brain-layout {
  display: grid;
  grid-template-columns: 1.08fr 0.92fr;
  gap: clamp(72px, 9vw, 150px);
  align-items: start;
  width: var(--page);
  margin: 0 auto;
}

.brain-copy h2 {
  max-width: 660px;
}

.brain-copy > p:last-child {
  max-width: 600px;
  margin-top: 30px;
  font-size: 18px;
}

.brain-sequence {
  border-top: 1px solid var(--line-strong);
}

.brain-sequence > div {
  padding: 30px 0 34px;
  border-bottom: 1px solid var(--line-strong);
}

.brain-sequence h3 {
  font-size: 24px;
}

.brain-sequence p {
  max-width: 430px;
  margin-top: 10px;
  font-size: 15px;
}

/* House memory */

.memory {
  background: var(--canvas);
}

.memory-image {
  position: relative;
  min-height: clamp(520px, 68vh, 720px);
  overflow: hidden;
  isolation: isolate;
}

.memory-image picture,
.memory-image img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.memory-image img {
  max-width: none;
  object-fit: cover;
}

.memory-image::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to top, rgba(12, 21, 24, 0.68), rgba(12, 21, 24, 0.06) 68%),
    linear-gradient(100deg, rgba(12, 21, 24, 0.54), transparent 66%);
}

.memory-image figcaption {
  position: absolute;
  z-index: 2;
  right: var(--gutter);
  bottom: clamp(64px, 8vw, 112px);
  left: var(--gutter);
}

.memory-image h2 {
  max-width: 720px;
  color: var(--cream);
}

.memory-image p {
  max-width: 560px;
  margin-top: 24px;
  color: rgba(247, 243, 233, 0.82);
  font-size: 18px;
}

.memory-story {
  display: grid;
  grid-template-columns: 1.25fr 0.9fr 0.9fr;
  gap: 0;
  width: var(--page);
  margin: 0 auto;
  padding-block: clamp(72px, 8vw, 112px) var(--section-space);
}

.memory-story article {
  padding-right: clamp(30px, 4vw, 58px);
}

.memory-story article + article {
  padding-left: clamp(30px, 4vw, 58px);
  border-left: 1px solid var(--line);
}

.memory-story article > p {
  color: var(--green-action);
  font-size: 13px;
  font-weight: 700;
}

.memory-story h3 {
  margin-top: 26px;
}

.memory-story span {
  display: block;
  margin-top: 14px;
  color: var(--muted);
  font-size: 15px;
}

/* App */

.app {
  border-top: 1px solid var(--line);
  background: var(--surface-soft);
}

.app-layout {
  display: grid;
  grid-template-columns: 0.92fr 1.08fr;
  gap: clamp(72px, 9vw, 150px);
  align-items: center;
  width: var(--page);
  margin: 0 auto;
}

.app .section-intro {
  width: auto;
  margin: 0;
}

.app-quote {
  padding: clamp(48px, 6vw, 82px) 0 clamp(48px, 6vw, 82px) clamp(36px, 5vw, 72px);
  border-left: 1px solid var(--line-strong);
}

.app-quote > p {
  color: var(--ink);
  font-size: clamp(30px, 3.2vw, 46px);
  font-weight: 550;
  letter-spacing: -0.04em;
  line-height: 1.22;
}

.app-quote footer {
  margin-top: 28px;
  color: var(--muted);
  font-size: 13px;
}

/* Hardware and installation */

.hardware {
  background: var(--canvas);
}

.install {
  border-top: 1px solid var(--line);
  background: var(--surface);
}

.media-split {
  display: grid;
  grid-template-columns: 1.06fr 0.94fr;
  gap: clamp(64px, 8vw, 124px);
  align-items: center;
  width: var(--page);
  margin: 0 auto;
}

.media-split-reverse {
  grid-template-columns: 0.88fr 1.12fr;
}

.product-image picture {
  display: block;
  overflow: hidden;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.product-image img {
  width: 100%;
  height: auto;
}

.product-copy h2,
.install-copy h2 {
  max-width: 560px;
}

.product-list,
.install-list {
  margin-top: 52px;
  padding: 0;
  border-top: 1px solid var(--line-strong);
}

.product-list > div,
.install-list li {
  padding: 24px 0;
  border-bottom: 1px solid var(--line);
}

.product-list dt,
.install-list strong {
  color: var(--ink);
  font-size: 18px;
  font-weight: 700;
}

.product-list dd {
  margin: 8px 0 0;
}

.product-list dd,
.install-list span {
  display: block;
  max-width: 480px;
  color: var(--muted);
  font-size: 15px;
}

.install-list {
  list-style: none;
}

/* Waitlist */

.finale {
  position: relative;
  overflow: hidden;
  border-top: 1px solid var(--line);
  background: var(--green-soft);
}

.finale::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(55% 72% at 76% 54%, rgba(255, 255, 255, 0.62), transparent 74%);
}

.finale-inner {
  position: relative;
  display: grid;
  grid-template-columns: 1.08fr 0.92fr;
  gap: clamp(56px, 8vw, 124px);
  align-items: end;
  width: var(--page);
  margin: 0 auto;
  padding-block: clamp(104px, 11vw, 160px) clamp(84px, 9vw, 120px);
}

.finale-copy h2 {
  max-width: 650px;
}

.finale-copy > p:last-child {
  max-width: 510px;
  margin-top: 26px;
  font-size: 17px;
}

.finale-form label {
  display: block;
  margin-bottom: 10px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
}

.waitlist-action {
  display: grid;
  min-height: 58px;
}

.waitlist-fields,
.waitlist-confirmation {
  grid-area: 1 / 1;
}

.waitlist-fields {
  display: flex;
  min-width: 0;
  transition: opacity 180ms ease, transform 220ms cubic-bezier(0.16, 1, 0.3, 1), visibility 0s 220ms;
}

.waitlist-confirmation {
  display: flex;
  align-items: center;
  min-height: 58px;
  padding: 0 22px;
  border: 1px solid rgba(46, 146, 101, 0.35);
  border-radius: 999px;
  color: #1d6146;
  background: rgba(46, 146, 101, 0.1);
  font-weight: 700;
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px) scale(0.985);
  transition: opacity 220ms ease, transform 260ms cubic-bezier(0.16, 1, 0.3, 1), visibility 0s 260ms;
}

.waitlist-confirmation::before {
  content: "✓";
  display: grid;
  flex: 0 0 30px;
  width: 30px;
  height: 30px;
  margin-right: 13px;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: var(--green-action);
  font-size: 16px;
}

.finale-form[data-state="success"] .waitlist-fields {
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px) scale(0.985);
}

.finale-form[data-state="success"] .waitlist-confirmation {
  opacity: 1;
  visibility: visible;
  transform: none;
  transition-delay: 70ms, 70ms, 0s;
}

.finale-form input {
  min-width: 0;
  flex: 1;
  padding: 0 22px;
  border: 1px solid #9faf9f;
  border-right: 0;
  border-radius: 999px 0 0 999px;
  color: var(--ink);
  background: rgba(253, 252, 248, 0.96);
  outline: 0;
}

.finale-form input::placeholder {
  color: var(--muted);
  opacity: 1;
}

.finale-form input:focus {
  border-color: var(--green-action);
  box-shadow: inset 0 0 0 1px var(--green-action);
}

.finale-form button {
  border-radius: 0 999px 999px 0;
}

.finale-form button:hover {
  transform: none;
}

.finale-form input:disabled,
.finale-form button:disabled {
  cursor: wait;
  opacity: 0.68;
}

.finale-form .waitlist-purpose {
  margin-top: 13px;
  color: var(--body);
  font-size: 12px;
  line-height: 1.5;
}

.finale-form .waitlist-purpose a {
  color: inherit;
  text-underline-offset: 3px;
}

.finale-form [data-form-status] {
  margin-top: 13px;
  color: var(--muted);
  font-size: 12px;
}

.finale-form [data-form-status]:empty {
  display: none;
}

.site-footer {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 40px;
  align-items: center;
  width: var(--page);
  margin: 0 auto;
  padding: 34px 0 calc(84px + env(safe-area-inset-bottom));
  border-top: 1px solid rgba(29, 43, 49, 0.14);
}

.site-footer img {
  width: 88px;
  height: auto;
}

.site-footer p {
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}

/* Motion */

@keyframes hero-enter {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes hero-settle {
  from { transform: scale(1.025); }
  to { transform: scale(1); }
}

@keyframes atmosphere-drift {
  from { transform: translate3d(-1.5%, 0, 0); opacity: 0.7; }
  to { transform: translate3d(1.5%, -0.5%, 0); opacity: 1; }
}

/* Responsive */

@media (max-width: 1100px) {
  .site-header nav {
    gap: 18px;
  }

  .brain-layout,
  .app-layout {
    gap: 64px;
  }

  .message {
    padding-inline: 48px;
  }

  .message-calm {
    padding-left: var(--gutter);
  }

  .message-change {
    padding-right: var(--gutter);
  }
}

@media (max-width: 820px) {
  :root {
    --page: min(100% - 40px, 720px);
    --section-space: 96px;
  }

  .site-header {
    grid-template-columns: 1fr auto;
    min-height: 70px;
  }

  .site-header nav {
    display: none;
  }

  .hero {
    min-height: max(660px, calc(100svh - 70px));
  }

  .hero-bg {
    object-position: 71% 50%;
  }

  .hero-inner {
    padding-block: 80px 112px;
  }

  .brain-layout,
  .app-layout,
  .media-split,
  .media-split-reverse,
  .finale-inner {
    grid-template-columns: 1fr;
  }

  .brain-layout,
  .app-layout,
  .media-split,
  .media-split-reverse {
    gap: 64px;
  }

  .house-context {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .house-sensor-list {
    grid-template-columns: repeat(2, 1fr);
    gap: 24px 0;
  }

  .house-sensor-list > div:nth-child(3) {
    padding-left: 0;
    border-left: 0;
  }

  .message-pair {
    grid-template-columns: 1fr;
  }

  .message {
    min-height: 0;
    padding-block: 72px;
    padding-inline: 20px;
  }

  .app-quote {
    padding: 48px 0 0;
    border-top: 1px solid var(--line-strong);
    border-left: 0;
  }

  .memory-story {
    grid-template-columns: 1fr;
    gap: 44px;
  }

  .memory-story article,
  .memory-story article + article {
    padding: 0;
    border-left: 0;
  }

  .memory-story article + article {
    padding-top: 44px;
    border-top: 1px solid var(--line);
  }

  .finale-form {
    margin-top: 8px;
  }

  .site-footer {
    grid-template-columns: 1fr auto;
  }

  .site-footer p:first-of-type {
    display: none;
  }
}

@media (max-width: 430px) {
  :root {
    --page: calc(100% - 32px);
    --section-space: 82px;
  }

  body {
    font-size: 16px;
  }

  h1 {
    font-size: clamp(42px, 12.3vw, 54px);
  }

  h2 {
    font-size: clamp(34px, 9.6vw, 44px);
  }

  .site-header {
    min-height: 64px;
    padding-inline: 16px;
  }

  .brand img {
    height: 27px;
  }

  .header-cta {
    min-height: 42px;
    padding-inline: 15px;
    font-size: 12px;
  }

  .hero {
    min-height: 760px;
  }

  .hero-bg {
    object-position: 74% 48%;
  }

  .hero-inner {
    padding: 66px 20px 112px;
  }

  .hero-lead {
    margin-top: 22px;
    font-size: 16px;
  }

  .hero-actions {
    margin-top: 26px;
  }

  .hero-actions .button {
    width: 100%;
  }

  .section-intro {
    margin-bottom: 52px;
  }

  .section-intro > p {
    margin-top: 22px;
    font-size: 16px;
  }

  .house-figure picture,
  .product-image picture {
    border-radius: 12px;
  }

  .house-context {
    margin-top: 24px;
    padding-top: 22px;
  }

  .house-sensor-list > div {
    padding-inline: 14px;
  }

  .house-sensor-list dt {
    font-size: 13px;
  }

  .message {
    padding-inline: 16px;
  }

  .message h3 {
    margin-top: 30px;
    font-size: 25px;
  }

  .brain-copy > p:last-child,
  .memory-image p {
    font-size: 16px;
  }

  .memory-image {
    min-height: 520px;
  }

  .memory-image figcaption {
    bottom: 54px;
  }

  .app-quote > p {
    font-size: 29px;
  }

  .product-list,
  .install-list {
    margin-top: 38px;
  }

  .finale-inner {
    padding-block: 84px 74px;
  }

  .waitlist-fields {
    display: block;
  }

  .finale-form input,
  .finale-form button {
    width: 100%;
    min-height: 54px;
    border-radius: 999px;
  }

  .finale-form input {
    border: 1px solid #9faf9f;
  }

  .finale-form button {
    margin-top: 10px;
  }

  .waitlist-confirmation {
    min-height: 64px;
    padding: 14px 18px;
    border-radius: 24px;
  }

  .site-footer {
    display: block;
    padding: 30px 0 calc(90px + env(safe-area-inset-bottom));
  }

  .site-footer p:first-of-type {
    display: block;
  }

  .site-footer p {
    margin-top: 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .hero-enter,
  .hero-bg,
  .hero-atmosphere {
    animation: none !important;
  }

  [data-reveal] {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .button,
  .site-header nav a {
    transition: none !important;
  }
}
