/* =========================================================
   bekraeft.dk — styles
   Dark theme matching /design/ reference.
   Per-client theming via --otp-* on the /verify page.
   ========================================================= */

/* ─── Fonts ──────────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&family=Inter:wght@400;500;600&display=swap');

/* ─── Variables ──────────────────────────────────────────── */
:root {
    /* Site theme (dark) */
    --bg:         hsl(220 20% 7%);
    --fg:         hsl(210 20% 90%);
    --primary:    hsl(82 100% 55%);
    --primary-fg: hsl(220 20% 7%);
    --card:       hsl(220 18% 10%);
    --secondary:  hsl(220 15% 15%);
    --muted:      hsl(215 15% 55%);
    --border:     hsl(220 15% 18%);
    --radius:     0.75rem;
    --glow:       0 0 40px hsl(82 100% 55% / 0.3);
    --font-h:     'Space Grotesk', sans-serif;
    --font-b:     'Inter', sans-serif;

    /* Per-client OTP theming — overridden by server on /verify */
    --otp-primary:   hsl(82 100% 40%);
    --otp-bg:        hsl(215 25% 95%);
    --otp-fg:        hsl(220 20% 15%);
    --otp-card-bg:   #ffffff;
    --otp-radius:    var(--radius);
    --otp-shadow:    0 4px 24px hsl(0 0% 0% / 0.12);
    --otp-font:      'Inter', system-ui, sans-serif;
    --otp-success:   #16a34a;
    --otp-warning:   hsl(38 92% 50%);
    --otp-error:     hsl(0 84% 60%);
}

/* ─── Reset ──────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
    font-family: var(--font-b);
    background: var(--bg);
    color: var(--fg);
    line-height: 1.6;
    min-height: 100dvh;
}
h1, h2, h3, h4, h5, h6 { font-family: var(--font-h); }
a { color: inherit; text-decoration: none; }

/* ─── Animations ─────────────────────────────────────────── */
@keyframes fade-up {
    from { opacity: 0; transform: translateY(24px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes fade-in {
    from { opacity: 0; }
    to   { opacity: 1; }
}
.anim-fade-up  { animation: fade-up  0.6s ease-out both; }
.anim-fade-in  { animation: fade-in  0.5s ease-out both; }
.delay-1 { animation-delay: 0.10s; }
.delay-2 { animation-delay: 0.20s; }
.delay-3 { animation-delay: 0.30s; }
.delay-4 { animation-delay: 0.40s; }
.delay-5 { animation-delay: 0.50s; }

/* ─── Utilities ──────────────────────────────────────────── */
.text-gradient {
    background: linear-gradient(135deg, hsl(82 100% 55%), hsl(82 80% 70%));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ─── Container ──────────────────────────────────────────── */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}
.container--narrow {
    max-width: 768px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* ─── Navbar ─────────────────────────────────────────────── */
.site-nav {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 50;
    border-bottom: 1px solid var(--border);
    background: hsl(220 20% 7% / 0.80);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
}
.site-nav .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 4rem;
}
.logo {
    font-family: var(--font-h);
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--fg);
    text-decoration: none;
}
.logo-dot {
    background: linear-gradient(135deg, hsl(82 100% 55%), hsl(82 80% 70%));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.nav-links {
    display: flex;
    align-items: center;
    gap: 2rem;
}
.nav-link {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--muted);
    text-decoration: none;
    transition: color 0.15s;
}
.nav-link:hover,
.nav-link.active { color: var(--primary); }
.nav-btn {
    display: inline-flex;
    align-items: center;
    background: var(--primary);
    color: var(--primary-fg);
    font-family: var(--font-h);
    font-size: 0.875rem;
    font-weight: 600;
    padding: 0.5rem 1rem;
    border-radius: var(--radius);
    text-decoration: none;
    transition: filter 0.15s, box-shadow 0.15s;
}
.nav-btn:hover {
    filter: brightness(1.1);
    box-shadow: var(--glow);
}

/* ─── Hero ───────────────────────────────────────────────── */
.hero {
    position: relative;
    display: flex;
    align-items: center;
    min-height: 100svh;
    overflow: hidden;
}
.hero-bg {
    position: absolute;
    inset: 0;
    background: url('../images/hero-bg.jpg') center / cover no-repeat;
}
.hero-overlay {
    position: absolute;
    inset: 0;
    background: hsl(220 20% 7% / 0.72);
}
.hero-content {
    position: relative;
    z-index: 10;
    padding-top: 5rem;
}
.hero-badge {
    display: inline-block;
    border: 1px solid hsl(82 100% 55% / 0.30);
    background: hsl(82 100% 55% / 0.10);
    color: var(--primary);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    padding: 0.375rem 1rem;
    border-radius: 9999px;
    margin-bottom: 1.5rem;
}
.hero-content h1 {
    max-width: 640px;
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.02em;
    margin-bottom: 1.5rem;
}
.hero-sub {
    max-width: 520px;
    font-size: 1.125rem;
    color: var(--muted);
    line-height: 1.7;
    margin-bottom: 2.5rem;
}
.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

/* ─── Buttons ────────────────────────────────────────────── */
.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--primary);
    color: var(--primary-fg);
    font-family: var(--font-h);
    font-size: 0.875rem;
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius);
    text-decoration: none;
    transition: filter 0.15s, box-shadow 0.15s;
}
.btn-primary:hover {
    filter: brightness(1.1);
    box-shadow: var(--glow);
}
.btn-primary .arrow { transition: transform 0.15s; }
.btn-primary:hover .arrow { transform: translateX(4px); }

