/* ==========================================================================
   Portfolio — dark, bold theme
   Fonts: Bricolage Grotesque (display) + Geist (body)
   ========================================================================== */
:root {
    --bg: #0b0b0d;
    --bg-2: #111114;
    --surface: #16161a;
    --surface-2: #1d1d22;
    --line: rgba(255, 255, 255, .08);
    --line-strong: rgba(255, 255, 255, .16);
    --ink: #f3f1ec;
    --ink-soft: #a3a19a;
    --ink-faint: #6d6b66;
    --accent: #d4ff3a;
    --accent-ink: #0b0b0d;
    --glow-1: #7c5cff;
    --glow-2: #ff5c8a;
    --radius: 22px;
    --radius-sm: 14px;
    --display: 'Bricolage Grotesque', 'Geist', system-ui, sans-serif;
    --sans: 'Geist', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --ease: cubic-bezier(.2, .7, .2, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 100px; }
body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font: 17px/1.65 var(--sans);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}
/* subtle film grain */
body::before {
    content: ""; position: fixed; inset: 0; z-index: 100; pointer-events: none; opacity: .05;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
::selection { background: var(--accent); color: var(--accent-ink); }
img { max-width: 100%; display: block; }
a { color: var(--accent); text-underline-offset: 3px; }
h1, h2, h3 { font-family: var(--display); font-weight: 700; line-height: 1.02; letter-spacing: -.035em; margin: 0 0 .5em; }
h1 { font-size: clamp(2.8rem, 8vw, 6.6rem); }
h2 { font-size: clamp(2.2rem, 5.5vw, 4.2rem); }
h3 { font-size: 1.55rem; letter-spacing: -.02em; line-height: 1.15; }
p { margin: 0 0 1em; }
em.hl { font-style: normal; color: var(--accent); }

.container { width: min(1240px, 100% - 32px); margin-inline: auto; }
.narrow { width: min(820px, 100% - 32px); }
.center { text-align: center; }
.muted { color: var(--ink-soft); }
.small { font-size: .875rem; }
.eyebrow {
    display: inline-flex; align-items: center; gap: .6em;
    font-size: .8rem; font-weight: 500; text-transform: uppercase; letter-spacing: .16em;
    color: var(--ink-soft); margin-bottom: 1.4em;
}
.eyebrow::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 12px var(--accent); }
.lead { font-size: clamp(1.1rem, 1.6vw, 1.3rem); color: var(--ink-soft); max-width: 620px; line-height: 1.6; }

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex; align-items: center; gap: .6em;
    padding: .95em 1.6em; border-radius: 999px;
    font: 600 1rem/1 var(--sans); text-decoration: none; cursor: pointer;
    border: 1px solid var(--line-strong); color: var(--ink); background: transparent;
    transition: transform .25s var(--ease), background .25s, color .25s, border-color .25s, box-shadow .25s;
}
.btn:hover { transform: translateY(-2px); border-color: var(--ink); }
.btn .arrow { transition: transform .25s var(--ease); }
.btn:hover .arrow { transform: translateX(4px); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { border-color: var(--accent); box-shadow: 0 10px 40px -8px rgba(212, 255, 58, .55); }
.btn-ghost:hover { background: var(--ink); color: var(--bg); }
.btn-small { padding: .6em 1.15em; font-size: .9rem; }

/* ---------- Header ---------- */
.site-header { position: fixed; top: 16px; left: 0; right: 0; z-index: 60; pointer-events: none; }
.nav {
    pointer-events: auto;
    display: flex; align-items: center; justify-content: space-between; gap: 1rem;
    height: 64px; padding: 0 10px 0 24px;
    background: rgba(17, 17, 20, .72); backdrop-filter: blur(16px) saturate(140%);
    border: 1px solid var(--line); border-radius: 999px;
    transition: background .3s;
}
.brand { font-family: var(--display); font-weight: 700; font-size: 1.25rem; letter-spacing: -.03em; color: var(--ink); text-decoration: none; display: flex; align-items: center; gap: .5rem; }
.brand-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--accent); }
.nav-links { display: flex; align-items: center; gap: .3rem; }
.nav-links a:not(.btn) { color: var(--ink-soft); text-decoration: none; font-weight: 500; font-size: .95rem; padding: .5em .85em; border-radius: 999px; transition: color .2s, background .2s; }
.nav-links a:not(.btn):hover { color: var(--ink); background: rgba(255, 255, 255, .06); }
.nav-links .btn { margin-left: .4rem; }
.nav-toggle { display: none; background: none; border: 0; color: var(--ink); cursor: pointer; padding: .5rem 1rem; font-size: 1.4rem; }
main { padding-top: 0; }

