/* ============================================
   FromAItoZI — Stylesheet
   Editorial-meets-technical. Chromatic spectrum.
   ============================================ */

:root {
    /* Core palette */
    --bg: #0a0a0f;
    --bg-elev: #12121a;
    --bg-card: #16161f;
    --line: #25252f;
    --line-strong: #3a3a48;

    --text: #ececf0;
    --text-mute: #a0a0ad;
    --text-dim: #6e6e7a;

    /* The spectrum — AI (red/orange) to ZI (indigo/violet) */
    --ai: #ff5630;          /* warm red-orange */
    --ai-soft: #ff8c5a;
    --ai-glow: rgba(255, 86, 48, 0.18);

    --zi: #6b5bff;          /* indigo-violet */
    --zi-soft: #9b8fff;
    --zi-glow: rgba(107, 91, 255, 0.18);

    --gradient: linear-gradient(90deg, var(--ai) 0%, #ff7a5c 30%, #b271ff 70%, var(--zi) 100%);

    /* Typography */
    --font-display: "Instrument Serif", "Times New Roman", serif;
    --font-body: "Geist", -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: "JetBrains Mono", "SF Mono", Consolas, monospace;

    /* Spacing scale */
    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 1rem;
    --space-4: 1.5rem;
    --space-5: 2rem;
    --space-6: 3rem;
    --space-7: 4rem;
    --space-8: 6rem;
    --space-9: 8rem;

    /* Layout */
    --max-w: 1180px;
    --content-w: 880px;
}

/* ============================================
   RESET & BASE
   ============================================ */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    background: var(--bg);
}

body {
    font-family: var(--font-body);
    font-weight: 400;
    background: var(--bg);
    color: var(--text);
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

/* Subtle film grain texture overlay */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 1;
    opacity: 0.025;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/></filter><rect width='200' height='200' filter='url(%23n)'/></svg>");
}

a {
    color: inherit;
    text-decoration: none;
    transition: color 0.18s ease;
}

em {
    font-family: var(--font-display);
    font-style: italic;
    font-weight: 400;
}

/* ============================================
   NAV
   ============================================ */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 2rem;
    background: rgba(10, 10, 15, 0.7);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--line);
}

.brand {
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: 0.95rem;
    letter-spacing: -0.01em;
    color: var(--text);
}

.brand .ai { color: var(--ai); }
.brand .zi { color: var(--zi); }

.nav-links {
    display: flex;
    align-items: center;
    gap: 2rem;
    font-family: var(--font-mono);
    font-size: 0.78rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.nav-links a {
    color: var(--text-mute);
}

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

.nav-cta {
    padding: 0.5rem 1rem;
    border: 1px solid var(--line-strong);
    border-radius: 999px;
    color: var(--text) !important;
    transition: border-color 0.18s, background 0.18s;
}

.nav-cta:hover {
    border-color: var(--zi);
    background: var(--zi-glow);
}

@media (max-width: 700px) {
    .nav { padding: 1rem 1.25rem; }
    .nav-links { gap: 1rem; }
    .nav-links a:not(.nav-cta) { display: none; }
}

/* ============================================
   HERO
   ============================================ */
.hero {
    position: relative;
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 10rem 2rem 6rem;
    z-index: 2;
}

/* Atmospheric gradient orb behind hero */
.hero::before {
    content: "";
    position: absolute;
    top: 4rem;
    left: -10%;
    width: 60%;
    height: 60%;
    background: radial-gradient(circle, var(--ai-glow), transparent 65%);
    filter: blur(60px);
    z-index: -1;
    pointer-events: none;
}

.hero::after {
    content: "";
    position: absolute;
    top: 12rem;
    right: -10%;
    width: 55%;
    height: 60%;
    background: radial-gradient(circle, var(--zi-glow), transparent 65%);
    filter: blur(60px);
    z-index: -1;
    pointer-events: none;
}

.hero-label {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--text-mute);
    margin-bottom: 2rem;
    padding: 0.4rem 0.8rem;
    border: 1px solid var(--line);
    border-radius: 999px;
}

.dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--ai);
    box-shadow: 0 0 0 3px var(--ai-glow);
    animation: pulse 2s ease-in-out infinite;
}

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

.hero-headline {
    font-family: var(--font-display);
    font-size: clamp(2.6rem, 6vw, 5.2rem);
    font-weight: 400;
    line-height: 1.02;
    letter-spacing: -0.025em;
    margin-bottom: 2rem;
    max-width: 18ch;
}

.hero-headline em {
    background: var(--gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero-sub {
    font-size: 1.2rem;
    color: var(--text-mute);
    max-width: 38rem;
    margin-bottom: 2.5rem;
    line-height: 1.5;
}

.hero-sub .ai { color: var(--ai); font-weight: 600; }
.hero-sub .zi { color: var(--zi); font-weight: 600; }

.hero-cta-row {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 2.5rem;
}

.hero-tagline {
    font-family: var(--font-display);
    font-style: italic;
    font-size: 1.15rem;
    color: var(--text-dim);
    margin-top: 1.5rem;
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.85rem 1.6rem;
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: 500;
    border-radius: 999px;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.22s ease;
    white-space: nowrap;
}

.btn-primary {
    background: var(--gradient);
    color: white;
    position: relative;
    overflow: hidden;
    background-size: 200% 100%;
    background-position: 0% 0%;
}

.btn-primary:hover {
    background-position: 100% 0%;
    transform: translateY(-1px);
    box-shadow: 0 10px 30px -10px var(--zi-glow);
}

.btn-ghost {
    color: var(--text-mute);
    border-color: var(--line-strong);
    background: transparent;
}

.btn-ghost:hover {
    color: var(--text);
    border-color: var(--text-mute);
}

/* ============================================
   SECTION FRAMEWORK
   ============================================ */
.section {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 6rem 2rem;
    position: relative;
    z-index: 2;
}

.section-label {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    color: var(--text-mute);
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--line);
}

.section-label .label-num {
    color: var(--ai);
    font-weight: 700;
}

.section-h2 {
    font-family: var(--font-display);
    font-size: clamp(2rem, 4.5vw, 3.6rem);
    font-weight: 400;
    line-height: 1.05;
    letter-spacing: -0.02em;
    margin-bottom: 3rem;
    max-width: 22ch;
}

.section-h2 em {
    color: var(--zi-soft);
}

/* ============================================
   PROBLEM
   ============================================ */
.problem-body {
    max-width: var(--content-w);
    font-size: 1.15rem;
    line-height: 1.7;
    color: var(--text-mute);
}

.problem-body p {
    margin-bottom: 1.5rem;
}

.problem-body .lead {
    color: var(--text);
    font-size: 1.25rem;
}

.problem-body em {
    color: var(--ai-soft);
    font-size: 1.05em;
}

.problem-emphasis {
    font-family: var(--font-display);
    font-size: 1.8rem !important;
    line-height: 1.25;
    color: var(--text) !important;
    margin: 2.5rem 0 !important;
    padding: 1.5rem 0;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

.problem-body .closer {
    color: var(--zi-soft);
    font-family: var(--font-display);
    font-size: 1.4rem;
    margin-top: 2rem;
}

/* ============================================
   SERVICES
   ============================================ */
.section-services {
    background:
        linear-gradient(180deg, transparent, rgba(107, 91, 255, 0.03), transparent);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
    margin-bottom: 2.5rem;
}

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

.service-card {
    background: var(--bg-card);
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 2rem 1.75rem;
    display: flex;
    flex-direction: column;
    transition: border-color 0.22s, transform 0.22s;
    position: relative;
}

.service-card:hover {
    border-color: var(--line-strong);
    transform: translateY(-2px);
}

.service-card-featured {
    border-color: var(--zi);
    background: linear-gradient(180deg, rgba(107, 91, 255, 0.06), var(--bg-card) 40%);
}

.service-card-featured::before {
    content: "MOST COMMON";
    position: absolute;
    top: -0.65rem;
    left: 1.75rem;
    font-family: var(--font-mono);
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    color: var(--bg);
    background: var(--zi);
    padding: 0.25rem 0.6rem;
    border-radius: 4px;
}

.service-num {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--text-dim);
    margin-bottom: 0.75rem;
    letter-spacing: 0.1em;
}

.service-name {
    font-family: var(--font-display);
    font-size: 1.85rem;
    font-weight: 400;
    line-height: 1.05;
    letter-spacing: -0.015em;
    margin-bottom: 1.25rem;
    color: var(--text);
}

.service-price {
    font-family: var(--font-mono);
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 0.35rem;
    background: var(--gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.service-meta {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-dim);
    margin-bottom: 1.5rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid var(--line);
}

.service-desc {
    font-size: 0.96rem;
    color: var(--text-mute);
    line-height: 1.6;
    margin-bottom: 1rem;
    flex-grow: 0;
}

.service-cta {
    margin-top: auto;
    padding-top: 1.25rem;
    font-family: var(--font-mono);
    font-size: 0.82rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--zi-soft);
    border-top: 1px solid var(--line);
    transition: color 0.18s, padding-left 0.2s;
}

.service-cta:hover {
    color: var(--text);
    padding-left: 0.25rem;
}

.services-footnote {
    text-align: center;
    color: var(--text-dim);
    font-style: italic;
    font-family: var(--font-display);
    font-size: 1.1rem;
}

/* ============================================
   CASE STUDY
   ============================================ */
.case-grid {
    display: grid;
    gap: 2rem;
    max-width: var(--content-w);
}

.case-block {
    padding: 1.75rem 0;
    border-top: 1px solid var(--line);
}

.case-block:first-of-type {
    border-top: 1px solid var(--line-strong);
}

.case-block-label {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    color: var(--ai);
    margin-bottom: 1rem;
}

.case-block p {
    font-size: 1.1rem;
    line-height: 1.65;
    color: var(--text-mute);
    margin-bottom: 1rem;
}

.case-block p:last-child { margin-bottom: 0; }

.case-block-emphasis {
    background: var(--bg-card);
    border-radius: 14px;
    padding: 2rem;
    border: 1px solid var(--zi);
    border-top: 1px solid var(--zi);
}

.case-block-emphasis .case-block-label {
    color: var(--zi);
}

.case-block-emphasis p {
    color: var(--text);
}

.case-block-emphasis strong {
    color: var(--zi-soft);
    font-weight: 500;
    font-family: var(--font-display);
    font-size: 1.15em;
    font-style: italic;
}

/* Pipeline list */
.pipeline {
    list-style: none;
    margin-top: 1.5rem;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.6rem;
}

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

.pipeline li {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.7rem 0.9rem;
    background: var(--bg-card);
    border: 1px solid var(--line);
    border-radius: 8px;
    font-size: 0.92rem;
    color: var(--text);
}

.step-num {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--bg);
    background: var(--gradient);
    padding: 0.2rem 0.45rem;
    border-radius: 4px;
    flex-shrink: 0;
}