.btn-outline {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    border: 1px solid var(--border);
    color: var(--fg);
    font-family: var(--font-h);
    font-size: 0.875rem;
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius);
    text-decoration: none;
    transition: border-color 0.15s, background 0.15s;
}
.btn-outline:hover {
    border-color: hsl(82 100% 55% / 0.5);
    background: var(--secondary);
}

/* ─── Features ───────────────────────────────────────────── */
.features {
    border-top: 1px solid var(--border);
    padding: 6rem 0;
}
.features-header {
    text-align: center;
    margin-bottom: 4rem;
}
.features-header h2 {
    font-size: clamp(1.75rem, 3vw, 2.5rem);
    font-weight: 700;
    margin-bottom: 0.75rem;
}
.features-header p {
    color: var(--muted);
    max-width: 360px;
    margin: 0 auto;
}
.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.5rem;
}
.feature-card {
    border: 1px solid var(--border);
    background: var(--card);
    border-radius: var(--radius);
    padding: 2rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.feature-card:hover {
    border-color: hsl(82 100% 55% / 0.3);
    box-shadow: var(--glow);
}
.feature-badge {
    display: inline-block;
    background: hsl(82 100% 55% / 0.10);
    color: var(--primary);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 0.25rem 0.75rem;
    border-radius: 0.375rem;
    margin-bottom: 1rem;
}
.feature-card h3 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}
.feature-card p {
    font-size: 0.875rem;
    line-height: 1.7;
    color: var(--muted);
}

/* ─── Flow page ──────────────────────────────────────────── */
.flow-page { padding-top: 4rem; }

.flow-hero-section {
    padding: 8rem 0 3rem;
    text-align: center;
}
.flow-hero-section h1 {
    font-size: clamp(2rem, 4vw, 3.25rem);
    font-weight: 700;
    margin-bottom: 1rem;
}
.flow-hero-section p {
    font-size: 1rem;
    color: var(--muted);
    max-width: 480px;
    margin: 0 auto;
}

/* ─── Flow diagram ───────────────────────────────────────── */
.flow-diagram-card {
    border: 1px solid var(--border);
    background: var(--card);
    border-radius: var(--radius);
    padding: 2rem;
    margin-bottom: 2rem;
}
.flow-diagram-card > h3 {
    text-align: center;
    font-size: 1rem;
    font-weight: 600;
    color: var(--muted);
    margin-bottom: 1.5rem;
}
.flow-column {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.625rem;
}
.flow-branches {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: 3rem;
    padding-top: 0.25rem;
    width: 100%;
}
.flow-branch {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.625rem;
}
.flow-node {
    border: 1px solid var(--border);
    background: var(--secondary);
    border-radius: var(--radius);
    padding: 0.625rem 1rem;
    min-width: 180px;
    max-width: 220px;
    text-align: center;
}
.flow-node--accent {
    border-color: hsl(82 100% 55% / 0.4);
    background: hsl(82 100% 55% / 0.08);
}
.flow-node-label {
    font-family: var(--font-h);
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--fg);
}
.flow-node--accent .flow-node-label { color: var(--primary); }
.flow-node-sub {
    font-size: 0.75rem;
    color: var(--muted);
    margin-top: 0.125rem;
}
.flow-arrow { color: var(--muted); }

