/* ============================================
   AllyTech AI — Clean, tight, award-caliber
   ============================================ */

:root {
    --purple-deep: #2D1B4E;
    --purple-accent: #6B46C1;
    --purple-light: #B4A5D8;
    --cream: #F5F3F0;
    --white: #FFFFFF;
    --charcoal: #1A1A1A;
    --text: #3D3550;
    --text-muted: #6E6580;
    --border: rgba(45, 27, 78, 0.1);

    --font-display: 'Instrument Serif', Georgia, serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;

    --space-sm: 1rem;
    --space-md: 2rem;
    --space-lg: 4rem;
    --space-xl: 7rem;
    --space-2xl: 10rem;

    --max-w: 1100px;
    --radius: 8px;
}

@media (prefers-color-scheme: dark) {
    :root {
        --purple-deep: #D4C8F0;
        --purple-accent: #A78BFA;
        --purple-light: #6E5A96;
        --cream: #0E0C11;
        --white: #1A1720;
        --charcoal: #F0EDE8;
        --text: #C8C0D6;
        --text-muted: #8A7FA0;
        --border: rgba(200, 192, 214, 0.1);
    }
}

/* Reset */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.65;
    color: var(--text);
    background: var(--cream);
    -webkit-font-smoothing: antialiased;
}

/* Typography */
h1, h2, h3 { font-family: var(--font-display); color: var(--purple-deep); font-weight: 400; letter-spacing: -0.02em; line-height: 1.1; }
h1 { font-size: clamp(2.8rem, 6vw, 5rem); }
h2 { font-size: clamp(2rem, 4vw, 3rem); }
h3 { font-size: 1.35rem; }
p { /* max-width: 60ch; */ }
a { color: var(--purple-accent); text-decoration: none; }
a:hover { color: var(--purple-deep); }
a:focus-visible { outline: 2px solid var(--purple-accent); outline-offset: 3px; }
strong { color: var(--charcoal); font-weight: 600; }

/* Layout */
.container { max-width: var(--max-w); margin: 0 auto; padding: 0 var(--space-md); }
section { padding: var(--space-xl) 0; }

/* ============================================
   Nav
   ============================================ */
.navbar {
    position: fixed; top: 0; left: 0; right: 0; z-index: 100;
    background: rgba(245, 243, 240, 0.92); backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px); border-bottom: 1px solid var(--border);
}
@media (prefers-color-scheme: dark) { .navbar { background: rgba(14, 12, 17, 0.92); } }
.nav-container { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.logo { display: flex; align-items: center; gap: 0.4rem; font-weight: 600; font-size: 1rem; color: var(--purple-deep); }
.logo-img { height: 1.6rem; width: 1.6rem; }
.logo-ai { color: var(--purple-accent); }
.nav-links { display: flex; list-style: none; gap: var(--space-lg); }
.nav-links a { color: var(--text-muted); font-size: 0.875rem; font-weight: 500; }
.nav-links a:hover { color: var(--purple-deep); }
.mobile-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; }
.mobile-toggle span { width: 20px; height: 1.5px; background: var(--charcoal); transition: 0.3s; }
@media (max-width: 768px) { .nav-links, .nav-cta { display: none; } .mobile-toggle { display: flex; } }

/* ============================================
   Buttons
   ============================================ */
.btn {
    display: inline-flex; align-items: center; justify-content: center;
    padding: 0.75rem 1.5rem; font-family: var(--font-body); font-size: 0.875rem;
    font-weight: 600; border-radius: var(--radius); border: 1.5px solid transparent;
    cursor: pointer; transition: all 0.2s ease; text-decoration: none; white-space: nowrap;
}
.btn-primary { background: var(--purple-accent); color: white; border-color: var(--purple-accent); }
.btn-primary:hover { background: var(--purple-deep); border-color: var(--purple-deep); color: white; transform: translateY(-1px); box-shadow: 0 6px 20px rgba(107,70,193,0.25); }
.btn-ghost { background: transparent; color: var(--purple-deep); border-color: var(--border); }
.btn-ghost:hover { border-color: var(--purple-deep); }
.btn-lg { padding: 0.9rem 2rem; font-size: 1rem; }
.btn-block { width: 100%; }

/* ============================================
   Hero
   ============================================ */
.hero {
    min-height: 100vh; display: flex; align-items: center;
    padding: calc(64px + var(--space-lg)) 0 var(--space-lg);
    background: var(--purple-deep);
    position: relative; overflow: hidden;
}
.hero::before {
    content: ''; position: absolute; inset: 0;
    background: url('images/hero-bg.jpg') center/cover no-repeat; opacity: 0.35;
}
.hero::after {
    content: ''; position: absolute; inset: 0;
    background: linear-gradient(160deg, rgba(45,27,78,0.92) 0%, rgba(107,70,193,0.7) 100%);
}
@media (prefers-color-scheme: dark) {
    .hero::before { opacity: 0.2; }
    .hero::after { background: linear-gradient(160deg, rgba(14,12,17,0.95) 0%, rgba(45,27,78,0.8) 100%); }
}

