/* ==========================================================================
   Edora — visual design + motion pass
   Copy unchanged. Motion is small, user-action driven, no libraries.
   ========================================================================== */

:root {
  --bg: #FAFAF8;
  --dark: #1A1A1A;
  --text: #1A1A1A;
  --text-on-dark: #F4F3EF;
  --muted: #6B6B68;
  --muted-on-dark: #9C9A93;
  --border: #E4E2DC;
  --border-dark: #33322E;
  --accent: #C9A468;          /* fills / decorative only */
  --accent-ink: #6B5320;      /* accent used for TEXT on light bg (AA-safe) */

  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  --radius: 6px;
  --wrap: 1120px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 32px;
}

/* ---------- Typography ---------- */
h1, h2 {
  font-family: var(--serif);
  font-weight: 500;
  color: var(--text);
  margin: 0;
}

h1 {
  font-size: clamp(2.4rem, 5.5vw, 4.4rem);
  line-height: 1.04;
  letter-spacing: 0.005em;
}

h2 {
  font-size: clamp(1.8rem, 3.6vw, 2.9rem);
  line-height: 1.1;
  letter-spacing: 0.005em;
  max-width: 18ch;
}

h3 {
  font-family: var(--sans);
  font-weight: 600;
  font-size: 1.16rem;
  line-height: 1.35;
  letter-spacing: -0.01em;
  margin: 0 0 8px;
}

p { margin: 0 0 18px; }
p:last-child { margin-bottom: 0; }

a { color: inherit; }

.lead {
  font-size: clamp(1.05rem, 1.6vw, 1.28rem);
  color: var(--muted);
  line-height: 1.6;
  max-width: 62ch;
}

.muted { color: var(--muted); }

.eyebrow {
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 22px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.eyebrow::before {
  content: "";
  width: 22px;
  height: 2px;
  background: var(--accent);
  display: inline-block;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--sans);
  font-weight: 500;
  font-size: 0.95rem;
  line-height: 1;
  padding: 15px 26px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.15s ease, filter 0.15s ease,
              background-color 0.15s ease, border-color 0.15s ease;
}
.btn-accent {
  background: var(--accent);
  border-color: var(--accent);
  color: #1A1A1A;
  font-weight: 600;
}
.btn-sm { padding: 11px 18px; font-size: 0.88rem; }
.btn-block { width: 100%; }

/* Hover — advance / brighten only, never fade or recede */
.btn:hover { transform: scale(1.02); }
.btn-accent:hover { filter: brightness(1.06); }
.btn:not(.btn-accent):hover {
  border-color: var(--text);
  background: rgba(26, 26, 26, 0.03);
}

/* Disabled + loading */
.btn:disabled,
.btn.is-loading {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none !important;
  filter: none !important;
}
.btn.is-loading { position: relative; color: transparent !important; }
.btn.is-loading::after {
  content: "";
  position: absolute;
  width: 16px; height: 16px;
  top: 50%; left: 50%;
  margin: -8px 0 0 -8px;
  border: 2px solid rgba(26, 26, 26, 0.3);
  border-top-color: #1A1A1A;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Focus states (keyboard) ---------- */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  box-shadow: 0 0 0 4px rgba(201, 164, 104, 0.3);
  border-radius: 4px;
}

/* ---------- Nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(250, 250, 248, 0.92);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.brand {
  font-family: var(--serif);
  font-size: 1.4rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-decoration: none;
  color: var(--text);
  display: inline-flex;
  align-items: center;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 30px;
}
.nav-right {
  display: flex;
  align-items: center;
  gap: 14px;
}
.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 8px;
  color: var(--text);
  cursor: pointer;
}
.nav-toggle:hover { border-color: var(--text); }
.mobile-menu { display: none; }
.nav-links a {
  font-size: 0.92rem;
  text-decoration: none;
  color: var(--muted);
  transition: color 0.15s ease;
}
.nav-links a:not(.btn):hover { color: var(--text); }
.nav-links a.btn { color: #1A1A1A; }

/* ---------- Sections ---------- */
section {
  padding: 104px 0;
  border-bottom: 1px solid var(--border);
}
section[id] { scroll-margin-top: 84px; }
.section-head { max-width: 60ch; margin-bottom: 56px; }

/* ---------- Hero ---------- */
.hero { padding: 128px 0 116px; }
.hero .eyebrow { color: var(--muted); }
.hero h1 { max-width: 15ch; margin-bottom: 30px; }
.hero .lead { margin-bottom: 40px; }
.hero-cta { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }

/* ---------- Problem ---------- */
.pain-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--border);
}
.pain {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 28px;
  padding: 34px 0;
  border-bottom: 1px solid var(--border);
  align-items: start;
}
.pain-num {
  font-family: var(--mono);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  color: var(--accent-ink);
  padding-top: 4px;
}
.pain-body p { color: var(--muted); max-width: 68ch; margin: 0; }

/* ---------- Product / modular signature element ---------- */
.product-intro { max-width: 64ch; margin-bottom: 64px; }

.module-system {
  display: grid;
  grid-template-columns: 168px 1fr;
  gap: 0;
  align-items: stretch;
}
.spine {
  background: var(--dark);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 28px 0;
  position: relative;
}
.spine-label {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--text-on-dark);
}
.spine-sub {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted-on-dark);
}

.module-stack {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding-left: 56px;
  position: relative;
}
.module {
  position: relative;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
  padding: 26px 28px;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
.module::before {
  content: "";
  position: absolute;
  left: -56px;
  top: 33px;
  width: 56px;
  height: 1px;
  background: var(--border);
}
.module::after {
  content: "";
  position: absolute;
  left: -60px;
  top: 28px;
  width: 9px;
  height: 9px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 2px;
}
.module h3 { margin-bottom: 10px; }
.module p { color: var(--muted); margin: 0; max-width: 64ch; }

.module--active { border-color: var(--accent); }
.module--active::before { background: var(--accent); }
.module--active::after { border-color: var(--accent); background: var(--accent); }

.module--soon { border-style: dashed; }
.module--soon::before { background: none; border-top: 1px dashed var(--border); }

/* hover — lift + brighten (advance) */
.module:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(26, 26, 26, 0.06);
}

.mod-tag {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.64rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding: 4px 9px;
  border-radius: 4px;
  margin-bottom: 14px;
}
.mod-tag--now { color: #1A1A1A; background: var(--accent); }
.mod-tag--soon { color: var(--muted); border: 1px solid var(--border); }

/* ---------- Why different (cards) ---------- */
.diff-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}
.diff-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 30px 30px 32px;
  background: #fff;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
.diff-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(26, 26, 26, 0.06);
  border-color: #d9d6cd;
}
.diff-card p { color: var(--muted); margin: 0; }
.diff-card--accent { border-top: 3px solid var(--accent); }
.card-tag {
  font-family: var(--mono);
  font-size: 0.64rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent-ink);
  display: block;
  margin-bottom: 14px;
}

/* ---------- Who it's for ---------- */
.pill-row { display: flex; flex-wrap: wrap; gap: 12px; margin: 0 0 26px; }
.pill {
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  padding: 9px 16px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #fff;
}
.audience-note { color: var(--muted); max-width: 60ch; }

/* ---------- Pricing ---------- */
.pricing-panel {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
  padding: 44px 44px 46px;
  max-width: 820px;
}
.pricing-panel p { color: var(--muted); }
.pricing-panel strong { color: var(--accent-ink); font-weight: 600; }

/* ---------- FAQ ---------- */
.faq-list { border-top: 1px solid var(--border); max-width: 860px; }
.faq-item { padding: 30px 0; border-bottom: 1px solid var(--border); }
.faq-item h3 { margin-bottom: 12px; }
.faq-item p { color: var(--muted); margin: 0; }

