@import url('https://fonts.googleapis.com/css2?family=PT+Serif:ital,wght@0,400;0,700;1,400;1,700&display=swap');

/* ===== Variables — dark theme (logo: mint #9EEFB1, gold #F5C762, coral #EB7085, cyan #7CDDFB, blue #375AC5) ===== */
:root {
    --color-bg: #0c0b0d;
    --color-surface: #131216;
    --color-surface-2: #1a181e;
    --color-border: #2a2830;
    --color-text: #ebe9ec;
    --color-text-muted: #9a959e;
    --color-accent: #7CDDFB;
    --color-accent-hover: #9ee5fc;
    --color-accent-muted: rgba(124, 221, 251, 0.15);
    --color-logo-mint: #9EEFB1;
    --color-logo-gold: #F5C762;
    --color-logo-coral: #EB7085;
    --color-logo-cyan: #7CDDFB;
    --font-sans: 'Outfit', system-ui, sans-serif;
    --font-serif: "PT Serif", serif;
    --radius: 8px;
    --radius-lg: 12px;
    --transition: 0.25s ease;
    --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
    --anim-duration: 0.6s;
}

/* ===== Reset & base ===== */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    font-family: var(--font-sans);
    font-weight: 500;
    font-size: 1rem;
    line-height: 1.6;
    color: var(--color-text);
    background: var(--color-bg);
    -webkit-font-smoothing: antialiased;
}
a { color: var(--color-accent); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--color-accent-hover); }
img, video { max-width: 100%; height: auto; display: block; }

/* ===== Page loading spinner (favicon) ===== */
.page-loader {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-bg);
    transition: opacity 0.4s ease, visibility 0.4s ease;
}
.page-loader__icon {
    width: 64px;
    height: 64px;
    animation: page-loader-spin 0.9s linear infinite;
}
@keyframes page-loader-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}
body.loaded .page-loader {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

/* ===== Layout ===== */
.main { min-height: 60vh; }
.container { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 1.5rem; }
.container-narrow { max-width: 560px; }

/* ===== Site header ===== */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;
    background: linear-gradient(to bottom, rgba(12,11,13,0.88) 0%, rgba(12,11,13,0.6) 70%, transparent 100%);
    backdrop-filter: blur(12px);
    transition: background 0.3s var(--ease-out-expo), box-shadow 0.3s ease;
}
.site-header.scrolled { background: rgba(12,11,13,0.95); box-shadow: 0 4px 24px rgba(0,0,0,0.4); }
.logo {
    display: flex;
    align-items: center;
    transition: transform 0.2s ease;
}
.logo:hover { transform: scale(1.02); }
.logo img {
    height: 2rem;
    width: auto;
    object-fit: contain;
}
.nav {
    display: flex;
    gap: 2rem;
}
.nav a {
    color: var(--color-text-muted);
    font-weight: 600;
    font-size: 0.95rem;
    position: relative;
    transition: color 0.25s ease;
}
.nav a::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -4px;
    width: 0;
    height: 2px;
    background: var(--color-accent);
    transition: width 0.3s var(--ease-out-expo);
}
.nav a:hover { color: var(--color-text); }
.nav a:hover::after { width: 100%; }
/* Services dropdown */
.nav-dropdown {
    position: relative;
}
.nav-dropdown__trigger {
    display: inline-flex;
    align-items: center;
    padding: 0;
    margin: 0;
    font: inherit;
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--color-text-muted);
    background: none;
    border: none;
    cursor: pointer;
    transition: color 0.25s ease;
}
.nav-dropdown__trigger:hover,
.nav-dropdown.open .nav-dropdown__trigger { color: var(--color-text); }
.nav-dropdown__trigger::after {
    content: '';
    width: 0;
    height: 0;
    margin-left: 0.35em;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 5px solid currentColor;
    transition: transform 0.2s ease;
}
.nav-dropdown.open .nav-dropdown__trigger::after { transform: rotate(180deg); }
.nav-dropdown__menu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(0.5rem);
    min-width: 200px;
    margin: 0;
    padding: 0.5rem 0;
    list-style: none;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    box-shadow: 0 12px 32px rgba(0,0,0,0.4);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s ease;
    z-index: 50;
}
.nav-dropdown.open .nav-dropdown__menu {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0.25rem);
}
.nav-dropdown__menu a {
    display: block;
    padding: 0.5rem 1rem;
    color: var(--color-text);
    font-weight: 500;
}
.nav-dropdown__menu a:hover {
    background: var(--color-accent-muted);
    color: var(--color-accent);
}
.nav-dropdown__menu a::after { display: none; }
.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 40px;
    height: 40px;
    padding: 0;
    border: none;
    background: transparent;
    cursor: pointer;
    color: var(--color-text);
}
.nav-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: currentColor;
    border-radius: 1px;
    transition: transform 0.2s ease, opacity 0.2s ease;
}
@media (max-width: 768px) {
    .nav { display: none; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; gap: 0; padding: 1rem; background: var(--color-surface); box-shadow: 0 12px 32px rgba(0,0,0,0.5); }
    .nav.open { display: flex; }
    .nav a { padding: 0.75rem 0; border-bottom: 1px solid var(--color-border); }
    .nav a::after { display: none; }
    .nav-dropdown { position: static; }
    .nav-dropdown__trigger { width: 100%; justify-content: space-between; padding: 0.75rem 0; border-bottom: 1px solid var(--color-border); }
    .nav-dropdown__menu { position: static; transform: none; min-width: auto; margin: 0 0 0.5rem 1rem; padding: 0.25rem 0; box-shadow: none; border: none; border-left: 2px solid var(--color-border); border-radius: 0; opacity: 1; visibility: visible; max-height: 0; overflow: hidden; }
    .nav-dropdown.open .nav-dropdown__menu { max-height: 400px; }
    .nav-dropdown.open .nav-dropdown__menu { transform: none; }
    .nav-dropdown__menu a { padding: 0.4rem 0.75rem; }
    .nav-toggle { display: flex; }
}

