/* ═══════════════════════════════════════════════
   CICADA TECHNOLOGIES — Holographic + Da Vinci
   Primaries: Black #000 & White #fff
   Accents: Chromatic holographic + Renaissance elegance
   ═══════════════════════════════════════════════ */

/* ── Custom Properties ── */
@property --angle {
    syntax: '<angle>';
    initial-value: 0deg;
    inherits: false;
}

:root {
    --bg: #000;
    --fg: #fff;
    --fg-dim: rgba(255, 255, 255, .55);
    --fg-muted: rgba(255, 255, 255, .25);
    --surface: rgba(255, 255, 255, .03);
    --border: rgba(255, 255, 255, .08);
    --radius: 16px;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-display: 'Cormorant Garamond', 'Georgia', 'Times New Roman', serif;

    /* pointer position (set by JS) */
    --mx: 50%;
    --my: 50%;

    /* chromatic palette for holographic gradients */
    --holo: conic-gradient(from var(--angle),
            #ff0044 0deg,
            #ff7700 60deg,
            #ffdd00 120deg,
            #00ff88 180deg,
            #0088ff 240deg,
            #aa00ff 300deg,
            #ff0044 360deg);
}

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

/* ── Global ── */
html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
}

body {
    font-family: var(--font-body);
    background: var(--bg);
    color: var(--fg);
    line-height: 1.7;
    overflow-x: hidden;
}

::selection {
    background: rgba(255, 255, 255, .15);
    color: #fff;
}

/* ── Scrollbar ── */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--fg-muted);
    border-radius: 3px;
}

/* ═══════════════════════════════════════════════
   DA VINCI BACKGROUND GEOMETRY
   ═══════════════════════════════════════════════ */
.davinci-bg {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100vmax;
    height: 100vmax;
    z-index: 0;
    pointer-events: none;
    opacity: 1;
    animation: slowSpin 120s linear infinite;
}

@keyframes slowSpin {
    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

/* ═══════════════════════════════════════════════
   CODEX DIVIDERS
   ═══════════════════════════════════════════════ */
.codex-divider {
    display: flex;
    justify-content: center;
    padding: 0.5rem 2rem;
}

.codex-divider svg {
    width: 280px;
    height: 20px;
}

/* ═══════════════════════════════════════════════
   NAVIGATION
   ═══════════════════════════════════════════════ */
nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 3rem;
    backdrop-filter: blur(16px) saturate(140%);
    -webkit-backdrop-filter: blur(16px) saturate(140%);
    background: rgba(0, 0, 0, .6);
    border-bottom: 1px solid var(--border);
    transition: background .3s;
}

nav.scrolled {
    background: rgba(0, 0, 0, .85);
}

.nav-wordmark {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 600;
    letter-spacing: .25em;
    color: var(--fg);
    text-decoration: none;
}

.nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-links a {
    font-size: .8rem;
    font-weight: 500;
    letter-spacing: .08em;
    color: var(--fg-dim);
    text-decoration: none;
    text-transform: uppercase;
    transition: color .25s;
}

.nav-links a:hover {
    color: var(--fg);
}

.nav-cta {
    position: relative;
    padding: .45rem 1.2rem;
    border-radius: 100px;
    overflow: hidden;
}

.nav-cta::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1px;
    background: var(--holo);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    animation: spin 4s linear infinite;
    opacity: .7;
}

/* ═══════════════════════════════════════════════
   HERO
   ═══════════════════════════════════════════════ */
#hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 6rem 2rem;
    position: relative;
    overflow: hidden;
}

/* Subtle holographic shimmer behind the hero */
#hero::before {
    content: '';
    position: absolute;
    width: 140%;
    height: 140%;
    top: -20%;
    left: -20%;
    background: var(--holo);
    filter: blur(120px);
    opacity: .07;
    animation: spin 20s linear infinite;
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero-annotation {
    font-family: var(--font-display);
    font-style: italic;
    font-size: clamp(.85rem, 1.5vw, 1.05rem);
    color: var(--fg-muted);
    letter-spacing: .12em;
    margin-bottom: 1.5rem;
}