/* ---------- Hero ---------- */
.hero { position: relative; padding: clamp(9rem, 18vw, 13rem) 0 clamp(4rem, 8vw, 6rem); overflow: hidden; isolation: isolate; }
.hero::before, .hero::after {
    content: ""; position: absolute; z-index: -1; border-radius: 50%; filter: blur(110px); opacity: .55;
    animation: drift 18s ease-in-out infinite alternate;
}
.hero::before { width: 520px; height: 520px; background: var(--glow-1); top: -160px; right: -80px; }
.hero::after { width: 420px; height: 420px; background: var(--glow-2); bottom: -200px; left: 18%; opacity: .3; animation-delay: -6s; }
@keyframes drift { to { transform: translate(-60px, 50px) scale(1.15); } }
.hero-grid {
    position: absolute; inset: 0; z-index: -1; opacity: .5;
    background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
    background-size: 72px 72px;
    mask-image: radial-gradient(ellipse at 50% 30%, #000 20%, transparent 70%);
}
.status-pill {
    display: inline-flex; align-items: center; gap: .6rem;
    padding: .45rem 1rem .45rem .7rem; margin-bottom: 2rem;
    border: 1px solid var(--line-strong); border-radius: 999px; background: rgba(255, 255, 255, .03);
    font-size: .88rem; color: var(--ink-soft);
}
.status-pill .pulse { width: 9px; height: 9px; border-radius: 50%; background: #3ddc84; position: relative; }
.status-pill .pulse::after { content: ""; position: absolute; inset: -4px; border-radius: 50%; border: 2px solid #3ddc84; animation: pulse 2s infinite; }
@keyframes pulse { from { transform: scale(.6); opacity: 1; } to { transform: scale(1.8); opacity: 0; } }
.hero h1 { max-width: 1050px; }
.hero .lead { margin-top: 1.6rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 2.4rem; }
.hero-stats { display: flex; flex-wrap: wrap; gap: clamp(2rem, 6vw, 5rem); margin-top: clamp(3.5rem, 7vw, 5.5rem); padding-top: 2rem; border-top: 1px solid var(--line); }
.hero-stats strong { display: block; font-family: var(--display); font-size: clamp(2.2rem, 4vw, 3rem); font-weight: 700; letter-spacing: -.04em; line-height: 1; }
.hero-stats span { color: var(--ink-soft); font-size: .92rem; }

/* ---------- Marquee ---------- */
.marquee { border-block: 1px solid var(--line); background: var(--bg-2); overflow: hidden; padding: 1.3rem 0; }
.marquee-track { display: flex; width: max-content; animation: scroll 38s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee-track span {
    font-family: var(--display); font-weight: 600; font-size: clamp(1.4rem, 2.6vw, 2.1rem); letter-spacing: -.02em;
    white-space: nowrap; padding: 0 1.6rem; display: flex; align-items: center; gap: 3.2rem; color: var(--ink);
}
.marquee-track span::after { content: "✦"; color: var(--accent); font-size: .7em; }
@keyframes scroll { to { transform: translateX(-50%); } }

/* ---------- Sections ---------- */
.section { padding: clamp(5rem, 11vw, 9rem) 0; position: relative; }
.section-alt { background: var(--bg-2); }
.section-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 2rem; flex-wrap: wrap; margin-bottom: clamp(2.5rem, 5vw, 4rem); }
.section-head h2 { margin: 0; max-width: 760px; }
.section-head p { color: var(--ink-soft); max-width: 380px; margin: 0; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 2rem; }

.placeholder-img {
    width: 100%; height: 100%; min-height: 100%; aspect-ratio: 4/3; display: grid; place-items: center; border-radius: inherit;
    background:
        radial-gradient(circle at 25% 30%, color-mix(in srgb, var(--ph, var(--glow-1)) 75%, transparent), transparent 55%),
        radial-gradient(circle at 80% 75%, color-mix(in srgb, var(--ph2, var(--glow-2)) 55%, transparent), transparent 50%),
        var(--surface-2);
}
.placeholder-img span { background: rgba(0, 0, 0, .45); backdrop-filter: blur(6px); padding: .4em 1em; border-radius: 999px; font-size: .85rem; color: var(--ink); border: 1px solid var(--line-strong); }
.placeholder-img.tall { aspect-ratio: 16/9; }

/* ---------- About ---------- */
.about-grid { display: grid; grid-template-columns: 5fr 7fr; gap: clamp(2.5rem, 6vw, 6rem); align-items: center; }
.about-media { position: relative; }
.about-media img, .about-media .placeholder-img { border-radius: var(--radius); aspect-ratio: 4/5; object-fit: cover; width: 100%; }
.about-media .placeholder-img { --ph: #3d7bff; --ph2: var(--accent); }
.sticker {
    position: absolute; right: -18px; bottom: 28px; width: 128px; height: 128px; border-radius: 50%;
    background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; text-align: center;
    font-family: var(--display); font-weight: 700; line-height: 1.05; font-size: 1rem; transform: rotate(-12deg);
    box-shadow: 0 20px 50px -10px rgba(0, 0, 0, .6);
}
.sticker strong { display: block; font-size: 2.1rem; letter-spacing: -.04em; }
.about-text p { color: var(--ink-soft); font-size: 1.1rem; }
.about-text p:first-of-type { color: var(--ink); font-size: clamp(1.2rem, 1.8vw, 1.45rem); line-height: 1.5; }
.tags { list-style: none; padding: 0; margin: 2rem 0 0; display: flex; flex-wrap: wrap; gap: .55rem; }
.tags li { border: 1px solid var(--line-strong); padding: .45em 1.05em; border-radius: 999px; font-size: .92rem; transition: background .2s, color .2s, border-color .2s; }
.tags li:hover { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }

/* ---------- Services ---------- */
.services { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem; }
.service {
    position: relative; overflow: hidden; display: flex; flex-direction: column; min-height: 400px; padding: 2.2rem;
    transition: transform .4s var(--ease), border-color .3s;
}
.service::before {
    content: ""; position: absolute; inset: 0; z-index: 0; opacity: 0; transition: opacity .4s;
    background: radial-gradient(circle at 100% 0%, rgba(212, 255, 58, .16), transparent 60%);
}
.service:hover { transform: translateY(-6px); border-color: rgba(212, 255, 58, .45); }
.service:hover::before { opacity: 1; }
.service > * { position: relative; z-index: 1; }
.service-top { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: auto; padding-bottom: 3rem; }
.service-num { font-family: var(--display); font-size: .95rem; color: var(--ink-faint); font-weight: 600; }
.service-icon {
    width: 60px; height: 60px; border-radius: 18px; display: grid; place-items: center;
    background: rgba(212, 255, 58, .1); color: var(--accent); border: 1px solid rgba(212, 255, 58, .25);
    transition: transform .4s var(--ease), background .3s, color .3s;
}
.service:hover .service-icon { transform: rotate(-8deg) scale(1.06); background: var(--accent); color: var(--accent-ink); }
.service h3 { font-size: 1.75rem; }
.service p { color: var(--ink-soft); }
.service .price { display: flex; justify-content: space-between; align-items: center; color: var(--ink); font-weight: 600; margin: 1rem 0 0; padding-top: 1.2rem; border-top: 1px solid var(--line); }
.service .price .arrow { color: var(--accent); transition: transform .3s var(--ease); }
.service:hover .price .arrow { transform: translateX(5px); }

/* ---------- Work ---------- */
.works { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.4rem; }
.work { display: block; text-decoration: none; color: inherit; padding: 0; overflow: hidden; background: transparent; border: 0; }
.work:first-child { grid-column: 1 / -1; }
.work-img { position: relative; border-radius: var(--radius); overflow: hidden; aspect-ratio: 4/3; border: 1px solid var(--line); }
.work:first-child .work-img { aspect-ratio: 21/9; }
.work-img img, .work-img .placeholder-img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: auto; transition: transform .8s var(--ease); }
.work:hover .work-img img, .work:hover .work-img .placeholder-img { transform: scale(1.05); }
.work-img::after {
    content: "View case study ↗"; position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%) scale(.85); opacity: 0;
    background: var(--accent); color: var(--accent-ink); font-weight: 600; padding: .85em 1.4em; border-radius: 999px; white-space: nowrap;
    transition: opacity .3s, transform .4s var(--ease);
}
.work:hover .work-img::after { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.work-body { display: flex; justify-content: space-between; align-items: flex-start; gap: 1.5rem; padding: 1.4rem .2rem 0; }
.work-body h3 { margin: 0 0 .3rem; font-size: clamp(1.5rem, 2.4vw, 2rem); }
.work-body p { color: var(--ink-soft); margin: 0; }
.meta { display: flex; gap: .5rem; flex-wrap: wrap; flex-shrink: 0; }
.meta span { font-size: .8rem; border: 1px solid var(--line-strong); padding: .3em .85em; border-radius: 999px; color: var(--ink-soft); white-space: nowrap; }
.work:nth-child(3n+2) .placeholder-img { --ph: #00c2a8; --ph2: #3d7bff; }
.work:nth-child(3n+3) .placeholder-img { --ph: #ff8a3d; --ph2: var(--glow-2); }

.work-meta { display: flex; flex-wrap: wrap; gap: 3rem; margin: 2.4rem 0; padding: 1.5rem 0; border-block: 1px solid var(--line); }
.work-meta dt { font-size: .78rem; color: var(--ink-faint); text-transform: uppercase; letter-spacing: .14em; margin-bottom: .3rem; }
.work-meta dd { margin: 0; font-weight: 600; font-size: 1.05rem; }
.work-hero { margin-bottom: 3rem; }
.work-hero img, .work-hero .placeholder-img { border-radius: var(--radius); width: 100%; border: 1px solid var(--line); }
.prose { font-size: 1.15rem; color: var(--ink-soft); margin-bottom: 2.5rem; }
.prose p:first-child { color: var(--ink); font-size: 1.3rem; }
.back { color: var(--ink-soft); text-decoration: none; display: inline-flex; gap: .4rem; margin-bottom: 1.5rem; }
.back:hover { color: var(--ink); }
.page-top { padding-top: clamp(8rem, 14vw, 10rem); }

/* ---------- Testimonials ---------- */
.testimonials { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem; }
.testimonial { margin: 0; display: flex; flex-direction: column; padding: 2.2rem; position: relative; overflow: hidden; }
.testimonial::before {
    content: "\201C"; position: absolute; top: -.18em; right: .15em; font-family: var(--display); font-size: 9rem; line-height: 1;
    color: var(--accent); opacity: .12;
}
.testimonial:nth-child(2) { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.testimonial:nth-child(2)::before { color: var(--accent-ink); }
.testimonial:nth-child(2) .stars, .testimonial:nth-child(2) figcaption span { color: rgba(11, 11, 13, .65); }
.stars { color: var(--accent); letter-spacing: .2em; margin-bottom: 1.5rem; font-size: .95rem; }
.testimonial blockquote { margin: 0 0 2rem; font-size: 1.2rem; line-height: 1.55; flex: 1; font-weight: 500; letter-spacing: -.01em; }
.testimonial figcaption { display: flex; align-items: center; gap: .9rem; }
.avatar {
    width: 46px; height: 46px; border-radius: 50%; flex-shrink: 0; display: grid; place-items: center;
    font-family: var(--display); font-weight: 700; background: var(--surface-2); color: var(--ink); border: 1px solid var(--line-strong);
}
.testimonial:nth-child(2) .avatar { background: var(--accent-ink); color: var(--accent); border-color: transparent; }
.testimonial figcaption strong { display: block; line-height: 1.3; }
.testimonial figcaption span { color: var(--ink-soft); font-size: .9rem; }

/* ---------- Contact ---------- */
.contact-wrap {
    position: relative; overflow: hidden; isolation: isolate;
    border-radius: calc(var(--radius) + 10px); border: 1px solid var(--line);
    background: var(--surface); padding: clamp(2rem, 5vw, 4.5rem);
}
.contact-wrap::before {
    content: ""; position: absolute; z-index: -1; width: 600px; height: 600px; border-radius: 50%;
    background: var(--glow-1); filter: blur(140px); opacity: .28; top: -300px; left: -200px;
}
.contact-grid { display: grid; grid-template-columns: 5fr 6fr; gap: clamp(2.5rem, 6vw, 5rem); align-items: start; }
.contact-grid h2 { font-size: clamp(2.4rem, 5vw, 4rem); }
.contact-list { list-style: none; padding: 0; margin: 2.5rem 0 0; }
.contact-list li { padding: 1.1rem 0; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: .15rem; }
.contact-list li span { color: var(--ink-faint); font-size: .78rem; text-transform: uppercase; letter-spacing: .14em; }
.contact-list a, .contact-list li { color: var(--ink); text-decoration: none; font-size: 1.15rem; font-weight: 500; }
.contact-list a:hover { color: var(--accent); }

.form label { display: block; font-weight: 500; font-size: .9rem; margin-bottom: 1.1rem; color: var(--ink-soft); }
.form input, .form textarea, .form select {
    display: block; width: 100%; margin-top: .45rem; padding: .95em 1.1em;
    border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
    font: inherit; font-size: 1rem; background: rgba(0, 0, 0, .28); color: var(--ink);
    transition: border-color .2s, box-shadow .2s, background .2s;
}
.form input::placeholder, .form textarea::placeholder { color: var(--ink-faint); }
.form input:focus, .form textarea:focus, .form select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px rgba(212, 255, 58, .15); background: rgba(0, 0, 0, .4); }
.form .btn { width: 100%; justify-content: center; margin-top: .4rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.opt { color: var(--ink-faint); font-weight: 400; }
.hp { position: absolute; left: -9999px; }

.flash { padding: 1em 1.2em; border-radius: var(--radius-sm); margin-bottom: 1.4rem; font-size: .95rem; border: 1px solid; }
.flash-success { background: rgba(61, 220, 132, .1); border-color: rgba(61, 220, 132, .35); color: #8af0b6; }
.flash-error { background: rgba(255, 92, 92, .1); border-color: rgba(255, 92, 92, .35); color: #ff9c9c; }
.flash-info { background: rgba(124, 92, 255, .12); border-color: rgba(124, 92, 255, .35); color: #c5b8ff; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding: clamp(4rem, 8vw, 6rem) 0 2rem; overflow: hidden; }
.footer-cta { display: flex; justify-content: space-between; align-items: flex-end; flex-wrap: wrap; gap: 2rem; margin-bottom: 4rem; }
.footer-cta h2 { margin: 0; max-width: 700px; }
.footer-word {
    font-family: var(--display); font-weight: 800; letter-spacing: -.06em; line-height: .8;
    font-size: clamp(4rem, 15vw, 14rem); white-space: nowrap; overflow: hidden;
    background: linear-gradient(180deg, var(--ink) 0%, rgba(243, 241, 236, .04) 95%);
    -webkit-background-clip: text; background-clip: text; color: transparent;
    margin-bottom: 2.5rem; user-select: none;
}
.footer-inner { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 1rem; font-size: .92rem; color: var(--ink-faint); padding-top: 1.5rem; border-top: 1px solid var(--line); }
.footer-inner p { margin: 0; }
.socials { display: flex; gap: 1.5rem; flex-wrap: wrap; }
.socials a { color: var(--ink-soft); text-decoration: none; }
.socials a:hover { color: var(--accent); }

/* ---------- Scroll reveal ---------- */
.js .reveal { opacity: 0; transform: translateY(28px); transition: opacity .9s var(--ease), transform .9s var(--ease); transition-delay: var(--d, 0s); }
.js .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; }
    .js .reveal { opacity: 1; transform: none; }
    html { scroll-behavior: auto; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1000px) {
    .services, .testimonials { grid-template-columns: 1fr 1fr; }
    .service { min-height: 340px; }
}
@media (max-width: 860px) {
    .nav-toggle { display: block; }
    .nav { border-radius: 26px; }
    .nav-open .nav { border-radius: 26px 26px 0 0; }
    .nav-links {
        display: none; position: absolute; top: 64px; left: 16px; right: 16px; flex-direction: column; align-items: stretch; gap: .2rem;
        background: rgba(17, 17, 20, .97); backdrop-filter: blur(16px); border: 1px solid var(--line); border-top: 0;
        border-radius: 0 0 26px 26px; padding: .6rem .8rem 1rem;
    }
    .nav-open .nav-links { display: flex; }
    .nav-links a:not(.btn) { padding: .8rem .9rem; }
    .nav-links .btn { margin: .5rem 0 0; justify-content: center; }
    .about-grid, .contact-grid { grid-template-columns: 1fr; }
    .about-media { max-width: 440px; }
    .sticker { right: -8px; width: 108px; height: 108px; }
    .works { grid-template-columns: 1fr; }
    .work:first-child .work-img { aspect-ratio: 4/3; }
    .work-body { flex-direction: column; gap: .8rem; }
}
@media (max-width: 640px) {
    body { font-size: 16px; }
    .services, .testimonials { grid-template-columns: 1fr; }
    .form-row { grid-template-columns: 1fr; gap: 0; }
    .service { min-height: 0; }
    .service-top { padding-bottom: 2rem; }
    .hero::before { width: 320px; height: 320px; }
}
.page-top h1 { font-size: clamp(2.4rem, 6vw, 4.6rem); }
.page-top .card.form { margin-top: 1.5rem; }