/* ============================================
   ABOUT
   ============================================ */
.section-about {
    padding-top: 8rem;
}

.about-grid {
    display: grid;
    grid-template-columns: 340px 1fr;
    gap: 4rem;
    align-items: start;
}

@media (max-width: 850px) {
    .about-grid { grid-template-columns: 1fr; gap: 2.5rem; }
}

.about-photo {
    position: sticky;
    top: 6rem;
}

@media (max-width: 850px) {
    .about-photo { position: static; max-width: 280px; }
}

.about-photo img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 14px;
    border: 1px solid var(--line);
    display: block;
}

.about-photo-caption {
    margin-top: 1.25rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--line);
}

.about-name {
    font-family: var(--font-display);
    font-size: 1.5rem;
    color: var(--text);
    margin-bottom: 0.15rem;
}

.about-title {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--zi-soft);
    margin-bottom: 0.4rem;
}

.about-location {
    font-family: var(--font-mono);
    font-size: 0.74rem;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.about-text {
    font-size: 1.1rem;
    line-height: 1.7;
    color: var(--text-mute);
}

.about-text p {
    margin-bottom: 1.5rem;
}

.about-text em {
    color: var(--text);
    font-size: 1.05em;
}

.about-closer {
    margin-top: 2rem !important;
    padding-top: 1.5rem;
    border-top: 1px solid var(--line);
    color: var(--text) !important;
    font-size: 1.2rem !important;
    font-family: var(--font-display);
    line-height: 1.4 !important;
}

/* ============================================
   PROCESS
   ============================================ */
.process-list {
    list-style: none;
    max-width: var(--content-w);
    counter-reset: process;
}

.process-list li {
    display: grid;
    grid-template-columns: 80px 1fr;
    gap: 2rem;
    padding: 2rem 0;
    border-top: 1px solid var(--line);
    align-items: start;
}

.process-list li:last-child {
    border-bottom: 1px solid var(--line);
}

.process-num {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--ai);
    letter-spacing: 0.1em;
}