/* ---------- Pilot (dark) ---------- */
.pilot {
  background: var(--dark);
  color: var(--text-on-dark);
  border-bottom: none;
}
.pilot .eyebrow { color: var(--muted-on-dark); }
.pilot h2 { color: var(--text-on-dark); }
.pilot .lead { color: var(--muted-on-dark); }
.pilot-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 72px;
  align-items: start;
}
.pilot-form { display: block; }
.pilot-form p { margin: 0 0 18px; }
.pilot-form label {
  display: block;
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted-on-dark);
  margin-bottom: 8px;
}
.pilot-form input,
.pilot-form textarea {
  width: 100%;
  background: #201F1D;
  border: 1px solid var(--border-dark);
  border-radius: var(--radius);
  color: var(--text-on-dark);
  font-family: var(--sans);
  font-size: 0.98rem;
  padding: 13px 15px;
  outline: none;
  transition: border-color 0.15s ease;
}
.pilot-form input:focus,
.pilot-form textarea:focus { border-color: var(--accent); }
.pilot-form textarea { resize: vertical; }
.form-status {
  font-family: var(--mono);
  font-size: 0.82rem;
  letter-spacing: 0.02em;
  margin-top: 8px;
  min-height: 1.2em;
}
.form-status--ok { color: var(--accent); }
.form-status--err { color: #E0A0A0; }
.pilot-contact { color: var(--muted-on-dark); margin-top: 26px; }
.pilot-contact a { color: var(--accent); text-decoration: none; }
.pilot-contact a:hover { filter: brightness(1.12); }

/* ---------- Footer ---------- */
.footer {
  background: var(--dark);
  color: var(--muted-on-dark);
  padding: 40px 0;
}
.footer p { margin: 0; font-size: 0.9rem; }

/* ==========================================================================
   MOTION — gated behind .js (no-JS shows everything) and reduced-motion
   ========================================================================== */
@media (prefers-reduced-motion: no-preference) {
  /* section scroll reveals */
  .js .reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.6s ease, transform 0.6s ease; }
  .js .reveal.is-visible { opacity: 1; transform: none; }

  /* hero entrance on load (staggered) */
  .js .hero .eyebrow,
  .js .hero h1,
  .js .hero .lead,
  .js .hero .hero-cta { opacity: 0; transform: translateY(14px); animation: heroIn 0.7s ease forwards; }
  .js .hero .eyebrow { animation-delay: 0.05s; }
  .js .hero h1 { animation-delay: 0.16s; }
  .js .hero .lead { animation-delay: 0.30s; }
  .js .hero .hero-cta { animation-delay: 0.44s; }
  @keyframes heroIn { to { opacity: 1; transform: none; } }

  /* modular docking — modules slide in and "dock" into the spine */
  .js .module-system .module { opacity: 0; transform: translateX(36px); }
  .js .module-system .module::before { transform: scaleX(0); transform-origin: left center; }
  .js .module-system .module::after { transform: scale(0); }

  .js .module-system.is-docked .module {
    opacity: 1; transform: none;
    transition: opacity 0.5s ease, transform 0.55s cubic-bezier(0.2, 0.7, 0.2, 1);
  }
  .js .module-system.is-docked .module-stack .module:nth-child(1) { transition-delay: 0.05s; }
  .js .module-system.is-docked .module-stack .module:nth-child(2) { transition-delay: 0.20s; }
  .js .module-system.is-docked .module-stack .module:nth-child(3) { transition-delay: 0.35s; }

  .js .module-system.is-docked .module::before { transform: scaleX(1); transition: transform 0.45s ease 0.15s; }
  .js .module-system.is-docked .module-stack .module:nth-child(2)::before { transition-delay: 0.30s; }
  .js .module-system.is-docked .module-stack .module:nth-child(3)::before { transition-delay: 0.45s; }

  .js .module-system.is-docked .module::after { transform: scale(1); transition: transform 0.3s ease 0.45s; }
  .js .module-system.is-docked .module-stack .module:nth-child(2)::after { transition-delay: 0.60s; }
  .js .module-system.is-docked .module-stack .module:nth-child(3)::after { transition-delay: 0.75s; }
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 860px) {
  .diff-grid { grid-template-columns: 1fr; }
  .pilot-layout { grid-template-columns: 1fr; gap: 44px; }
}

@media (max-width: 720px) {
  body { font-size: 16px; }
  .wrap { padding: 0 22px; }
  section { padding: 76px 0; }
  .hero { padding: 92px 0 84px; }

  .nav-links { gap: 14px; }
  .nav-links a:not(.btn) { display: none; }
  .nav-toggle { display: inline-flex; min-height: 44px; min-width: 44px; }
  .mobile-menu {
    display: none;
    flex-direction: column;
    background: rgba(250, 250, 248, 0.98);
    border-top: 1px solid var(--border);
  }
  .mobile-menu.open { display: flex; }
  .mobile-menu a {
    padding: 14px 22px;
    min-height: 44px;
    display: flex;
    align-items: center;
    text-decoration: none;
    color: var(--text);
    border-bottom: 1px solid var(--border);
  }
  .mobile-menu a:last-child { border-bottom: none; }

  /* 44px min tap targets on mobile */
  .btn { min-height: 44px; }
  .btn-sm { padding: 12px 18px; }
  .brand { min-height: 44px; padding: 4px 0; }

  .module-system { grid-template-columns: 1fr; gap: 16px; }
  .spine {
    flex-direction: row;
    justify-content: flex-start;
    gap: 16px;
    padding: 16px 20px;
  }
  .spine-label, .spine-sub { writing-mode: horizontal-tb; transform: none; }
  .module-stack { padding-left: 0; }
  .module::before, .module::after { display: none; }
  /* keep docking as a simple settle when connectors are hidden */
  .js .module-system .module { transform: translateY(16px); }
  .js .module-system.is-docked .module { transform: none; }

  .pain { grid-template-columns: 40px 1fr; gap: 16px; }
  .pricing-panel { padding: 30px 24px; }
}

@media (max-width: 420px) {
  h1 { font-size: 2.2rem; }
  .wrap { padding: 0 18px; }
  .diff-card { padding: 24px 22px 26px; }
  .module { padding: 22px 20px; }
}
