/* ==========================================================================
   Atelier — landing page
   Palette: warm dark "workshop" theme. Serif display + system sans body.
   ========================================================================== */

:root {
  --bg: #0f0e0c;
  --bg-raise: #16140f;
  --surface: #1c1913;
  --surface-2: #242017;
  --border: #2e2a20;
  --border-soft: #262218;
  --text: #ece7dc;
  --text-dim: #a89f8d;
  --text-faint: #756d5d;
  --accent: #e8a33d;
  --accent-2: #e0684b;
  --accent-soft: rgba(232, 163, 61, 0.12);
  --gradient: linear-gradient(100deg, #e8a33d, #e0684b);
  --radius: 14px;
  --radius-sm: 9px;
  --font-display: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, "SF Mono", "Cascadia Code", Consolas, Menlo, monospace;
  --shadow-lg: 0 30px 80px -20px rgba(0, 0, 0, 0.7);
  --max: 1120px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

::selection { background: rgba(232, 163, 61, 0.28); }

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

a { color: inherit; text-decoration: none; }

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

/* --------------------------------------------------------------------------
   Typography
   -------------------------------------------------------------------------- */

h1, h2, h3 { font-family: var(--font-display); font-weight: 500; letter-spacing: -0.015em; }

h1 {
  font-size: clamp(2.6rem, 6.2vw, 4.4rem);
  line-height: 1.06;
}

h2 {
  font-size: clamp(1.9rem, 3.6vw, 2.7rem);
  line-height: 1.15;
}

h3 { font-size: 1.18rem; line-height: 1.35; }

.lede {
  color: var(--text-dim);
  font-size: clamp(1.05rem, 1.6vw, 1.25rem);
  line-height: 1.6;
  max-width: 42em;
}

.kicker {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 14px;
}

.accent-i { font-style: italic; background: var(--gradient); -webkit-background-clip: text; background-clip: text; color: transparent; padding-right: 0.06em; }

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  padding: 12px 22px;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, border-color 0.15s ease;
  white-space: nowrap;
}

.btn-primary {
  background: var(--gradient);
  color: #1a1105;
  box-shadow: 0 8px 28px -8px rgba(232, 130, 61, 0.55);
}

.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 12px 34px -8px rgba(232, 130, 61, 0.7); }

.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}

.btn-ghost:hover { border-color: var(--text-faint); background: var(--bg-raise); }

.btn-sm { padding: 9px 18px; font-size: 0.88rem; }

/* --------------------------------------------------------------------------
   Header / nav
   -------------------------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  background: rgba(15, 14, 12, 0.72);
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s ease;
}

.site-header.scrolled { border-bottom-color: var(--border-soft); }

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
  gap: 20px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 1.35rem;
  letter-spacing: 0.01em;
}

.brand-mark { width: 28px; height: 28px; flex-shrink: 0; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  list-style: none;
}

.nav-links a {
  font-size: 0.92rem;
  color: var(--text-dim);
  transition: color 0.15s ease;
}

.nav-links a:hover { color: var(--text); }

.nav-actions { display: flex; align-items: center; gap: 14px; }

.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 3px;
  font-size: 0.78rem;
  font-weight: 600;
}

.lang-switch a, .lang-switch span {
  padding: 4px 10px;
  border-radius: 999px;
  color: var(--text-dim);
}

.lang-switch [aria-current] {
  background: var(--surface-2);
  color: var(--text);
}

.lang-switch a:hover { color: var(--text); }

@media (max-width: 860px) {
  .nav-links { display: none; }
}

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */

.hero {
  position: relative;
  padding: 110px 0 40px;
  text-align: center;
}

.hero::before {
  content: "";
  position: absolute;
  inset: -200px 0 auto;
  height: 640px;
  background:
    radial-gradient(560px 320px at 50% 10%, rgba(232, 163, 61, 0.13), transparent 70%),
    radial-gradient(700px 400px at 70% 0%, rgba(224, 104, 75, 0.08), transparent 70%);
  pointer-events: none;
}

.hero > .container { position: relative; }

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-dim);
  border: 1px solid var(--border);
  background: var(--bg-raise);
  border-radius: 999px;
  padding: 6px 14px;
  margin-bottom: 28px;
}

.hero-badge .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}

