/* ============================================================
   SQFT Calculator V2 — Landing Page (welcome.php)
   Extracted from src/welcome.php
   ============================================================ */

:root {
    --w-bg-1: #dbe6f8;
    --w-bg-2: #eff4fc;
    --w-surface: #ffffff;
    --w-border: #d7e1f0;
    --w-text: #15203a;
    --w-muted: #4e5e7f;
    --w-blue: #2b5cb5;
    --w-blue-dark: #224894;
    --w-green: #3f9a2c;
    --w-green-dark: #347f24;
    --w-accent: #f0c84a;
    --w-shadow: 0 14px 34px rgba(19, 41, 86, 0.15);
    --w-shadow-soft: 0 8px 18px rgba(19, 41, 86, 0.1);
}

body {
    min-height: 100vh;
    font-family: "Segoe UI", "Helvetica Neue", sans-serif;
    background: radial-gradient(circle at top left, var(--w-bg-1), var(--w-bg-2));
    color: var(--w-text);
}

.landing-shell {
    max-width: 1080px;
    border-radius: 18px;
    border: 1px solid var(--w-border);
    box-shadow: var(--w-shadow);
    overflow: hidden;
}

.landing-top {
    background: linear-gradient(135deg, #244f9e, #153b79);
    border-radius: 12px;
    min-height: 96px;
    padding: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: var(--w-shadow-soft);
}

.landing-top .nav-actions {
    margin-left: auto;
    gap: 10px;
}

.logo-bg {
    border-radius: 10px;
    padding: 6px;
}

.logo-img {
    height: 70px;
}

.logo-companion-img {
    height: 64px;
}

.hero {
    margin-top: 14px;
    border-radius: 14px;
    border-left: 6px solid #62a4f2;
    background: linear-gradient(180deg, #f4f8ff, #ebf2ff);
    box-shadow: var(--w-shadow-soft);
    padding: 18px;
}

.hero h1 {
    margin-bottom: 4px;
    font-size: clamp(1.7rem, 3vw, 2.35rem);
}

.hero h2 {
    margin-bottom: 8px;
    font-weight: 700;
    color: #2b4776;
    font-size: clamp(1.05rem, 1.7vw, 1.3rem);
}

.hero-lead {
    margin: 0 auto;
    color: var(--w-muted);
    max-width: 76ch;
    line-height: 1.45;
    font-size: 15px;
    text-align: center;
}

.hero-benefits {
    margin: 14px auto 0 auto;
    padding-left: 0;
    display: flex;
    justify-content: center;
    gap: 48px;
    max-width: 900px;
}

.hero-benefits li {
    font-weight: 600;
    color: #1e3560;
    display: flex;
    align-items: center;
    gap: 6px;
    list-style-position: inside;
    justify-content: center;
}

.section-grid {
    margin-top: 14px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.card {
    background: var(--w-surface);
    border: 1px solid #e2e9f6;
    border-radius: 12px;
    box-shadow: 0 10px 22px rgba(19, 41, 86, 0.08);
    padding: 14px;
}

.card h3 {
    margin-top: 0;
    margin-bottom: 8px;
    color: #1f3764;
}

.card p,
.card li {
    color: #3e5378;
    line-height: 1.5;
}

.card ul {
    margin: 0;
    padding-left: 18px;
}

.icon-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
}

.icon-pill {
    border: 1px solid #d8e1f3;
    background: #f6f9ff;
    border-radius: 10px;
    padding: 10px;
    text-align: center;
    font-weight: 700;
    color: #24457a;
}

.icon-pill span {
    display: block;
    margin-bottom: 4px;
    font-size: 12px;
    color: #4f6793;
}

.demo-box {
    border: 1px dashed #88a5d8;
    background: #f8fbff;
    border-radius: 10px;
    padding: 12px;
}

.demo-row {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    font-weight: 700;
}

.demo-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-top: 12px;
}

.demo-room-card {
    background: linear-gradient(135deg, #1e3865, #2a4a7f);
    border: 2px solid transparent;
    border-radius: 10px;
    padding: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #e8f1ff;
}

.demo-room-card:hover {
    transform: translateY(-2px);
    border-color: #88a5d8;
}

.demo-room-card.active {
    border-color: var(--w-green);
    background: linear-gradient(135deg, #2a5a8f, #3a6aaf);
    box-shadow: 0 0 12px rgba(63, 154, 44, 0.3);
}

.demo-room-title {
    font-weight: 700;
    font-size: 15px;
    margin-bottom: 8px;
    color: #fff;
}

.demo-room-data {
    font-size: 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 10px;
}

.demo-data-row {
    display: flex;
    justify-content: space-between;
    gap: 6px;
}

.demo-data-label {
    color: #a8c5e0;
    font-weight: 600;
}

.demo-data-value {
    color: #fff;
    font-weight: 700;
}

.demo-room-workload {
    font-size: 18px;
    font-weight: 700;
    color: var(--w-green);
    border-top: 1px solid rgba(168, 197, 224, 0.3);
    padding-top: 8px;
    text-align: center;
}

.demo-room-card.active .demo-room-workload {
    font-size: 22px;
    color: #4dff4d;
}

.demo-total-section {
    margin-top: 16px;
    padding: 12px;
    background: linear-gradient(135deg, #2a4a7f, #1e3865);
    border: 1px solid #88a5d8;
    border-radius: 10px;
    color: #e8f1ff;
}

.demo-total-label {
    font-size: 12px;
    color: #a8c5e0;
    font-weight: 600;
    margin-bottom: 4px;
}

.demo-total-value {
    font-size: 20px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 6px;
}

#demoRunningTotal {
    color: var(--w-green);
    font-weight: 700;
}

.demo-total-hint {
    font-size: 11px;
    color: #7fa5d8;
    font-style: italic;
    margin-top: 6px;
}

.meta-card {
    margin-top: 14px;
    background: var(--w-surface);
    border: 1px solid #e2e9f6;
    box-shadow: 0 10px 22px rgba(19, 41, 86, 0.08);
    border-radius: 12px;
    padding: 14px;
}

.meta-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px 14px;
    margin-top: 10px;
}

.meta-item {
    border-bottom: 1px solid #e7edf9;
    padding-bottom: 6px;
    display: flex;
    justify-content: space-between;
    gap: 10px;
    font-size: 14px;
}

.meta-label {
    font-weight: 600;
    color: #506790;
}

.meta-value {
    font-weight: 700;
    color: #1f3764;
}

.cta-row {
    margin-top: 14px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

.footer {
    margin-top: 14px;
    border-top: 1px solid #d7e1f0;
    padding: 12px 2px 4px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    color: #4b618a;
    font-size: 13px;
    flex-wrap: wrap;
}

.footer-links {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.footer a {
    color: #2752a0;
    font-weight: 600;
    text-decoration: none;
}

.btn {
    border-radius: 10px;
    min-height: 44px;
    font-weight: 700;
    border: 1px solid transparent;
    transition: transform 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn-primary {
    background-color: var(--w-blue);
}

.btn-primary:hover {
    background-color: var(--w-blue-dark);
}

.btn-secondary {
    background-color: var(--w-green);
}

.btn-secondary:hover {
    background-color: var(--w-green-dark);
}

.btn-warning {
    background-color: var(--w-accent);
    color: #2f2811;
}

.btn-warning:hover {
    background-color: #ddb63e;
}

button:focus-visible,
.btn:focus-visible,
a:focus-visible {
    outline: 3px solid rgba(37, 98, 195, 0.35);
    outline-offset: 2px;
}

body.dark-mode {
    --w-bg-1: #18233a;
    --w-bg-2: #101827;
    --w-surface: #1f293b;
    --w-border: #334155;
    --w-text: #e9f0ff;
    --w-muted: #b9c8e8;
    --w-shadow: 0 14px 34px rgba(0, 0, 0, 0.35);
    --w-shadow-soft: 0 8px 18px rgba(0, 0, 0, 0.28);
}

body.dark-mode .hero {
    background: linear-gradient(180deg, #243246, #1d2a3f);
    border-left-color: #3f83d6;
}

body.dark-mode .hero h2,
body.dark-mode .hero-benefits li,
body.dark-mode .card h3,
body.dark-mode .meta-value,
body.dark-mode .footer {
    color: #d5e2ff;
}

body.dark-mode .card,
body.dark-mode .meta-card {
    border-color: #33445e;
    box-shadow: 0 10px 22px rgba(0, 0, 0, 0.24);
}

body.dark-mode .icon-pill {
    border-color: #3f5375;
    background: #25344b;
    color: #d5e2ff;
}

body.dark-mode .icon-pill span,
body.dark-mode .card p,
body.dark-mode .card li,
body.dark-mode .meta-label,
body.dark-mode .hero-lead {
    color: #b9c8e8;
}

body.dark-mode .demo-box {
    border-color: #5978ab;
    background: #25344b;
}

body.dark-mode .meta-item {
    border-bottom-color: #33445e;
}

body.dark-mode .footer {
    border-top-color: #33445e;
}

body.dark-mode .footer a {
    color: #86abef;
}

@media (max-width: 920px) {
    .demo-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .demo-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 920px) {
    .landing-top {
        flex-wrap: wrap;
        justify-content: center;
    }

    .landing-top .nav-actions {
        margin-left: 0;
        width: 100%;
        justify-content: center;
    }

    .hero-benefits,
    .section-grid,
    .icon-grid,
    .meta-grid {
        grid-template-columns: 1fr;
    }

    .logo-img {
        height: 62px;
    }

    .logo-companion-img {
        height: 56px;
    }
}
