/* Mersail landing page. Palette and type follow the app (frontend/tailwind.config.ts):
   warm paper neutrals, deep indigo accent, Bricolage Grotesque + DM Sans, self-hosted. */

@font-face { font-family: "DM Sans"; font-weight: 400; font-display: swap; src: url(/fonts/dm-sans-latin-400-normal.woff2) format("woff2"); }
@font-face { font-family: "DM Sans"; font-weight: 500; font-display: swap; src: url(/fonts/dm-sans-latin-500-normal.woff2) format("woff2"); }
@font-face { font-family: "DM Sans"; font-weight: 600; font-display: swap; src: url(/fonts/dm-sans-latin-600-normal.woff2) format("woff2"); }
@font-face { font-family: "Bricolage Grotesque"; font-weight: 600; font-display: swap; src: url(/fonts/bricolage-grotesque-latin-600-normal.woff2) format("woff2"); }
@font-face { font-family: "Bricolage Grotesque"; font-weight: 700; font-display: swap; src: url(/fonts/bricolage-grotesque-latin-700-normal.woff2) format("woff2"); }

:root {
  --paper: #F9F7F5;
  --paper-2: #F2EEE9;
  --card: #FFFFFF;
  --line: #E6E0D9;
  --line-2: #D9D1C8;
  --ink: #1A1411;
  --body: #3D3530;
  --muted: #6B6259;
  --accent: #4338CA;
  --accent-ink: #3730A3;
  --accent-wash: #EDE9FE;
  --ok: #166534; --ok-wash: #F0FDF4;
  --warn: #92400E; --warn-wash: #FFFBEB;
  --night: #1A1411; --night-2: #2A221D; --night-text: #E9E3DC; --night-muted: #B3A99F;
  --shadow: 0 1px 2px rgba(26, 20, 17, .04), 0 12px 32px -12px rgba(26, 20, 17, .18);
  --radius: 10px;
  --display: "Bricolage Grotesque", "DM Sans", system-ui, sans-serif;
  --sans: "DM Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #14100E;
    --paper-2: #1B1613;
    --card: #211B17;
    --line: #342B25;
    --line-2: #453A32;
    --ink: #F6F1EB;
    --body: #D9D0C7;
    --muted: #A69B90;
    --accent: #8B83F0;
    --accent-ink: #A9A3F5;
    --accent-wash: #26214A;
    --ok: #86EFAC; --ok-wash: #14291C;
    --warn: #FCD34D; --warn-wash: #2E2412;
    --night: #0D0A08; --night-2: #1E1814;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 16px 40px -16px rgba(0, 0, 0, .6);
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0; background: var(--paper); color: var(--body);
  font: 400 17px/1.65 var(--sans); -webkit-font-smoothing: antialiased;
}
img { display: block; }
a { color: var(--accent); text-underline-offset: 3px; }
h1, h2, h3 { font-family: var(--display); color: var(--ink); margin: 0; letter-spacing: -0.02em; }
p { margin: 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.container { width: 100%; max-width: 1160px; margin: 0 auto; padding: 0 24px; }
@media (max-width: 600px) { .container { padding: 0 16px; } }

.skip { position: absolute; left: -9999px; top: 8px; background: var(--card); padding: 8px 12px; z-index: 100; }
.skip:focus { left: 8px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: 600 15px/1 var(--sans); text-decoration: none; border-radius: 8px;
  border: 1px solid transparent; transition: background .15s, border-color .15s, transform .15s;
  white-space: nowrap;
}
.btn-sm { padding: 10px 16px; font-size: 14px; }
.btn-lg { padding: 16px 24px; font-size: 16px; }
.btn-xs { padding: 8px 12px; font-size: 13px; border-radius: 6px; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-ink); }
@media (prefers-color-scheme: dark) { .btn-primary { color: #14100E; } }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line-2); }
.btn-ghost:hover { border-color: var(--ink); }
.btn-light { background: #fff; color: #1A1411; }
.btn-light:hover { background: #EDE9FE; }
a.btn:active { transform: translateY(1px); }

/* Nav */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--paper) 86%, transparent);
  backdrop-filter: saturate(1.4) blur(12px); -webkit-backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav-inner { display: flex; align-items: center; gap: 32px; height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font: 700 19px/1 var(--display); letter-spacing: -0.01em; }
.brand img { border-radius: 7px; }
.nav-links { display: flex; gap: 28px; margin-right: auto; }
.nav-links a { color: var(--body); text-decoration: none; font-size: 15px; font-weight: 500; }
.nav-links a:hover { color: var(--ink); }
@media (max-width: 820px) { .nav-links { display: none; } .nav-inner { justify-content: space-between; } }

/* Hero */
.hero {
  position: relative; overflow: hidden; padding: 88px 0 96px;
  background:
    radial-gradient(900px 480px at 85% 10%, color-mix(in srgb, var(--accent) 14%, transparent), transparent 70%),
    radial-gradient(600px 400px at 0% 100%, color-mix(in srgb, #C2703D 10%, transparent), transparent 70%);
}
.hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, #000 30%, transparent 75%);
  mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, #000 30%, transparent 75%);
}
.hero-grid { position: relative; display: grid; grid-template-columns: 1fr 1.05fr; gap: 64px; align-items: center; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px;
  background: var(--card); border: 1px solid var(--line); font-size: 13px; font-weight: 600; color: var(--body);
}
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px var(--accent-wash); }
.hero h1 { font-size: clamp(38px, 5.2vw, 62px); line-height: 1.04; margin: 24px 0 22px; font-weight: 700; letter-spacing: -0.035em; }
.lead { font-size: clamp(18px, 1.6vw, 21px); line-height: 1.55; max-width: 540px; color: var(--body); }
.soon { display: inline-flex; align-items: center; gap: 8px; margin-top: 32px; font-size: 14px; font-weight: 600; color: var(--accent-ink); }
.soon-dot { width: 8px; height: 8px; border-radius: 50%; background: #D97706; box-shadow: 0 0 0 4px color-mix(in srgb, #D97706 22%, transparent); }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin: 14px 0 28px; }
.hero-points { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 10px 22px; font-size: 14px; font-weight: 500; color: var(--muted); }
.hero-points li { display: inline-flex; align-items: center; gap: 7px; }
.hero-points svg, .lock svg { width: 16px; height: 16px; fill: none; stroke: var(--ok); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }

@media (max-width: 980px) {
  .hero { padding: 56px 0 72px; }
  .hero-grid { grid-template-columns: 1fr; gap: 56px; }
}
@media (max-width: 600px) {
  .cta-row .btn { width: 100%; white-space: normal; text-align: center; }
}

/* Hero visual */
.hero-visual { position: relative; margin: 0; padding: 76px 0 96px; }
.hero-visual figcaption { position: absolute; right: 4px; bottom: 40px; font-size: 12px; color: var(--muted); }
.window { background: var(--card); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); overflow: hidden; }
.window-bar { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); background: var(--paper-2); }
.lights { display: inline-flex; gap: 6px; }
.lights i { width: 10px; height: 10px; border-radius: 50%; background: var(--line-2); }
.window-title { font-size: 13px; font-weight: 600; color: var(--ink); margin-right: auto; }
.pill { font-size: 11px; font-weight: 600; padding: 4px 9px; border-radius: 999px; }
.pill-muted { background: var(--accent-wash); color: var(--accent-ink); }
.window-body { display: grid; grid-template-columns: 170px 1fr; min-height: 300px; }
.mock-side { padding: 16px; border-right: 1px solid var(--line); background: var(--paper); }
.mock-label { font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin: 0 0 8px; }
.mock-side .mock-label:not(:first-child) { margin-top: 16px; }
.mock-value { font-size: 13px; font-weight: 600; color: var(--ink); }
.chips { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 6px; }
.chips li { font-size: 12px; font-weight: 500; padding: 5px 9px; border-radius: 6px; background: var(--card); border: 1px solid var(--line); color: var(--body); }
.email { padding: 16px; background: var(--paper-2); }
.email-head { display: flex; align-items: center; gap: 8px; padding: 10px 14px; background: #2F4A3A; color: #F4EEE4; border-radius: 8px 8px 0 0; font: 600 14px/1 var(--display); }
.store-logo { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: #E9DFCF; color: #2F4A3A; font: 700 13px/1 var(--display); }
.store-logo.sm { width: 18px; height: 18px; font-size: 10px; }
.email-body { background: #FFFDF9; color: #3D3530; padding: 16px; border-radius: 0 0 8px 8px; font-size: 13px; line-height: 1.55; border: 1px solid #E9DFCF; border-top: 0; }
.email-subject { font: 600 15px/1.3 var(--display); color: #1A1411; margin-bottom: 8px; }
.products { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 14px 0; }
.product { display: grid; gap: 4px; font-size: 12px; }
.product b { color: #1A1411; }
.ph { display: block; border-radius: 6px; aspect-ratio: 4 / 3; }
.ph-a { background: linear-gradient(135deg, #E9DFCF, #C9B79C); }
.ph-b { background: linear-gradient(135deg, #D6E2D3, #8FA98C); }
.ph-c { background: linear-gradient(135deg, #F1D9C6, #C2703D); }
.email-btn { display: inline-block; background: #C2703D; color: #fff; font-weight: 600; font-size: 12px; padding: 8px 14px; border-radius: 6px; }
.window-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; border-top: 1px solid var(--line); }
.lock { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; color: var(--muted); }
.lock svg { stroke: var(--muted); stroke-width: 2; }

.float {
  position: absolute; display: flex; align-items: center; gap: 10px; max-width: 340px;
  background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; box-shadow: var(--shadow);
}
.float b { display: block; font-size: 13px; color: var(--ink); font-weight: 600; line-height: 1.3; }
.float small { font-size: 12px; color: var(--muted); }
.float-a { left: -28px; bottom: 14px; }
.float-b { right: -20px; top: 0; }
@media (max-width: 1240px) { .float-a { left: -8px; } .float-b { right: -8px; } }
@media (max-width: 600px) {
  .hero-visual { padding: 0; }
  .hero-visual figcaption { position: static; margin-top: 8px; text-align: right; }
  .window-body { grid-template-columns: 1fr; }
  .mock-side { border-right: 0; border-bottom: 1px solid var(--line); }
  .chips { flex-direction: row; flex-wrap: wrap; }
  .mock-side .mock-label:not(:first-child), .mock-side .mock-value { display: none; }
  .float { position: static; margin-top: 10px; max-width: none; }
  .window-foot { flex-direction: column; align-items: flex-start; }
}

.badge { flex: none; font-size: 11px; font-weight: 600; padding: 4px 9px; border-radius: 999px; }
.badge-ok { background: var(--ok-wash); color: var(--ok); }
.badge-warn { background: var(--warn-wash); color: var(--warn); }

/* Trust strip */
.strip { border-block: 1px solid var(--line); background: var(--card); }
.strip-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 28px; padding-block: 20px; font-size: 14px; font-weight: 500; color: var(--muted); }
.strip-inner span { display: inline-flex; align-items: center; gap: 8px; }
.strip-inner span::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }

/* Sections */
.section { padding: 112px 0; }
.section-alt { background: var(--paper-2); border-block: 1px solid var(--line); }
.section-head { max-width: 720px; margin: 0 auto 56px; text-align: center; }
.section-head.left { text-align: left; margin: 0; }
.kicker { font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); margin-bottom: 14px; }
.section h2 { font-size: clamp(30px, 3.6vw, 44px); line-height: 1.1; font-weight: 700; letter-spacing: -0.03em; }
.sub { margin-top: 18px; font-size: 18px; color: var(--muted); }
@media (max-width: 720px) { .section { padding: 72px 0; } .section-head { margin-bottom: 40px; } }

/* Steps */
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; counter-reset: s; }
.steps li { position: relative; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 32px 28px; }
.step-num { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; background: var(--accent-wash); color: var(--accent-ink); font: 700 18px/1 var(--display); margin-bottom: 22px; }
.steps h3 { font-size: 21px; margin-bottom: 10px; }
.steps p { color: var(--muted); font-size: 16px; }
@media (max-width: 860px) { .steps { grid-template-columns: 1fr; } }

/* Features */
.feature { display: grid; grid-template-columns: 1fr 1fr; gap: 72px; align-items: center; padding: 40px 0; }
.feature + .feature { border-top: 1px solid var(--line); }
.feature.reverse .feature-copy { order: 2; }
.feature-copy h3 { font-size: clamp(24px, 2.4vw, 30px); line-height: 1.2; margin-bottom: 16px; }
.feature-copy p { color: var(--muted); font-size: 17px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
.feature-visual { padding: 24px; box-shadow: var(--shadow); }
@media (max-width: 860px) {
  .feature { grid-template-columns: 1fr; gap: 28px; }
  .feature.reverse .feature-copy { order: 0; }
}

.swatches { display: flex; gap: 8px; margin-bottom: 18px; }
.swatches i { width: 36px; height: 36px; border-radius: 8px; border: 1px solid var(--line); }
.sw1 { background: #2F4A3A; } .sw2 { background: #E9DFCF; } .sw3 { background: #C2703D; } .sw4 { background: #1A1411; }
.mini-email { border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: #FFFDF9; }
.mini-head { display: flex; align-items: center; gap: 8px; padding: 8px 12px; background: #2F4A3A; color: #F4EEE4; font: 600 12px/1 var(--display); }
.mini-line { height: 8px; border-radius: 4px; background: #E9DFCF; margin: 12px 12px 0; }
.mini-line.w80 { width: 80%; } .mini-line.w60 { width: 60%; }
.mini-products { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding: 12px; }
.why { margin-top: 16px; font-size: 13px; color: var(--muted); padding: 10px 12px; border-radius: 8px; background: var(--accent-wash); }
.why b { display: block; color: var(--accent-ink); font-weight: 600; margin-bottom: 2px; }

.filter { display: flex; justify-content: space-between; gap: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 8px; font-size: 14px; margin-bottom: 8px; }
.filter span { color: var(--muted); }
.filter b { color: var(--ink); font-weight: 600; }
.seg-row { display: flex; gap: 8px; margin-top: 16px; }
.seg { flex: 1; text-align: center; font-size: 13px; font-weight: 600; padding: 9px; border-radius: 8px; border: 1px solid var(--line); color: var(--muted); }
.seg.on { background: var(--accent); border-color: var(--accent); color: #fff; }
@media (prefers-color-scheme: dark) { .seg.on { color: #14100E; } }

.thread { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.thread:last-child { border-bottom: 0; padding-bottom: 0; }
.thread > div { flex: 1; min-width: 0; }
.thread b { display: block; font-size: 14px; color: var(--ink); font-weight: 600; }
.thread small { font-size: 12px; color: var(--muted); }
.avatar { flex: none; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--paper-2); border: 1px solid var(--line); font-weight: 600; font-size: 13px; color: var(--body); }

.metrics { display: grid; gap: 16px; }
.metrics small { display: block; font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.bar { display: block; height: 10px; border-radius: 5px; background: var(--line-2); }
.bar-accent { background: var(--accent); }
.w55 { width: 55%; } .w12 { width: 12%; } .w8 { width: 8%; } .w78 { width: 78%; }

/* Campaign types */
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.type { padding: 28px 24px; transition: border-color .15s, transform .15s; }
.type:hover { border-color: var(--accent); transform: translateY(-2px); }
.type h3 { font-size: 20px; margin-bottom: 10px; }
.type p { font-size: 15px; color: var(--muted); }
@media (max-width: 980px) { .grid-4 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .grid-4 { grid-template-columns: 1fr; } }

/* Control (dark band) */
.section-dark { background: var(--night); color: var(--night-text); }
.section-dark h2, .section-dark h3 { color: #FBF8F4; }
.section-dark .kicker { color: #A9A3F5; }
.section-dark .sub { color: var(--night-muted); }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.ctl { padding: 28px; border-radius: var(--radius); background: var(--night-2); border: 1px solid #3A302A; }
.ctl h3 { font-size: 20px; margin-bottom: 10px; }
.ctl p { font-size: 15px; color: var(--night-muted); }
@media (max-width: 860px) { .grid-3 { grid-template-columns: 1fr; } }

/* Pricing */
.plans { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; }
.plan { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px 22px; display: flex; flex-direction: column; }
.plan:first-child { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.plan h3 { font-size: 19px; }
.price { margin: 14px 0 2px; color: var(--ink); }
.price b { font: 700 36px/1 var(--display); letter-spacing: -0.03em; }
.price span { font-size: 14px; color: var(--muted); margin-left: 2px; }
.yearly { font-size: 13px; color: var(--muted); }
.allow { margin: 16px 0; padding: 10px 12px; border-radius: 8px; background: var(--accent-wash); color: var(--accent-ink); font-size: 14px; font-weight: 600; line-height: 1.35; }
.plan ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 9px; font-size: 14px; }
.plan li { position: relative; padding-left: 22px; line-height: 1.45; }
.plan li::before { content: ""; position: absolute; left: 2px; top: 5px; width: 10px; height: 6px; border-left: 2px solid var(--ok); border-bottom: 2px solid var(--ok); transform: rotate(-45deg); }
.plans-note { max-width: 760px; margin: 32px auto 0; text-align: center; font-size: 15px; color: var(--muted); }
@media (max-width: 1100px) { .plans { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 760px) { .plans { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .plans { grid-template-columns: 1fr; } }

/* FAQ */
.faq-grid { display: grid; grid-template-columns: 1fr 1.8fr; gap: 64px; align-items: start; }
.faq-grid .section-head { position: sticky; top: 104px; }
.faq details { border-bottom: 1px solid var(--line-2); }
.faq details:first-child { border-top: 1px solid var(--line-2); }
.faq summary {
  list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 22px 0; font: 600 18px/1.35 var(--display); color: var(--ink);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; flex: none; width: 10px; height: 10px; margin-right: 4px;
  border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg) translateY(-3px); transition: transform .2s;
}
.faq details[open] summary::after { transform: rotate(-135deg) translateY(-3px); }
.faq details p { padding: 0 0 24px; color: var(--muted); font-size: 16px; }
@media (max-width: 860px) {
  .faq-grid { grid-template-columns: 1fr; gap: 32px; }
  .faq-grid .section-head { position: static; }
}

/* Final CTA */
.final { padding: 0 0 112px; }
.final-inner {
  text-align: center; padding: 80px 32px; border-radius: 20px; color: #E9E3DC;
  background:
    radial-gradient(600px 300px at 80% 0%, rgba(139, 131, 240, .45), transparent 70%),
    radial-gradient(500px 300px at 10% 100%, rgba(194, 112, 61, .35), transparent 70%),
    #1E1A3A;
}
.final h2 { color: #fff; font-size: clamp(28px, 3.6vw, 44px); line-height: 1.1; font-weight: 700; letter-spacing: -0.03em; max-width: 760px; margin: 0 auto 16px; }
.final p { font-size: 18px; margin-bottom: 32px; color: #CFC8F5; }
.section-alt + .final { padding-top: 112px; }
@media (max-width: 600px) { .final-inner { padding: 56px 20px; } .final .btn { width: 100%; white-space: normal; } }

/* Footer */
.footer { border-top: 1px solid var(--line); padding: 40px 0 48px; font-size: 14px; color: var(--muted); }
.footer-inner { display: grid; grid-template-columns: 1fr auto; gap: 24px 48px; align-items: start; }
.footer-brand p { margin-top: 10px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 10px 24px; }
.footer-links a { color: var(--body); text-decoration: none; }
.footer-links a:hover { color: var(--accent); text-decoration: underline; }
.copy { grid-column: 1 / -1; }
@media (max-width: 720px) { .footer-inner { grid-template-columns: 1fr; } }