.hero h1 { max-width: 15em; margin: 0 auto 22px; }

.hero .lede { margin: 0 auto 34px; }

.hero-ctas {
  display: flex;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.hero-note { font-size: 0.85rem; color: var(--text-faint); }

/* --------------------------------------------------------------------------
   App mockup
   -------------------------------------------------------------------------- */

.mockup-wrap {
  padding: 46px 0 30px;
  perspective: 1400px;
}

.mockup {
  max-width: 960px;
  margin: 0 auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-raise);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  font-size: 12.5px;
}

.mockup-titlebar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border-soft);
  background: var(--surface);
}

.mockup-titlebar .tl-dot { width: 11px; height: 11px; border-radius: 50%; background: var(--border); }
.mockup-titlebar .tl-dot:nth-child(1) { background: #574f3f; }

.mockup-titlebar .tl-title {
  margin-left: 10px;
  color: var(--text-faint);
  font-size: 11.5px;
}

.mockup-body { display: flex; min-height: 400px; }

.mockup-sidebar {
  width: 208px;
  flex-shrink: 0;
  border-right: 1px solid var(--border-soft);
  background: var(--surface);
  padding: 12px 10px;
  text-align: left;
}

.mockup-vault {
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-faint);
  padding: 4px 8px 10px;
}

.tree { list-style: none; color: var(--text-dim); }

.tree li {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 4.5px 8px;
  border-radius: 6px;
  white-space: nowrap;
}

.tree li.indent { padding-left: 24px; }

.tree li.active { background: var(--accent-soft); color: var(--text); }

.tree .ic { width: 13px; height: 13px; flex-shrink: 0; opacity: 0.75; }

.badge-ext {
  margin-left: auto;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--text-faint);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0 4px;
}

.mockup-main { flex: 1; display: flex; flex-direction: column; min-width: 0; }

.mockup-tabs {
  display: flex;
  border-bottom: 1px solid var(--border-soft);
  background: var(--surface);
}

.mockup-tab {
  padding: 8px 16px;
  font-size: 11.5px;
  color: var(--text-faint);
  border-right: 1px solid var(--border-soft);
  display: flex;
  align-items: center;
  gap: 6px;
}

.mockup-tab.active {
  color: var(--text);
  background: var(--bg-raise);
  box-shadow: inset 0 -2px 0 var(--accent);
}

.mockup-editor {
  padding: 26px 34px;
  text-align: left;
  flex: 1;
}

.mockup-editor .doc-h1 {
  font-family: var(--font-display);
  font-size: 21px;
  margin-bottom: 12px;
  color: var(--text);
}

.mline {
  height: 9px;
  border-radius: 4px;
  background: var(--surface-2);
  margin-bottom: 10px;
}

.mline.w80 { width: 80%; }
.mline.w95 { width: 95%; }
.mline.w60 { width: 60%; }
.mline.w40 { width: 40%; }

.mockup-code {
  margin: 18px 0 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #12100c;
  overflow: hidden;
}

.mockup-code-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 12px;
  border-bottom: 1px solid var(--border-soft);
  color: var(--text-faint);
  font-family: var(--font-mono);
  font-size: 10.5px;
}

.run-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 700;
  font-size: 10px;
  border-radius: 999px;
  padding: 3px 10px;
  font-family: var(--font-body);
}

.mockup-code pre {
  padding: 12px 14px;
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1.75;
  color: #cfc6b4;
  overflow-x: auto;
}

