/* Electryx landing page — mirrors the app's palette (WorkspacePalette / ElectryxDesign). */

:root {
  color-scheme: dark light;
  --blue: #007aff;
  --blue-soft: rgba(0, 122, 255, 0.16);
  --orange: #ff9f0a;
  --teal: #30d0b0;
  --violet: #8b7cff;
  --bg: #000;
  --surface: #1c1c1e;
  --surface-2: #2b2b2e;
  --border: rgba(255, 255, 255, 0.12);
  --text: #f5f5f7;
  --secondary: #abb8cc;
  --glass: rgba(28, 28, 30, 0.84);
  --hero-glow: rgba(0, 122, 255, 0.35);
  --radius-card: 16px;
  --radius-panel: 20px;
  --max: 1160px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", system-ui, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #fff;
    --surface: #f2f2f7;
    --surface-2: #e5e5ea;
    --border: #e0e5ed;
    --text: #1d1d1f;
    --secondary: #57637a;
    --glass: rgba(255, 255, 255, 0.84);
    --hero-glow: rgba(0, 122, 255, 0.18);
  }
}

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

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

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.5 var(--font);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; border-radius: 6px; }

.container { width: min(100% - 40px, var(--max)); margin-inline: auto; }

.skip-link {
  position: absolute; left: 16px; top: -60px; z-index: 100;
  background: var(--blue); color: #fff; padding: 10px 16px; border-radius: 999px;
}
.skip-link:focus { top: 12px; }

/* Navigation: a floating glass bar like the app's tab bar. */
.nav {
  position: sticky; top: 12px; z-index: 50;
  width: min(100% - 24px, var(--max)); margin: 12px auto 0;
  display: flex; align-items: center; gap: 16px;
  padding: 8px 8px 8px 14px;
  background: var(--glass);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border: 1px solid var(--border);
  border-radius: 999px;
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); font-weight: 700; font-size: 18px; }
.brand:hover { text-decoration: none; }
.brand img { width: 32px; height: 32px; border-radius: 8px; }
.nav-links { display: flex; gap: 2px; margin: 0 0 0 auto; list-style: none; padding: 0; }
.nav-links a {
  display: block; padding: 8px 14px; border-radius: 999px;
  color: var(--secondary); font-size: 15px; font-weight: 500;
}
.nav-links a:hover { color: var(--text); background: var(--surface-2); text-decoration: none; }
@media (max-width: 860px) { .nav-links { display: none; } .nav .button { margin-left: auto; } }

/* Buttons: capsule shapes as in the app's paywall and floating create button. */
.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 20px; border-radius: 999px;
  font-weight: 600; font-size: 16px; border: 1px solid transparent; cursor: pointer;
  transition: transform 0.15s ease, background-color 0.15s ease;
}
.button:hover { text-decoration: none; transform: translateY(-1px); }
.button-primary { background: var(--blue); color: #fff; }
.button-primary:hover { background: #1a88ff; }
.button-secondary { background: var(--surface); color: var(--text); border-color: var(--border); }
.button-large { min-height: 56px; padding: 0 26px; font-size: 17px; }

.store-badge {
  display: inline-flex; align-items: center; gap: 12px; text-align: left;
  min-height: 56px; padding: 8px 22px 8px 18px; border-radius: 14px;
  background: var(--text); color: var(--bg);
}
.store-badge:hover { text-decoration: none; opacity: 0.88; }
.store-badge svg { width: 26px; height: 26px; flex: none; }
.store-badge small { display: block; font-size: 11px; line-height: 1.1; opacity: 0.75; }
.store-badge strong { display: block; font-size: 19px; line-height: 1.15; font-weight: 600; }
.store-badge[aria-disabled="true"] { cursor: default; }
.store-badge[aria-disabled="true"]:hover { opacity: 1; }

/* Hero */
.hero { position: relative; padding: 72px 0 24px; text-align: center; isolation: isolate; }
.hero::before {
  content: ""; position: absolute; inset: -140px 0 auto; height: 760px; z-index: -1;
  background: radial-gradient(60% 55% at 50% 30%, var(--hero-glow), transparent 70%);
}
.hero-icon {
  width: 96px; height: 96px; margin: 0 auto 24px; border-radius: 22px;
  box-shadow: 0 0 0 1px var(--border), 0 18px 60px var(--hero-glow);
}
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 14px; border-radius: 999px; margin-bottom: 18px;
  background: var(--blue-soft); color: var(--blue); font-size: 14px; font-weight: 600;
}
h1, h2, h3 { margin: 0; letter-spacing: -0.02em; line-height: 1.08; }
h1 { font-size: clamp(42px, 7vw, 80px); font-weight: 800; }
h2 { font-size: clamp(32px, 4.6vw, 52px); font-weight: 800; }
h3 { font-size: 20px; font-weight: 700; letter-spacing: -0.01em; line-height: 1.25; }
.lead { font-size: clamp(18px, 2vw, 22px); color: var(--secondary); max-width: 700px; margin: 20px auto 0; }
.hero-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; margin-top: 32px; }
.hero-note { margin-top: 14px; color: var(--secondary); font-size: 14px; }

