/*  =================================================================================
    AGENTICSAFE.AI STYLESHEET
    Built in layers: tokens -> base -> nav -> hero -> sections.
    ================================================================================= */

/* ------------- DESIGN TOKENS ------------- */
:root {
    /* Brand colors (from brand guide) */
    --color-bg:         #081826; /* primary background */
    --color-bg-alt:     #072543; /* secondary background*/
    --color-accent:     #005a83; /* accent - fills & glows */
    --color-text:       #d3d5e0; /* primary text */

    /* Derived tones */
    --color-accent-bright:  #4ea9cf; /* lightened accent for text & links */
    --color-text-soft:      #8b94a6; /* dimmer text for secondary copy */
    --color-line:           rgba(211, 213, 224, 0.12); /* hairline borders */

    /* Typography */
    --font-heading: 'Roboto', sans-serif;
    --font-body:    'Archivo', sans-serif;

    /* Layout */
    --container-width: 1100px;
}

/* ------------- RESET ------------- */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* ------------- BASE ------------- */
html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    font-family: var(--font-body);
    font-size: 1.05rem;
    line-height: 1.65;
    color: var(--color-text);
    background-color: var(--color-bg);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

h1, h2, h3 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.15;
}

a {
    color: inherit;
    text-decoration: none;
}

ul {
    list-style: none;
}

img {
    display: block;
    max-width: 100%;
}

/* ------------- NAV ------------- */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    background-color: rgba(8, 24, 38, 0.85);
    backdrop-filter: blur(10px);
    -webkit-background-filter: blur(10px);
    border-bottom: 1px solid var(--color-line);
}

.nav__inner {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 1.1rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav__logo img {
    height: 32px;
    width: auto;
}

.nav__links {
    display: flex;
    gap: 2rem;
}

.nav__links a {
    font-size: 0.95rem;
    color: var(--color-text-soft);
    transition: color 0.2s ease;
}

.nav__links a:hover {
    color: var(--color-accent-bright)
}

/* ------------- HERO ------------- */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 9rem 0rem 5rem;
    background: linear-gradient(to bottom, var(--color-bg) 55%, var(--color-bg-alt) 100%);
    overflow: hidden;
}

