/* DENMAIL — Public site styles
   ─────────────────────────────── */

:root {
    --bg: #030712;
    --bg-elev: #060914;
    --surface: #0a0f1e;
    --card: #111827;
    --card-hover: #1e293b;
    --border: rgba(255, 255, 255, 0.07);
    --border-strong: rgba(255, 255, 255, 0.14);
    --text: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --accent: #6366f1;
    --accent-light: #818cf8;
    --accent-strong: #4f46e5;
    --accent-glow: rgba(99, 102, 241, 0.18);
    --violet: #a78bfa;
    --green: #22c55e;
    --amber: #f59e0b;
    --red: #ef4444;
    --gradient: linear-gradient(135deg, #6366f1 0%, #a78bfa 50%, #38bdf8 100%);
    --gradient-sub: linear-gradient(135deg, #6366f1, #a78bfa);
    --radius: 12px;
    --radius-sm: 8px;
    --radius-lg: 18px;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.25);
    --shadow-md: 0 6px 24px rgba(0, 0, 0, 0.35);
    --shadow-glow: 0 0 40px rgba(99, 102, 241, 0.25);
}

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

html, body { height: 100%; }

body {
    background: var(--bg);
    color: var(--text);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 15px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

a { color: var(--accent-light); text-decoration: none; transition: color 0.15s; }
a:hover { color: var(--text); }

/* Ambient gradient background orbs for depth */
body::before,
body::after {
    content: '';
    position: fixed;
    width: 720px;
    height: 720px;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.18;
    pointer-events: none;
    z-index: 0;
}
body::before {
    background: radial-gradient(circle, var(--accent) 0%, transparent 60%);
    top: -240px; left: -200px;
}
body::after {
    background: radial-gradient(circle, var(--violet) 0%, transparent 60%);
    bottom: -260px; right: -200px;
}

/* ─── NAV ────────────────────────────────────────────────── */
.nav {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(3, 7, 18, 0.82);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
}
.nav-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 16px 24px;
    display: flex;
    align-items: center;
    gap: 32px;
}
.nav-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 18px;
    letter-spacing: 2px;
    color: var(--text) !important;
}
.nav-brand .brand-mark {
    width: 34px; height: 34px; border-radius: 9px;
    background: var(--gradient-sub);
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-weight: 800; font-size: 18px;
    box-shadow: var(--shadow-glow);
}
.nav-links {
    display: flex; gap: 28px; flex: 1;
    list-style: none;
}
.nav-links a {
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    padding: 6px 0;
    position: relative;
}
.nav-links a.active,
.nav-links a:hover { color: var(--text); }
.nav-links a.active::after {
    content: '';
    position: absolute; left: 0; right: 0; bottom: -8px;
    height: 2px; background: var(--accent);
    border-radius: 2px;
}
.nav-cta { display: flex; gap: 10px; align-items: center; }