.hero-devices { position: relative; margin: 64px auto 0; max-width: 820px; padding-bottom: 40px; }
.hero-devices .device-pad { width: 74%; }
.hero-devices .device-phone { position: absolute; right: 0; bottom: 0; width: 30%; }
@media (max-width: 640px) {
  .hero-devices .device-pad { width: 84%; }
  .hero-devices .device-phone { width: 38%; right: -6px; }
}

/* Device frames are pure CSS so the screenshots stay plain, untouched captures. */
.device {
  position: relative; background: #0b0b0c;
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 40px 100px rgba(0, 0, 0, 0.5), inset 0 0 0 2px #2a2a2c;
}
.device img { width: 100%; }
.device-phone { padding: 2.8%; border-radius: 15% / 7%; }
.device-phone img { border-radius: 12.4% / 5.8%; }
.device-pad { padding: 1.5%; border-radius: 3.4% / 4.6%; }
.device-pad img { border-radius: 2.2% / 3%; }

/* Highlights */
.facts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 72px; }
.fact {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-card);
  padding: 18px 20px; text-align: left;
}
.fact strong { display: block; font-size: 17px; }
.fact span { color: var(--secondary); font-size: 14px; }
@media (max-width: 860px) { .facts { grid-template-columns: repeat(2, 1fr); } }

/* Sections */
section { padding: 96px 0; }
.section-head { max-width: 760px; margin-bottom: 48px; }
.section-head.centered { margin-inline: auto; text-align: center; }
.section-head p { color: var(--secondary); font-size: 19px; margin: 16px 0 0; }
.kicker {
  display: block; margin-bottom: 12px; font-size: 14px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.08em; color: var(--blue);
}
.kicker.orange { color: var(--orange); }
.kicker.teal { color: var(--teal); }
.kicker.violet { color: var(--violet); }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
.split.reverse > :first-child { order: 2; }
@media (max-width: 900px) {
  .split { grid-template-columns: 1fr; gap: 40px; }
  .split.reverse > :first-child { order: 0; }
}

.phones { display: flex; justify-content: center; gap: 20px; padding-bottom: 48px; }
.phones .device-phone { width: min(46%, 290px); }
.phones .device-phone:nth-child(2) { transform: translateY(48px); }

.checklist { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 16px; }
.checklist li { display: grid; grid-template-columns: 32px 1fr; gap: 14px; align-items: start; }
.checklist .icon {
  width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center;
  background: var(--blue-soft); color: var(--blue);
}
.checklist .icon svg { width: 18px; height: 18px; }
.checklist strong { display: block; }
.checklist span { color: var(--secondary); font-size: 15px; }

/* Feature grid: card surfaces with tinted icon squares, like the app's benefit rows. */
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media (max-width: 900px) { .grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .grid { grid-template-columns: 1fr; } }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-panel); padding: 24px; }
.card p { color: var(--secondary); font-size: 15px; margin: 8px 0 0; }
.tile-icon {
  width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; margin-bottom: 16px;
  background: var(--blue-soft); color: var(--blue);
}
.tile-icon svg { width: 22px; height: 22px; }
.tile-icon.orange, .checklist .icon.orange { background: rgba(255, 159, 10, 0.16); color: var(--orange); }
.tile-icon.teal, .checklist .icon.teal { background: rgba(48, 208, 176, 0.16); color: var(--teal); }
.tile-icon.violet, .checklist .icon.violet { background: rgba(139, 124, 255, 0.18); color: var(--violet); }