/* ===== Buttons ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    font-family: var(--font-sans);
    font-size: 0.95rem;
    font-weight: 700;
    border-radius: var(--radius);
    border: none;
    cursor: pointer;
    transition: background 0.3s ease, color 0.3s ease, transform 0.25s var(--ease-out-expo), box-shadow 0.3s ease;
}
.btn:active { transform: scale(0.97); }
.btn-primary {
    background: var(--color-accent);
    color: #fff;
    box-shadow: 0 0 0 0 rgba(55, 90, 197, 0.3);
}
.btn-primary:hover {
    background: var(--color-accent-hover);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(55, 90, 197, 0.3);
}
.btn-secondary {
    background: transparent;
    color: var(--color-text);
    border: 2px solid var(--color-border);
}
.btn-secondary:hover {
    border-color: var(--color-accent);
    color: var(--color-accent);
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(55, 90, 197, 0.15);
}
.btn-large { padding: 1rem 2rem; font-size: 1rem; }

/* ===== Video hero ===== */
.video-hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.video-backdrop {
    position: absolute;
    inset: 0;
}
.hero-video {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    transform: translate(-50%, -50%);
    object-fit: cover;
}
.video-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(12,11,13,0.35) 0%, rgba(12,11,13,0.65) 50%, var(--color-bg) 100%);
}
.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 2rem 1.5rem 4rem;
}
.hero-title {
    font-size: clamp(2rem, 6vw, 3.5rem);
    font-weight: 700;
    line-height: 1.15;
    margin: 0 0 0.75rem;
    letter-spacing: -0.02em;
    color: var(--color-text);
    text-shadow: 0 2px 24px rgba(0,0,0,0.5);
    opacity: 0;
    transform: translateY(28px);
    animation: hero-fade-up 0.9s var(--ease-out-expo) 0.2s forwards;
}
.hero-title .serif { font-family: var(--font-serif); font-style: italic; font-weight: 400; }
.hero-tagline {
    font-size: 1.15rem;
    color: var(--color-text-muted);
    max-width: 480px;
    margin: 0 auto 2rem;
    text-shadow: 0 2px 12px rgba(0,0,0,0.4);
    opacity: 0;
    transform: translateY(24px);
    animation: hero-fade-up 0.9s var(--ease-out-expo) 0.4s forwards;
}
.hero-cta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
    opacity: 0;
    transform: translateY(24px);
    animation: hero-fade-up 0.9s var(--ease-out-expo) 0.55s forwards;
}
.hero-cta .btn:nth-child(1) { animation: btn-glow 2.5s ease-in-out 1.2s infinite alternate; }
.hero-scroll {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    color: var(--color-text-muted);
    z-index: 2;
    opacity: 0;
    transform: translateX(-50%) translateY(20px);
    animation: hero-scroll-in 0.8s var(--ease-out-expo) 0.9s forwards;
}
@keyframes hero-fade-up {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
@keyframes hero-scroll-in {
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}
@keyframes btn-glow {
    to { box-shadow: 0 8px 32px rgba(124, 221, 251, 0.5); }
}
.hero-scroll span {
    display: block;
    width: 24px;
    height: 40px;
    border: 2px solid currentColor;
    border-radius: 12px;
    position: relative;
}
.hero-scroll span::after {
    content: '';
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 8px;
    background: currentColor;
    border-radius: 2px;
    animation: scroll-bounce 2s ease-in-out infinite;
}
@keyframes scroll-bounce {
    0%, 100% { opacity: 1; transform: translateX(-50%) translateY(0); }
    50% { opacity: 0.5; transform: translateX(-50%) translateY(6px); }
}

/* ===== Sections + scroll reveal ===== */
.section { padding: 4rem 0; }
.section-about { background: var(--color-surface); }
.animate-on-scroll {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.85s var(--ease-out-expo), transform 0.85s var(--ease-out-expo);
}
.animate-on-scroll.is-visible {
    opacity: 1;
    transform: translateY(0);
}
/* Section title and lead text animate in first */
.animate-on-scroll .section-title {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.7s var(--ease-out-expo), transform 0.7s var(--ease-out-expo);
    will-change: opacity, transform;
}
.animate-on-scroll .section-lead {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.7s var(--ease-out-expo), transform 0.7s var(--ease-out-expo);
    will-change: opacity, transform;
}
.animate-on-scroll.is-visible .section-title {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0.08s;
}
.animate-on-scroll.is-visible .section-lead {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0.18s;
}
/* Feature cards animate in with stagger */
.animate-on-scroll .feature-card {
    opacity: 0;
    transform: translateY(36px);
    transition: opacity 0.65s var(--ease-out-expo), transform 0.65s var(--ease-out-expo), border-color var(--transition), box-shadow 0.4s ease;
    will-change: opacity, transform;
}
.animate-on-scroll .feature-card:nth-child(1) { transition-delay: 0.2s; }
.animate-on-scroll .feature-card:nth-child(2) { transition-delay: 0.32s; }
.animate-on-scroll .feature-card:nth-child(3) { transition-delay: 0.44s; }
.animate-on-scroll.is-visible .feature-card {
    opacity: 1;
    transform: translateY(0);
}
.section-title {
    font-family: var(--font-serif);
    font-size: 2rem;
    font-weight: 600;
    margin: 0 0 0.5rem;
    text-align: center;
}
.section-lead {
    text-align: center;
    color: var(--color-text-muted);
    max-width: 560px;
    margin: 0 auto 2.5rem;
    font-size: 1.05rem;
}
.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.5rem;
}
.feature-card {
    background: var(--color-surface-2);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 1.75rem;
}
.feature-card:hover {
    border-color: var(--color-accent-muted);
    box-shadow: 0 12px 40px rgba(124, 221, 251, 0.12);
    transform: translateY(-4px);
}
.feature-icon {
    font-size: 1.5rem;
    color: var(--color-accent);
    margin-bottom: 0.75rem;
    transition: transform 0.4s var(--ease-out-expo);
}
.feature-card:hover .feature-icon {
    transform: scale(1.15);
}
.feature-card h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0 0 0.5rem;
}
.feature-card p { margin: 0; color: var(--color-text-muted); font-size: 0.95rem; }