.hero__canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    -webkit-mask-image: radial-gradient(ellipse 78% 72% at 50% 38%, #000 55%, transparent 100%);
    mask-image: radial-gradient(ellipse 78% 72% at 50% 38%, #000 55%, transparent 100%);
}

.hero__mark {
    position: absolute;
    top: calc(50% + 2.25rem);
    left: 50%;
    transform: translate(-50%, -50%);
    height: 78vmin;
    width: auto;
    z-index: 0;
    pointer-events: none;
    opacity: 0.40;
    -webkit-mask-image: radial-gradient(ellipse 66% 62% at 50% 50%, #000 40%, transparent 100%);
    mask-image: radial-gradient(ellipse 66% 62% at 50% 50%, #000 40%, transparent 100%);
}

.hero__mark path {
    fill: var(--color-accent-bright)
}

.hero__content {
    position: relative;
    z-index: 1;
    max-width: 920px;
    width: 100%;
    margin: 0 auto;
    text-align: center;
}

.eyebrow {
    font-family: var(--font-heading);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    margin-bottom: 1.25rem;
    position: relative;
}

.hero__title {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    letter-spacing: -0.02em;
    margin-bottom: 1.5rem;
    background-image: linear-gradient(to bottom, var(--color-text), var(--color-accent-bright) 400%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero__subtitle {
    font-family: var(--font-heading);
    font-weight: 400;
    font-size: 1.15rem;
    color: var(--color-text);
    max-width: 540px;
    margin: 0 auto 2.5rem;
    text-wrap: balance;
}

/* ------------- BUTTON ------------- */
.btn {
    display: inline-block;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--color-text);
    background-color: var(--color-accent);
    background-image: linear-gradient(to bottom, transparent, rgba(0, 0, 0, 0.3));
    padding: 0.9rem 1.8rem;
    border-radius: 6px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 90, 131, 0.5);
}

/* ------------- LAYOUT ------------- */
.container {
    max-width: var(--container-width);
    width: 100%;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* ------------- SECTIONS ------------- */
.section {
    padding: 6rem 0;
}

.section--alt {
    background-color: var(--color-bg-alt);
}

.section__title {
    font-size: clamp(2rem, 4vw, 3rem);
    letter-spacing: -0.02em;
    margin-bottom: 1.5rem;
    max-width: 16ch;
}

.section__lead {
    font-size: 1.2rem;
    color: var(--color-text-soft);
    max-width: 620px;
}

#about {
    background: linear-gradient(to bottom, var(--color-bg-alt) 55%, var(--color-bg) 100%);
}

.about__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem 5rem;
    align-items: start;
}

.about__left .section__title {
    max-width: 18ch;
}

.about__left .section__lead {
    color: var(--color-text);
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    line-height: 1.3;
    margin-top: 0.5rem;
    max-width: 620px;
}

.about__body {
    margin-top: 1.25rem;
    color: var(--color-text-soft);
    font-size: 1.05rem;
    max-width: 42ch;
}

.about__arch-title {
    font-size: 1.4rem;
    margin-bottom: 0.25rem;
}

.about__arch-title {
    font-size: 1.4rem;
    margin-bottom: 0.25rem;
    margin-top: 0.5rem;
}

.about__arch-sub {
    font-size: 0.8rem;
    font-family: var(--font-heading);
    font-weight: 700;
    letter-spacing: 0.13em;
    text-transform: uppercase;
    color: var(--color-accent-bright);
    margin-bottom: 1.5rem;
}

.about__arch-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.about__arch-list li {
    padding-left: 1.1rem;
    border-left: 2px solid var(--color-accent);
    color: var(--color-text-soft);
    font-size: 1rem;
    line-height: 1.6;
}

.about__arch-list li strong {
    display: block;
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--color-text);
    margin-bottom: 0.2rem;
}

@media (max-width: 760px) {
    .about__grid {
        grid-template-columns: 1fr;
    }
}

.capabilities__label {
    font-family: var(--font-heading);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--color-accent-bright);
    margin-top: 1rem;
}

#capabilities .section__title {
    max-width: none;
}

/* ------------- CAPABILITY CARDS ------------- */
.cards {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 3rem;
}

.cards .card {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--color-line);
    border-radius: 14px;
    padding: 2rem 2.5rem;
    min-height: 160px;
    background-color: var(--color-bg-alt);
    background-image: radial-gradient(130% 90% at 100% 0%, rgba(78, 169, 207, 0.10), rgba(78, 169, 207, 0) 55%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 14px 34px rgba(0, 0, 0, 0.35);
    transition: opacity 0.6s ease, transform 0.5s ease, border-color 0.25s ease, box-shadow 0.3s ease;
}

@media (prefers-reduced-motion: reduce) {
    .cards .card { transition: none; }
}

.cards .card:hover {
    transform: translateY(-3px);
    border-color: var(--color-accent);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.09), 0 22px 50px rgba(0, 90, 131, 0.32);
}

.cards .card:hover .card__num {
    opacity: 0.18;
}

.card--horizontal {
    display: flex;
    align-items: stretch;
    gap: 2rem;
}

.card__content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    justify-content: center;
}

.card__num {
    flex-shrink: 0;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 5rem;
    line-height: 1;
    letter-spacing: -0.03em;
    color: var(--color-accent-bright);
    opacity: 0.08;
    transition: opacity 0.3s ease;
    pointer-events: none;
    user-select: none;
}

.card__title {
    font-size: 1.3rem;
    margin-bottom: 0;
}

.card__body {
    font-size: 0.875rem;
    line-height: 1.65;
    color: var(--color-text-soft);
    font-weight: 400;
    opacity: 0.65;
    margin-bottom: 0;
}

