/* Hallpane website. Dark, warm and quiet, like the app's Lamplight look. */

:root {
  --bg: #08090b;
  --bg-raised: #111317;
  --card: rgba(255, 255, 255, 0.035);
  --card-hover: rgba(255, 255, 255, 0.06);
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.14);
  --text: #f4f0e8;
  --muted: rgba(244, 240, 232, 0.62);
  --faint: rgba(244, 240, 232, 0.56);
  --amber: #f0a854;
  --amber-light: #ffd59c;
  --coral: #ff7a66;
  --sky: #78b4ff;
  --sage: #8cd7a5;
  --violet: #ab95ff;
  --radius: 28px;
  --max: 1180px;
  color-scheme: dark;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.6 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
picture { display: block; }
a { color: var(--amber); text-decoration: none; }
a:hover { text-decoration: underline; }

.wrap { width: min(var(--max), 100% - 32px); margin: 0 auto; }

/* Background atmosphere */
.glow {
  position: absolute;
  inset: 0 0 auto 0;
  height: 1100px;
  pointer-events: none;
  background:
    radial-gradient(700px 480px at 50% 0%, rgba(240, 168, 84, 0.22), transparent 70%),
    radial-gradient(600px 420px at 12% 8%, rgba(120, 90, 255, 0.14), transparent 70%),
    radial-gradient(600px 420px at 90% 14%, rgba(255, 110, 90, 0.10), transparent 70%);
  z-index: 0;
}

