/* ==========================================================
   READY — Agentic Intelligence Consulting
   ========================================================== */

:root {
    --orange: #FF472E;
    --warm: #F5F2ED;
    --dark: #1C1917;
    --text: #1A1A1A;
    --font: 'Bricolage Grotesque', sans-serif;
    --mono: 'JetBrains Mono', monospace;
}


/* --- Reset --- */

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

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    font-family: var(--font);
    color: var(--text);
    line-height: 1.6;
    font-size: 16px;
    background: var(--dark);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    overflow-x: hidden;
    cursor: none;
}


/* --- Noise overlay --- */

.noise {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    pointer-events: none;
    opacity: 0.03;
    mix-blend-mode: overlay;
}


/* --- Skip link --- */

.skip-to-content {
    position: absolute;
    left: -9999px;
    top: auto;
    width: 1px;
    height: 1px;
    overflow: hidden;
    text-decoration: none;
}

.skip-to-content:focus {
    position: fixed;
    left: 16px;
    top: 16px;
    width: auto;
    height: auto;
    padding: 12px 20px;
    background: var(--text);
    color: var(--warm);
    font-size: 0.85rem;
    z-index: 10000;
    border-radius: 4px;
}


/* --- Cursor --- */

.cursor-dot {
    position: fixed;
    left: 0;
    top: 0;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #fff;
    mix-blend-mode: difference;
    pointer-events: none;
    z-index: 9990;
    transform: translate(-50%, -50%);
    opacity: 0;
    transition: opacity 0.3s ease;
    will-change: left, top;
}

body.loaded .cursor-dot {
    opacity: 0.85;
}

@media (hover: none) {
    .cursor-dot { display: none; }
    body { cursor: auto; }
}


/* ==========================================================
   HERO
   ========================================================== */

.hero {
    min-height: 100vh;
    background: var(--orange);
    display: flex;
    flex-direction: column;
    padding: 48px;
    position: relative;
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 15% 85%, rgba(0,0,0,0.06) 0%, transparent 50%),
        radial-gradient(ellipse at 85% 15%, rgba(255,255,255,0.04) 0%, transparent 45%);
    pointer-events: none;
}

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

.hero-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.brand {
    font-family: var(--mono);
    font-size: 0.9rem;
    font-weight: 500;
    letter-spacing: 0.22em;
    color: rgba(0, 0, 0, 0.85);
    text-transform: uppercase;
}

.hero-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
    font-family: var(--mono);
    font-size: 0.78rem;
    color: rgba(0, 0, 0, 0.55);
    letter-spacing: 0.02em;
}

.hero-heading {
    margin-top: auto;
    padding-bottom: 8vh;
    font-weight: 300;
    font-size: clamp(3rem, 8vw, 7rem);
    line-height: 1.0;
    letter-spacing: -0.03em;
    color: rgba(0, 0, 0, 0.85);
    text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.04);
}

.hero-line {
    display: block;
}

.hero-line--light {
    color: rgba(255, 255, 255, 0.6);
}


/* ==========================================================
   CONTENT — The Takeover
   ========================================================== */

.content {
    background: var(--dark);
    position: relative;
    overflow: hidden;
}


/* --- Ambient terminal stream --- */

.terminal-stream {
    position: absolute;
    inset: 0;
    overflow: hidden;
    z-index: 1;
    pointer-events: none;
    mask-image: linear-gradient(to bottom, transparent 0%, black 10%, black 90%, transparent 100%);
    -webkit-mask-image: linear-gradient(to bottom, transparent 0%, black 10%, black 90%, transparent 100%);
}

.terminal-stream-track {
    font-family: var(--mono);
    font-size: clamp(1.8rem, 3vw, 3rem);
    line-height: 2.4;
    color: rgba(245, 242, 237, 0.04);
    white-space: nowrap;
    animation: streamDrift 120s linear infinite;
    will-change: transform;
}

.terminal-stream-track p {
    margin: 0;
}

@keyframes streamDrift {
    0% { transform: translateY(0); }
    100% { transform: translateY(-50%); }
}


/* --- Content foreground --- */

.content-inner {
    max-width: 900px;
    margin: 0 auto;
    padding: 140px 48px 100px;
    position: relative;
    z-index: 2;
}


/* --- Statement --- */

.statement {
    font-weight: 300;
    font-size: clamp(2.4rem, 5vw, 4rem);
    line-height: 1.15;
    letter-spacing: -0.03em;
    color: var(--warm);
    max-width: 720px;
    margin-bottom: 140px;
    min-height: 1.15em;
}

/* Phase 1: mono typing */
.statement.typing {
    font-family: var(--mono);
    font-weight: 400;
    font-size: clamp(1.4rem, 2.8vw, 2.2rem);
    letter-spacing: -0.01em;
    line-height: 1.3;
}

.statement .stmt-cursor {
    display: inline-block;
    width: 0.55em;
    height: 1.1em;
    background: var(--warm);
    vertical-align: text-bottom;
    margin-left: 2px;
    animation: blink 1s step-end infinite;
}

/* Phase 2: morph to display */
.statement.morphing {
    transition: font-size 0.6s cubic-bezier(0.16, 1, 0.3, 1),
                font-weight 0.6s cubic-bezier(0.16, 1, 0.3, 1),
                letter-spacing 0.6s cubic-bezier(0.16, 1, 0.3, 1),
                line-height 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    font-family: var(--font);
    font-weight: 300;
    font-size: clamp(2.4rem, 5vw, 4rem);
    letter-spacing: -0.03em;
    line-height: 1.15;
}


