/* ================= RESET ================= */
/* Normalize box sizing and remove default margins */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
}

/* ================= DESIGN TOKENS ================= */
/* Centralized colors and effects */
:root {
    --bg-dark: #0b1220;
    --bg-darker: #070d18;
    --gradient-main: radial-gradient(1200px 600px at 10% 10%, rgba(34,211,238,0.15), transparent 40%),
    radial-gradient(800px 500px at 90% 20%, rgba(59,130,246,0.18), transparent 45%),
    linear-gradient(135deg, #0b1220, #0f172a);
    --accent-blue: #3b82f6;
    --accent-teal: #22d3ee;
    --text-main: #e5e7eb;
    --text-muted: #9ca3af;
    --border-soft: rgba(255,255,255,0.08);
}

/* ================= BASE ================= */
body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
               Roboto, Helvetica, Arial, sans-serif;
    background: var(--gradient-main);
    color: var(--text-main);
    line-height: 1.6;
}

/* Safety hook for semantic layout */
main {
    display: block;
}

/* ================= SKIP LINK ================= */
/* Accessible, audit-safe, visually hidden unless focused */
.skip-link {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.skip-link:focus {
    position: fixed;
    top: 1rem;
    left: 1rem;
    width: auto;
    height: auto;
    margin: 0;
    padding: 0.6rem 1rem;
    background: #020617;
    color: var(--text-main);
    border-radius: 8px;
    z-index: 1000;
    clip: auto;
    white-space: normal;
}

/* ================= HEADER ================= */
.site-header {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1.25rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}

.header__left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.header__tagline {
    color: #ffffff;
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0;
    letter-spacing: 0.02em;
    white-space: nowrap;
}

.site-header .site-logo {
    height: 32px;
    width: auto;
    display: block;
}

/* Ensure picture wrapper doesn't affect alignment */
.site-logo-wrap { display: block; }
.site-logo-wrap .site-logo { display: block; height: inherit; }

.main-nav {
    flex: 1;
    display: flex;
    justify-content: center;
}

/* Larger screens */
@media (min-width: 900px) {
    .site-header .site-logo { height: 40px; }
    .header__tagline { font-size: 1.5rem; }
}

/* Small screens */
@media (max-width: 640px) {
    .site-header {
        flex-wrap: wrap;
    }
    .site-header .site-logo { height: 28px; }
    .header__tagline { 
        font-size: 1rem;
    }
    .header__left {
        flex-direction: column;
        align-items: flex-start;
    }
    .main-nav {
        width: 100%;
        order: 3;
    }
    .header__actions {
        order: 2;
    }
}

/* ================= NAV ================= */
.main-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

/* When nav uses semantic list markup, make it look inline and remove bullets */
.main-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 1rem;
    align-items: center;
}

.main-nav li {
    margin: 0;
}

.main-nav a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.95rem;
}

.main-nav a:hover,
.main-nav a:focus-visible {
    color: var(--text-main);
}

/* Make footer nav lists inline and remove default list styling */
.site-footer nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 1rem;
    align-items: center;
}

.site-footer nav ul li {
    margin: 0;
}

/* Responsive: stack nav on narrow viewports */
@media (max-width: 640px) {
    .main-nav ul {
        flex-direction: column;
        gap: 0.5rem;
    }
}

/* ================= BUTTONS ================= */
.btn {
    display: inline-block;
    padding: 0.6rem 1.1rem;
    border-radius: 8px;
    font-size: 0.9rem;
    text-decoration: none;
    transition: transform 0.2s ease, background 0.2s ease, opacity 0.2s ease;
}

.btn--primary {
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-teal));
    color: #020617;
    font-weight: 600;
}

.btn--secondary {
    color: var(--text-main);
    border: 1px solid var(--border-soft);
    background: rgba(255,255,255,0.02);
}

.btn:hover,
.btn:focus-visible {
    transform: translateY(-1px);
}

.btn:focus-visible {
    outline: 2px solid var(--accent-teal);
    outline-offset: 3px;
}

/* ================= HERO ================= */
.hero {
    max-width: 1200px;
    margin: 4rem auto 6rem;
    padding: 0 2rem;
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 3rem;
    align-items: center;
}

.badge {
    display: inline-block;
    padding: 0.35rem 0.7rem;
    margin-bottom: 1rem;
    font-size: 0.75rem;
    letter-spacing: 0.03em;
    color: var(--accent-teal);
    border: 1px solid rgba(34,211,238,0.35);
    border-radius: 999px;
    background: rgba(34,211,238,0.08);
}

.hero h1 {
    font-size: 2.2rem;
    line-height: 1.1;
    margin: 0 0 1rem;
}

.hero p {
    font-size: 1.05rem;
    color: var(--text-muted);
    max-width: 520px;
    margin: 0;
}

.hero__actions {
    margin-top: 1.75rem;
}

.hero__actions .btn {
    margin-right: 0.75rem;
}

/* Optional visuals support (if you have the image cards on index) */
.hero__visuals {
    position: relative;
}