.grid-bg {
  position: absolute;
  inset: 0 0 auto 0;
  height: 900px;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: radial-gradient(800px 520px at 50% 10%, #000 20%, transparent 75%);
  mask-image: radial-gradient(800px 520px at 50% 10%, #000 20%, transparent 75%);
  z-index: 0;
}

main, .nav, footer { position: relative; z-index: 1; }

/* Navigation */
.nav {
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: saturate(160%) blur(18px);
  -webkit-backdrop-filter: saturate(160%) blur(18px);
  background: rgba(8, 9, 11, 0.62);
  border-bottom: 1px solid var(--line);
}

.nav .wrap { display: flex; align-items: center; gap: 24px; height: 64px; }

.brand { display: flex; align-items: center; gap: 10px; color: var(--text); font-weight: 650; font-size: 18px; letter-spacing: -0.01em; }
.brand:hover { text-decoration: none; }
.brand img { width: 32px; height: 32px; border-radius: 8px; }

.nav-links { margin-left: auto; display: flex; align-items: center; gap: 26px; font-size: 15px; }
.nav-links a { color: var(--muted); }
.nav-links a:hover { color: var(--text); text-decoration: none; }
.nav-links a.btn-primary, .nav-links a.btn-primary:hover { color: #111; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 26px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 16px;
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn svg { width: 20px; height: 20px; }

.btn-primary {
  background: linear-gradient(180deg, #fff 0%, #ece6db 100%);
  color: #111;
  box-shadow: 0 10px 30px -10px rgba(240, 168, 84, 0.55), inset 0 -1px 0 rgba(0, 0, 0, 0.1);
}

.btn-ghost { color: var(--text); background: var(--card); border: 1px solid var(--line-strong); }
.btn-ghost:hover { background: var(--card-hover); }

.nav .btn { min-height: 38px; padding: 0 16px; font-size: 14px; }

/* Hero */
.hero { padding: 96px 0 0; text-align: center; }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 7px 16px 7px 10px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
}
.pill b {
  padding: 2px 9px;
  border-radius: 999px;
  background: rgba(240, 168, 84, 0.16);
  color: var(--amber-light);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

h1, h2, h3 { letter-spacing: -0.03em; line-height: 1.05; margin: 0; }

.hero h1 {
  margin: 28px auto 0;
  max-width: 900px;
  font-size: clamp(44px, 7.4vw, 88px);
  font-weight: 800;
}

.gradient {
  background: linear-gradient(100deg, var(--amber-light) 0%, var(--amber) 45%, var(--coral) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero .lead {
  margin: 24px auto 0;
  max-width: 640px;
  font-size: clamp(18px, 2.1vw, 21px);
  color: var(--muted);
}

.hero .actions { display: flex; justify-content: center; flex-wrap: wrap; gap: 12px; margin-top: 36px; }

.meta { margin-top: 18px; font-size: 14px; color: var(--faint); }

/* Device frame, shared by the hero and feature cards */
.ipad {
  padding: 1.1%;
  border-radius: 4.2% / 5.6%;
  background: linear-gradient(140deg, #6b6f78 0%, #2c2f35 22%, #17191d 55%, #3c4048 85%, #70747d 100%);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.05), 0 60px 120px -30px rgba(0, 0, 0, 0.9);
}
.ipad .bezel { padding: 2.2%; border-radius: 3.8% / 5.1%; background: #050506; }
.ipad img { border-radius: 2.4% / 3.2%; width: 100%; }

.hero-device {
  position: relative;
  margin: 72px auto 0;
  max-width: 1080px;
  perspective: 2000px;
}
.hero-device .ipad {
  transform: rotateX(14deg);
  transform-origin: 50% 0;
  transition: transform 1.2s cubic-bezier(0.2, 0.7, 0.1, 1);
}
.hero-device.flat .ipad { transform: rotateX(0deg); }
.hero-device::before {
  content: "";
  position: absolute;
  inset: 10% 8% -4% 8%;
  background: radial-gradient(closest-side, rgba(240, 168, 84, 0.35), transparent);
  filter: blur(40px);
  z-index: -1;
}

/* Trust strip */
.strip {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px 34px;
  margin: 64px auto 0;
  padding: 22px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 15px;
}
.strip span { display: inline-flex; align-items: center; gap: 9px; }
.strip svg { width: 18px; height: 18px; color: var(--amber); }

/* Sections */
section { padding: 120px 0 0; }

.section-head { max-width: 880px; }
.section-head.center { margin: 0 auto; text-align: center; }

.kicker {
  display: inline-block;
  margin-bottom: 14px;
  color: var(--amber);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

h2 { font-size: clamp(34px, 4.6vw, 56px); font-weight: 750; }
.section-head p { margin: 18px 0 0; color: var(--muted); font-size: 19px; }

/* Bento grid */
.bento {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 18px;
  margin-top: 56px;
}

.card {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background:
    radial-gradient(500px 300px at 0% 0%, rgba(var(--tint, 240, 168, 84), 0.12), transparent 70%),
    var(--bg-raised);
  padding: 32px;
  transition: border-color 0.3s ease, transform 0.3s ease;
}
.card:hover { border-color: var(--line-strong); }

.card h3 { font-size: 24px; font-weight: 700; letter-spacing: -0.02em; }
.card p { margin: 10px 0 0; color: var(--muted); font-size: 16px; }

.icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  margin-bottom: 22px;
  border-radius: 14px;
  background: rgba(var(--tint, 240, 168, 84), 0.14);
  color: rgb(var(--tint, 240, 168, 84));
}
.icon svg { width: 24px; height: 24px; }

.span-4 { grid-column: span 4; }
.span-3 { grid-column: span 3; }
.span-2 { grid-column: span 2; }

.card .shot {
  margin: 28px -32px -32px 32px;
  border-top-left-radius: 18px;
  border: 1px solid var(--line-strong);
  border-right: 0;
  border-bottom: 0;
  overflow: hidden;
  box-shadow: 0 -20px 60px -20px rgba(0, 0, 0, 0.7);
}
.card .shot img { width: 100%; }

.card.tall { display: flex; flex-direction: column; }
.card.tall .shot { margin-top: auto; }

/* Mock tiles in the control card, drawn like the app's */
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: auto; padding-top: 28px; }
.tile {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 108px;
  padding: 14px;
  border-radius: 18px;
  background: #1a1d22;
  color: var(--text);
}
.tile.on { background: #f2ece1; color: #1b1a18; }
.tile .dot { width: 26px; height: 26px; margin-bottom: auto; border-radius: 50%; background: rgba(var(--c), 0.22); box-shadow: inset 0 0 0 7px rgba(var(--c), 0.9); }
.tile b { margin-top: 12px; font-size: 14px; font-weight: 600; line-height: 1.2; }
.tile small { font-size: 12px; opacity: 0.6; }
.tile i { position: absolute; left: 0; bottom: 0; height: 4px; background: #d68c1e; }

/* Steps */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 56px; counter-reset: step; }
.step { padding: 30px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--card); }
.step::before {
  counter-increment: step;
  content: counter(step);
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  margin-bottom: 20px;
  border-radius: 50%;
  background: linear-gradient(180deg, var(--amber-light), var(--amber));
  color: #1a1206;
  font-weight: 800;
}
.step h3 { font-size: 21px; }
.step p { margin: 8px 0 0; color: var(--muted); font-size: 16px; }

/* Split section */
.split { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 64px; align-items: center; }
.split .portrait { max-width: 420px; margin-left: auto; }
.split .portrait .ipad { border-radius: 6% / 4.4%; padding: 1.6%; }
.split .portrait .bezel { padding: 3.2%; border-radius: 5.4% / 4%; }
.split .portrait img { border-radius: 3.6% / 2.7%; }

.checks { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 14px; }
.checks li { display: flex; gap: 12px; align-items: flex-start; color: var(--muted); }
.checks svg { flex: none; width: 22px; height: 22px; margin-top: 2px; color: var(--sage); }
.checks strong { color: var(--text); font-weight: 600; }

/* Call to action */
.cta {
  position: relative;
  overflow: hidden;
  margin-top: 120px;
  padding: 80px 32px;
  border-radius: 36px;
  border: 1px solid var(--line-strong);
  text-align: center;
  background:
    radial-gradient(600px 300px at 50% 0%, rgba(240, 168, 84, 0.28), transparent 70%),
    radial-gradient(500px 300px at 50% 120%, rgba(120, 90, 255, 0.18), transparent 70%),
    var(--bg-raised);
}
.cta img { width: 84px; height: 84px; margin: 0 auto 24px; border-radius: 20px; box-shadow: 0 20px 50px -10px rgba(240, 168, 84, 0.5); }
.cta p { margin: 16px auto 0; max-width: 520px; color: var(--muted); font-size: 19px; }
.cta .actions { margin-top: 32px; display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; }

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

/* Document pages: support and privacy */
.doc { padding-top: 88px; }
.doc .wrap { max-width: 780px; }
.doc h1 { font-size: clamp(40px, 6vw, 64px); font-weight: 800; }
.doc .lead { margin: 20px 0 0; font-size: 20px; color: var(--muted); }
.doc h2 { margin: 56px 0 0; font-size: 26px; font-weight: 700; letter-spacing: -0.02em; }
.doc p { color: var(--muted); }
.doc .updated { margin-top: 14px; color: var(--faint); font-size: 14px; }
.doc .actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }

.contact {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px 24px;
  margin-top: 36px;
  padding: 26px 28px;
  border-radius: var(--radius);
  border: 1px solid var(--line-strong);
  background: radial-gradient(400px 200px at 0% 0%, rgba(240, 168, 84, 0.16), transparent 70%), var(--bg-raised);
}
.contact div { flex: 1 1 260px; }
.contact strong { display: block; font-size: 18px; }
.contact span { color: var(--muted); font-size: 15px; }

.faq { margin-top: 28px; border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 4px;
  font-size: 18px;
  font-weight: 600;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  flex: none;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  color: var(--muted);
  font-size: 20px;
  font-weight: 400;
  transition: transform 0.25s ease;
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { margin: -6px 4px 22px; }

.facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 36px; }
.fact { padding: 22px; border-radius: 20px; border: 1px solid var(--line); background: var(--card); }
.fact strong { display: block; font-size: 17px; }
.fact span { color: var(--muted); font-size: 14px; }

/* Reveal on scroll, only when scripts run and motion is welcome */
.js .reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.2, 0.7, 0.1, 1); }
.js .reveal.seen { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .hero-device .ipad { transform: none; transition: none; }
}

/* Smaller screens */
@media (max-width: 900px) {
  .bento { grid-template-columns: 1fr 1fr; }
  .span-4, .span-3 { grid-column: span 2; }
  .span-2 { grid-column: span 1; }
  .steps { grid-template-columns: 1fr; }
  .split { grid-template-columns: 1fr; gap: 40px; }
  .split .portrait { width: 100%; margin: 0 auto; }
  .facts { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
  body { font-size: 16px; }
  .nav-links a:not(.btn) { display: none; }
  .hero { padding-top: 64px; }
  section { padding-top: 88px; }
  .bento { grid-template-columns: 1fr; }
  .span-4, .span-3, .span-2 { grid-column: auto; }
  .card { padding: 26px; }
  .card .shot { margin: 24px -26px -26px 26px; }
  .cta { padding: 56px 22px; border-radius: 28px; }
  footer nav { margin-left: 0; }
}