.hero .container { position: relative; z-index: 2; text-align: center; }

.hero-content { max-width: 700px; margin: 0 auto var(--space-lg); }
.hero-content h1 { color: white; margin-bottom: var(--space-md); }
.hero-lead { font-size: 1.15rem; color: rgba(255,255,255,0.85); margin: 0 auto var(--space-md); max-width: 55ch; }
.hero-ctas { display: flex; gap: var(--space-sm); flex-wrap: wrap; justify-content: center; }
.hero .btn-ghost { color: rgba(255,255,255,0.9); border-color: rgba(255,255,255,0.25); }
.hero .btn-ghost:hover { border-color: white; color: white; }

.hero-video { width: 100%; max-width: 640px; margin: 0 auto; aspect-ratio: 16/9; border-radius: var(--radius); overflow: hidden; box-shadow: 0 12px 40px rgba(0,0,0,0.3); }
.hero-video iframe { width: 100%; height: 100%; border: none; }

/* ============================================
   Shared Section Styles
   ============================================ */
.section-header { margin-bottom: var(--space-lg); }
.eyebrow { display: block; font-family: var(--font-mono); font-size: 0.72rem; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; color: var(--purple-accent); margin-bottom: 0.75rem; }
.section-sub { font-size: 1.1rem; color: var(--text-muted); margin-top: 0.5rem; }

/* ============================================
   Process
   ============================================ */
.process { background: var(--white); border-top: 1px solid var(--border); }
.process-steps { list-style: none; counter-reset: step; display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-md); }
@media (max-width: 768px) { .process-steps { grid-template-columns: 1fr; } }

.process-steps li {
    counter-increment: step; position: relative;
    padding: var(--space-md); border: 1px solid var(--border); border-radius: var(--radius);
    background: var(--cream);
}
.process-steps li::before {
    content: counter(step); font-family: var(--font-display); font-size: 2.5rem;
    color: var(--purple-light); opacity: 0.4; position: absolute; top: var(--space-md); right: var(--space-md); line-height: 1;
}
.process-steps strong { display: block; font-size: 1.1rem; color: var(--purple-deep); margin-bottom: 0.25rem; }
.step-time { display: block; font-family: var(--font-mono); font-size: 0.72rem; color: var(--purple-accent); text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 0.75rem; }
.process-steps p { font-size: 0.9rem; color: var(--text-muted); }

/* ============================================
   Services
   ============================================ */
.services { background: var(--cream); }
.services-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-md); margin-bottom: var(--space-lg); }
@media (max-width: 900px) { .services-grid { grid-template-columns: 1fr; } }

.service-card { display: block; padding: var(--space-md); border: 1px solid var(--border); border-radius: var(--radius); background: var(--white); text-decoration: none; color: inherit; transition: transform 0.2s ease, box-shadow 0.2s ease; cursor: pointer; }
.service-card:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(107,70,193,0.12); }
.service-card--featured { border-color: var(--purple-accent); }
.service-label { display: inline-block; font-family: var(--font-mono); font-size: 0.72rem; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase; color: var(--purple-accent); margin-bottom: 0.5rem; }
.service-timeline { font-family: var(--font-mono); font-size: 0.8rem; color: var(--text-muted); margin-bottom: 0.75rem; }
.service-card p { max-width: none; font-size: 0.95rem; color: var(--text); margin-bottom: 0.5rem; }
.service-card p:last-child { margin-bottom: 0; }

.capabilities { padding-top: var(--space-md); border-top: 1px solid var(--border); }
.capabilities h3 { font-family: var(--font-body); font-weight: 600; font-size: 1rem; margin-bottom: var(--space-sm); color: var(--purple-deep); }
.capabilities-list { list-style: none; columns: 2; column-gap: var(--space-lg); }
@media (max-width: 600px) { .capabilities-list { columns: 1; } }
.capabilities-list li { padding: 0.4rem 0; font-size: 0.9rem; color: var(--text); break-inside: avoid; padding-left: 1.2rem; position: relative; }
.capabilities-list li::before { content: "→"; position: absolute; left: 0; color: var(--purple-accent); }

/* ============================================
   Product
   ============================================ */
