/* ============================================================================
 * Talking Unicorn — landing + signup styling.
 * Bold + playful with sunset-gradient accents (coral → pink → violet).
 *
 * Kept separate from app.css (the admin UI) so the marketing surface can be
 * loud without dragging the admin surface along.
 * ========================================================================== */

:root {
    --bg:         #fffaf6;
    --bg-card:   #ffffff;
    --fg:         #1b0e2b;
    --fg-soft:   #534a5c;
    --fg-mute:   #8b8194;
    --line:       rgba(27, 14, 43, 0.08);
    --line-strong: rgba(27, 14, 43, 0.18);

    --c1: #ff6b47;   /* coral */
    --c2: #ff5a8a;   /* pink */
    --c3: #7b5fe0;   /* violet */
    --c4: #4ecdc4;   /* teal — for the "no tracking" accent */
    --c-soft1: #fff0e6;
    --c-soft2: #ffe4ed;
    --c-soft3: #eee6ff;

    --grad-warm: linear-gradient(135deg, var(--c1) 0%, var(--c2) 50%, var(--c3) 100%);
    --grad-hero: linear-gradient(160deg, #fff0e6 0%, #ffe4ed 35%, #eee6ff 100%);
    --grad-soft: linear-gradient(135deg, #ffe4ed 0%, #eee6ff 100%);
    --grad-btn:  linear-gradient(135deg, #ff6b47 0%, #ff5a8a 60%, #7b5fe0 100%);

    --radius:    14px;
    --radius-lg: 24px;
    --shadow-card: 0 6px 24px -8px rgba(123, 95, 224, 0.18);
    --shadow-cta:  0 10px 30px -6px rgba(255, 90, 138, 0.45);

    --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
    --font-display: ui-sans-serif, system-ui, -apple-system, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; font-family: var(--font); color: var(--fg); background: var(--bg); line-height: 1.5; -webkit-font-smoothing: antialiased; }

a { color: var(--c3); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ── Top nav ─────────────────────────────────────────────────────────── */
/* The whole header gets the soft warm/purple gradient. Slightly
   darker than the hero so it reads as a defined band. The gradient
   unicorn logo (transparent + pale) shows clearly against it without
   needing a chip behind it. */
.nav {
    position: sticky; top: 0; z-index: 10;
    background: linear-gradient(135deg, #e7daff 0%, #fbd6e3 50%, #ffd6c2 100%);
    backdrop-filter: saturate(120%) blur(10px);
    border-bottom: 1px solid rgba(123, 95, 224, 0.18);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.5) inset;
}
.nav .inner {
    max-width: 1120px; margin: 0 auto; padding: 16px 24px;
    display: flex; align-items: center; gap: 28px;
}
.nav .links { display: flex; gap: 22px; flex: 1; }
.nav .links a { color: var(--fg-soft); font-size: .94rem; font-weight: 500; }
.nav .links a:hover { color: var(--fg); text-decoration: none; }
.nav .actions { display: flex; gap: 10px; align-items: center; }

/* ── Brand mark ──────────────────────────────────────────────────────── */
.brand {
    display: flex; align-items: center; gap: 12px;
    font-weight: 700; font-size: 1.2rem; letter-spacing: -0.01em;
    color: var(--fg);
}
/* Gradient wordmark — orange → pink → purple, matches the hero
   accent words ("finally", "under control.") and the primary CTA.
   The span is the "Talking Unicorn" text in templates/_logo.html. */
.brand > span {
    background: var(--grad-btn);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    /* Fallback for ancient browsers that don't support background-clip:text. */
    background-color: #ff5a8a;
}
.brand svg { display: block; }
/* The nav now carries its own gradient (see .nav above) — the logo
   sits directly on it. We override the inline height set in _logo.html
   so the gradient unicorn is large enough to read at a glance. */
.brand img {
    height: 44px !important;
    width: auto;
    filter: drop-shadow(0 1px 2px rgba(123, 95, 224, 0.18));
}

/* ── Hero ────────────────────────────────────────────────────────────── */
.hero {
    background: var(--grad-hero);
    padding: 80px 24px 120px;
    border-bottom: 1px solid var(--line);
    position: relative;
    overflow: hidden;
}
.hero::before, .hero::after {
    content: ""; position: absolute; border-radius: 50%;
    filter: blur(60px); opacity: 0.55;
    pointer-events: none;
}
.hero::before { width: 320px; height: 320px; background: var(--c1); top: -120px; right: -80px; }
.hero::after  { width: 280px; height: 280px; background: var(--c3); bottom: -120px; left: -60px; opacity: 0.4; }

.hero .inner { max-width: 1120px; margin: 0 auto; position: relative; z-index: 1; }
.hero .hero-grid {
    display: grid; grid-template-columns: 1fr auto; gap: 48px; align-items: center;
}
.hero .hero-copy { min-width: 0; }
.hero .hero-illo {
    width: 320px; height: 320px;
    display: flex; align-items: center; justify-content: center;
    filter: drop-shadow(0 18px 36px rgba(123, 95, 224, 0.25));
    animation: float 6s ease-in-out infinite;
}
.hero .hero-illo img {
    max-width: 100%; max-height: 100%;
    height: auto; width: auto;
}
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-12px); }
}
.hero h1 {
    font-family: var(--font-display);
    font-size: clamp(2.4rem, 5vw, 3.6rem);
    font-weight: 800; letter-spacing: -0.025em;
    line-height: 1.05; margin: 24px 0 18px; max-width: 760px;
}
.hero h1 .grad-text {
    background: var(--grad-warm);
    -webkit-background-clip: text; background-clip: text;
    color: transparent;
}
.hero .sub {
    font-size: 1.2rem; color: var(--fg-soft);
    max-width: 620px; margin-bottom: 18px;
}
.hero .sub.small {
    font-size: .98rem; margin-bottom: 32px; max-width: 580px;
}
.hero .sub strong { color: var(--fg); font-weight: 600; }
.hero .sub em     { font-style: normal; color: var(--c3); }
.hero .cta-row { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }
.hero .small-note { color: var(--fg-mute); font-size: .9rem; }

.hero-eyebrow {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 6px 14px; border-radius: 999px;
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid var(--line-strong);
    font-size: .82rem; font-weight: 500; color: var(--fg-soft);
}
.hero-eyebrow .dot {
    width: 8px; height: 8px; border-radius: 50%;
    background: var(--c1); box-shadow: 0 0 0 4px rgba(255, 107, 71, 0.18);
}

/* ── Buttons ─────────────────────────────────────────────────────────── */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 12px 22px; font: inherit; font-size: 1rem; font-weight: 600;
    border-radius: 999px; cursor: pointer; text-decoration: none;
    border: none; transition: transform .12s ease, box-shadow .12s ease;
    line-height: 1; white-space: nowrap;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn.primary {
    background: var(--grad-btn); color: #fff;
    box-shadow: var(--shadow-cta);
}
.btn.primary:hover { box-shadow: 0 14px 36px -8px rgba(255, 90, 138, 0.55); }

.btn.ghost {
    background: rgba(255, 255, 255, 0.7); color: var(--fg);
    border: 1px solid var(--line-strong);
}
.btn.ghost:hover { background: #fff; }

.btn.small { padding: 8px 16px; font-size: .9rem; }

/* ── Sections ────────────────────────────────────────────────────────── */
.section { padding: 100px 24px; }
.section .inner { max-width: 1120px; margin: 0 auto; }
.section h2 {
    font-family: var(--font-display);
    font-size: clamp(1.8rem, 3.4vw, 2.6rem);
    font-weight: 800; letter-spacing: -0.02em;
    margin: 0 0 14px; line-height: 1.1;
}
/* margin: 0 auto 56px so the 620px-capped lede centers under the
   centered h2 instead of sitting at the left edge of the .section.
   (Without auto margins, max-width just narrows the box; the box
   itself stays at offset 0.) */
.section .lede { color: var(--fg-soft); font-size: 1.15rem; max-width: 620px; margin: 0 auto 56px; }

.section.tinted { background: var(--grad-soft); }

/* ── CRM spotlight ───────────────────────────────────────────────────── */
.crm-spotlight {
    /* Soft warm tint distinct from the .tinted pricing section below so
       visitors register CRM as its own beat, not part of pricing. */
    background: linear-gradient(160deg, #fff5ef 0%, #fdedf3 60%, #f3ecff 100%);
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}
.crm-spotlight .crm-eyebrow {
    display: inline-block; margin: 0 0 14px;
    padding: 5px 14px; border-radius: 999px;
    background: var(--grad-warm); color: #fff;
    font-size: 11.5px; font-weight: 700;
    letter-spacing: 0.08em;
}
.crm-spotlight h2 { font-size: 2rem; margin: 0 0 14px; }
.crm-spotlight .lede { margin-bottom: 32px; }

.crm-diagram {
    max-width: 760px; margin: 0 auto 40px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid var(--line);
    border-radius: var(--radius-xl);
    box-shadow: 0 12px 36px -16px rgba(123, 95, 224, 0.25);
}
.crm-diagram svg {
    display: block; width: 100%; height: auto;
}

.crm-cases {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
    max-width: 1040px; margin: 0 auto 32px;
    text-align: left;
}
.crm-case {
    background: var(--bg-card);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 24px;
}
.crm-case h3 {
    font-size: 1.05rem; font-weight: 700; margin: 0 0 8px;
    letter-spacing: -0.01em;
    /* Gradient text — ties the case headlines to the brand sweep. */
    background: var(--grad-warm);
    -webkit-background-clip: text; background-clip: text;
    color: transparent;
}
.crm-case p {
    margin: 0; color: var(--fg-soft);
    font-size: .95rem; line-height: 1.55;
}
.crm-case code {
    font-family: var(--mono, ui-monospace, "SFMono-Regular", "Menlo", monospace);
    font-size: .85em; padding: 1px 6px; border-radius: 4px;
    background: rgba(123, 95, 224, 0.1); color: #5e3fb8;
}

.crm-cta { margin-top: 4px; }
.crm-cta .btn {
    /* Slightly larger CTA so it reads as the section's call-to-action,
       not just a footnote link. */
    padding: 14px 28px; font-size: 1rem;
}

/* ── Feature grid ────────────────────────────────────────────────────── */
/* 3-column at desktop (auto-fits to 2 then 1 on narrower viewports).
   We chose 320px minimum so 4-up never happens at 1440px+ widths —
   3-up reads better with longer feature paragraphs, and we have 6
   features so it slots into 3+3 evenly. */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 24px;
}
.feature {
    background: var(--bg-card); border-radius: var(--radius-lg);
    padding: 32px; border: 1px solid var(--line);
    /* Even card heights: longer copy doesn't make one card taller
       than its neighbours in the same row. Looks intentional. */
    display: flex; flex-direction: column;
    transition: transform .15s ease, box-shadow .15s ease;
}
.feature h3 + p, .feature h3 ~ p { flex: 1; }
.feature:hover { transform: translateY(-4px); box-shadow: var(--shadow-card); }
.feature .icon {
    width: 48px; height: 48px; border-radius: 14px;
    display: flex; align-items: center; justify-content: center;
    background: var(--grad-warm); color: #fff; margin-bottom: 18px;
}
.feature .icon svg { width: 24px; height: 24px; }
/* Image-based feature icon (for icons sourced from the unicorn icon
   pack, like the alicorn horn in the UNI feature). Same 48×48 chip
   as .icon but painted through the gradient via mask. */
.feature .icon-img {
    width: 48px; height: 48px; border-radius: 14px;
    background: var(--grad-warm); display: flex;
    align-items: center; justify-content: center;
    margin-bottom: 18px;
}
.feature .icon-img img {
    width: 28px; height: 28px; object-fit: contain;
    filter: brightness(0) invert(1);  /* paint the line-art white */
}
.feature h3 { font-size: 1.15rem; font-weight: 700; margin: 0 0 8px; letter-spacing: -0.01em; }
.feature p  { margin: 0; color: var(--fg-soft); font-size: .95rem; line-height: 1.55; }
.feature p code, .feature p .mono {
    font-family: var(--mono, ui-monospace, "SFMono-Regular", "Menlo", monospace);
    font-size: .85rem; padding: 1px 6px; border-radius: 4px;
    background: var(--bg-soft); color: var(--fg);
}
.feature p em { font-style: normal; color: var(--c3); }

/* Each feature gets a different gradient tint on the icon for variety
   (cycles through six so the new 6-card grid stays cohesive). */
.feature:nth-child(1) .icon, .feature:nth-child(1) .icon-img { background: linear-gradient(135deg, #ff6b47, #ff5a8a, #7b5fe0); }
.feature:nth-child(2) .icon { background: linear-gradient(135deg, #ff5a8a, #7b5fe0); }
.feature:nth-child(3) .icon { background: linear-gradient(135deg, #7b5fe0, #4ecdc4); }
.feature:nth-child(4) .icon { background: linear-gradient(135deg, #4ecdc4, #ff6b47); }
.feature:nth-child(5) .icon { background: linear-gradient(135deg, #ffb84d, #ff5a8a); }
.feature:nth-child(6) .icon { background: linear-gradient(135deg, #ff6b47, #ffb84d); }

/* ── Pricing ─────────────────────────────────────────────────────────── */
.plans {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px; margin-top: 8px;
}
.plan-card {
    background: var(--bg-card); border-radius: var(--radius-lg);
    padding: 32px 28px; border: 1px solid var(--line);
    display: flex; flex-direction: column; gap: 18px;
    position: relative; transition: transform .15s ease, box-shadow .15s ease;
}
.plan-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-card); }
.plan-card.featured {
    border: 2px solid transparent;
    background-image: linear-gradient(var(--bg-card), var(--bg-card)),
                      var(--grad-warm);
    background-origin: border-box;
    background-clip: padding-box, border-box;
}
.plan-card .badge {
    position: absolute; top: -12px; left: 28px;
    background: var(--grad-btn); color: #fff;
    padding: 4px 12px; border-radius: 999px;
    font-size: .75rem; font-weight: 600; letter-spacing: 0.02em;
    box-shadow: var(--shadow-cta);
}
.plan-card .name { font-size: .9rem; font-weight: 600; color: var(--fg-soft); text-transform: uppercase; letter-spacing: 0.05em; }
.plan-card .price { font-size: 2.6rem; font-weight: 800; letter-spacing: -0.03em; line-height: 1; }
.plan-card .price .unit { font-size: .9rem; font-weight: 500; color: var(--fg-mute); margin-left: 4px; }
.plan-card .desc { color: var(--fg-soft); font-size: .95rem; margin: 0; }
.plan-card ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.plan-card li { display: flex; align-items: flex-start; gap: 10px; font-size: .95rem; color: var(--fg-soft); }
.plan-card li .check {
    width: 18px; height: 18px; border-radius: 50%; flex-shrink: 0;
    background: var(--c-soft2); color: var(--c2);
    display: flex; align-items: center; justify-content: center; font-size: .7rem; margin-top: 2px;
}
.plan-card form { margin-top: 8px; }
.plan-card form .field { margin-bottom: 12px; }
.plan-card label { font-size: .8rem; color: var(--fg-mute); display: block; margin-bottom: 4px; }
.plan-card .at-input {
    display: flex; align-items: center; gap: 4px;
    background: var(--bg); border: 1px solid var(--line-strong);
    border-radius: 10px; padding: 8px 12px;
}
.plan-card .at-input input {
    border: none; outline: none; background: transparent;
    font: inherit; font-size: .95rem; flex: 1; min-width: 0;
    padding: 0; color: var(--fg);
}
.plan-card .at-input .domain { color: var(--fg-mute); font-size: .9rem; }
.plan-card .btn { width: 100%; }

/* Per-mailbox overage callout under the plans grid. */
.overage-note {
    max-width: 640px; margin: 32px auto 0;
    padding: 14px 20px; font-size: .95rem; line-height: 1.55;
    color: var(--fg-soft);
    background: rgba(255, 255, 255, 0.55);
    border: 1px solid var(--line); border-radius: var(--radius-lg);
}

/* ── CTA strip ───────────────────────────────────────────────────────── */
.cta-strip {
    background: var(--grad-warm); color: #fff;
    border-radius: var(--radius-lg); padding: 56px 40px;
    display: flex; align-items: center; justify-content: space-between;
    gap: 32px; flex-wrap: wrap;
    position: relative; overflow: hidden;
}
.cta-strip-watermark {
    position: absolute; right: -40px; bottom: -60px;
    width: 320px; height: auto;
    opacity: 0.22; pointer-events: none;
    transform: rotate(-12deg);
}
.cta-strip h3 {
    margin: 0; font-size: 1.7rem; font-weight: 800;
    letter-spacing: -0.02em; max-width: 540px;
}
/* On the CTA strip the button sits on the warm gradient + the red
   watermark unicorn. A plain white-on-gradient pill fades into the
   background. Bump it to solid white with crisp dark text + a real
   shadow so it reads as a clear call to action above the artwork. */
.cta-strip .btn.primary {
    background: #fff;
    color: var(--fg);            /* near-black, not pink */
    font-weight: 700;
    box-shadow: 0 4px 14px -2px rgba(0, 0, 0, 0.25),
                0 0 0 1px rgba(255, 255, 255, 0.7) inset;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    position: relative;          /* lift above the watermark unicorn */
    z-index: 1;
}
.cta-strip .btn.primary:hover {
    box-shadow: 0 8px 24px -4px rgba(0, 0, 0, 0.35),
                0 0 0 1px rgba(255, 255, 255, 0.9) inset;
    transform: translateY(-1px);
}

/* ── FAQ ─────────────────────────────────────────────────────────────── */
.faq-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}
.faq-item {
    background: var(--bg-card); border: 1px solid var(--line);
    border-radius: var(--radius-lg); padding: 24px;
}
.faq-item h4 { margin: 0 0 8px; font-size: 1.02rem; font-weight: 700; }
.faq-item p  { margin: 0; color: var(--fg-soft); font-size: .95rem; line-height: 1.55; }

/* ── Footer ──────────────────────────────────────────────────────────── */
/* Mirror the nav's gradient (flipped 180°) so the page is book-ended
   by the same warm/purple band. */
.footer {
    background: linear-gradient(315deg, #e7daff 0%, #fbd6e3 50%, #ffd6c2 100%);
    border-top: 1px solid rgba(123, 95, 224, 0.18);
    padding: 48px 24px 32px;
}
.footer .brand img {
    height: 44px !important;
    width: auto;
    filter: drop-shadow(0 1px 2px rgba(123, 95, 224, 0.18));
}
.footer .inner {
    max-width: 1120px; margin: 0 auto;
    display: flex; justify-content: space-between; align-items: flex-start;
    gap: 32px; flex-wrap: wrap;
}
.footer .col h5 { margin: 0 0 12px; font-size: .8rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: var(--fg-mute); }
.footer .col ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.footer .col a { color: var(--fg-soft); font-size: .9rem; }
.footer .col a:hover { color: var(--fg); text-decoration: none; }
.footer .bottom {
    max-width: 1120px; margin: 32px auto 0; padding-top: 24px;
    border-top: 1px solid var(--line); color: var(--fg-mute); font-size: .85rem;
}

/* ── Flash messages ─────────────────────────────────────────────────── */
.flash {
    padding: 12px 16px; border-radius: 12px; margin: 16px 0;
    font-size: .95rem; border: 1px solid;
}
.flash.ok    { background: #e6f3ec; border-color: #b3dac3; color: #16794b; }
.flash.error { background: #fde7e6; border-color: #f1b9b6; color: #b3261e; }
.flash.warn  { background: #fdf3d4; border-color: #ead694; color: #8a6d00; }

/* ── Centered cards (success, cancel, login) ────────────────────────── */
.centered-page {
    min-height: 70vh;
    display: flex; align-items: center; justify-content: center;
    padding: 60px 24px;
}
.centered-card {
    background: var(--bg-card); border: 1px solid var(--line);
    border-radius: var(--radius-lg); padding: 48px 40px;
    max-width: 520px; width: 100%; text-align: center;
    box-shadow: var(--shadow-card);
}
.centered-card .emoji-block {
    width: 64px; height: 64px; margin: 0 auto 20px;
    border-radius: 18px; display: flex; align-items: center; justify-content: center;
    background: var(--grad-warm); color: #fff;
}
.centered-card .emoji-block svg { width: 32px; height: 32px; }
.centered-card .stamp {
    display: block; margin: 0 auto 20px;
    width: 120px; height: 120px; border-radius: 18px;
    box-shadow: 0 10px 30px -6px rgba(255, 90, 138, 0.35);
}
.centered-card h1 { font-size: 1.8rem; font-weight: 800; letter-spacing: -0.02em; margin: 0 0 12px; }
.centered-card p  { color: var(--fg-soft); margin: 0 0 24px; font-size: 1rem; }
.centered-card .cta-row { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

/* ── Small screen tidy-ups ──────────────────────────────────────────── */
@media (max-width: 860px) {
    .hero .hero-grid { grid-template-columns: 1fr; gap: 24px; }
    .hero .hero-illo { width: 220px; height: 220px; margin: 0 auto; order: -1; }
}
@media (max-width: 640px) {
    .nav .links { display: none; }
    .hero { padding: 48px 20px 64px; }
    .hero .hero-illo { width: 180px; height: 180px; }
    .section { padding: 64px 20px; }
    .cta-strip { padding: 36px 24px; text-align: center; justify-content: center; }
    .cta-strip-watermark { width: 220px; right: -60px; bottom: -80px; opacity: 0.18; }
    .footer .inner { flex-direction: column; }
}