.mockup-code .tk-kw { color: #e0684b; }
.mockup-code .tk-fn { color: #e8a33d; }
.mockup-code .tk-str { color: #9fb87b; }
.mockup-code .tk-cm { color: #6b6355; }

@media (max-width: 720px) {
  .mockup-sidebar { display: none; }
  .mockup-editor { padding: 20px; }
}

/* --------------------------------------------------------------------------
   "One app" strip
   -------------------------------------------------------------------------- */

.strip {
  border-top: 1px solid var(--border-soft);
  border-bottom: 1px solid var(--border-soft);
  background: var(--bg-raise);
  padding: 26px 0;
  margin-top: 40px;
}

.strip-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px 34px;
  flex-wrap: wrap;
  color: var(--text-faint);
  font-size: 0.92rem;
}

.strip-inner .fmt {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 3px 9px;
  color: var(--text-dim);
}

/* --------------------------------------------------------------------------
   Sections
   -------------------------------------------------------------------------- */

.section { padding: 96px 0; }

.section-head { max-width: 640px; margin-bottom: 54px; }

.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }

.section-head h2 { margin-bottom: 16px; }

.section-head p { color: var(--text-dim); }

/* Features grid */

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.feature-card {
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  background: var(--bg-raise);
  padding: 28px 26px;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.feature-card:hover { border-color: var(--border); transform: translateY(-2px); }

.feature-icon {
  width: 42px;
  height: 42px;
  border-radius: 11px;
  background: var(--accent-soft);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
}

.feature-icon svg { width: 21px; height: 21px; }

.feature-card h3 { margin-bottom: 9px; }

.feature-card p { font-size: 0.93rem; color: var(--text-dim); line-height: 1.6; }

.soon-tag {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-soft);
  border-radius: 5px;
  padding: 2px 8px;
  margin-left: 8px;
  vertical-align: 2px;
}

@media (max-width: 920px) { .features-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .features-grid { grid-template-columns: 1fr; } }

/* Local-first two-column */

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}

.split h2 { margin-bottom: 18px; }

.split .lede { font-size: 1.02rem; margin-bottom: 26px; }

.check-list { list-style: none; display: grid; gap: 14px; }

.check-list li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  color: var(--text-dim);
  font-size: 0.96rem;
}

.check-list .ck {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  margin-top: 2px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
}

.check-list .ck svg { width: 11px; height: 11px; }

.check-list strong { color: var(--text); font-weight: 600; }

.privacy-visual {
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  background: var(--bg-raise);
  padding: 34px;
  display: grid;
  gap: 14px;
}

.pv-row {
  display: flex;
  align-items: center;
  gap: 14px;
  border: 1px solid var(--border-soft);
  background: var(--surface);
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  font-size: 0.9rem;
  color: var(--text-dim);
}

.pv-row .pv-ic {
  width: 34px;
  height: 34px;
  flex-shrink: 0;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-soft);
  color: var(--accent);
}

.pv-row .pv-ic svg { width: 17px; height: 17px; }

.pv-row strong { color: var(--text); display: block; font-size: 0.95rem; }

@media (max-width: 860px) {
  .split { grid-template-columns: 1fr; gap: 40px; }
}

/* Comparison table */

.compare-scroll { overflow-x: auto; border: 1px solid var(--border-soft); border-radius: var(--radius); }

.compare {
  width: 100%;
  min-width: 640px;
  border-collapse: collapse;
  background: var(--bg-raise);
  font-size: 0.92rem;
}

.compare th, .compare td {
  padding: 15px 20px;
  text-align: center;
  border-bottom: 1px solid var(--border-soft);
}

.compare th { font-weight: 600; font-size: 0.88rem; color: var(--text-dim); }

.compare tr:last-child td { border-bottom: none; }

.compare td:first-child, .compare th:first-child {
  text-align: left;
  color: var(--text);
  font-weight: 500;
}

.compare .col-us { background: rgba(232, 163, 61, 0.06); }

.compare th.col-us { color: var(--accent); font-weight: 700; }

.compare .yes { color: var(--accent); font-weight: 700; }
.compare .no { color: var(--text-faint); }
.compare .part { color: var(--text-dim); font-size: 0.85rem; }

/* Roadmap */

.roadmap { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }

.rm-card {
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  background: var(--bg-raise);
  padding: 26px 24px;
  position: relative;
}

.rm-card.current { border-color: rgba(232, 163, 61, 0.45); }

.rm-tag {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 12px;
}

.rm-card.current .rm-tag { color: var(--accent); }

.rm-card h3 { font-size: 1.05rem; margin-bottom: 6px; }

.rm-card .rm-sub {
  font-family: var(--font-display);
  font-style: italic;
  color: var(--text-dim);
  font-size: 0.92rem;
  margin-bottom: 14px;
}

.rm-card ul { list-style: none; display: grid; gap: 7px; }

.rm-card ul li {
  font-size: 0.85rem;
  color: var(--text-dim);
  padding-left: 16px;
  position: relative;
}

.rm-card ul li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 9px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--text-faint);
}

.rm-card.current ul li::before { background: var(--accent); }

