/* EmberEdit — Coming Soon site
   Visual language mirrors the Electron app (app/public/style.css):
   Caudex serif type, dark panel theme, orange accent. */

@font-face {
  font-family: "Caudex";
  src: url("../media/fonts/Caudex-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
}
@font-face {
  font-family: "Caudex";
  src: url("../media/fonts/Caudex-Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
}

:root {
  --bg: #14141b;
  --bg-2: #0e0e13;
  --panel: #1e1e29;
  --panel-2: #262634;
  --text: #e9e9f0;
  --dim: #9a9aad;
  --accent: #ff8a19;
  --accent-2: #ff5c38;
  --line: #2e2e3e;
  --shadow: rgba(0, 0, 0, 0.45);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

a, button, [data-open-terms], [data-close-terms] { cursor: pointer; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 "Caudex", Georgia, serif;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

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

.wrap {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ── Ambient background glow ─────────────────────────────────────────── */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(60% 42% at 18% -6%, rgba(255, 138, 25, 0.16), transparent 60%),
    radial-gradient(50% 38% at 100% 8%, rgba(255, 92, 56, 0.12), transparent 65%),
    var(--bg);
}

/* ── Header ───────────────────────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 24px;
  background: rgba(20, 20, 27, 0.72);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex-shrink: 0;
}
.brand img { width: 30px; height: 30px; }
.brand-name {
  font-size: 19px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: 0.2px;
}
.brand-name span { color: var(--accent); }

.site-nav {
  display: flex;
  align-items: center;
  gap: 22px;
  font-size: 16px;
}
.site-nav a {
  color: var(--dim);
  text-decoration: none;
  transition: color 0.15s;
}
.site-nav a:hover { color: var(--text); }
.nav-email {
  color: var(--text) !important;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 7px 13px;
  font-size: 16px;
}
.nav-email:hover { border-color: var(--accent); }

/* ── Buttons / pills (shared look with the app) ──────────────────────── */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 16px;
  font-size: 16px;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 700;
}
.pill .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 10px 2px rgba(255, 138, 25, 0.75);
  animation: pulse-dot 1.6s ease-in-out infinite;
}
@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.75); }
}

.primary-btn {
  display: inline-block;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 13px 26px;
  font: 700 16px "Caudex", Georgia, serif;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 10px 30px -10px rgba(255, 92, 56, 0.55);
  transition: filter 0.15s, transform 0.15s;
}
.primary-btn:hover { filter: brightness(1.08); transform: translateY(-1px); }

.ghost-btn {
  display: inline-block;
  background: var(--panel);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 24px;
  font: 600 16px "Caudex", Georgia, serif;
  text-decoration: none;
  cursor: pointer;
  transition: border-color 0.15s;
}
.ghost-btn:hover { border-color: var(--dim); }

/* ── Hero ─────────────────────────────────────────────────────────────── */
.hero {
  padding: 92px 24px 64px;
  text-align: center;
}
.hero .pill { margin-top: 26px; }
.hero h1 {
  margin: 0 auto;
  max-width: 900px;
  font-size: clamp(34px, 6vw, 64px);
  line-height: 1.12;
  font-weight: 700;
  letter-spacing: -0.5px;
}
.hero h1 .fire { color: var(--accent); }
.hero .sub {
  max-width: 620px;
  margin: 36px auto 0;
  color: var(--dim);
  font-size: clamp(16px, 2vw, 18.5px);
  line-height: 1.65;
}
.hero-cta {
  margin-top: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
}
.hero-note {
  margin-top: 16px;
  font-size: 16px;
  color: var(--dim);
}