.card__body--vector {
    font-size: 1rem;
    line-height: 1.6;
    color: var(--color-text);
    font-weight: 500;
    margin-bottom: 0;
}

@media (max-width: 640px) {
    .card__num {
        display: none;
    }
}

/* ------------- FOOTER ------------- */
.footer {
    background-color: var(--color-bg);
    border-top: 1px solid var(--color-line);
    padding: 4rem 0 2.5rem;
}

.footer__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1.5rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--color-line);
}

.footer__logo img {
    height: 32px;
    width: auto;
}

.footer__nav {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
}

.footer__nav a {
    font-size: 0.95rem;
    color: var(--color-text-soft);
    transition: color 0.2s ease;
}

.footer__nav a:hover {
    color: var(--color-accent-bright);
}

.footer__meta {
    margin-top: 2rem;
    font-size: 0.9rem;
    color: var(--color-text-soft);
}

/* ------------- SCROLL REVEAL ------------- */
[data-reveal] {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

[data-reveal].is-visible {
    opacity: 1;
    transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
    [data-reveal] {
        opacity: 1;
        transform: none;
        transition: none;
    }
}

/* ------------- CONTACT ------------- */
#contact {
    position: relative;
    overflow-x: hidden;
    background: linear-gradient(to bottom, var(--color-bg) 55%, var(--color-bg-alt) 100%);
}

.contact__mark {
    position: absolute;
    right: 5%;
    top: 0;
    bottom: 0;
    width: auto;
    max-height: 100%;
    opacity: 0.07;
    pointer-events: none;
    z-index: 0;
    display: flex;
    align-items: center;
}

[data-reveal-mark] {
    opacity: 0;
    transition: opacity 1.2s ease;
}

[data-reveal-mark].is-visible {
    opacity: 0.07;
}

.contact__mark svg {
    height: 80%;
    width: auto;
}

.contact__mark path {
    fill: var(--color-accent-bright);
}

.contact__grid {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem 4rem;
    align-items: start;
    margin-top: 2rem;
}

@media (max-width: 760px) {
    .contact__grid {
        grid-template-columns: 1fr;
    }

    .contact__mark {
        width: 300px;
        right: -15%;
        opacity: 0.03;
    }
}

.contact__form-shell {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.form-field {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.form-label {
    font-family: var(--font-heading);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--color-text-soft);
}

.form-input {
    font-family: var(--font-body);
    font-size: 1rem;
    color: var(--color-text);
    background-color: var(--color-bg-alt);
    border: 1px solid var(--color-line);
    border-radius: 6px;
    padding: 0.75rem 1rem;
    width: 100%;
    transition: border-color 0.2s ease;
}

.form-input::placeholder {
    color: var(--color-text-soft);
    opacity: 0.7;
}

.form-input:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.form-row {
    display: flex;
    gap: 1.25rem;
}

.form-row .form-field {
    flex: 1;
}

.form-required {
    color: var(--color-accent-bright);
}

.form-input--textarea {
    min-height: 120px;
    resize: vertical;
}

.form-input:focus {
    outline: none;
    border-color: var(--color-accent-bright);
}

.btn--submit {
    align-self: flex-start;
    border: none;
    cursor: pointer;
}

.btn--submit:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.contact__note {
    font-size: 0.85rem;
    color: var(--color-text-soft);
    min-height: 1.2em;
}

.contact__note--ok {
    color: var(--color-accent-bright);
}

.contact__note--err {
    color: #e06c6c;
}

/* ------------- RESPONSIVE ------------- */
@media (max-width: 640px) {
    .nav__inner {
        padding: 1rem 1.25rem;
    }
    .nav__links {
        gap: 1rem;
    }
    .nav__links a {
        font-size: 0.85rem;
    }
    .nav__logo img {
        height: 28px;
    }
    .form-row {
        flex-direction: column;
        gap: 1.25rem;
    }
}