:root {
  --paper: #f4f1eb;
  --paper-2: #ebe6dc;
  --ink: #14161a;
  --ink-2: #4a4d52;
  --line: #d9d3c7;
  --night: #14161a;
  --night-2: #1d2025;
  --night-line: #2c3037;
  --amber: #f0a43a;
  --amber-soft: #f6c77f;
  --green: #2f6f5e;
  --radius: 18px;
  --serif: "Instrument Serif", Georgia, serif;
  --sans: "Inter", system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 16px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; }
a { color: inherit; }
button { font: inherit; color: inherit; }

.wrap { width: min(1180px, 100% - 32px); margin-inline: auto; }
.wrap--narrow { width: min(780px, 100% - 32px); }

h1, h2 {
  font-family: var(--serif);
  font-weight: 400;
  letter-spacing: -0.01em;
  line-height: 1.02;
  margin: 0 0 24px;
}
h1 { font-size: clamp(48px, 7vw, 92px); }
h2 { font-size: clamp(38px, 5vw, 64px); max-width: 16ch; }
h1 em, h2 em { font-style: italic; color: var(--green); }
h3 { font-size: 18px; font-weight: 600; margin: 0 0 8px; letter-spacing: -0.01em; }

.eyebrow {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--green);
  margin: 0 0 16px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 24px;
  border-radius: 999px;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--paper);
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: transform .15s ease, background .2s ease, color .2s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn--ghost { background: transparent; color: var(--ink); }
.btn--small { padding: 9px 16px; font-size: 14px; }
.btn--full { width: 100%; }
.btn--whatsapp { background: #25d366; border-color: #25d366; color: #0b2b17; margin-top: 8px; }

/* Nav */
.nav {
  position: sticky;
  top: 0;
  z-index: 20;
  background: color-mix(in srgb, var(--paper) 85%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s;
}
.nav.is-scrolled { border-bottom-color: var(--line); }
.nav__inner { display: flex; align-items: center; justify-content: space-between; height: 68px; gap: 16px; }
.nav__links { display: flex; gap: 28px; font-size: 15px; }
.nav__links a { text-decoration: none; color: var(--ink-2); }
.nav__links a:hover { color: var(--ink); }
.nav__actions { display: flex; align-items: center; gap: 10px; }
.lang {
  background: none;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 12px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 18px;
  letter-spacing: -0.02em;
  text-decoration: none;
}
.logo__dot { color: var(--amber); }
.logo__mark {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background:
    radial-gradient(circle at 70% 30%, var(--amber) 0 4px, transparent 5px),
    var(--ink);
  clip-path: polygon(50% 0, 100% 40%, 100% 100%, 0 100%, 0 40%);
}

/* Hero */
.hero { padding: 56px 0 96px; overflow: hidden; }
.hero__grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 48px; align-items: center; }
.lede { font-size: 19px; color: var(--ink-2); max-width: 34em; margin: 0 0 32px; }
.hero__ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 32px; }
.hero__points { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px 24px; font-size: 14px; color: var(--ink-2); }
.hero__points li::before { content: "✓"; color: var(--green); font-weight: 700; margin-right: 8px; }

.hero__demo { position: relative; display: grid; justify-items: center; }
.glow {
  position: absolute;
  inset: -10% -20%;
  background: radial-gradient(closest-side, var(--glow, rgba(240,164,58,.55)), transparent 70%);
  opacity: var(--glow-o, 1);
  transition: background .6s ease, opacity .6s ease;
  pointer-events: none;
}
.demo__hint { position: relative; font-size: 13px; color: var(--ink-2); margin: 16px 0 0; }