.hero-title {
    display: flex;
    flex-direction: column;
    gap: 0;
    line-height: 1;
}

.hero-title .holo-text {
    font-family: var(--font-display);
    font-size: clamp(3.5rem, 10vw, 9rem);
    font-weight: 700;
    letter-spacing: .02em;
    text-transform: uppercase;
}

.hero-tagline {
    font-size: clamp(1rem, 2vw, 1.35rem);
    font-weight: 300;
    letter-spacing: .15em;
    color: var(--fg-dim);
    margin-top: 1.5rem;
    text-transform: uppercase;
}

.hero-line {
    width: 60px;
    height: 2px;
    margin: 2.5rem auto 0;
    background: var(--holo);
    animation: spin 4s linear infinite;
    border-radius: 2px;
}

/* ═══════════════════════════════════════════════
   HOLOGRAPHIC TEXT
   ═══════════════════════════════════════════════ */
.holo-text {
    background: linear-gradient(90deg,
            #fff 0%,
            #ff0044 15%,
            #ffdd00 30%,
            #00ff88 45%,
            #0088ff 60%,
            #aa00ff 75%,
            #fff 100%);
    background-size: 300% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: holoShift 6s linear infinite;
}

.holo-text-subtle {
    background: linear-gradient(90deg,
            rgba(255, 255, 255, .9),
            rgba(255, 0, 68, .6),
            rgba(0, 255, 136, .6),
            rgba(0, 136, 255, .6),
            rgba(255, 255, 255, .9));
    background-size: 300% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: holoShift 8s linear infinite;
}

@keyframes holoShift {
    0% {
        background-position: 0% 50%;
    }

    100% {
        background-position: 300% 50%;
    }
}

/* ═══════════════════════════════════════════════
   SECTIONS
   ═══════════════════════════════════════════════ */
section {
    position: relative;
    z-index: 1;
    padding: 8rem 2rem;
}

.section-inner {
    max-width: 1100px;
    margin: 0 auto;
}

.section-number {
    display: block;
    font-family: var(--font-display);
    font-size: .95rem;
    font-weight: 400;
    font-style: italic;
    letter-spacing: .2em;
    color: var(--fg-muted);
    margin-bottom: .75rem;
}

section h2 {
    font-family: var(--font-display);
    font-size: clamp(2rem, 4vw, 3.2rem);
    font-weight: 600;
    letter-spacing: .02em;
    margin-bottom: 2rem;
}

/* ── About ── */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 4rem;
    align-items: start;
}

.about-text p {
    color: var(--fg-dim);
    font-size: 1.1rem;
    margin-bottom: 1.25rem;
}

.codex-note {
    font-family: var(--font-display);
    font-size: 1rem;
    color: var(--fg-muted) !important;
    letter-spacing: .04em;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
}

/* ── Services ── */
.section-header {
    margin-bottom: 3.5rem;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

/* ── Vision ── */
.vision-block blockquote {
    font-family: var(--font-display);
    font-size: clamp(1.5rem, 3vw, 2.6rem);
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 2rem;
    font-style: italic;
}

.vision-block>p {
    color: var(--fg-dim);
    font-size: 1.1rem;
    max-width: 640px;
}

/* ── Contact ── */
#contact {
    text-align: center;
}

.contact-block h2 {
    margin-bottom: 1rem;
}

.contact-block>p {
    color: var(--fg-dim);
    font-size: 1.15rem;
    margin-bottom: 2.5rem;
}

/* ═══════════════════════════════════════════════
   HOLOGRAPHIC CARD
   ═══════════════════════════════════════════════ */
.holo-card {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    transition: transform .35s cubic-bezier(.4, 0, .2, 1);
}

