/* ==========================================================================
   Atlas Security — Base
   Tokens, reset, typography and layout primitives.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Fonts
   -------------------------------------------------------------------------- */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700;800&family=Inter:wght@400;500;600;700&display=swap');

/* --------------------------------------------------------------------------
   2. Design tokens
   -------------------------------------------------------------------------- */
:root {
    /* Brand */
    --atlas-primary: #c9994a;
    --atlas-primary-dark: #a97c34;
    --atlas-primary-light: #e2bd7d;
    --atlas-primary-rgb: 201, 153, 74;
    --atlas-gradient: linear-gradient(135deg, #e2bd7d 0%, #c9994a 45%, #a97c34 100%);
    --atlas-gradient-soft: linear-gradient(135deg, rgba(201,153,74,.18) 0%, rgba(201,153,74,.04) 100%);

    /* Surfaces (dark is the default theme) */
    --atlas-bg: #080b10;
    --atlas-bg-alt: #0b0f15;
    --atlas-surface: #0f141c;
    --atlas-surface-2: #141b25;
    --atlas-surface-3: #1a222d;
    --atlas-line: rgba(255, 255, 255, .09);
    --atlas-line-strong: rgba(255, 255, 255, .16);

    /* Text */
    --atlas-text: #f2f4f7;
    --atlas-text-soft: #cbd2dc;
    --atlas-muted: #8f9bab;
    --atlas-heading: #ffffff;

    /* Effects */
    --atlas-shadow-sm: 0 2px 10px rgba(0, 0, 0, .3);
    --atlas-shadow: 0 18px 44px -18px rgba(0, 0, 0, .75);
    --atlas-shadow-lg: 0 34px 80px -28px rgba(0, 0, 0, .85);
    --atlas-ring: 0 0 0 3px rgba(var(--atlas-primary-rgb), .35);

    /* Geometry */
    --atlas-radius-sm: 8px;
    --atlas-radius: 16px;
    --atlas-radius-lg: 24px;
    --atlas-radius-xl: 32px;
    --atlas-radius-pill: 999px;

    /* Layout */
    --atlas-container: 1240px;
    --atlas-gutter: 24px;
    --atlas-header-h: 84px;
    --atlas-section-y: clamp(72px, 9vw, 132px);

    /* Motion */
    --atlas-ease: cubic-bezier(.22, .61, .36, 1);
    --atlas-ease-out: cubic-bezier(.16, 1, .3, 1);
    --atlas-dur: .45s;

    color-scheme: dark;
}

/* Light theme */
[data-theme="light"] {
    --atlas-bg: #ffffff;
    --atlas-bg-alt: #f4f6f8;
    --atlas-surface: #f6f7f9;
    --atlas-surface-2: #eef1f4;
    --atlas-surface-3: #e6eaef;
    --atlas-line: rgba(13, 18, 24, .10);
    --atlas-line-strong: rgba(13, 18, 24, .18);

    --atlas-text: #1a212b;
    --atlas-text-soft: #3b4653;
    --atlas-muted: #5a6472;
    --atlas-heading: #0d1218;

    --atlas-shadow-sm: 0 2px 8px rgba(13, 18, 24, .06);
    --atlas-shadow: 0 18px 40px -22px rgba(13, 18, 24, .35);
    --atlas-shadow-lg: 0 32px 70px -30px rgba(13, 18, 24, .40);

    color-scheme: light;
}

/* --------------------------------------------------------------------------
   3. Reset
   -------------------------------------------------------------------------- */
*,
*::before,
*::after {
    box-sizing: border-box;
}

* {
    margin: 0;
    padding: 0;
}

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--atlas-header-h) + 24px);
}

body {
    min-height: 100vh;
    background-color: var(--atlas-bg);
    color: var(--atlas-text);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 1rem;
    line-height: 1.7;
    letter-spacing: .01em;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
    transition: background-color var(--atlas-dur) var(--atlas-ease), color var(--atlas-dur) var(--atlas-ease);
}

body.is-locked {
    overflow: hidden;
}

img,
svg,
video,
canvas {
    display: block;
    max-width: 100%;
}