.section-cta {
    text-align: center;
    background: var(--color-surface-2);
    border-top: 1px solid var(--color-border);
}
.animate-on-scroll.section-cta .section-title,
.animate-on-scroll.section-cta .section-lead,
.animate-on-scroll.section-cta .btn {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.7s var(--ease-out-expo), transform 0.7s var(--ease-out-expo);
}
.animate-on-scroll.section-cta.is-visible .section-title { opacity: 1; transform: translateY(0); transition-delay: 0.1s; }
.animate-on-scroll.section-cta.is-visible .section-lead { opacity: 1; transform: translateY(0); transition-delay: 0.2s; }
.animate-on-scroll.section-cta.is-visible .btn { opacity: 1; transform: translateY(0); transition-delay: 0.3s; }

/* ===== Page header (inner pages) ===== */
.page-header {
    padding: 8rem 0 3rem;
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
}
.page-header .container {
    opacity: 0;
    transform: translateY(20px);
    animation: hero-fade-up 0.7s var(--ease-out-expo) 0.15s forwards;
}
.page-title {
    font-family: var(--font-serif);
    font-size: 2.25rem;
    font-weight: 400;
    margin: 0 0 0.5rem;
}
.page-subtitle {
    color: var(--color-text-muted);
    margin: 0;
    font-size: 1.05rem;
}
.form form,
.alert {
    opacity: 0;
    transform: translateY(20px);
    animation: hero-fade-up 0.6s var(--ease-out-expo) 0.25s forwards;
}
.page-header__breadcrumb {
    font-size: 0.9rem;
    color: var(--color-text-muted);
    margin: 0 0 0.75rem;
}
.page-header__breadcrumb a { color: var(--color-text-muted); }
.page-header__breadcrumb a:hover { color: var(--color-accent); }