/* ─── Steps ──────────────────────────────────────────────── */
.steps-list {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    padding-bottom: 6rem;
}
.step {
    border: 1px solid var(--border);
    background: var(--card);
    border-radius: var(--radius);
    padding: 2rem;
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
}
.step--highlight {
    border-color: hsl(82 100% 55% / 0.4);
    background: hsl(82 100% 55% / 0.04);
}
.step-number {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 3rem;
    height: 3rem;
    border-radius: 0.5rem;
    background: hsl(82 100% 55% / 0.10);
    color: var(--primary);
    font-family: var(--font-h);
    font-size: 0.9rem;
    font-weight: 700;
}
.step-body { flex: 1; }
.step-header {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    margin-bottom: 0.5rem;
}
.step-icon { color: var(--muted); flex-shrink: 0; }
.step-body h3 { font-size: 1.125rem; font-weight: 600; }
.step-body > p {
    font-size: 0.875rem;
    line-height: 1.7;
    color: var(--muted);
    margin-top: 0.25rem;
    margin-bottom: 1rem;
}
.code-example {
    border: 1px solid var(--border);
    background: var(--secondary);
    border-radius: 0.5rem;
    padding: 1rem;
    font-size: 0.8rem;
    font-family: 'Courier New', monospace;
    white-space: pre;
    overflow-x: auto;
    color: var(--fg);
    line-height: 1.6;
}
.sms-example {
    border: 1px solid var(--border);
    background: var(--secondary);
    border-radius: 0.75rem 0.75rem 0.75rem 0.25rem;
    padding: 0.875rem 1.25rem;
    font-size: 0.9rem;
    line-height: 1.7;
    display: inline-block;
}
.sms-example strong { color: var(--primary); }

/* ─── Verification page ──────────────────────────────────── */
.verify-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100dvh;
    padding: 2rem 1.5rem;
    background-color: var(--otp-bg);
    font-family: var(--otp-font);
    color: var(--otp-fg);
}
.verify-card {
    background: var(--otp-card-bg);
    border-radius: var(--otp-radius);
    box-shadow: var(--otp-shadow);
    padding: 2.5rem 2rem;
    max-width: 420px;
    width: 100%;
    text-align: center;
}
.verify-logo { margin-bottom: 1.5rem; }
.verify-logo img { max-height: 60px; max-width: 180px; object-fit: contain; }
.verify-icon {
    width: 72px;
    height: 72px;
    margin: 0 auto 1.5rem;
    color: var(--otp-success);
}
.verify-icon svg { width: 100%; height: 100%; }
.verify-title {
    font-family: var(--otp-font);
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--otp-primary);
    margin-bottom: 0.5rem;
}
.verify-subtitle {
    font-size: 1rem;
    opacity: 0.75;
    margin-bottom: 2rem;
}
.verify-btn {
    display: inline-block;
    background: var(--otp-primary);
    color: #fff;
    padding: 0.85rem 2rem;
    border-radius: 99px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    transition: opacity 0.15s;
    margin-bottom: 1.5rem;
}
.verify-btn:hover { opacity: 0.85; }
.verify-footer {
    font-size: 0.75rem;
    opacity: 0.45;
    margin-top: 1rem;
}

/* ─── Error pages ────────────────────────────────────────── */
.error-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100dvh;
    padding: 2rem 1.5rem;
}
.error-card {
    border: 1px solid var(--border);
    background: var(--card);
    border-radius: var(--radius);
    padding: 2.5rem 2rem;
    max-width: 420px;
    width: 100%;
    text-align: center;
}
.error-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 1.5rem;
}
.error-icon--warning { color: var(--otp-warning); }
.error-icon--expired { color: var(--otp-error); }
.error-icon svg { width: 100%; height: 100%; }
.error-card h1 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
}
.error-card p {
    font-size: 0.925rem;
    color: var(--muted);
    margin-bottom: 0.4rem;
}

/* ─── Sales page ─────────────────────────────────────────── */
.sales-hero {
    padding: 9rem 0 4rem;
    text-align: center;
}
.sales-hero h1 {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 1.5rem;
}
.sales-lead {
    font-size: 1.0625rem;
    color: var(--muted);
    line-height: 1.8;
    max-width: 680px;
    margin: 0 auto;
}

.sales-diagram {
    padding: 0 0 2rem;
}
.diagram-figure {
    margin: 0;
    text-align: center;
}
.diagram-img {
    max-width: 100%;
    border: 1px solid var(--border);
    border-radius: var(--radius);
}
.sales-flow-desc {
    border: 1px solid var(--border);
    background: var(--card);
    border-radius: var(--radius);
    padding: 2rem;
    margin-bottom: 1.5rem;
}
.sales-flow-desc h2 {
    font-size: 1.375rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
}
.sales-flow-desc p {
    font-size: 0.9375rem;
    color: var(--muted);
    line-height: 1.8;
}