@media (max-width: 980px) { .roadmap { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .roadmap { grid-template-columns: 1fr; } }

/* FAQ */

.faq { max-width: 760px; margin: 0 auto; }

.faq details {
  border-bottom: 1px solid var(--border-soft);
}

.faq summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 22px 4px;
  font-weight: 600;
  font-size: 1.02rem;
}

.faq summary::-webkit-details-marker { display: none; }

.faq summary .chev {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  color: var(--text-faint);
  transition: transform 0.2s ease;
}

.faq details[open] summary .chev { transform: rotate(45deg); color: var(--accent); }

.faq .faq-a {
  padding: 0 4px 24px;
  color: var(--text-dim);
  font-size: 0.96rem;
  max-width: 60em;
}

/* Final CTA */

.final-cta {
  text-align: center;
  border: 1px solid var(--border-soft);
  border-radius: 22px;
  background:
    radial-gradient(480px 260px at 50% -40%, rgba(232, 163, 61, 0.16), transparent 70%),
    var(--bg-raise);
  padding: 84px 30px;
}

.final-cta h2 { max-width: 18em; margin: 0 auto 16px; }

.final-cta p { color: var(--text-dim); max-width: 36em; margin: 0 auto 32px; }

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */

.site-footer {
  border-top: 1px solid var(--border-soft);
  padding: 44px 0 54px;
  margin-top: 40px;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.footer-inner .brand { font-size: 1.1rem; }

.footer-links { display: flex; gap: 24px; list-style: none; flex-wrap: wrap; }

.footer-links a { font-size: 0.88rem; color: var(--text-dim); }

.footer-links a:hover { color: var(--text); }

.footer-meta { width: 100%; margin-top: 18px; font-size: 0.82rem; color: var(--text-faint); }

/* --------------------------------------------------------------------------
   Modal
   -------------------------------------------------------------------------- */

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(8, 7, 5, 0.72);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.22s ease, visibility 0.22s ease;
}

.modal-backdrop.open { opacity: 1; visibility: visible; }

.modal {
  width: 100%;
  max-width: 440px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 36px 34px 32px;
  position: relative;
  transform: translateY(14px) scale(0.98);
  transition: transform 0.22s ease;
  box-shadow: var(--shadow-lg);
}

.modal-backdrop.open .modal { transform: none; }

.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: none;
  background: transparent;
  color: var(--text-faint);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease, color 0.15s ease;
}

.modal-close:hover { background: var(--surface-2); color: var(--text); }

.modal-close svg { width: 16px; height: 16px; }

.modal h3 {
  font-size: 1.5rem;
  margin-bottom: 10px;
  font-family: var(--font-display);
}

.modal .modal-sub { color: var(--text-dim); font-size: 0.93rem; margin-bottom: 24px; }

.modal form { display: grid; gap: 12px; }

.modal input[type="email"] {
  width: 100%;
  background: var(--bg-raise);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 0.98rem;
  font-family: var(--font-body);
  padding: 13px 16px;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.modal input[type="email"]::placeholder { color: var(--text-faint); }

.modal input[type="email"]:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.modal .btn { justify-content: center; width: 100%; }

.modal .modal-privacy { font-size: 0.78rem; color: var(--text-faint); text-align: center; margin-top: 6px; }

.form-msg { font-size: 0.88rem; min-height: 1.3em; text-align: center; }
.form-msg.err { color: #e0684b; }
.form-msg.ok { color: var(--accent); }

.modal-success { text-align: center; padding: 12px 0 4px; display: none; }

.modal-success .ok-ic {
  width: 56px;
  height: 56px;
  margin: 0 auto 18px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-success .ok-ic svg { width: 26px; height: 26px; }

.modal-success h4 { font-family: var(--font-display); font-size: 1.3rem; margin-bottom: 8px; }

.modal-success p { color: var(--text-dim); font-size: 0.92rem; }

.modal.done form, .modal.done .modal-sub { display: none; }
.modal.done .modal-success { display: block; }

/* honeypot */
.hp-field { position: absolute; left: -9999px; opacity: 0; height: 0; overflow: hidden; }

/* --------------------------------------------------------------------------
   Reveal animations
   -------------------------------------------------------------------------- */

.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  * { animation: none !important; }
}