.product { background: var(--white); border-top: 1px solid var(--border); }
.product .section-header p { font-size: 1rem; color: var(--text); margin-top: var(--space-sm); }
.popular-badge { display: inline-block; font-size: 0.65rem; margin-left: 0.5rem; vertical-align: middle; }

/* ============================================
   About
   ============================================ */
.about { background: var(--white); border-top: 1px solid var(--border); }
.about-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: var(--space-xl); align-items: start; }
@media (max-width: 768px) { .about-grid { grid-template-columns: 1fr; gap: var(--space-lg); } }
.about-text h2 { margin-bottom: var(--space-sm); }
.about-text p { margin-bottom: var(--space-sm); }
.about-location { font-family: var(--font-mono); font-size: 0.8rem; color: var(--text-muted); margin-top: var(--space-sm); }

.about-principles { display: grid; grid-template-columns: 1fr; gap: 0; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.principle { padding: var(--space-sm) var(--space-md); border-bottom: 1px solid var(--border); display: flex; flex-direction: column; gap: 0.15rem; background: var(--cream); }
.principle:last-child { border-bottom: none; }
.principle strong { font-size: 0.9rem; color: var(--purple-deep); }
.principle span { font-size: 0.8rem; color: var(--text-muted); }

/* ============================================
   Contact
   ============================================ */
.contact { background: var(--cream); border-top: 1px solid var(--border); }
.contact .section-header { text-align: center; }
.contact .section-header h2 { margin-left: auto; margin-right: auto; }
.contact .section-sub { margin-left: auto; margin-right: auto; }

.contact-form {
    max-width: 640px; margin: 0 auto; padding: var(--space-lg);
    background: var(--white); border: 1px solid var(--border); border-radius: var(--radius);
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-sm); }
@media (max-width: 500px) { .form-row { grid-template-columns: 1fr; } }
.form-field { margin-bottom: var(--space-sm); }
.form-field label { display: block; font-size: 0.8rem; font-weight: 600; color: var(--purple-deep); margin-bottom: 0.3rem; }
.form-field input,
.form-field select,
.form-field textarea {
    width: 100%; padding: 0.65rem 0.8rem; font-family: var(--font-body); font-size: 0.95rem;
    border: 1px solid var(--border); border-radius: var(--radius); background: var(--cream);
    color: var(--charcoal); transition: border-color 0.15s;
}
.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus { outline: none; border-color: var(--purple-accent); }
.form-field textarea { resize: vertical; }
.form-note { text-align: center; font-size: 0.8rem; color: var(--text-muted); margin-top: var(--space-sm); }

/* ============================================
   Footer
   ============================================ */
.footer { background: var(--purple-deep); padding: var(--space-md) 0; }
@media (prefers-color-scheme: dark) { .footer { background: var(--white); border-top: 1px solid var(--border); } }

.footer-content {
    display: flex; align-items: center; justify-content: space-between; gap: var(--space-md);
}
@media (max-width: 768px) { .footer-content { flex-direction: column; align-items: flex-start; gap: var(--space-sm); } }

.footer-brand { display: flex; align-items: center; gap: var(--space-md); }
.footer-brand .logo { color: white; font-size: 0.9rem; }
@media (prefers-color-scheme: dark) { .footer-brand .logo { color: var(--purple-deep); } }
.footer-brand p { font-size: 0.75rem; color: rgba(255,255,255,0.5); margin: 0; }
@media (prefers-color-scheme: dark) { .footer-brand p { color: var(--text-muted); } }

.footer-links { display: flex; gap: var(--space-md); }
.footer-links a { font-size: 0.8rem; color: rgba(255,255,255,0.5); }
.footer-links a:hover { color: white; }
@media (prefers-color-scheme: dark) { .footer-links a { color: var(--text-muted); } .footer-links a:hover { color: var(--purple-accent); } }

.footer-meta { display: none; }
.footer-security { display: none; }

/* ============================================
   Mobile Nav & Motion
   ============================================ */
@media (max-width: 768px) {
    .nav-links.active {
        display: flex; flex-direction: column; position: absolute;
        top: 64px; left: 0; right: 0; background: var(--white);
        border-bottom: 1px solid var(--border); padding: var(--space-sm); gap: 0.5rem;
    }
}
.mobile-toggle.active span:nth-child(1) { transform: rotate(45deg) translate(4px, 4px); }
.mobile-toggle.active span:nth-child(2) { opacity: 0; }
.mobile-toggle.active span:nth-child(3) { transform: rotate(-45deg) translate(4px, -4px); }

@media (prefers-reduced-motion: no-preference) {
    .reveal { opacity: 0; transform: translateY(8px); transition: opacity 0.4s ease, transform 0.4s ease; }
    .reveal.visible { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
    .reveal { opacity: 1; transform: none; }
}