.sales-body { padding: 0 0 4rem; }
.sales-two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}
.sales-point {
    border: 1px solid var(--border);
    background: var(--card);
    border-radius: var(--radius);
    padding: 2rem;
}
.sales-badge {
    display: inline-block;
    background: hsl(82 100% 55% / 0.10);
    color: var(--primary);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 0.25rem 0.75rem;
    border-radius: 0.375rem;
    margin-bottom: 0.875rem;
}
.sales-badge--secondary {
    background: hsl(220 15% 25%);
    color: var(--fg);
}
.sales-point h3 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0.625rem;
}
.sales-point p {
    font-size: 0.875rem;
    color: var(--muted);
    line-height: 1.75;
}

.sales-integration { padding: 0 0 4rem; }
.sales-int-card {
    border: 1px solid hsl(82 100% 55% / 0.25);
    background: hsl(82 100% 55% / 0.04);
    border-radius: var(--radius);
    padding: 2.5rem;
}
.sales-int-kicker {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--primary);
    margin-bottom: 0.5rem;
}
.sales-int-card h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
}
.sales-int-card > p {
    font-size: 0.9375rem;
    color: var(--muted);
    line-height: 1.8;
    margin-bottom: 1.75rem;
    max-width: 580px;
}
.sales-int-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.sales-marketing { padding: 0 0 6rem; }
.sales-marketing-inner {
    border-top: 1px solid var(--border);
    padding-top: 3rem;
    text-align: center;
}
.sales-marketing-headline {
    font-family: var(--font-h);
    font-size: clamp(1.25rem, 3vw, 1.75rem);
    font-weight: 700;
    margin-bottom: 1rem;
}
.sales-marketing-sub {
    font-size: 0.9375rem;
    color: var(--muted);
    line-height: 1.8;
    max-width: 600px;
    margin: 0 auto;
}

/* ─── Footer ─────────────────────────────────────────────── */
.site-footer {
    border-top: 1px solid var(--border);
    padding: 2rem 0;
}
.site-footer .container { text-align: center; }
.site-footer p {
    font-size: 0.875rem;
    color: var(--muted);
}
.site-footer a {
    color: var(--primary);
    transition: filter 0.15s;
}
.site-footer a:hover { filter: brightness(1.1); }

/* ─── Demo page ──────────────────────────────────────────── */
.demo-form-wrap {
    max-width: 440px;
}
.demo-field {
    margin-bottom: 1rem;
}
.demo-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 0.375rem;
    color: var(--fg);
}
.demo-input {
    width: 100%;
    background: var(--secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--fg);
    font-family: var(--font-b);
    font-size: 1rem;
    padding: 0.75rem 1rem;
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.demo-input::placeholder { color: var(--muted); }
.demo-input:focus {
    border-color: hsl(82 100% 55% / 0.6);
    box-shadow: 0 0 0 3px hsl(82 100% 55% / 0.12);
}
.demo-btn {
    margin-top: 0.5rem;
    border: none;
    cursor: pointer;
    font-family: var(--font-h);
    font-size: 0.9375rem;
    font-weight: 600;
    padding: 0.8125rem 2rem;
    border-radius: var(--radius);
    background: var(--primary);
    color: var(--primary-fg);
    transition: filter 0.15s, box-shadow 0.15s;
}
.demo-btn:hover:not(:disabled) {
    filter: brightness(1.08);
    box-shadow: var(--glow);
}
.demo-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.demo-error {
    margin-top: 0.75rem;
    font-size: 0.875rem;
    color: hsl(0 84% 65%);
    background: hsl(0 84% 65% / 0.08);
    border: 1px solid hsl(0 84% 65% / 0.2);
    border-radius: 0.5rem;
    padding: 0.625rem 0.875rem;
}
.demo-success {
    margin-top: 1.5rem;
    font-size: 1rem;
    color: hsl(142 70% 60%);
}

/* Override modal.js shadow-DOM custom properties for dark theme */
#bekraeft-host {
    --otp-primary:   hsl(82 100% 55%);
    --otp-bg:        hsl(220 18% 10%);
    --otp-fg:        hsl(210 20% 90%);
}

/* ─── Responsive ─────────────────────────────────────────── */
@media (max-width: 640px) {
    .nav-links { gap: 0.625rem; }
    .nav-link { font-size: 0.8rem; }
    .nav-link--secondary { display: none; }
    .nav-btn  { font-size: 0.8rem; padding: 0.4rem 0.75rem; }
    .flow-branches { flex-direction: column; align-items: center; gap: 0.5rem; }
    .flow-node { min-width: 160px; }
    .step { flex-direction: column; gap: 1rem; }
    .sales-two-col { grid-template-columns: 1fr; }
    .sales-hero h1 { font-size: 1.75rem; }
}