/* ── Hero video ───────────────────────────────────────────────────────── */
@property --ember-border-angle {
  syntax: "<angle>";
  initial-value: 160deg;
  inherits: false;
}
.hero-video-wrap {
  max-width: 784px;
  margin: 56px auto 0;
  position: relative;
  border-radius: 18px;
  padding: 6px;
  --ember-border-angle: 160deg;
  background: linear-gradient(var(--ember-border-angle), rgba(255, 138, 25, 0.5), rgba(255, 92, 56, 0.05) 40%, transparent 70%);
  box-shadow: 0 40px 90px -30px rgba(0, 0, 0, 0.65);
  animation: ember-border-rotate 30s linear infinite;
}
@keyframes ember-border-rotate {
  from { --ember-border-angle: 160deg; }
  to { --ember-border-angle: 520deg; }
}
@media (prefers-reduced-motion: reduce) {
  .hero-video-wrap { animation: none; }
}
.hero-video-inner {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  background: #000;
  border: 1px solid var(--line);
  cursor: pointer;
}
.hero-video-inner video {
  display: block;
  width: 100%;
  max-height: 496px;
  background: #000;
  pointer-events: none;
}
.hero-video-hint {
  position: absolute;
  left: 16px;
  bottom: 16px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: rgba(20, 20, 27, 0.78);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 16px;
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  pointer-events: none;
  transition: opacity 0.2s;
}
.hero-video-hint[hidden] { display: none; }

/* ── Section shells ───────────────────────────────────────────────────── */
section { padding: 88px 24px; }
.section-head {
  max-width: 680px;
  margin: 0 auto 52px;
  text-align: center;
}
.section-eyebrow {
  display: inline-block;
  color: var(--accent);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  margin-bottom: 12px;
}
.section-head h2 {
  margin: 0;
  font-size: clamp(26px, 4vw, 38px);
  line-height: 1.2;
}
.section-head p {
  margin: 14px 0 0;
  color: var(--dim);
  font-size: 16px;
}

/* ── Feature grid ─────────────────────────────────────────────────────── */
.features {
  background: linear-gradient(180deg, transparent, rgba(38, 38, 52, 0.35) 12%, rgba(38, 38, 52, 0.35) 88%, transparent);
}
.feature-grid {
  max-width: 1080px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.feature-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 26px 24px;
  transition: border-color 0.18s, transform 0.18s;
}
.feature-card:hover {
  border-color: var(--accent);
  transform: translateY(-3px);
}
.feature-icon {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  background: rgba(255, 138, 25, 0.12);
  color: var(--accent);
  margin-bottom: 16px;
}
.feature-card h3 {
  margin: 0 0 8px;
  font-size: 16.5px;
}
.feature-card p {
  margin: 0;
  color: var(--dim);
  font-size: 16px;
  line-height: 1.6;
}

/* ── Ember particle overlay (scripts/ember-particles.js) ────────────────── */
.ember-fx-canvas {
  position: fixed;
  inset: 0;
  z-index: 40; /* below .site-header (50) and .modal-backdrop (200) */
  pointer-events: none;
}

/* ── How it works ─────────────────────────────────────────────────────── */
.steps {
  max-width: 980px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  counter-reset: step;
  position: relative;
}
.step { position: relative; text-align: center; padding: 0 10px; }
.step-num {
  width: 46px;
  height: 46px;
  margin: 0 auto 18px;
  border-radius: 50%;
  background: var(--panel-2);
  border: 1px solid var(--line);
  color: var(--accent);
  font-weight: 700;
  font-size: 17px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.18s, transform 0.18s;
}
.step-num:hover {
  border-color: var(--accent);
  transform: scale(1.06);
}
.step h3 { margin: 0 0 8px; font-size: 17px; }
.step p { margin: 0; color: var(--dim); font-size: 16px; line-height: 1.6; }
.step-arrow {
  position: absolute;
  top: 22px;
  right: -20px;
  color: var(--line);
  font-size: 22px;
}
.step:last-child .step-arrow { display: none; }