/* ===== Services list & service page ===== */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}
.service-card {
    display: block;
    padding: 1.75rem;
    background: var(--color-surface-2);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    transition: border-color 0.25s ease, box-shadow 0.25s ease, transform 0.25s var(--ease-out-expo);
    color: inherit;
}
.service-card:hover {
    border-color: var(--color-accent-muted);
    box-shadow: 0 12px 40px rgba(124, 221, 251, 0.12);
    transform: translateY(-4px);
}
.service-card:hover .service-card__link { color: var(--color-accent); }
.service-card__title {
    font-size: 1.2rem;
    font-weight: 700;
    margin: 0 0 0.5rem;
}
.service-card__desc {
    color: var(--color-text-muted);
    font-size: 0.95rem;
    margin: 0 0 0.75rem;
    line-height: 1.5;
}
.service-card__link {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--color-text-muted);
    transition: color 0.2s ease;
}
.section-service .prose {
    font-size: 1.05rem;
    line-height: 1.75;
}
.section-service .prose p { margin: 0 0 1rem; }
.section-service .prose p:last-child { margin-bottom: 0; }
.service-cta { margin-top: 2rem; }

/* ===== Forms ===== */
.section-form { padding: 3rem 0 4rem; }
.form-group {
    border: none;
    margin: 0 0 2rem;
    padding: 0;
}
.form-group legend {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--color-text);
}
.form-row {
    margin-bottom: 1.25rem;
}
.form-row label {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 0.4rem;
    color: var(--color-text-muted);
}
.form-row .req { color: var(--color-accent); }
.form-row input,
.form-row select,
.form-row textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    font-family: var(--font-sans);
    font-size: 1rem;
    color: var(--color-text);
    background: var(--color-surface-2);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    transition: border-color var(--transition), box-shadow 0.25s ease;
}
.form-row input::placeholder,
.form-row textarea::placeholder { color: var(--color-text-muted); opacity: 0.8; }
.form-row input:focus,
.form-row select:focus,
.form-row textarea:focus {
    outline: none;
    border-color: var(--color-accent);
    box-shadow: 0 0 0 3px var(--color-accent-muted);
}
.form-row textarea { resize: vertical; min-height: 100px; }
.form-row-half { display: inline-block; width: calc(50% - 0.5rem); }
.form-row-half:first-of-type { margin-right: 0.5rem; }
@media (max-width: 560px) {
    .form-row-half { width: 100%; margin-right: 0; }
}
.form-actions { margin-top: 1.5rem; }
.alert {
    padding: 1rem 1.25rem;
    border-radius: var(--radius);
    margin-bottom: 1.5rem;
}
.alert-success { background: rgba(158, 239, 177, 0.15); border: 1px solid var(--color-logo-mint); color: #9EEFB1; }
.alert-error { background: rgba(235, 112, 133, 0.15); border: 1px solid var(--color-logo-coral); color: #f5aab5; }

/* ===== Footer ===== */
.site-footer {
    padding: 3rem 1.5rem;
    background: var(--color-surface);
    border-top: 1px solid var(--color-border);
}
.footer-inner {
    max-width: 1120px;
    margin: 0 auto;
    text-align: center;
}
.footer-logo {
    margin: 0 0 0.25rem;
}
.footer-logo img {
    height: 2rem;
    width: auto;
    margin: 0 auto;
    object-fit: contain;
}
.footer-tagline {
    color: var(--color-text-muted);
    font-size: 0.9rem;
    margin: 0 0 1.5rem;
}
.footer-nav {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}
.footer-nav a { color: var(--color-text-muted); font-size: 0.9rem; }
.footer-nav a:hover { color: var(--color-accent); }
.footer-copy {
    font-size: 0.85rem;
    color: var(--color-text-muted);
    margin: 0;
}

/* ===== Responsive: entire site ===== */
@media (max-width: 900px) {
    .container { padding-left: 1.25rem; padding-right: 1.25rem; }
    .section { padding: 3rem 0; }
    .section-title { font-size: 1.75rem; }
    .section-lead { font-size: 1rem; margin-bottom: 2rem; }
    .features { grid-template-columns: 1fr; gap: 1.25rem; }
    .services-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    .main { min-height: 50vh; }
    .video-hero { min-height: 100vh; min-height: 100dvh; }
    .hero-content { padding: 1.5rem 1rem 3rem; }
    .hero-title { font-size: clamp(1.75rem, 5.5vw, 2.5rem); }
    .hero-tagline { font-size: 1rem; margin-bottom: 1.5rem; max-width: 100%; }
    .hero-cta { flex-direction: column; gap: 0.75rem; }
    .hero-cta .btn { width: 100%; max-width: 280px; }
    .hero-scroll { bottom: 1.25rem; }
    .hero-scroll span { width: 20px; height: 32px; }
    .section { padding: 2.5rem 0; }
    .section-about .container { padding-top: 0.5rem; }
    .section-cta .btn-large { width: 100%; max-width: 280px; }
    .page-header { padding: 6rem 0 2rem; }
    .page-title { font-size: 1.75rem; }
    .page-subtitle { font-size: 1rem; }
    .section-form { padding: 2rem 0 3rem; }
    .footer-nav { flex-wrap: wrap; justify-content: center; gap: 1rem; }
    .footer-tagline { font-size: 0.85rem; margin-bottom: 1.25rem; padding: 0 0.5rem; }
}

@media (max-width: 560px) {
    .container { padding-left: 1rem; padding-right: 1rem; }
    .container-narrow { padding-left: 1rem; padding-right: 1rem; }
    .site-header { padding: 0.75rem 1rem; }
    .logo img { height: 1.75rem; }
    .hero-title { font-size: 1.6rem; }
    .hero-tagline { font-size: 0.95rem; }
    .section-title { font-size: 1.5rem; }
    .section-lead { font-size: 0.95rem; margin-bottom: 1.5rem; }
    .feature-card { padding: 1.25rem; }
    .feature-card h3 { font-size: 1rem; }
    .feature-card p { font-size: 0.9rem; }
    .form-group legend { font-size: 1rem; }
    .form-row label { font-size: 0.85rem; }
    .form-row input,
    .form-row select,
    .form-row textarea { padding: 0.65rem 0.85rem; font-size: 16px; }
    .form-actions .btn { width: 100%; }
    .site-footer { padding: 2rem 1rem; }
    .footer-logo img { height: 1.75rem; }
}

@media (max-width: 380px) {
    .hero-title { font-size: 1.4rem; }
    .hero-cta .btn { max-width: 100%; }
    .section-cta .btn-large { max-width: 100%; }
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
    .animate-on-scroll { opacity: 1; transform: none; }
    .animate-on-scroll .section-title,
    .animate-on-scroll .section-lead,
    .animate-on-scroll .feature-card { opacity: 1; transform: none; }
}
