/* Colors and type come from the Roofline app's Twilight theme. */
@font-face {
  font-family: "Schibsted Grotesk";
  src: url("/fonts/schibsted-grotesk.woff2") format("woff2");
  font-weight: 400 700;
  font-display: swap;
}

:root {
  --canvas: #121c33;
  --canvas-2: #1b2848;
  --canvas-3: #24345a;
  --line: rgba(255, 255, 255, .09);
  --on: #eef1f8;
  --muted: #a6b1cc;
  --primary: #b9a6f2;
  --primary-hover: #cabaf7;
  --on-primary: #17122b;
  --card: #f6f7fb;
  --ink: #161e33;
  --ink-soft: #55607a;
  --edge: #dde1ec;
  --glow: #ffd37a;
  --radius: 20px;
  --gutter: 20px;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 72px;
}

body {
  margin: 0;
  background: var(--canvas);
  color: var(--on);
  font: 400 17px/1.5 "Schibsted Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

img, svg { display: block; max-width: 100%; }
img { height: auto; }
h1, h2, h3, p, dl, dd, ol { margin: 0; padding: 0; }
ol { list-style: none; }
a { color: inherit; }

:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.wrap {
  width: 100%;
  max-width: 1160px;
  margin-inline: auto;
  padding-inline: max(var(--gutter), env(safe-area-inset-left));
}

h1, h2 { letter-spacing: -.022em; font-weight: 600; text-wrap: balance; }
h2 { font-size: clamp(30px, 5vw, 44px); line-height: 1.1; }
h3 { font-size: 20px; line-height: 1.25; font-weight: 600; letter-spacing: -.01em; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 12px;
  background: var(--primary);
  color: var(--on-primary);
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .15s ease, transform .15s ease;
}
.btn:hover { background: var(--primary-hover); }
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: .65; cursor: progress; }
.btn-small { padding: 9px 14px; font-size: 15px; }
.btn-big { padding: 16px 26px; font-size: 18px; min-height: 56px; }
.btn-block { width: 100%; }

/* Header */
.top { position: relative; z-index: 2; }
.top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: 16px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}
.brand-name { font-weight: 600; font-size: 19px; letter-spacing: -.01em; }
.brand-by { color: var(--muted); font-size: 14px; }

/* Hero */
.hero {
  position: relative;
  padding-top: clamp(28px, 6vw, 64px);
  background:
    radial-gradient(70% 420px at 50% 640px, rgba(185, 166, 242, .14), transparent 70%),
    var(--canvas);
}
.eyebrow { color: var(--muted); font-size: 15px; margin-bottom: 14px; }
h1 { font-size: clamp(42px, 10.4vw, 78px); line-height: 1.02; }
.lede {
  margin-top: 18px;
  max-width: 34em;
  color: #cdd4e6;
  font-size: clamp(18px, 2.4vw, 21px);
  line-height: 1.45;
  text-wrap: pretty;
}
.hero-cta { margin-top: 26px; }
.hero-cta .btn { width: 100%; }
.fine { margin-top: 10px; color: var(--muted); font-size: 15px; text-align: center; }

.stage { margin-top: clamp(30px, 6vw, 56px); }
.house { position: relative; max-width: 300px; margin-inline: auto; }

.gable { width: 100%; height: 66px; overflow: visible; margin-bottom: 2px; }
.bulbs {
  fill: none;
  stroke: var(--glow);
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: .01 11;
  vector-effect: non-scaling-stroke;
}
.bulbs-glow { stroke-width: 7; opacity: .75; }
.reveal-line {
  stroke-dasharray: 1;
  stroke-dashoffset: 0;
}

.laptop {
  position: relative;
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 26px;
  padding: 7px;
  background: #0b1224;
  box-shadow: 0 30px 80px -20px rgba(4, 8, 22, .9);
  height: min(118vw, 500px);
  overflow: hidden;
}
.laptop img { border-radius: 19px; }
.laptop::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 110px;
  background: linear-gradient(transparent, var(--canvas));
}

.phone { display: none; }

/* Sections */
.steps, .tour, .offer, .faq { padding-block: clamp(64px, 10vw, 120px); }
.tour { padding-top: 0; }
.offer { padding-block: 0; }

.section-head p { margin-top: 12px; color: var(--muted); max-width: 36em; }

.step-list { margin-top: 36px; display: grid; gap: 30px; }
.step-list li {
  display: grid;
  grid-template-columns: 38px 1fr;
  column-gap: 14px;
}
.step-n {
  grid-row: span 2;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(185, 166, 242, .5);
  border-radius: 50%;
  color: var(--primary);
  font-weight: 600;
  font-size: 16px;
}
.step-list h3 { padding-top: 4px; }
.step-list p { margin-top: 6px; color: var(--muted); }