/* ── Final CTA band ───────────────────────────────────────────────────── */
.cta-band {
  text-align: center;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.cta-band h2 { margin: 0 0 12px; font-size: clamp(24px, 3.6vw, 34px); }
.cta-band p { margin: 0 0 30px; color: var(--dim); }

/* ── Footer ───────────────────────────────────────────────────────────── */
.site-footer {
  padding: 44px 24px 36px;
}
.footer-inner {
  max-width: 1180px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 18px;
  padding-top: 28px;
}
.footer-brand {
  display: flex;
  align-items: center;
  gap: 9px;
}
.footer-brand img { width: 22px; height: 22px; }
.footer-brand span { font-weight: 700; font-size: 16px; }
.footer-brand span .fire { color: var(--accent); }
.footer-links {
  display: flex;
  align-items: center;
  gap: 22px;
  font-size: 16px;
  color: var(--dim);
  flex-wrap: wrap;
}
.footer-links a {
  color: var(--dim);
  text-decoration: none;
  background: none;
  border: none;
  font: inherit;
  cursor: pointer;
  padding: 0;
}
.footer-links a:hover { color: var(--accent); }
.footer-tag {
  font-size: 16px;
  color: var(--dim);
}

/* ── Terms modal (mirrors the app's .modal-backdrop / .modal) ───────────── */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal-backdrop[hidden] { display: none !important; }
.modal {
  width: 640px;
  max-width: 100%;
  max-height: 86vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 30px 80px -20px #000c;
}
.modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 24px 26px 16px;
  border-bottom: 1px solid var(--line);
  flex-shrink: 0;
}
.modal-head h2 { margin: 0 0 4px; font-size: 19px; }
.modal-head .dim { color: var(--dim); font-size: 16px; }
.modal-close {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--text);
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
}
.modal-close:hover { border-color: var(--accent); color: var(--accent); }
.modal-body {
  padding: 22px 26px 28px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--line) transparent;
}
.modal-body::-webkit-scrollbar { width: 10px; }
.modal-body::-webkit-scrollbar-thumb { background: var(--line); border-radius: 6px; border: 2px solid var(--panel); }
.terms-section { margin-bottom: 20px; }
.terms-section h3 {
  margin: 0 0 8px;
  font-size: 16px;
  color: var(--accent);
}
.terms-section p {
  margin: 0;
  font-size: 16px;
  line-height: 1.7;
  color: var(--text);
}

/* ── Download page (download.html) ───────────────────────────────────── */
.download-hero {
  padding: 76px 24px 40px;
  text-align: center;
}
.download-hero h1 {
  margin: 22px auto 0;
  max-width: 700px;
  font-size: clamp(30px, 5vw, 50px);
  line-height: 1.15;
  font-weight: 700;
}
.download-hero h1 .fire { color: var(--accent); }
.download-hero .sub {
  max-width: 560px;
  margin: 20px auto 0;
  color: var(--dim);
  font-size: 16px;
  line-height: 1.6;
}

.download-grid-section {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 24px 88px;
}
.download-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-bottom: 28px;
}
.download-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 28px 26px;
  text-align: center;
}
.download-card h3 { margin: 4px 0 6px; font-size: 19px; }
.download-card p { margin: 0 0 16px; color: var(--dim); font-size: 16px; }
.download-card .feature-icon { margin: 0 auto 14px; }
.download-pill { font-size: 14px; padding: 5px 14px; }

.download-steps-card,
.download-support-note {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 26px 28px;
  margin-bottom: 20px;
}
.download-steps-card h3,
.download-support-note h3 {
  margin: 0 0 14px;
  font-size: 17px;
  color: var(--accent);
}
.download-steps-list {
  margin: 0;
  padding-left: 22px;
  color: var(--dim);
  font-size: 16px;
  line-height: 1.7;
}
.download-steps-list li { margin-bottom: 8px; }
.download-support-note p {
  margin: 0;
  color: var(--dim);
  font-size: 16px;
  line-height: 1.7;
}
.download-support-note a { color: var(--accent); text-decoration: none; }
.download-support-note a:hover { text-decoration: underline; }

@media (max-width: 620px) {
  .download-grid { grid-template-columns: 1fr; }
}

/* ── Responsive ───────────────────────────────────────────────────────── */
@media (max-width: 860px) {
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: 1fr; gap: 44px; }
  .step-arrow { display: none; }
  .site-nav a:not(.nav-email) { display: none; }
}
@media (max-width: 560px) {
  .feature-grid { grid-template-columns: 1fr; }
  .hero { padding: 64px 18px 48px; }
  section { padding: 60px 18px; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
}