/* ─── BUTTONS ─────────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: var(--radius-sm);
    border: 1px solid transparent;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: transform 0.12s, background 0.15s, border-color 0.15s, box-shadow 0.15s;
    text-decoration: none;
    font-family: inherit;
    color: var(--text);
    background: transparent;
    line-height: 1;
    white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary {
    background: var(--gradient-sub);
    color: #fff;
    box-shadow: 0 4px 16px rgba(99, 102, 241, 0.35);
}
.btn-primary:hover {
    box-shadow: 0 6px 24px rgba(99, 102, 241, 0.5);
    color: #fff;
}
.btn-ghost {
    border-color: var(--border-strong);
    background: rgba(255, 255, 255, 0.02);
}
.btn-ghost:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: var(--accent-light);
    color: var(--text);
}
.btn-lg { padding: 14px 26px; font-size: 15px; }
.btn .material-icons { font-size: 18px; }

/* ─── LAYOUT HELPERS ──────────────────────────────────────── */
.main { flex: 1; position: relative; z-index: 1; }
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}
.section { padding: 80px 0; position: relative; z-index: 1; }
.section-narrow { padding: 64px 0; }
.section-tight { padding: 40px 0; }

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    background: var(--accent-glow);
    border: 1px solid rgba(99, 102, 241, 0.25);
    color: var(--accent-light);
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
}
.section-title {
    font-size: 40px;
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.15;
    margin: 16px 0 14px 0;
}
.section-title .grad {
    background: var(--gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.section-subtitle {
    color: var(--text-secondary);
    font-size: 17px;
    max-width: 680px;
    line-height: 1.6;
}

/* ─── HERO ────────────────────────────────────────────────── */
.hero {
    padding: 96px 0 72px;
    position: relative;
    z-index: 1;
}
.hero-inner { max-width: 920px; margin: 0 auto; text-align: center; }
.hero h1 {
    font-size: 64px;
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.05;
    margin: 20px 0 20px 0;
}
.hero h1 .grad {
    background: var(--gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.hero-lede {
    font-size: 19px;
    color: var(--text-secondary);
    max-width: 640px;
    margin: 0 auto 36px auto;
    line-height: 1.6;
}
.hero-cta { display: inline-flex; gap: 12px; flex-wrap: wrap; justify-content: center; }
.hero-trust {
    margin-top: 28px;
    font-size: 12px;
    color: var(--text-muted);
    display: flex; gap: 18px; justify-content: center; flex-wrap: wrap;
}
.hero-trust span { display: inline-flex; align-items: center; gap: 6px; }
.hero-trust .material-icons { font-size: 14px; color: var(--green); }

/* Product mockup card */
.hero-mockup {
    max-width: 980px;
    margin: 64px auto 0;
    background: linear-gradient(180deg, var(--card) 0%, #0b1222 100%);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-lg);
    box-shadow: 0 40px 80px -20px rgba(0, 0, 0, 0.7),
                0 0 0 1px rgba(99, 102, 241, 0.15) inset;
    overflow: hidden;
    position: relative;
}
.hero-mockup::before {
    content: '';
    position: absolute; top: 0; left: 0; right: 0; height: 1px;
    background: linear-gradient(90deg, transparent, rgba(99, 102, 241, 0.6), transparent);
}
.mockup-bar {
    padding: 12px 18px;
    display: flex; align-items: center; gap: 8px;
    border-bottom: 1px solid var(--border);
    background: rgba(0, 0, 0, 0.3);
}
.mockup-bar .dot { width: 10px; height: 10px; border-radius: 50%; }
.mockup-bar .dot-red { background: #ef4444; }
.mockup-bar .dot-amber { background: #f59e0b; }
.mockup-bar .dot-green { background: #22c55e; }
.mockup-bar .url {
    margin-left: 14px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    color: var(--text-muted);
}

.mockup-body {
    display: grid;
    grid-template-columns: 220px 1fr;
    min-height: 360px;
}
.mockup-side {
    background: rgba(0, 0, 0, 0.25);
    border-right: 1px solid var(--border);
    padding: 20px 14px;
}
.mockup-side-item {
    padding: 8px 10px;
    border-radius: 6px;
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 4px;
    display: flex; align-items: center; gap: 10px;
}
.mockup-side-item.active {
    background: var(--accent-glow);
    color: var(--accent-light);
    font-weight: 600;
}
.mockup-side-item .material-icons { font-size: 16px; }
.mockup-side-item .count {
    margin-left: auto;
    background: var(--accent);
    color: #fff;
    font-size: 10px;
    padding: 2px 7px;
    border-radius: 10px;
    font-weight: 700;
}
.mockup-list { padding: 8px; }
.mockup-list-item {
    padding: 12px 14px;
    border-radius: 8px;
    display: grid;
    grid-template-columns: 180px 1fr auto;
    gap: 14px;
    align-items: center;
    font-size: 13px;
    border-bottom: 1px solid var(--border);
}
.mockup-list-item:hover { background: rgba(255, 255, 255, 0.03); }
.mockup-list-item .sender { color: var(--text); font-weight: 600; }
.mockup-list-item .subject { color: var(--text-secondary); }
.mockup-list-item .time { color: var(--text-muted); font-size: 11px; }
.mockup-list-item .tag {
    padding: 2px 8px; border-radius: 4px;
    font-size: 10px; font-weight: 700;
    background: rgba(99, 102, 241, 0.15);
    color: var(--accent-light);
    margin-right: 6px;
}
.mockup-list-item .tag.green { background: rgba(34, 197, 94, 0.15); color: #86efac; }
.mockup-list-item .tag.amber { background: rgba(245, 158, 11, 0.15); color: #fcd34d; }

/* ─── FEATURE GRID ────────────────────────────────────────── */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
    margin-top: 48px;
}
.feature-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px 24px;
    transition: border-color 0.2s, transform 0.2s, background 0.2s;
    position: relative;
    overflow: hidden;
}
.feature-card::before {
    content: '';
    position: absolute; inset: 0;
    background: radial-gradient(circle at 0% 0%, rgba(99, 102, 241, 0.08), transparent 60%);
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
}
.feature-card:hover {
    transform: translateY(-2px);
    border-color: var(--accent-light);
    background: var(--card-hover);
}
.feature-card:hover::before { opacity: 1; }
.feature-icon {
    width: 44px; height: 44px;
    border-radius: 10px;
    background: var(--accent-glow);
    border: 1px solid rgba(99, 102, 241, 0.3);
    display: flex; align-items: center; justify-content: center;
    margin-bottom: 18px;
}
.feature-icon .material-icons {
    color: var(--accent-light);
    font-size: 22px;
}
.feature-card h3 {
    font-size: 17px;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text);
}
.feature-card p {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* ─── STATS STRIP ─────────────────────────────────────────── */
.stats-strip {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 20px;
    padding: 36px 40px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.08), rgba(167, 139, 250, 0.04));
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-top: 40px;
}
.stat { text-align: center; }
.stat .num {
    font-size: 36px;
    font-weight: 800;
    background: var(--gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    letter-spacing: -0.02em;
}
.stat .label {
    font-size: 12px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-top: 4px;
}

/* ─── PRICING ─────────────────────────────────────────────── */
.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 48px;
    max-width: 1060px;
    margin-left: auto;
    margin-right: auto;
}
.pricing-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 32px 28px;
    display: flex;
    flex-direction: column;
    position: relative;
    transition: border-color 0.2s, transform 0.2s;
}
.pricing-card.featured {
    border-color: var(--accent);
    box-shadow: 0 0 0 1px var(--accent) inset, var(--shadow-glow);
    transform: scale(1.02);
}
.pricing-card .badge {
    position: absolute; top: 16px; right: 16px;
    background: var(--gradient-sub);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 999px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}
.pricing-card h3 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 4px;
}
.pricing-card .tier-desc {
    color: var(--text-muted);
    font-size: 13px;
    margin-bottom: 18px;
}
.pricing-card .price {
    font-size: 42px;
    font-weight: 800;
    letter-spacing: -0.03em;
    margin-bottom: 2px;
}
.pricing-card .price small {
    font-size: 15px;
    color: var(--text-muted);
    font-weight: 500;
    letter-spacing: 0;
}
.pricing-card .price-sub {
    font-size: 12px; color: var(--text-muted);
    margin-bottom: 24px;
}
.pricing-card ul {
    list-style: none;
    margin-bottom: 24px;
}
.pricing-card li {
    display: flex;
    gap: 10px;
    padding: 7px 0;
    font-size: 14px;
    color: var(--text-secondary);
    align-items: flex-start;
    line-height: 1.5;
}
.pricing-card li .material-icons {
    color: var(--green);
    font-size: 18px;
    flex-shrink: 0;
    margin-top: 1px;
}
.pricing-card .btn { width: 100%; justify-content: center; margin-top: auto; }

/* ─── CTA ─────────────────────────────────────────────────── */
.cta-box {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.12), rgba(167, 139, 250, 0.06));
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-lg);
    padding: 56px 40px;
    text-align: center;
    margin: 40px 0;
    position: relative;
    overflow: hidden;
}
.cta-box::before {
    content: '';
    position: absolute; top: 0; left: 0; right: 0; height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
}
.cta-box h2 {
    font-size: 34px;
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 14px;
}
.cta-box p {
    color: var(--text-secondary);
    margin-bottom: 28px;
    max-width: 560px;
    margin-left: auto;
    margin-right: auto;
}

/* ─── FORMS ───────────────────────────────────────────────── */
.form {
    max-width: 520px;
    margin: 0 auto;
    padding: 36px 32px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
}
.form h1 {
    font-size: 26px;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 8px;
}
.form p.lede {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 26px;
}
.form-group { margin-bottom: 16px; }
.form-group label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 1px;
}
.form-group label .required { color: var(--accent-light); }
.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    background: var(--surface);
    border: 1px solid var(--border-strong);
    border-radius: 8px;
    color: var(--text);
    padding: 11px 14px;
    font-size: 14px;
    font-family: inherit;
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.18);
}
.form-group textarea { min-height: 120px; resize: vertical; }
.form-error {
    padding: 12px 14px;
    background: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #fca5a5;
    border-radius: 8px;
    font-size: 13px;
    margin-bottom: 18px;
}
.form-success {
    padding: 12px 14px;
    background: rgba(34, 197, 94, 0.08);
    border: 1px solid rgba(34, 197, 94, 0.3);
    color: #86efac;
    border-radius: 8px;
    font-size: 13px;
    margin-bottom: 18px;
}
.form-hint {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 6px;
}
.form .btn-primary { width: 100%; justify-content: center; padding: 12px; }

