@tailwind base;
@tailwind components;
@tailwind utilities;

@layer base {
    :root {
        --surface-1: #ffffff;
        --surface-2: #f8fafc;
        --ink-1: #0f172a;
        --ink-2: #475569;
        --line-soft: rgba(15, 23, 42, 0.08);
        --shadow-soft: 0 16px 40px rgba(15, 23, 42, 0.08);
    }

    body {
        color: var(--ink-1);
        text-rendering: optimizeLegibility;
    }
}

@layer components {
    .pro-section {
        @apply py-16 px-4;
    }

    .pro-container {
        width: min(1160px, calc(100% - 24px));
        margin: 0 auto;
    }

    .pro-card {
        background: var(--surface-1);
        border: 1px solid var(--line-soft);
        border-radius: 1rem;
        box-shadow: var(--shadow-soft);
    }

    .pro-eyebrow {
        @apply text-xs font-semibold uppercase tracking-[0.2em];
        color: var(--brand-primary, #1d4ed8);
    }

    .pro-title {
        @apply text-3xl md:text-4xl font-black leading-tight;
        color: var(--brand-secondary, #0f172a);
    }

    .pro-text {
        @apply text-sm md:text-base leading-relaxed;
        color: var(--brand-ink-soft, #64748b);
    }

    .pro-pill {
        @apply inline-flex items-center rounded-full px-3 py-1 text-xs font-semibold;
        color: var(--brand-primary, #1d4ed8);
        background: color-mix(in srgb, var(--brand-primary, #1d4ed8) 10%, #ffffff);
        border: 1px solid color-mix(in srgb, var(--brand-primary, #1d4ed8) 18%, #ffffff);
    }

    .pro-btn {
        @apply inline-flex items-center justify-center rounded-full px-5 py-2.5 text-sm font-semibold transition;
        background: var(--brand-primary, #1d4ed8);
        color: #fff;
    }

    .pro-btn:hover {
        background: color-mix(in srgb, var(--brand-primary, #1d4ed8) 84%, #000000);
    }

    .admin-panel-card {
        @apply bg-white rounded-xl border border-gray-100;
        box-shadow: 0 10px 28px rgba(15, 23, 42, 0.05);
    }

    .public-shell {
        width: min(1180px, calc(100% - 28px));
        margin: 0 auto;
    }

    .public-header {
        background: transparent;
        border-bottom: 0;
    }

    .public-topbar {
        background: #0b0b0b;
        color: #fff;
        font-size: 12px;
    }

    .topbar-inner {
        height: 30px;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 14px;
    }

    .topbar-note {
        font-size: 11px;
        color: #cbd5e1;
        letter-spacing: 0.06em;
        text-transform: uppercase;
        font-weight: 600;
    }

    .topbar-social {
        display: flex;
        gap: 8px;
    }

    .topbar-social a {
        width: 18px;
        height: 18px;
        display: grid;
        place-items: center;
        border-radius: 50%;
        background: #fff;
        color: #000;
        text-decoration: none;
        font-size: 10px;
        font-weight: 700;
    }

    .nav-wrap {
        padding: 10px 0 12px;
    }

    .public-navbar {
        border-radius: 18px;
        background: #ffffff;
        border: 1px solid #e9edf2;
        box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
        padding: 10px 16px;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 16px;
    }

    .brand-wrap {
        display: inline-flex;
        align-items: center;
        gap: 10px;
        text-decoration: none;
        min-width: 160px;
    }

    .brand-logo {
        height: 44px;
        width: auto;
        object-fit: contain;
        display: block;
    }

    .brand-fallback-mark {
        width: 40px;
        height: 40px;
        border-radius: 12px;
        background: linear-gradient(135deg, #ef4444, #b91c1c);
        color: #fff;
        display: grid;
        place-items: center;
        font-weight: 800;
        font-size: 16px;
        flex-shrink: 0;
    }

    .brand-meta {
        display: inline-flex;
        flex-direction: column;
        line-height: 1.1;
    }

    .brand-name {
        font-size: 14px;
        font-weight: 800;
        color: #0f172a;
    }

    .brand-tagline {
        font-size: 11px;
        color: #64748b;
        font-weight: 600;
        margin-top: 2px;
    }

    .nav-links {
        align-items: center;
        gap: 20px;
    }

    .nav-links a {
        color: #475569;
        text-decoration: none;
        font-size: 13px;
        font-weight: 600;
    }

    .nav-links a.is-active,
    .nav-links a:hover {
        color: var(--brand-primary, #1d4ed8);
    }

    .nav-cta {
        border: 0;
        border-radius: 999px;
        padding: 10px 18px;
        font-size: 12px;
        font-weight: 700;
        color: #fff;
        background: #0b0b0b;
        box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
    }

    .nav-menu-btn {
        border: 1px solid #d1d5db;
        border-radius: 10px;
        width: 36px;
        height: 34px;
        display: inline-flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 4px;
        font-size: 12px;
    }

    .nav-menu-btn span {
        width: 15px;
        height: 2px;
        border-radius: 999px;
        background: #334155;
    }

    /* legacy dropdown hidden; replaced with drawer */
    .mobile-menu { display: none; }

    .public-footer {
        background: #0a1633;
        padding: 34px 0 22px;
        color: #e2e8f0;
    }

    /* Global final CTA */
    .final-cta {
        display: grid;
        grid-template-columns: 1fr auto;
        gap: 20px;
        align-items: center;
        background: linear-gradient(134deg, var(--site-red, #c1121f), color-mix(in srgb, var(--site-red, #c1121f) 72%, #111827));
        color: #fff;
        padding: 26px 26px;
        border-radius: 22px;
        box-shadow: 0 18px 40px rgba(15, 23, 42, 0.12);
    }
    .final-cta h3 {
        margin: 0 0 10px;
        font-size: clamp(1.6rem, 2.8vw, 2.3rem);
        line-height: 1.06;
        font-weight: 900;
    }
    .final-cta p {
        margin: 0;
        color: rgba(255, 255, 255, 0.86);
        line-height: 1.68;
        max-width: 54ch;
    }
    .final-cta img {
        width: 182px;
        height: 182px;
        border-radius: 22px;
        object-fit: cover;
        border: 8px solid rgba(255, 255, 255, 0.14);
    }
    @media (max-width: 960px) {
        .final-cta { grid-template-columns: 1fr; text-align: left; }
        .final-cta img { width: 140px; height: 140px; justify-self: start; }
    }

    /* ────────────────────────────────
       Premium mobile drawer
    ──────────────────────────────── */
    .mobile-drawer-overlay {
        position: fixed;
        inset: 0;
        background: rgba(15, 23, 42, 0.45);
        backdrop-filter: blur(2px);
        opacity: 0;
        pointer-events: none;
        transition: opacity .25s ease;
        z-index: 60;
    }
    .mobile-drawer-overlay.is-open {
        opacity: 1;
        pointer-events: auto;
    }
    .mobile-drawer {
        position: fixed;
        top: 0;
        right: 0;
        width: min(86vw, 380px);
        height: 100%;
        background: #ffffff;
        color: #0f172a;
        box-shadow: -18px 0 48px rgba(15, 23, 42, 0.16);
        transform: translateX(100%);
        transition: transform .28s ease;
        z-index: 65;
        display: flex;
        flex-direction: column;
    }
    .mobile-drawer.is-open { transform: translateX(0); }
    .mobile-drawer__head {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 22px 22px 16px;
        border-bottom: 1px solid #e5e7eb;
    }
    .mobile-drawer__brand {
        display: flex;
        align-items: center;
        gap: 10px;
        text-decoration: none;
        color: inherit;
    }
    .mobile-drawer__brand img { height: 36px; width: auto; object-fit: contain; }
    .mobile-drawer__brand span { font-weight: 800; font-size: 16px; color: #0f172a; }
    .mobile-drawer__close {
        border: 1px solid #dbe3ee;
        background: #ffffff;
        color: #64748b;
        width: 42px;
        height: 42px;
        border-radius: 14px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        font-size: 22px;
        line-height: 1;
        box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
    }
    .mobile-drawer__links {
        padding: 18px 22px;
        display: grid;
        gap: 8px;
        flex: 1;
        overflow-y: auto;
    }
    .mobile-drawer__links a {
        display: flex;
        align-items: center;
        gap: 10px;
        padding: 13px 10px;
        background: transparent;
        border: 0;
        border-bottom: 1px solid #edf2f7;
        border-radius: 0;
        color: #1e293b;
        text-decoration: none;
        font-weight: 700;
        font-size: 15px;
        transition: color .2s, padding-left .2s;
    }
    .mobile-drawer__links a:hover {
        background: transparent;
        border-color: #edf2f7;
        color: var(--brand-primary, #1d4ed8);
        padding-left: 16px;
    }
    .mobile-drawer__follow {
        display: flex;
        align-items: center;
        gap: 14px;
        padding: 18px 22px 8px;
        color: #475569;
        font-weight: 700;
        font-size: 14px;
    }
    .mobile-drawer__phone {
        display: flex;
        align-items: center;
        gap: 10px;
        padding: 0 22px 18px;
        color: #111827;
        font-weight: 800;
        font-size: 15px;
        border-bottom: 1px solid #e5e7eb;
    }
    .mobile-drawer__cta {
        margin: 8px 22px 12px;
        display: block;
        width: calc(100% - 44px);
        text-align: center;
        background: #0f172a;
        color: #fff;
        font-weight: 800;
        padding: 14px 16px;
        border-radius: 999px;
        border: 0;
        box-shadow: 0 10px 24px rgba(15, 23, 42, 0.16);
    }
    .mobile-drawer__footer {
        padding: 0 22px 18px;
        border-top: 0;
        display: grid;
        gap: 10px;
    }
    .mobile-drawer__contact {
        display: flex;
        align-items: center;
        gap: 10px;
        color: #cbd5e1;
        font-weight: 700;
        font-size: 14px;
    }
    .mobile-drawer__contact svg { color: var(--brand-primary, #38bdf8); }
    .mobile-drawer__social {
        display: flex;
        gap: 10px;
        flex-wrap: wrap;
    }
    .mobile-drawer__social a {
        width: 34px;
        height: 34px;
        border-radius: 999px;
        background: #ffffff;
        border: 1px solid #e2e8f0;
        display: grid;
        place-items: center;
        color: #111827;
        text-decoration: none;
        font-weight: 800;
        box-shadow: 0 8px 18px rgba(15, 23, 42, 0.05);
    }

    .footer-card {
        background: transparent;
        border-radius: 0;
        border: 1px solid rgba(148, 163, 184, 0.15);
        border-left: 0;
        border-right: 0;
        padding: 26px 2px 30px;
        display: grid;
        grid-template-columns: 1.1fr 0.9fr 0.9fr;
        gap: 28px;
        min-height: 200px;
    }

    .footer-brand .brand-logo {
        height: 54px;
        width: auto;
        max-width: 220px;
        object-fit: contain;
    }

    .footer-name {
        font-size: 26px;
        font-weight: 800;
        color: #f8fafc;
    }

    .footer-card h4 {
        margin: 0 0 8px;
        font-size: 18px;
        font-weight: 800;
        color: #f8fafc;
    }

    .footer-card ul {
        margin: 0;
        padding: 0;
        list-style: none;
        display: grid;
        gap: 8px;
        font-size: 15px;
        color: #e2e8f0;
    }

    .footer-card a {
        color: #e2e8f0;
        text-decoration: none;
        opacity: 0.95;
    }

    .footer-card a:hover {
        color: #ffffff;
        opacity: 1;
    }

    .footer-text {
        margin: 14px 0 0;
        color: #cbd5e1;
        font-size: 16px;
        line-height: 1.6;
        max-width: 520px;
    }

    .footer-location {
        margin-top: 10px;
        color: #94a3b8;
        font-size: 16px;
        line-height: 1.45;
    }

    .footer-contact-list li {
        display: flex;
        align-items: center;
        gap: 10px;
    }

    .footer-icon {
        font-size: 14px;
        line-height: 1;
        color: #3b82f6;
    }

    .footer-copy {
        margin-top: 20px;
        color: #94a3b8;
        font-size: 13px;
        text-align: center;
    }

    .vss-global-section {
        padding: 28px 0 34px;
        background: transparent;
    }

    .vss-global-head {
        text-align: center;
        margin-bottom: 18px;
    }

    .vss-global-head h2 {
        margin: 0;
        font-size: clamp(2rem, 3.2vw, 3rem);
        line-height: 1.08;
        font-weight: 900;
        color: #0f172a;
    }

    .vss-global-head p {
        margin: 10px auto 0;
        max-width: 68ch;
        color: #475569;
        font-size: 1.05rem;
        line-height: 1.65;
    }

    .vss-global-filters {
        margin: 20px 0 24px;
        display: flex;
        justify-content: center;
        gap: 10px;
        flex-wrap: wrap;
    }

    .vss-filter-btn {
        border: 1px solid #dbe2ea;
        background: #fff;
        color: #334155;
        border-radius: 999px;
        padding: 8px 18px;
        font-size: 0.92rem;
        font-weight: 700;
        cursor: pointer;
        transition: all 0.2s ease;
    }

    .vss-filter-btn.is-active,
    .vss-filter-btn:hover {
        background: #000;
        color: #fff;
        border-color: #000;
    }

    .vss-global-slider {
        position: relative;
    }

    .vss-slides-wrap {
        min-height: 428px;
        position: relative;
    }

    .vss-slide {
        display: none;
        background: #fff;
        border: 1px solid #dfe5ec;
        border-radius: 30px;
        overflow: hidden;
        box-shadow: 0 20px 38px rgba(15, 23, 42, 0.08);
        grid-template-columns: minmax(280px, 36%) minmax(0, 1fr);
        align-items: center;
        gap: 18px;
    }

    .vss-slide.is-active {
        display: grid;
    }

    .vss-slide-media {
        height: 100%;
        min-height: 428px;
        background: linear-gradient(145deg, #f8fafc, #edf2f7);
        display: flex;
        align-items: flex-end;
        justify-content: center;
    }

    .vss-slide-media img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        max-height: 428px;
    }

    .vss-slide-content {
        padding: 26px 26px 26px 6px;
    }

    .vss-slide-copy {
        margin: 0;
        color: #1e293b;
        font-size: clamp(1.04rem, 1.5vw, 1.24rem);
        line-height: 1.7;
    }

    .vss-slide-copy span {
        color: var(--brand-accent, #e1252b);
        font-weight: 800;
    }

    .vss-slide-meta {
        margin: 16px 0 0;
        padding: 0;
        list-style: none;
        display: grid;
        gap: 8px;
        color: #334155;
        font-size: 1rem;
    }

    .vss-slide-meta strong {
        color: #0f172a;
    }

    .vss-slide-link {
        display: inline-flex;
        margin-top: 18px;
        text-decoration: none;
        font-weight: 800;
        color: var(--brand-primary, #1d4ed8);
    }

    .vss-arrow {
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
        width: 44px;
        height: 44px;
        border-radius: 50%;
        border: 1px solid #d7dee7;
        background: #fff;
        color: #111827;
        font-size: 1.2rem;
        display: grid;
        place-items: center;
        z-index: 2;
        box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
    }

    .vss-arrow-prev {
        left: -16px;
    }

    .vss-arrow-next {
        right: -16px;
    }

    .vss-dots {
        display: flex;
        justify-content: center;
        gap: 8px;
        padding-top: 14px;
    }

    .vss-dot {
        width: 10px;
        height: 10px;
        border-radius: 50%;
        background: #cbd5e1;
        border: 0;
        padding: 0;
        cursor: pointer;
    }

    .vss-dot.is-active {
        background: var(--brand-accent, #e1252b);
    }

    @media (max-width: 1024px) {
        .vss-arrow-prev {
            left: 6px;
        }

        .vss-arrow-next {
            right: 6px;
        }

        .vss-slide {
            grid-template-columns: 1fr;
        }

        .vss-slide-media {
            min-height: 280px;
        }

        .vss-slide-content {
            padding: 20px;
        }

        .vss-slides-wrap {
            min-height: 560px;
        }
    }

    @media (max-width: 768px) {
        .brand-meta {
            display: none;
        }

        .footer-card {
            grid-template-columns: 1fr;
            gap: 18px;
            padding: 18px 0 20px;
        }

        .footer-card h4 {
            font-size: 17px;
        }

        .footer-card ul {
            font-size: 15px;
        }

        .footer-text,
        .footer-location {
            font-size: 16px;
        }

        .footer-copy {
            font-size: 14px;
        }

        .vss-arrow {
            width: 38px;
            height: 38px;
            font-size: 1rem;
        }

        .vss-slides-wrap {
            min-height: 530px;
        }
    }

    @media (max-width: 560px) {
        .vss-slide {
            border-radius: 20px;
        }

        .vss-slide-media {
            min-height: 220px;
        }

        .vss-slide-meta {
            font-size: 0.92rem;
        }

        .vss-slides-wrap {
            min-height: 500px;
        }
    }
}
