@font-face {
    font-family: 'DM Serif Display';
    src: url('fonts/DMSerifDisplay-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'DM Serif Display';
    src: url('fonts/DMSerifDisplay-Italic.ttf') format('truetype');
    font-weight: 400;
    font-style: italic;
    font-display: swap;
}
@font-face {
    font-family: 'DM Sans';
    src: url('fonts/DMSans-VariableFont_opsz_wght.ttf') format('truetype');
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
}

:root {
    --navy:   #0B1829;
    --slate:  #8A9AA6;
    --white:  #FFFFFF;
    --bg:     #F4F5F7;
    --border: rgba(138, 154, 166, 0.18);
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    font-family: 'DM Sans', sans-serif;
    background: var(--bg);
    color: var(--navy);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ─── NAV ─────────────────────────────────── */
nav {
    position: sticky;
    top: 0;
    z-index: 100;
    height: 72px;
    padding: 0 4rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(244, 245, 247, 0.94);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 11px;
    text-decoration: none;
}

.brand-mark { width: 42px; height: 42px; }

.nav-brand-text { display: flex; flex-direction: column; gap: 1px; }

.brand-name {
    font-family: 'DM Sans', sans-serif;
    font-weight: 500;
    font-size: 0.82rem;
    letter-spacing: 0.2em;
    color: var(--navy);
}

.brand-tagline {
    font-size: 0.62rem;
    color: var(--slate);
    letter-spacing: 0.06em;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 2.5rem;
    list-style: none;
}

.nav-links a {
    text-decoration: none;
    color: var(--slate);
    font-size: 0.88rem;
    font-weight: 400;
    transition: color 0.18s;
}

.nav-links a:hover { color: var(--navy); }
.nav-links .btn-solid:hover { color: var(--white); }

/* ─── BUTTONS ─────────────────────────────── */
.btn {
    display: inline-block;
    text-decoration: none;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.88rem;
    font-weight: 500;
    padding: 0.65rem 1.5rem;
    cursor: pointer;
    border: none;
    transition: opacity 0.18s, background 0.18s, color 0.18s;
}

.btn-solid {
    background: var(--navy);
    color: var(--white);
}

.btn-solid:hover { opacity: 0.82; }

.btn-outline {
    background: transparent;
    color: var(--navy);
    border: 1.5px solid var(--navy);
}

.btn-outline:hover {
    background: var(--navy);
    color: var(--white);
}

/* ─── HERO ────────────────────────────────── */
.hero {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 4rem;
    max-width: 1300px;
    margin: 0 auto;
    padding: 7rem 4rem 6rem;
    min-height: calc(100vh - 72px);
}

.hero-content { max-width: 540px; }

.hero-title {
    font-family: 'DM Serif Display', serif;
    font-size: clamp(3.2rem, 5.5vw, 5rem);
    font-weight: 400;
    line-height: 1.05;
    color: var(--navy);
    margin-bottom: 1.6rem;
    letter-spacing: -0.01em;
    animation: fadeUp 0.75s ease both;
}

.hero-sub {
    font-size: 1rem;
    line-height: 1.75;
    color: var(--slate);
    font-weight: 300;
    margin-bottom: 2.5rem;
    max-width: 460px;
    animation: fadeUp 0.75s 0.12s ease both;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    animation: fadeUp 0.75s 0.22s ease both;
}

.hero-visual {
    display: flex;
    justify-content: center;
    align-items: center;
    animation: fadeIn 1.1s 0.3s ease both;
}

.hero-mark {
    width: min(400px, 42vw);
    height: min(400px, 42vw);
}

/* ─── SERVICES ────────────────────────────── */
#services {
    background: var(--white);
    padding: 6rem 4rem;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-title {
    font-family: 'DM Serif Display', serif;
    font-size: clamp(2rem, 3.5vw, 3rem);
    font-weight: 400;
    color: var(--navy);
    margin-bottom: 0.6rem;
}

.section-sub {
    font-size: 0.92rem;
    color: var(--slate);
    font-weight: 300;
    letter-spacing: 0.01em;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
}

.service-card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 2rem 1.75rem;
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.service-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 40px rgba(11, 24, 41, 0.07);
}

.service-icon {
    width: 48px;
    height: 48px;
    background: rgba(138, 154, 166, 0.14);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.25rem;
}

.service-icon svg {
    width: 22px;
    height: 22px;
    stroke: var(--navy);
    fill: none;
    stroke-width: 1.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.service-title {
    font-family: 'DM Serif Display', serif;
    font-size: 1.2rem;
    font-weight: 400;
    color: var(--navy);
    margin-bottom: 0.75rem;
    line-height: 1.25;
}

.service-desc {
    font-size: 0.85rem;
    line-height: 1.7;
    color: var(--slate);
    font-weight: 300;
}

/* ─── CREDENTIAL BAND ─────────────────────── */
.credential-band {
    background: linear-gradient(130deg, var(--navy) 0%, #1c3550 60%, #2a4a68 100%);
    padding: 5.5rem 4rem;
    text-align: center;
}

.credential-statement {
    font-family: 'DM Serif Display', serif;
    font-size: clamp(1.3rem, 2.4vw, 1.9rem);
    font-weight: 400;
    color: var(--white);
    opacity: 0.95;
    max-width: 760px;
    margin: 0 auto;
    line-height: 1.65;
    letter-spacing: 0.01em;
}

/* ─── WHY CIPHERON ────────────────────────── */
#about {
    padding: 6rem 4rem;
    background: var(--bg);
}

.why-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 3.5rem;
    max-width: 1000px;
    margin: 0 auto;
    text-align: center;
}

.why-item-title {
    font-family: 'DM Serif Display', serif;
    font-size: 1.4rem;
    font-weight: 400;
    color: var(--navy);
    margin-bottom: 0.75rem;
}

.why-item-desc {
    font-size: 0.875rem;
    line-height: 1.75;
    color: var(--slate);
    font-weight: 300;
}

/* ─── CTA ─────────────────────────────────── */
.cta-section {
    padding: 2rem 4rem 5rem;
    background: var(--bg);
}

.cta-box {
    max-width: 820px;
    margin: 0 auto;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 4.5rem 4rem;
    text-align: center;
}

.cta-title {
    font-family: 'DM Serif Display', serif;
    font-size: clamp(1.8rem, 3vw, 2.6rem);
    font-weight: 400;
    color: var(--navy);
    margin-bottom: 0.85rem;
}

.cta-sub {
    font-size: 0.95rem;
    color: var(--slate);
    font-weight: 300;
    margin-bottom: 2.25rem;
}

/* ─── FOOTER ──────────────────────────────── */
footer {
    background: var(--bg);
    border-top: 1px solid var(--border);
    padding: 1.75rem 4rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.footer-mark { width: 34px; height: 34px; }

.footer-brand-name {
    font-family: 'DM Sans', sans-serif;
    font-weight: 500;
    font-size: 0.75rem;
    letter-spacing: 0.2em;
    color: var(--navy);
    display: block;
}

.footer-brand-tagline {
    font-size: 0.58rem;
    color: var(--slate);
    letter-spacing: 0.05em;
    display: block;
}

.footer-copy {
    font-size: 0.78rem;
    color: var(--slate);
}

/* ─── ANIMATIONS ──────────────────────────── */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(22px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

/* ─── RESPONSIVE ──────────────────────────── */
@media (max-width: 1024px) {
    .services-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 860px) {
    nav { padding: 0 2rem; }
    .hero {
        grid-template-columns: 1fr;
        padding: 4rem 2rem 3rem;
        min-height: auto;
    }
    .hero-visual { display: none; }
    .why-grid { grid-template-columns: 1fr; gap: 2.5rem; }
    #services, #about, .credential-band, .cta-section { padding: 4rem 2rem; }
    .cta-box { padding: 3rem 2rem; }
    footer { padding: 1.75rem 2rem; flex-direction: column; gap: 1rem; text-align: center; }
}

@media (max-width: 600px) {
    .services-grid { grid-template-columns: 1fr; }
}

/* ─── HAMBURGER ───────────────────────────── */
.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 24px;
    height: 18px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
}

.nav-toggle span {
    display: block;
    width: 100%;
    height: 2px;
    background: var(--navy);
    transition: transform 0.22s ease, opacity 0.22s ease;
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] span:nth-child(2) {
    opacity: 0;
}

.nav-toggle[aria-expanded="true"] span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

@media (max-width: 600px) {
    .nav-toggle { display: flex; }

    .nav-links {
        display: none;
        position: absolute;
        top: 72px;
        left: 0;
        right: 0;
        background: var(--bg);
        border-bottom: 1px solid var(--border);
        flex-direction: column;
        align-items: flex-start;
        padding: 1.5rem 2rem;
        gap: 1.25rem;
        z-index: 99;
    }

    .nav-links.open { display: flex; }

    .nav-links li { display: block; width: 100%; }

    .nav-links .btn-solid {
        display: block;
        text-align: center;
        width: 100%;
    }
}
