/* Mallpup — site styles. Dark theme, single accent. */

:root {
    --bg: #05080f;
    --bg-raised: #0b111c;
    --bg-panel: #101827;
    --line: rgba(148, 176, 214, 0.14);
    --text: #e8eef7;
    --text-muted: #9aa8bd;
    --text-faint: #6b788d;
    --accent: #4cc9ff;
    --accent-strong: #8fe0ff;
    --accent-dim: rgba(76, 201, 255, 0.16);
    --radius: 18px;
    --container: 1200px;
    --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

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

html { scroll-behavior: smooth; }

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

a { color: inherit; }
ul, ol { list-style: none; }
h1, h2, h3 { line-height: 1.1; letter-spacing: -0.02em; font-weight: 700; }
h2 { font-size: clamp(32px, 4.5vw, 52px); }
h3 { font-size: 22px; }

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

.skip-link {
    position: absolute; left: 16px; top: -60px;
    background: var(--accent); color: var(--bg);
    padding: 10px 16px; border-radius: 8px; font-weight: 600; z-index: 2000;
}
.skip-link:focus { top: 16px; }

.eyebrow {
    font-size: 13px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase;
    color: var(--accent); margin-bottom: 16px;
}
.lede { font-size: 18px; color: var(--text-muted); max-width: 620px; }

/* Buttons */
.btn {
    display: inline-flex; align-items: center; justify-content: center;
    padding: 14px 26px; border-radius: 12px; font-weight: 600; font-size: 15px;
    text-decoration: none; transition: transform .2s ease, box-shadow .2s ease, background .2s ease, border-color .2s ease;
}
.btn-primary { background: var(--accent); color: var(--bg); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 40px rgba(76, 201, 255, 0.35); }
.btn-ghost { border: 1px solid var(--line); color: var(--text); background: rgba(255,255,255,0.02); }
.btn-ghost:hover { border-color: var(--accent); background: var(--accent-dim); }
.btn:focus-visible, a:focus-visible, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* Navigation */
.nav {
    position: fixed; inset: 0 0 auto 0; z-index: 1000;
    padding: 18px 32px;
    background: rgba(5, 8, 15, 0.9);
    backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid transparent;
    transition: border-color .3s ease;
}
.nav.is-scrolled { border-bottom-color: var(--line); }
.nav-container { max-width: 1320px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.logo { display: inline-flex; align-items: center; gap: 10px; font-size: 20px; font-weight: 700; text-decoration: none; color: var(--text); letter-spacing: -0.01em; }
.logo-mark { width: 36px; height: 36px; object-fit: contain; flex: none; }
[data-theme="dark"] .logo-mark { filter: drop-shadow(0 0 1px rgba(255, 255, 255, .8)); }
.nav-menu { display: flex; align-items: center; gap: 32px; }
.nav-menu a { text-decoration: none; font-size: 15px; font-weight: 500; color: var(--text-muted); transition: color .2s ease; }
.nav-menu a:hover { color: var(--text); }
.nav-menu .nav-cta { color: var(--bg); background: var(--accent); padding: 10px 18px; border-radius: 10px; font-weight: 600; }
.nav-menu .nav-cta:hover { color: var(--bg); background: var(--accent-strong); }
.nav-toggle { display: none; background: none; border: 0; width: 44px; height: 44px; cursor: pointer; flex-direction: column; justify-content: center; gap: 5px; align-items: center; }
.nav-toggle span { display: block; width: 22px; height: 2px; background: var(--text); transition: transform .25s ease, opacity .25s ease; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Hero */
/* The header is 73px tall; the paw offset accounts for transparent padding in the dog image. */
.hero {
    --dog-width: clamp(220px, 29vw, 440px);
    --dog-center: calc(73px + clamp(215px, calc(28vw - 70px), 340px));
    --dog-paw-offset: clamp(83px, 10.96vw, 166px);
    position: relative; min-height: 100vh; min-height: 100svh;
    display: flex; align-items: flex-start; overflow: hidden;
    padding: calc(73px + clamp(80px, 6.25vw, 90px)) 32px 80px;
}
.hero-visual {
    position: absolute; inset: 0; z-index: 0;
    background: var(--bg); pointer-events: none;
}
.hero-visual::after { content: ""; position: absolute; left: 58%; right: 6%; top: calc(var(--dog-center) + var(--dog-paw-offset) - 2px); border-bottom: 1px solid var(--line); }
.hero-dog { position: absolute; z-index: 1; left: 76%; top: var(--dog-center); width: var(--dog-width); height: auto; transform: translate(-50%, -50%); filter: drop-shadow(0 18px 13px rgba(23, 21, 18, .10)); }
.hero-content { position: relative; z-index: 1; max-width: 1320px; width: 100%; margin: 0 auto; }
.hero h1 { font-size: clamp(42px, 6.4vw, 84px); font-weight: 800; max-width: 12ch; margin-bottom: 24px; }
.hero-subtitle { font-size: clamp(17px, 1.6vw, 21px); color: var(--text-muted); max-width: 560px; margin-bottom: 36px; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 44px; }
.hero-tags { display: flex; flex-wrap: wrap; gap: 8px 10px; max-width: 560px; }
.hero-tags li { font-size: 13px; color: var(--text-faint); padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; }

/* Proof strip */
.proof { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--bg-raised); }
.proof-grid { display: grid; grid-template-columns: repeat(3, 1fr); }
.stat { padding: 36px 24px; display: flex; flex-direction: column; gap: 6px; }
.stat + .stat { border-left: 1px solid var(--line); }
.stat-value { font-size: 34px; font-weight: 700; letter-spacing: -0.02em; color: var(--accent-strong); }
.stat-label { font-size: 15px; color: var(--text-muted); }

/* Sections */
section { padding: 104px 0; }
.section-header { max-width: 720px; margin-bottom: 64px; }
.section-header h2 { margin-bottom: 16px; }

/* Services */
.services-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.card {
    background: var(--bg-panel); border: 1px solid var(--line); border-radius: var(--radius);
    padding: 36px; position: relative; overflow: hidden;
    transition: border-color .25s ease, transform .25s ease;
}
.card::after {
    content: ""; position: absolute; inset: -1px; border-radius: inherit; pointer-events: none;
    background: radial-gradient(400px circle at var(--mx, 50%) var(--my, 0%), rgba(76, 201, 255, 0.12), transparent 45%);
    opacity: 0; transition: opacity .3s ease;
}
.card:hover { border-color: rgba(76, 201, 255, 0.4); transform: translateY(-4px); }
.card:hover::after { opacity: 1; }
.card-icon { width: 36px; height: 36px; color: var(--accent); margin-bottom: 22px; }
.card h3 { margin-bottom: 12px; }
.card p { color: var(--text-muted); font-size: 16px; margin-bottom: 20px; }
.card-list li { font-size: 14px; color: var(--text); padding-left: 18px; position: relative; margin-bottom: 8px; }
.card-list li::before { content: ""; position: absolute; left: 0; top: 9px; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }

/* Outcomes */
.outcomes { background: var(--bg-raised); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.outcomes-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.outcome { padding: 32px; border-left: 2px solid var(--accent); background: rgba(255,255,255,0.02); border-radius: 0 var(--radius) var(--radius) 0; }
.outcome h3 { margin-bottom: 14px; font-size: 20px; }
.outcome p { color: var(--text-muted); font-size: 15px; margin-bottom: 14px; }
.outcome-result { color: var(--accent-strong) !important; font-weight: 600; margin-bottom: 0 !important; }

/* Process */
.process-rail { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; counter-reset: step; position: relative; }
.process-rail::before { content: ""; position: absolute; left: 0; right: 0; top: 22px; height: 1px; background: var(--line); }
.process-rail li { position: relative; padding-top: 56px; }
.step-index { position: absolute; top: 0; left: 0; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; font-weight: 700; color: var(--accent); background: var(--bg); border: 1px solid var(--accent); }
.process-rail h3 { font-size: 20px; margin-bottom: 10px; }
.process-rail p { color: var(--text-muted); font-size: 15px; }

/* About */
.about { background: var(--bg-raised); border-top: 1px solid var(--line); }
.about-grid { display: grid; grid-template-columns: 1fr 1.4fr; gap: 60px; align-items: start; }
.about-copy p { color: var(--text-muted); font-size: 17px; margin-bottom: 18px; }

/* Contact */
.contact-panel {
    display: grid; grid-template-columns: 1.4fr 1fr; gap: 48px; align-items: center;
    background: linear-gradient(135deg, rgba(76, 201, 255, 0.14), rgba(76, 201, 255, 0.02));
    border: 1px solid rgba(76, 201, 255, 0.3); border-radius: 28px; padding: 64px;
}
.contact-panel h2 { margin-bottom: 16px; }
.contact-actions { display: flex; flex-direction: column; gap: 14px; align-items: flex-start; }
.contact-note { font-size: 14px; color: var(--text-muted); }

/* Footer */
.footer { border-top: 1px solid var(--line); padding: 56px 0 40px; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: 32px; align-items: start; }
.footer-brand p { color: var(--text-muted); font-size: 15px; margin-top: 12px; max-width: 360px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: flex-end; }
.footer-links a { text-decoration: none; color: var(--text-muted); font-size: 14px; }
.footer-links a:hover { color: var(--text); }
.footer-copy { grid-column: 1 / -1; padding-top: 32px; border-top: 1px solid var(--line); color: var(--text-faint); font-size: 13px; }

/* Reveal on scroll */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.reveal.is-visible { opacity: 1; transform: none; }

/* Responsive */
/* On phones and portrait tablets, the dog sits above the copy. */
@media (max-width: 768px), (max-width: 1024px) and (orientation: portrait) {
    .hero { --dog-width: min(56vw, 250px); --dog-center: min(calc(45vw + 10px), 225px); --dog-paw-offset: min(21.17vw, 94.5px); padding: min(74vw, 350px) 32px 60px; }
    .hero-visual::after { left: 15%; right: 15%; }
    .hero-dog { left: 50%; }
}

@media (max-width: 1024px) {
    .proof-grid { grid-template-columns: 1fr; }
    .stat + .stat { border-left: 0; border-top: 1px solid var(--line); }
    .outcomes-grid, .process-rail { grid-template-columns: 1fr; }
    .process-rail::before { display: none; }
    .about-grid, .contact-panel { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    section { padding: 80px 0; }
    .container, .nav { padding-left: 20px; padding-right: 20px; }
    .hero { padding-left: 20px; padding-right: 20px; }
    .services-grid { grid-template-columns: 1fr; }
    .contact-panel { padding: 36px 24px; }
    .footer-grid { grid-template-columns: 1fr; }
    .footer-links { justify-content: flex-start; }

    .nav-toggle { display: flex; }
    .nav-menu {
        position: fixed; inset: 0; top: 0; padding: 100px 28px 40px;
        flex-direction: column; align-items: flex-start; gap: 24px;
        background: rgba(5, 8, 15, 0.97); transform: translateX(100%);
        transition: transform .3s ease; z-index: -1;
    }
    .nav-menu.is-open { transform: none; }
    .nav-menu a { font-size: 24px; font-weight: 600; color: var(--text); }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .reveal { opacity: 1; transform: none; transition: none; }
    .btn, .card { transition: none; }
}

/* FAQ */
.faq { border-top: 1px solid var(--line); }
.faq-grid { display: grid; grid-template-columns: 1fr 1.6fr; gap: 60px; align-items: start; }
.faq-grid .section-header { margin-bottom: 0; }
.faq-list details { border-top: 1px solid var(--line); }
.faq-list details:last-child { border-bottom: 1px solid var(--line); }
.faq-list summary {
    cursor: pointer; list-style: none; padding: 22px 44px 22px 0; font-size: 18px; font-weight: 600;
    position: relative; color: var(--text);
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after {
    content: "+"; position: absolute; right: 4px; top: 50%; transform: translateY(-50%);
    width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--line);
    display: grid; place-items: center; color: var(--accent); font-weight: 400; font-size: 18px; transition: transform .2s ease;
}
.faq-list details[open] summary::after { content: "–"; }
.faq-list details p { color: var(--text-muted); font-size: 16px; padding: 0 44px 24px 0; }
.faq-list details a { color: var(--accent); }

/* Contact form */
.contact-panel { align-items: start; }
.contact-alt { margin-top: 20px; color: var(--text-muted); font-size: 15px; }
.contact-alt a { color: var(--accent); font-weight: 600; text-decoration: none; }
.contact-form { display: flex; flex-direction: column; gap: 18px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.field { display: flex; flex-direction: column; gap: 8px; }
.field label { font-size: 14px; font-weight: 600; color: var(--text); }
.field .optional { font-weight: 400; color: var(--text-faint); }
.field input, .field select, .field textarea {
    font: inherit; font-size: 15px; color: var(--text);
    background: rgba(5, 8, 15, 0.6); border: 1px solid var(--line); border-radius: 10px;
    padding: 12px 14px; width: 100%; transition: border-color .2s ease, box-shadow .2s ease;
}
.field select { appearance: none; -webkit-appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%239aa8bd' stroke-width='1.6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 36px; }
.field select option { background: var(--bg-panel); color: var(--text); }
.field textarea { resize: vertical; min-height: 120px; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-dim); }
.field input[aria-invalid="true"], .field textarea[aria-invalid="true"] { border-color: #ff6b8a; }
.contact-form .btn { align-self: flex-start; }
.contact-form .btn[disabled] { opacity: .6; cursor: progress; transform: none; box-shadow: none; }
.form-status { font-size: 14px; color: var(--text-muted); min-height: 1.4em; }
.form-status.is-success { color: #7ee8a2; }
.form-status.is-error { color: #ff8fa6; }

@media (max-width: 1024px) { .faq-grid { grid-template-columns: 1fr; gap: 32px; } }
@media (max-width: 600px) { .field-row { grid-template-columns: 1fr; } }

/* Plain pages (404.html, privacy.html): logo, one column, hairline footer.
   Served at any depth, so they link assets with root-relative paths. */
.plain { min-height: 100vh; min-height: 100svh; max-width: 1320px; margin: 0 auto; padding: 28px 32px; display: flex; flex-direction: column; }
.plain-foot { font-size: 13px; color: var(--text-faint); border-top: 1px solid var(--line); padding-top: 20px; }
.notfound-body { margin: auto 0; padding: 12vh 0; max-width: 640px; }
.notfound-body h1 { font-size: clamp(40px, 6vw, 72px); margin-bottom: 20px; }
.notfound-body p { font-size: 18px; color: var(--text-muted); margin-bottom: 36px; }
.legal { max-width: 680px; padding: 12vh 0 96px; }
.legal h1 { font-size: clamp(40px, 6vw, 64px); margin-bottom: 12px; }
.legal h2 { font-size: 24px; margin: 48px 0 12px; }
.legal p, .legal li { font-size: 17px; color: var(--text-muted); margin-bottom: 14px; }
.legal ul { list-style: none; }
.legal li { padding-left: 20px; position: relative; }
.legal li::before { content: ""; position: absolute; left: 0; top: .8em; width: 8px; height: 1px; background: var(--text); }
.legal strong { color: var(--text); font-weight: 600; }
.legal-date { font-size: 14px; color: var(--text-faint); }
.form-note { font-size: 13px; color: var(--text-faint); }
@media (max-width: 768px) { .plain { padding: 20px; } }

/* ---------- Light theme (paper, ink, one accent) ----------
   Activated with <html data-theme="light">. Typographic, hairline-separated, no panels or glows. */
[data-theme="light"] {
    --bg: #f5f2ec;
    --bg-raised: #efebe3;
    --bg-panel: #fbf9f5;
    --line: rgba(23, 21, 18, 0.12);
    --text: #171512;
    --text-muted: #5f5a53;
    --text-faint: #6f6a63;
    --accent: #1e3a8a;
    --accent-strong: #172d6e;
    --accent-dim: rgba(30, 58, 138, 0.10);
    --radius: 0px;
    --font-display: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Palatino, Georgia, "Times New Roman", serif;
    color-scheme: light;
}
[data-theme="light"] body { -webkit-font-smoothing: auto; }
[data-theme="light"] h1, [data-theme="light"] h2, [data-theme="light"] h3 { font-family: var(--font-display); font-weight: 500; letter-spacing: -0.015em; }
[data-theme="light"] .hero h1 { font-weight: 500; font-size: clamp(44px, 6.6vw, 88px); line-height: 1.02; }
[data-theme="light"] h3 { font-size: 24px; }
[data-theme="light"] .stat-value { font-family: var(--font-display); font-weight: 500; color: var(--text); font-size: 40px; }
[data-theme="light"] .step-index { font-family: var(--font); }
[data-theme="light"] .eyebrow { color: var(--text-muted); font-weight: 500; }

[data-theme="light"] .skip-link, [data-theme="light"] .btn-primary, [data-theme="light"] .nav-menu .nav-cta { color: #fff; }
[data-theme="light"] .nav-menu .nav-cta:hover { color: #fff; }
[data-theme="light"] .btn { border-radius: 999px; }
[data-theme="light"] .btn-primary:hover { box-shadow: 0 10px 30px rgba(30, 58, 138, 0.22); }
[data-theme="light"] .btn-ghost { background: transparent; border-color: rgba(23, 21, 18, 0.25); }
[data-theme="light"] .btn-ghost:hover { background: var(--accent-dim); }
[data-theme="light"] .nav { background: rgba(245, 242, 236, 0.86); }
[data-theme="light"] .nav-menu .nav-cta { border-radius: 999px; }

[data-theme="light"] .hero-visual { background: var(--bg); }
[data-theme="light"] .hero-tags li { border-color: rgba(23, 21, 18, 0.18); color: var(--text-muted); }

[data-theme="light"] .proof { background: transparent; }

[data-theme="light"] .card { background: transparent; border: 0; border-top: 1px solid var(--text); padding: 32px 0 8px; }
[data-theme="light"] .card::after { display: none; }
[data-theme="light"] .card:hover { transform: none; }
[data-theme="light"] .card-icon { color: var(--text); }
[data-theme="light"] .card-list li::before { background: var(--text); }
[data-theme="light"] .services-grid { gap: 20px 56px; }

[data-theme="light"] .outcomes, [data-theme="light"] .about { background: var(--bg-raised); }
[data-theme="light"] .outcome { background: transparent; border-left: 1px solid var(--text); padding: 8px 0 8px 28px; }
[data-theme="light"] .outcome-result { color: var(--text) !important; font-style: italic; font-weight: 500; }
[data-theme="light"] .step-index { background: var(--bg); border-color: var(--text); color: var(--text); }

[data-theme="light"] .contact-panel { background: var(--bg-panel); border: 1px solid var(--line); border-radius: 0; }
[data-theme="light"] .field input, [data-theme="light"] .field select, [data-theme="light"] .field textarea { background: #fff; border-radius: 0; }
[data-theme="light"] .field select option { background: #fff; }
[data-theme="light"] .form-status.is-success { color: #1f6b3a; }
[data-theme="light"] .form-status.is-error, [data-theme="light"] .field input[aria-invalid="true"], [data-theme="light"] .field textarea[aria-invalid="true"] { color: #a1203a; border-color: #a1203a; }
[data-theme="light"] .form-status.is-error { border: 0; }
[data-theme="light"] .faq-list summary::after { color: var(--text); border-color: var(--text); }

@media (max-width: 768px) {
    [data-theme="light"] .nav-menu { background: rgba(245, 242, 236, 0.97); }
}