/* --- Services --- */

.services {
    display: flex;
    flex-direction: column;
    gap: 72px;
    margin-bottom: 80px;
}

.service-name {
    font-family: var(--font);
    font-size: clamp(1.5rem, 2.2vw, 1.9rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--warm);
    margin-bottom: 12px;
    line-height: 1.15;
}

.service-desc {
    font-family: var(--mono);
    font-weight: 400;
    font-size: 0.85rem;
    line-height: 1.8;
    letter-spacing: 0.01em;
    color: rgba(245, 242, 237, 0.5);
    max-width: 520px;
}


/* --- Aside (comment style) --- */

.aside {
    font-family: var(--mono);
    font-size: 0.78rem;
    line-height: 1.75;
    letter-spacing: 0.01em;
    color: rgba(245, 242, 237, 0.25);
    max-width: 520px;
}


/* --- End prompt --- */

.content-prompt {
    margin-top: 100px;
    font-family: var(--mono);
    font-size: 0.85rem;
    color: rgba(245, 242, 237, 0.25);
    display: flex;
    align-items: center;
}

.content-prompt .prompt-user { color: rgba(167, 243, 208, 0.3); font-weight: 500; }
.content-prompt .prompt-sep,
.content-prompt .prompt-dir { color: rgba(245, 242, 237, 0.15); }
.content-prompt .prompt-symbol { color: rgba(245, 242, 237, 0.15); margin-right: 8px; }

.terminal-cursor {
    background-color: rgba(245, 242, 237, 0.35);
    width: 7px;
    height: 1.15em;
    display: inline-block;
    vertical-align: middle;
    margin-left: 2px;
    animation: blink 1s step-end infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}


/* ==========================================================
   FOOTER
   ========================================================== */

.footer {
    background: var(--orange);
    padding: 48px;
    position: relative;
}

.footer::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 30% 50%, rgba(0,0,0,0.04) 0%, transparent 50%);
    pointer-events: none;
}

.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    position: relative;
    z-index: 2;
}

.footer-left {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.footer .brand {
    font-size: 0.9rem;
}

.footer-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
}

.footer-detail {
    font-family: var(--mono);
    font-size: 0.78rem;
    color: rgba(0, 0, 0, 0.5);
    letter-spacing: 0.03em;
}


/* ==========================================================
   ANIMATIONS
   ========================================================== */

/* Hero load sequence */
.hero-top,
.hero-heading .hero-line {
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

body.loaded .hero-top {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0.1s;
}

body.loaded .hero-heading .hero-line:nth-child(1) {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0.3s;
}

body.loaded .hero-heading .hero-line:nth-child(2) {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0.5s;
}

/* Scroll reveals */
.reveal {
    opacity: 0;
    transform: translateY(14px);
    transition: opacity 0.65s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.65s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

.service.reveal:nth-child(2) { transition-delay: 0.1s; }
.service.reveal:nth-child(3) { transition-delay: 0.2s; }


/* ==========================================================
   RESPONSIVE — Tablet (<=1024px)
   ========================================================== */

@media (max-width: 1024px) {
    .hero {
        padding: 40px 32px;
    }

    .content-inner {
        padding: 100px 32px 80px;
    }

    .statement {
        margin-bottom: 100px;
    }

    .services {
        gap: 56px;
    }

    .footer {
        padding: 40px 32px;
    }
}


/* ==========================================================
   RESPONSIVE — Mobile (<=640px)
   ========================================================== */

@media (max-width: 640px) {
    .hero {
        min-height: 85vh;
        padding: 28px 20px;
    }

    .hero-heading {
        font-size: clamp(2.4rem, 10vw, 3.5rem);
        padding-bottom: 6vh;
    }

    .content-inner {
        padding: 64px 20px 56px;
    }

    .statement {
        font-size: clamp(1.7rem, 7vw, 2.4rem);
        margin-bottom: 72px;
    }

    .services {
        gap: 48px;
        margin-bottom: 56px;
    }

    .service-name {
        font-size: clamp(1.25rem, 5vw, 1.5rem);
    }

    .service-desc {
        font-size: 0.8rem;
    }

    .terminal-stream-track {
        font-size: 1.4rem;
    }

    .footer {
        padding: 32px 20px;
    }

    .cursor-dot { display: none; }
    body { cursor: auto; }
}


/* ==========================================================
   REDUCED MOTION
   ========================================================== */

@media (prefers-reduced-motion: reduce) {
    .terminal-stream-track {
        animation: none;
    }
}


/* ==========================================================
   PRINT
   ========================================================== */

@media print {
    .cursor-dot,
    .noise,
    .terminal-stream,
    .content-prompt { display: none; }
    .hero { min-height: auto; padding: 40px; }
    .hero-top, .hero-heading .hero-line { opacity: 1; transform: none; }
    .content { background: white; }
    .content-inner { padding: 40px; }
    .statement { color: var(--text); }
    .service-name { color: var(--text); }
    .service-desc { color: rgba(26, 26, 26, 0.6); font-family: var(--font); }
    .aside { color: rgba(26, 26, 26, 0.4); }
    .reveal { opacity: 1; transform: none; }
}