.holo-card:hover {
    transform: translateY(-4px) scale(1.015);
}

/* Animated holographic border */
.holo-card-border {
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1px;
    background: var(--holo);
    animation: spin 4s linear infinite;
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: .45;
    transition: opacity .35s;
}

.holo-card:hover .holo-card-border {
    opacity: .9;
}

/* Pointer-follow holographic shimmer inside card */
.holo-card::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: radial-gradient(600px circle at var(--mx) var(--my),
            rgba(255, 255, 255, .04),
            transparent 40%);
    pointer-events: none;
}

.holo-card-content {
    position: relative;
    z-index: 1;
    padding: 2.5rem;
    background: var(--surface);
    border-radius: inherit;
}

.card-numeral {
    display: block;
    font-family: var(--font-display);
    font-style: italic;
    font-size: .85rem;
    color: var(--fg-muted);
    letter-spacing: .15em;
    margin-bottom: .75rem;
}

.holo-card-content h3 {
    font-family: var(--font-display);
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: .75rem;
    letter-spacing: .01em;
}

.holo-card-content p {
    color: var(--fg-dim);
    font-size: .95rem;
    line-height: 1.7;
}

/* ═══════════════════════════════════════════════
   HOLOGRAPHIC BUTTON
   ═══════════════════════════════════════════════ */
.holo-button {
    display: inline-block;
    position: relative;
    padding: 1rem 2.5rem;
    border-radius: 100px;
    text-decoration: none;
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 500;
    letter-spacing: .04em;
    color: var(--fg);
    overflow: hidden;
    transition: transform .3s;
}

.holo-button:hover {
    transform: scale(1.04);
}

.holo-button::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1.5px;
    background: var(--holo);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    animation: spin 3s linear infinite;
}

.holo-button span {
    position: relative;
    z-index: 1;
}

/* ═══════════════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════════════ */
footer {
    position: relative;
    z-index: 1;
    padding: 3rem 2rem;
    border-top: 1px solid var(--border);
}

.footer-inner {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-brand {
    font-family: var(--font-display);
    font-size: .8rem;
    font-weight: 600;
    letter-spacing: .3em;
    color: var(--fg-muted);
}

.footer-copy {
    font-size: .75rem;
    color: var(--fg-muted);
}

/* ═══════════════════════════════════════════════
   ANIMATIONS
   ═══════════════════════════════════════════════ */
@keyframes spin {
    to {
        --angle: 360deg;
    }
}

/* ── Scroll Reveal ── */
[data-reveal] {
    opacity: 0;
    transform: translateY(32px);
    transition: opacity .7s cubic-bezier(.4, 0, .2, 1), transform .7s cubic-bezier(.4, 0, .2, 1);
}

[data-reveal].visible {
    opacity: 1;
    transform: translateY(0);
}

/* stagger children */
[data-reveal]:nth-child(2) {
    transition-delay: .1s;
}

[data-reveal]:nth-child(3) {
    transition-delay: .2s;
}

[data-reveal]:nth-child(4) {
    transition-delay: .3s;
}

/* ═══════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════ */
@media (max-width: 768px) {
    nav {
        padding: 1rem 1.5rem;
    }

    .nav-links {
        gap: 1.25rem;
    }

    .nav-links a {
        font-size: .7rem;
    }

    section {
        padding: 5rem 1.25rem;
    }

    .about-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .services-grid {
        grid-template-columns: 1fr;
    }

    .holo-card-content {
        padding: 1.75rem;
    }

    .footer-inner {
        flex-direction: column;
        gap: .75rem;
        text-align: center;
    }

    .codex-divider svg {
        width: 180px;
    }
}

/* ═══════════════════════════════════════════════
   REDUCED MOTION
   ═══════════════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    [data-reveal] {
        opacity: 1;
        transform: none;
    }

    .davinci-bg {
        animation: none;
    }
}