/* ─── FOOTER ──────────────────────────────────────────────── */
.footer {
    border-top: 1px solid var(--border);
    padding: 48px 0 32px;
    margin-top: 80px;
    position: relative;
    z-index: 1;
    background: rgba(3, 7, 18, 0.6);
}
.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 48px;
}
.footer-brand {
    max-width: 320px;
}
.footer-brand p {
    color: var(--text-muted);
    font-size: 13px;
    margin-top: 14px;
    line-height: 1.6;
}
.footer-col h4 {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 14px;
}
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 8px; }
.footer-col a { color: var(--text-muted); font-size: 13px; }
.footer-col a:hover { color: var(--text); }
.footer-bottom {
    max-width: 1200px;
    margin: 32px auto 0;
    padding: 20px 24px 0;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: var(--text-muted);
    flex-wrap: wrap;
    gap: 12px;
}

/* ─── USE CASES ROW ──────────────────────────────────────── */
.use-case-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin-top: 36px;
}
.use-case {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
}
.use-case .tag {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--accent-light);
    margin-bottom: 10px;
}
.use-case h4 {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 6px;
}
.use-case p {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* ─── RESPONSIVE ──────────────────────────────────────────── */
@media (max-width: 900px) {
    .hero h1 { font-size: 44px; }
    .hero-lede { font-size: 16px; }
    .section-title { font-size: 30px; }
    .section { padding: 56px 0; }
    .nav-links { display: none; }
    .mockup-body { grid-template-columns: 1fr; }
    .mockup-side { display: none; }
    .mockup-list-item { grid-template-columns: 1fr; }
    .mockup-list-item .time { display: none; }
    .footer-inner { grid-template-columns: 1fr 1fr; }
    .cta-box h2 { font-size: 26px; }
    .form { padding: 28px 22px; }
}
@media (max-width: 540px) {
    .hero { padding: 56px 0 48px; }
    .hero h1 { font-size: 34px; }
    .hero-cta .btn { width: 100%; justify-content: center; }
    .footer-inner { grid-template-columns: 1fr; gap: 32px; }
    .stats-strip { padding: 28px 22px; }
    .stat .num { font-size: 28px; }
}

/* ─── SSO BUTTON + DIVIDER (login page) ────────────────────── */
.btn-sso {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    color: #fff;
    border: 1px solid var(--border-strong);
    position: relative;
    overflow: hidden;
    transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s;
}
.btn-sso::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg,
        rgba(99,102,241,0.18) 0%,
        rgba(167,139,250,0.08) 50%,
        transparent 100%);
    opacity: 0;
    transition: opacity 0.2s;
    pointer-events: none;
}
.btn-sso:hover {
    transform: translateY(-1px);
    border-color: var(--accent-light);
    color: #fff;
    box-shadow: 0 6px 24px rgba(99, 102, 241, 0.25);
}
.btn-sso:hover::before { opacity: 1; }
.btn-sso .material-icons {
    color: var(--accent-light);
    position: relative;
    z-index: 1;
}

.webmail-sso-divider {
    text-align: center;
    margin: 4px 0 18px 0;
    position: relative;
    color: var(--text-muted);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
}
.webmail-sso-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--border);
    z-index: 0;
}
.webmail-sso-divider span {
    position: relative;
    background: var(--bg);
    padding: 0 14px;
    z-index: 1;
}