/* Gallery: horizontal scroll with snapping. */
.gallery {
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(200px, 250px); gap: 22px;
  overflow-x: auto; scroll-snap-type: x mandatory; padding: 8px max(20px, calc((100% - var(--max)) / 2)) 28px;
  scrollbar-width: thin;
}
.gallery figure { margin: 0; scroll-snap-align: center; }
.gallery .device { box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35), inset 0 0 0 2px #2a2a2c; }
.gallery figcaption { margin-top: 14px; text-align: center; color: var(--secondary); font-size: 14px; }

.wide-shot { margin: 56px auto 0; max-width: 1000px; }

/* Pricing */
.plans { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; max-width: 920px; margin: 0 auto; }
@media (max-width: 760px) { .plans { grid-template-columns: 1fr; } }
.plan { padding: 28px; }
.plan.pro { border-color: var(--blue); box-shadow: 0 0 0 1px var(--blue), 0 20px 60px var(--hero-glow); }
.plan .price { font-size: 28px; font-weight: 800; margin-top: 6px; letter-spacing: -0.02em; }
.plan ul { padding-left: 20px; margin: 18px 0 0; color: var(--secondary); font-size: 15px; }
.plan li { margin: 7px 0; }
.plan li::marker { color: var(--blue); }
.badge {
  display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 13px; font-weight: 700;
  background: var(--blue); color: #fff; vertical-align: middle; margin-left: 8px; letter-spacing: 0;
}
.fine { color: var(--secondary); font-size: 14px; text-align: center; margin: 24px auto 0; max-width: 720px; }

/* FAQ */
.faq { max-width: 820px; margin: 0 auto; display: grid; gap: 12px; }
.faq details { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-card); padding: 0 22px; }
.faq summary {
  cursor: pointer; list-style: none; padding: 20px 0; font-weight: 600; font-size: 18px;
  display: flex; justify-content: space-between; gap: 16px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--blue); font-size: 24px; line-height: 1; }
.faq details[open] summary::after { content: "\2212"; }
.faq details p { margin: 0 0 20px; color: var(--secondary); }

/* Final call to action */
.cta {
  text-align: center; border-radius: 32px; padding: 72px 24px;
  background: radial-gradient(70% 90% at 50% 0%, var(--hero-glow), transparent 70%), var(--surface);
  border: 1px solid var(--border);
}
.cta img { width: 80px; height: 80px; border-radius: 18px; margin: 0 auto 22px; }
.cta .lead { margin-bottom: 32px; }

footer { padding: 40px 0 64px; color: var(--secondary); font-size: 14px; }
.footer-row { display: flex; flex-wrap: wrap; gap: 16px 32px; justify-content: space-between; align-items: center; }
.footer-links { display: flex; flex-wrap: wrap; gap: 20px; list-style: none; padding: 0; margin: 0; }
.footer-links a { color: var(--secondary); }

/* Scroll-in animation is opt-in via JS, so content is always visible without it. */
.js .reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.7s ease, transform 0.7s ease; }
.js .reveal.visible { opacity: 1; transform: none; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

/* Legal and support pages */
.legal { padding: 72px 0 32px; }
.legal article { max-width: 760px; }
.legal h1 { font-size: clamp(38px, 5.4vw, 56px); margin-top: 10px; }
.legal h2 { font-size: 22px; letter-spacing: -0.01em; line-height: 1.25; margin: 40px 0 10px; }
.legal p, .legal li { color: var(--secondary); }
.legal strong { color: var(--text); }
.legal ul { padding-left: 22px; }
.legal li { margin: 8px 0; }
.legal li::marker { color: var(--blue); }
.legal .updated { margin: 12px 0 28px; font-size: 15px; }
.legal .summary {
  margin-top: 32px; padding: 6px 24px 10px; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius-panel);
}
.legal .summary h2 { margin-top: 18px; }
.nav-links a[aria-current="page"] { color: var(--text); background: var(--surface-2); }