.shot { margin-top: 44px; }
.tour h2 + .shot { margin-top: 32px; }
.shot-note p { margin-top: 6px; color: var(--muted); }

.frame {
  position: relative;
  margin: 16px 0 0;
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
  background: var(--canvas-2);
}
.frame:not(.frame-photo)::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 48px;
  background: linear-gradient(transparent, var(--canvas));
  pointer-events: none;
}

.soon {
  margin-top: 44px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--canvas-2);
  color: #cdd4e6;
}
.pill {
  display: inline-block;
  margin-right: 6px;
  padding: 2px 10px;
  border-radius: 99px;
  background: rgba(185, 166, 242, .2);
  color: var(--primary);
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
}

/* Offer */
.offer-card {
  display: grid;
  gap: 28px;
  padding: 28px 22px;
  border-radius: var(--radius);
  background: var(--canvas-2);
  border: 1px solid var(--line);
}
.offer-copy p { margin-top: 12px; color: #cdd4e6; }
.offer-copy .btn { display: none; }
.price {
  padding: 22px;
  border-radius: 16px;
  background: var(--card);
  color: var(--ink);
}
.price-name { color: var(--ink-soft); font-size: 15px; }
.price-num {
  margin-top: 2px;
  font-size: 56px;
  line-height: 1.05;
  font-weight: 600;
  letter-spacing: -.03em;
  font-variant-numeric: tabular-nums;
}
.price-num span { font-size: 22px; font-weight: 500; letter-spacing: 0; color: var(--ink-soft); }
.price-lock { margin-top: 6px; font-weight: 600; }
.price-reg { margin-top: 4px; color: var(--ink-soft); font-size: 15px; }

/* FAQ */
.faq-list { margin-top: 30px; display: grid; gap: 26px; }
dt { font-weight: 600; font-size: 18px; }
dd { margin-top: 6px; color: var(--muted); }

/* Form */
.join { padding-bottom: clamp(56px, 8vw, 96px); }
.form-card {
  position: relative;
  padding: 26px 20px;
  border-radius: var(--radius);
  background: var(--card);
  color: var(--ink);
  max-width: 720px;
  margin-inline: auto;
}
.form-sub { margin-top: 6px; color: var(--ink-soft); }

form { margin-top: 22px; display: grid; gap: 20px; }
.grid-2 { display: grid; gap: 20px; }
.field { display: grid; gap: 6px; }
.field > span, legend { font-weight: 500; font-size: 16px; }
.field em { font-style: normal; font-weight: 400; color: var(--ink-soft); font-size: 14px; margin-left: 4px; }

input[type="text"], input[type="email"], input[type="tel"], textarea {
  width: 100%;
  padding: 13px 14px;
  border: 1px solid #c9cfdf;
  border-radius: 12px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 17px;
  color-scheme: light;
  min-height: 50px;
}
textarea { resize: vertical; min-height: 72px; }
input:focus-visible, textarea:focus-visible { outline: 2px solid #7a63d6; outline-offset: 0; border-color: #7a63d6; }

.choices { margin: 0; padding: 0; border: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.choices legend { padding: 0; margin-bottom: 8px; width: 100%; }
.choices label { position: relative; cursor: pointer; }
.choices input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}
.choices span {
  display: flex;
  align-items: center;
  min-height: 46px;
  padding: 10px 15px;
  border: 1px solid #c9cfdf;
  border-radius: 12px;
  background: #fff;
  font-size: 16px;
  transition: background-color .12s ease, border-color .12s ease;
}
.choices input:checked + span { background: #e9e3fb; border-color: #7a63d6; font-weight: 500; }
.choices input:focus-visible + span { outline: 2px solid #7a63d6; outline-offset: 2px; }

.trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.form-error {
  padding: 12px 14px;
  border-radius: 12px;
  background: #fbe9e5;
  color: #8f2d1c;
}
.form-error a { font-weight: 600; }

.thanks { padding: 18px 0; text-align: center; outline: none; }
.thanks svg { margin: 0 auto 14px; }
.thanks h2 { font-size: 30px; }
.thanks p { margin-top: 8px; color: var(--ink-soft); font-size: 18px; }

.close {
  display: none;
  position: absolute;
  top: 12px;
  right: 12px;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--ink-soft);
  cursor: pointer;
}
.close:hover { background: #e7eaf3; }

dialog {
  width: min(720px, 100%);
  max-width: 100%;
  max-height: 100dvh;
  margin: auto auto 0;
  padding: 0;
  border: 0;
  border-radius: var(--radius) var(--radius) 0 0;
  background: transparent;
  overflow: auto;
  overscroll-behavior: contain;
}
dialog::backdrop { background: rgba(6, 10, 24, .72); }
dialog .form-card { border-radius: inherit; padding-top: 22px; padding-bottom: calc(26px + env(safe-area-inset-bottom)); }
dialog .close { display: grid; }
dialog h2 { padding-right: 44px; font-size: 27px; }
dialog .thanks h2 { padding-right: 0; }
dialog[open] { animation: sheet .24s ease-out; }
@keyframes sheet { from { opacity: 0; transform: translateY(18px); } }

/* Footer */
.foot { border-top: 1px solid var(--line); }
.foot-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding-block: 24px;
  color: var(--muted);
  font-size: 15px;
}
.foot-row span { color: var(--on); font-weight: 600; }

/* Bottom button on phones */
.sticky {
  position: fixed;
  z-index: 5;
  inset: auto 0 0;
  padding: 10px var(--gutter) calc(10px + env(safe-area-inset-bottom));
  background: linear-gradient(transparent, rgba(18, 28, 51, .96) 28%);
  transition: opacity .2s ease, transform .2s ease;
}
.sticky[hidden] { display: block; opacity: 0; transform: translateY(16px); pointer-events: none; visibility: hidden; }

/* Motion, kept quiet */
.js .reveal { opacity: 0; transform: translateY(14px); transition: opacity .55s ease, transform .55s ease; }
.js .reveal.in { opacity: 1; transform: none; }
.js .laptop, .js .phone { animation: rise .8s cubic-bezier(.2, .7, .2, 1) both; }
.js .phone { animation-delay: .18s; }
.js .reveal-line { animation: draw 1.5s .35s ease-out both; }
@keyframes rise { from { opacity: 0; transform: translateY(26px); } }
@keyframes draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }

@media (min-width: 560px) {
  .grid-2 { grid-template-columns: 1fr 1fr; }
  .form-card { padding: 34px; }
}

@media (min-width: 760px) {
  :root { --gutter: 32px; }
  .btn-small { padding: 10px 16px; }
  .hero-copy { text-align: center; }
  .lede { margin-inline: auto; text-wrap: balance; }
  .hero-cta .btn { width: auto; min-width: 320px; }

  .house { max-width: 1040px; }
  .gable { height: clamp(90px, 11vw, 132px); }
  .bulbs { stroke-width: 5; stroke-dasharray: .01 16; }
  .bulbs-glow { stroke-width: 10; }
  .laptop {
    height: auto;
    border-radius: 18px 18px 8px 8px;
    padding: 10px 10px 0;
  }
  .laptop img { border-radius: 10px 10px 0 0; }
  .laptop::after { display: none; }

  .phone {
    display: block;
    position: absolute;
    right: -6px;
    bottom: -28px;
    width: 23%;
    border: 1px solid rgba(255, 255, 255, .2);
    border-radius: 26px;
    padding: 6px;
    background: #0b1224;
    box-shadow: 0 24px 60px -12px rgba(4, 8, 22, .95);
  }
  .phone img { border-radius: 20px; }

  .step-list { grid-template-columns: repeat(3, 1fr); gap: 36px; }
  .step-list li { grid-template-columns: 1fr; row-gap: 12px; align-content: start; }
  .step-n { grid-row: auto; }
  .step-list h3 { padding-top: 0; }
  .step-list p { margin-top: -4px; }

  .shot {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 44px;
    align-items: start;
    margin-top: 72px;
  }
  .shot-note { position: sticky; top: 40px; }
  .frame { margin: 0; max-height: none; }
  .frame:not(.frame-photo)::after { display: none; }

  .soon { margin-top: 72px; margin-left: 294px; }

  .offer-card {
    grid-template-columns: 1fr 340px;
    align-items: center;
    gap: 48px;
    padding: 48px;
  }
  .offer-copy .btn { display: inline-flex; margin-top: 24px; }

  .faq-list { grid-template-columns: 1fr 1fr; gap: 36px 56px; }

  dialog { margin: auto; border-radius: var(--radius); max-height: 92dvh; }
  dialog .form-card { padding: 34px; }

  .sticky { display: none; }
}

@media (min-width: 1100px) {
  .phone { right: -44px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .js .laptop, .js .phone, .js .reveal-line, dialog[open] { animation: none; }
  .btn, .sticky { transition: none; }
}