img {
    height: auto;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input,
select,
textarea {
    font: inherit;
    color: inherit;
}

button {
    background: none;
    border: 0;
    cursor: pointer;
}

ul,
ol {
    list-style: none;
    margin: 0;
    padding-left: 0;
}

/* Bootstrap's reboot sets `ol, ul { padding-left: 2rem }` and
   `p { margin-bottom: 1rem }`. Those element selectors out-rank the
   universal `*` reset above, so they are cancelled explicitly here. */
h1, h2, h3, h4, h5, h6,
p, figure, blockquote, pre, dl, dd {
    margin: 0;
}

hr {
    border: 0;
    border-top: 1px solid var(--atlas-line);
}

::selection {
    background: rgba(var(--atlas-primary-rgb), .32);
    color: var(--atlas-heading);
}

/* --------------------------------------------------------------------------
   4. Accessibility
   -------------------------------------------------------------------------- */
:focus-visible {
    outline: 2px solid var(--atlas-primary);
    outline-offset: 3px;
    border-radius: 4px;
}

.screen-reader-text,
.visually-hidden {
    position: absolute !important;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.skip-link {
    position: absolute;
    top: -120px;
    left: 16px;
    z-index: 2000;
    padding: 12px 20px;
    background: var(--atlas-primary);
    color: #0b0f14;
    font-weight: 700;
    border-radius: 0 0 10px 10px;
    transition: top .25s var(--atlas-ease);
}

.skip-link:focus {
    top: 0;
}

/* --------------------------------------------------------------------------
   5. Typography
   -------------------------------------------------------------------------- */
h1, h2, h3, h4, h5, h6,
.display-1, .display-2, .display-3 {
    font-family: 'Outfit', 'Inter', sans-serif;
    color: var(--atlas-heading);
    font-weight: 700;
    line-height: 1.12;
    letter-spacing: -.02em;
}

h1 { font-size: clamp(2.25rem, 5vw, 3.6rem); }
h2 { font-size: clamp(1.85rem, 3.6vw, 2.75rem); }
h3 { font-size: clamp(1.25rem, 2vw, 1.6rem); }
h4 { font-size: 1.125rem; }
h5 { font-size: 1rem; }

/* Balanced wrapping prevents lopsided headings such as
   "Let's Make Your Security a" / "Priority" */
h1, h2, h3, .cta-band__title, .hero__title, .section-head h2 {
    text-wrap: balance;
}

p {
    color: var(--atlas-text-soft);
}

.lead {
    font-size: clamp(1.02rem, 1.5vw, 1.2rem);
    color: var(--atlas-muted);
    line-height: 1.8;
}

.text-gradient {
    background: var(--atlas-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .28em;
    text-transform: uppercase;
    color: var(--atlas-primary);
    margin-bottom: 18px;
}

.eyebrow::before {
    content: '';
    width: 34px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--atlas-primary));
}

.eyebrow--center::after {
    content: '';
    width: 34px;
    height: 1px;
    background: linear-gradient(270deg, transparent, var(--atlas-primary));
}

.eyebrow--center {
    justify-content: center;
}

.text-center { text-align: center; }
.text-muted { color: var(--atlas-muted); }
.text-primary { color: var(--atlas-primary); }
.fw-600 { font-weight: 600; }
.fw-700 { font-weight: 700; }

/* --------------------------------------------------------------------------
   6. Layout primitives
   -------------------------------------------------------------------------- */
.container {
    width: 100%;
    max-width: var(--atlas-container);
    margin-inline: auto;
    padding-inline: var(--atlas-gutter);
}

.container--narrow {
    max-width: 860px;
}

.section {
    position: relative;
    padding-block: var(--atlas-section-y);
}

.section--tight {
    padding-block: clamp(56px, 6vw, 88px);
}

.section--alt {
    background-color: var(--atlas-bg-alt);
}

.section--surface {
    background-color: var(--atlas-surface);
}

.section-head {
    max-width: 720px;
    margin-bottom: clamp(40px, 5vw, 64px);
}

.section-head--center {
    margin-inline: auto;
    text-align: center;
}

.section-head p {
    margin-top: 18px;
}

.section-head--split {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 32px;
    max-width: none;
    flex-wrap: wrap;
}

.grid {
    display: grid;
    gap: 28px;
}

.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.row {
    display: flex;
    gap: 18px;
    flex-wrap: wrap;
    align-items: center;
}

.row--between { justify-content: space-between; }
.row--center { justify-content: center; }
.row--end { justify-content: flex-end; }

.stack {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.mt-0 { margin-top: 0; }
.mt-2 { margin-top: 12px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 36px; }
.mt-5 { margin-top: 52px; }
.mb-0 { margin-bottom: 0; }
.mb-2 { margin-bottom: 12px; }
.mb-3 { margin-bottom: 24px; }
.mb-4 { margin-bottom: 36px; }

/* --------------------------------------------------------------------------
   7. Decorative background layers
   -------------------------------------------------------------------------- */
.atlas-noise {
    position: fixed;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    opacity: .035;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
}

.atlas-glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(90px);
    pointer-events: none;
    z-index: 0;
}

.atlas-glow--gold {
    background: radial-gradient(circle, rgba(var(--atlas-primary-rgb), .22) 0%, transparent 68%);
}

.atlas-glow--cool {
    background: radial-gradient(circle, rgba(56, 132, 255, .12) 0%, transparent 68%);
}

/* --------------------------------------------------------------------------
   8. Scrollbar
   -------------------------------------------------------------------------- */
::-webkit-scrollbar {
    width: 11px;
    height: 11px;
}

::-webkit-scrollbar-track {
    background: var(--atlas-bg-alt);
}

::-webkit-scrollbar-thumb {
    background: var(--atlas-surface-3);
    border-radius: 99px;
    border: 3px solid var(--atlas-bg-alt);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--atlas-primary);
}

/* --------------------------------------------------------------------------
   9. Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 1080px) {
    .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 860px) {
    :root { --atlas-header-h: 72px; }

    .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .section-head--split { align-items: flex-start; }
}

@media (max-width: 620px) {
    :root { --atlas-gutter: 20px; }

    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: minmax(0, 1fr);
    }

    body { font-size: .97rem; }
}

/* --------------------------------------------------------------------------
   10. Print
   -------------------------------------------------------------------------- */
@media print {
    .atlas-header,
    .atlas-footer,
    .site-preloader,
    .btn,
    .theme-toggle {
        display: none !important;
    }

    body {
        background: #fff;
        color: #000;
    }
}