/* Phone */
.phone {
  position: relative;
  width: 330px;
  max-width: 100%;
  padding: 12px;
  border-radius: 46px;
  background: #0d0e10;
  box-shadow: 0 40px 80px -30px rgba(20,22,26,.6), inset 0 0 0 2px #2a2d33;
}
.phone__notch { position: absolute; top: 20px; left: 50%; translate: -50% 0; width: 90px; height: 24px; border-radius: 20px; background: #000; z-index: 2; }
.app {
  position: relative;
  border-radius: 36px;
  background: var(--night);
  color: #f2efe8;
  padding: 54px 16px 72px;
  min-height: 600px;
  overflow: hidden;
}
.app__head { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 16px; }
.app__hello { margin: 0; font-family: var(--serif); font-size: 26px; line-height: 1.1; }
.app__home { margin: 2px 0 0; font-size: 12px; color: #9a9ea6; }
.app__weather { font-size: 13px; color: #c9ccd2; background: var(--night-2); padding: 6px 10px; border-radius: 999px; }

.app__scenes { display: flex; gap: 6px; margin-bottom: 14px; overflow-x: auto; scrollbar-width: none; }
.chip {
  flex: none;
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid var(--night-line);
  background: transparent;
  font-size: 12px;
  cursor: pointer;
  transition: background .2s, color .2s, border-color .2s;
}
.chip.is-active { background: var(--amber); border-color: var(--amber); color: var(--ink); }

.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.tile {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-areas: "icon icon" "name name" "state state";
  align-content: start;
  gap: 2px;
  text-align: left;
  padding: 12px;
  border-radius: 18px;
  border: 0;
  background: var(--night-2);
  transition: background .3s ease, color .3s ease;
}
button.tile { cursor: pointer; }
.tile__icon { grid-area: icon; width: 30px; height: 30px; border-radius: 50%; background: #2a2e35; display: grid; place-items: center; margin-bottom: 6px; transition: background .3s; }
.tile__icon svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.tile__name { grid-area: name; font-size: 13px; font-weight: 600; }
.tile__state { grid-area: state; font-size: 12px; color: #9a9ea6; }
.tile[aria-pressed="true"] { background: #f2efe8; color: var(--ink); }
.tile[aria-pressed="true"] .tile__icon { background: var(--amber); }
.tile[aria-pressed="true"] .tile__state { color: var(--ink-2); }
.tile--wide { grid-column: span 2; grid-template-columns: auto 1fr auto; grid-template-areas: "icon name state" "slider slider slider"; align-items: center; gap: 4px 10px; }
.tile--wide .tile__icon { margin: 0; }
.tile--wide .tile__state { text-align: right; }
.tile--thermo { grid-template-areas: "icon name thermo"; }
.tile--sensors .tile__state.is-alert { color: var(--amber); }

.slider { grid-area: slider; width: 100%; margin-top: 8px; accent-color: var(--amber); }
.thermo { grid-area: thermo; display: flex; align-items: center; gap: 10px; }
.thermo__btn { width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--night-line); background: transparent; cursor: pointer; font-size: 16px; line-height: 1; }
.thermo__val { font-family: var(--serif); font-size: 30px; min-width: 2ch; text-align: center; }

.app__toast {
  position: absolute;
  left: 16px; right: 16px; bottom: 16px;
  margin: 0;
  padding: 10px 14px;
  border-radius: 14px;
  background: rgba(240,164,58,.15);
  border: 1px solid rgba(240,164,58,.35);
  color: var(--amber-soft);
  font-size: 12px;
  opacity: 0;
  translate: 0 10px;
  transition: opacity .3s, translate .3s;
}
.app__toast.is-visible { opacity: 1; translate: 0 0; }

/* Sections */
.section { padding: 112px 0; }
.section__lede { font-size: 18px; color: var(--ink-2); max-width: 36em; margin: -8px 0 40px; }
.section--dark { background: var(--night); color: #f2efe8; }
.section--dark .eyebrow { color: var(--amber); }
.section--dark h2 em { color: var(--amber-soft); }
.section--dark .section__lede { color: #b0b3b9; }
.section--soft { background: var(--paper-2); }

/* Device cards */
.cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 48px; }
.card {
  background: #fbfaf7;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  transition: transform .2s ease, box-shadow .2s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: 0 20px 40px -24px rgba(20,22,26,.35); }
.card p { margin: 0; font-size: 15px; color: var(--ink-2); }
.card__icon { width: 44px; height: 44px; border-radius: 12px; background: var(--paper-2); display: grid; place-items: center; margin-bottom: 20px; }
.card__icon svg { width: 22px; height: 22px; fill: none; stroke: var(--ink); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.card--accent { background: var(--ink); color: #f2efe8; border-color: var(--ink); }
.card--accent p { color: #b0b3b9; }
.card--accent .card__icon { background: var(--amber); }

/* Scenes */
.scenes { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.scene {
  text-align: left;
  padding: 24px;
  border-radius: var(--radius);
  border: 1px solid var(--night-line);
  background: var(--night-2);
  cursor: pointer;
  transition: border-color .2s, transform .2s;
}
.scene:hover { transform: translateY(-3px); border-color: #3c414a; }
.scene.is-active { border-color: var(--amber); }
.scene p { margin: 0; color: #b0b3b9; font-size: 15px; }
.scene__time { display: inline-block; font-family: var(--serif); font-size: 32px; color: var(--amber-soft); margin-bottom: 12px; }

/* Steps */
.steps { list-style: none; padding: 0; margin: 48px 0 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px; counter-reset: none; }
.step { border-top: 1px solid var(--ink); padding-top: 20px; }
.step__n { display: block; font-family: var(--serif); font-size: 44px; line-height: 1; color: var(--green); margin-bottom: 16px; }
.step p { margin: 0; color: var(--ink-2); font-size: 15px; }

/* FAQ */
.faq { margin-top: 40px; border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  list-style: none;
  cursor: pointer;
  padding: 22px 40px 22px 0;
  font-weight: 600;
  font-size: 17px;
  position: relative;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 4px; top: 50%; translate: 0 -50%; font-size: 24px; font-weight: 400; transition: rotate .2s; }
.faq details[open] summary::after { rotate: 45deg; }
.faq details p { margin: 0 0 22px; color: var(--ink-2); max-width: 60ch; }

/* Contact */
.contact { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: start; }
.form { background: var(--night-2); border: 1px solid var(--night-line); border-radius: 24px; padding: 28px; display: grid; gap: 16px; }
.form label, .form legend { display: grid; gap: 6px; font-size: 13px; font-weight: 500; color: #c9ccd2; }
.form fieldset { border: 0; padding: 0; margin: 0; }
.form legend { margin-bottom: 8px; }
.form input:not([type="checkbox"]), .form select, .form textarea {
  width: 100%;
  font: inherit;
  font-size: 15px;
  color: #f2efe8;
  background: var(--night);
  border: 1px solid var(--night-line);
  border-radius: 12px;
  padding: 12px 14px;
}
.form input:focus, .form select:focus, .form textarea:focus { outline: 2px solid var(--amber); outline-offset: 1px; border-color: transparent; }
.checks { display: flex; flex-wrap: wrap; gap: 8px; }
.checks label { display: block; cursor: pointer; }
.checks input { position: absolute; opacity: 0; pointer-events: none; }
.checks span { display: inline-block; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--night-line); font-size: 13px; transition: background .2s, color .2s, border-color .2s; }
.checks input:checked + span { background: var(--amber); border-color: var(--amber); color: var(--ink); }
.checks input:focus-visible + span { outline: 2px solid var(--amber); outline-offset: 2px; }
.form .btn { background: var(--amber); border-color: var(--amber); color: var(--ink); margin-top: 4px; }

/* Footer */
.footer { padding: 40px 0; border-top: 1px solid var(--line); }
.footer__inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; font-size: 14px; color: var(--ink-2); }
.footer p { margin: 0; }
.footer .logo { color: var(--ink); }

/* Reveal on scroll */
.reveal { opacity: 0; translate: 0 16px; transition: opacity .6s ease, translate .6s ease; }
.reveal.is-in { opacity: 1; translate: 0 0; }

/* Responsive */
@media (max-width: 1000px) {
  .cards, .scenes { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 860px) {
  .nav__links { display: none; }
  .hero { padding-top: 32px; }
  .hero__grid, .contact { grid-template-columns: 1fr; gap: 48px; }
  .section { padding: 80px 0; }
}
@media (max-width: 560px) {
  .cards, .scenes, .steps { grid-template-columns: 1fr; }
  .nav__actions .btn--small { display: none; }
  .hero__ctas .btn { flex: 1 1 100%; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
  .reveal { opacity: 1; translate: none; }
}