.ui-card {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-soft);
    border-radius: 14px;
    padding: 0.75rem;
    backdrop-filter: blur(12px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.35);
}

.ui-card img {
    display: block;
    width: 100%;
    border-radius: 10px;
}

.offset-1 {
    position: absolute;
    top: 80px;
    left: -60px;
    width: 80%;
}

.offset-2 {
    position: absolute;
    bottom: -60px;
    right: -40px;
    width: 75%;
}

/* ================= SERVICES ================= */
.services {
    max-width: 1200px;
    margin: 6rem auto;
    padding: 0 2rem;
}

.services h2 {
    font-size: 2.1rem;
    margin: 0 0 2rem;
}

.services__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
}

.service-card {
    display: block;
    padding: 1.5rem;
    border-radius: 14px;
    text-decoration: none;
    color: var(--text-main);
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--border-soft);
    transition: transform 0.25s ease, background 0.25s ease;
}

.service-card:hover,
.service-card:focus-visible {
    transform: translateY(-4px);
    background: rgba(255,255,255,0.06);
}

.service-card h3 {
    margin: 0 0 0.5rem;
}

.service-card p {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.95rem;
}


/* ================= ABOUT ================= */
.about-panel {
    margin-top: 2.5rem;
    padding: 2rem;
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
    gap: 2rem;
    border-radius: 16px;
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--border-soft);
}

.about-panel__copy h3 {
    margin: 0 0 0.75rem;
    font-size: 1.5rem;
}

.about-panel__copy p {
    margin: 0 0 0.75rem;
    color: var(--text-muted);
}

.about-panel__copy p:last-child {
    margin-bottom: 0;
}

.about-panel__highlights {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
}

.about-panel__item {
    padding: 1rem 1.1rem;
    border-radius: 12px;
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--border-soft);
}

.about-panel__stat {
    display: block;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--accent-teal);
}

.about-panel__label {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* ================= FEATURES ================= */
.features {
    max-width: 1200px;
    margin: 6rem auto;
    padding: 0 2rem;
}

.features__grid {
    list-style: none;
    padding: 0;
    margin: 2rem 0 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
}

.features__grid li {
    padding: 1rem 1.25rem;
    border-radius: 10px;
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--border-soft);
}

/* ================= FOOTER ================= */
.site-footer {
    border-top: 1px solid var(--border-soft);
    padding: 2.5rem 2rem;
}

.footer__content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 1rem;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.site-footer a {
    color: var(--text-muted);
    text-decoration: none;
    margin-right: 1rem;
}

.site-footer a:hover,
.site-footer a:focus-visible {
    color: var(--text-main);
}

.site-footer nav a:last-child {
    margin-right: 0;
}

/* ================= PAGE TEMPLATE ================= */
/* Dedicated pages: security.html, contact.html, services/*.html */
main .page {
    max-width: 900px;
    margin: 5rem auto 6rem;
    padding: 0 2rem;
}

main .page h1 {
    font-size: 2.4rem;
    line-height: 1.15;
    margin: 0 0 1rem;
}

main .page .page-intro {
    margin: 0 0 1.75rem;
    color: var(--text-muted);
    font-size: 1.05rem;
    max-width: 70ch;
}

main .page p {
    color: var(--text-muted);
    max-width: 75ch;
    margin: 0 0 1rem;
}

main .page h2 {
    margin: 2.25rem 0 0.75rem;
    font-size: 1.35rem;
}

main .page ul,
main .page ol {
    margin: 0.75rem 0 1.25rem;
    padding-left: 1.25rem;
}

main .page li {
    margin: 0.45rem 0;
    color: var(--text-main);
}

/* Links inside dedicated page bodies */
main .page a {
    color: var(--text-main);
    text-decoration: underline;
    text-decoration-color: rgba(255,255,255,0.25);
    text-underline-offset: 3px;
}

main .page a:hover,
main .page a:focus-visible {
    text-decoration-color: rgba(34,211,238,0.65);
}

/* Panel used on security/contact pages */
main .page-panel {
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--border-soft);
    border-radius: 14px;
    padding: 1.5rem;
}

/* Security page emphasis */
main .page--security h1 {
    color: var(--accent-teal);
}

main .page--security .page-panel {
    border-color: rgba(34,211,238,0.25);
}

/* Contact page small polish */
main .page--contact strong {
    color: var(--text-main);
}

.practices {
    margin-top: 2rem;
}

.page--security .services__grid {
    max-width: 100%;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.page--security h2 {
    margin-top: 3rem;
}

.page--security .service-card {
    padding: 1.25rem;
}

/* ================= RESPONSIVE ================= */
@media (max-width: 900px) {
    .hero {
        grid-template-columns: 1fr;
    }

    .hero__visuals {
        margin-top: 3rem;
    }

    .offset-1,
    .offset-2 {
        position: static;
        width: 100%;
        margin-top: 1rem;
    }

    .about-panel {
        grid-template-columns: 1fr;
    }
}

/* ================= ACCESSIBILITY ================= */
/* Respect user preference for reduced motion */
@media (prefers-reduced-motion: reduce) {
    * {
        transition: none !important;
    }
}