.process-list h3 {
    font-family: var(--font-display);
    font-size: 1.6rem;
    font-weight: 400;
    color: var(--text);
    margin-bottom: 0.5rem;
    line-height: 1.2;
}

.process-meta {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-dim);
    margin-left: 0.6rem;
}

.process-list p {
    color: var(--text-mute);
    line-height: 1.6;
}

/* ============================================
   CONTACT
   ============================================ */
.section-contact {
    padding-bottom: 8rem;
    position: relative;
}

.section-contact::before {
    content: "";
    position: absolute;
    top: 30%;
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    height: 70%;
    background: radial-gradient(ellipse, var(--zi-glow), transparent 65%);
    filter: blur(80px);
    z-index: -1;
    pointer-events: none;
}

.contact-grid {
    display: grid;
    grid-template-columns: 1.3fr 1fr;
    gap: 1.5rem;
    max-width: var(--content-w);
}

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

.contact-card {
    background: var(--bg-card);
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 2rem;
}

.contact-card-primary {
    border-color: var(--line-strong);
    background: linear-gradient(180deg, rgba(107, 91, 255, 0.06), var(--bg-card));
}

.contact-label {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    color: var(--text-dim);
    margin-bottom: 1.25rem;
}

.contact-card p {
    color: var(--text-mute);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.contact-note {
    font-size: 0.82rem !important;
    color: var(--text-dim) !important;
    font-style: italic;
    margin-top: 1rem !important;
    margin-bottom: 0 !important;
}

.email-list {
    list-style: none;
}

.email-list li {
    padding: 0.7rem 0;
    border-bottom: 1px solid var(--line);
    font-family: var(--font-mono);
    font-size: 0.92rem;
}

.email-list li:last-child { border-bottom: none; }

.email-list a {
    color: var(--text);
    transition: color 0.18s;
}

.email-list a:hover {
    color: var(--zi-soft);
}

.email-list span {
    color: var(--text-dim);
    font-size: 0.82rem;
    margin-left: 0.3rem;
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 3rem 2rem 4rem;
    border-top: 1px solid var(--line);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1.5rem;
    font-size: 0.85rem;
    color: var(--text-dim);
    position: relative;
    z-index: 2;
}

.footer-brand {
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: 1rem;
    color: var(--text);
}

.footer-brand .ai { color: var(--ai); }
.footer-brand .zi { color: var(--zi); }

.footer-meta {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-family: var(--font-mono);
    font-size: 0.78rem;
}

.footer-meta a {
    color: var(--text-mute);
}

.footer-meta a:hover {
    color: var(--text);
}

.footer-sep {
    opacity: 0.5;
}

.footer-tagline {
    font-family: var(--font-display);
    font-style: italic;
    color: var(--text-mute);
}

/* ============================================
   REVEAL ON SCROLL
   ============================================ */
.reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

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

/* ============================================
   FOCUS STYLES (accessibility)
   ============================================ */
:focus-visible {
    outline: 2px solid var(--zi-soft);
    outline-offset: 3px;
    border-radius: 4px;
}

/* Reduce motion preference */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
    html { scroll-behavior: auto; }
}
