:root {
    --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --bg: #ffffff;
    --bg-alt: #f7f7fa;
    --surface: #ffffff;
    --text: #16161a;
    --text-muted: #5b5b66;
    --text-faint: #6b6b76;
    --border: #e7e7ec;
    --border-strong: #d2d2da;
    --accent: #5b43e0;
    --accent-hover: #4936c4;
    --accent-light: #f1eefd;
    --white: #ffffff;
    --radius: 16px;
    --radius-sm: 12px;
    --gap-cards: 1.75rem;
    --max-width: 1040px;
    --space: clamp(2.25rem, 6vw, 4.5rem);
    --container-pad: clamp(1.5rem, 5vw, 2.5rem);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font);
    color: var(--text);
    background: var(--bg);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--container-pad);
}

a {
    color: var(--accent);
}

a:focus-visible,
button:focus-visible,
.btn:focus-visible,
summary:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
    border-radius: 4px;
}

.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    background: var(--accent);
    color: var(--white);
    padding: 0.75rem 1.25rem;
    border-radius: 0 0 10px 0;
    font-weight: 600;
    font-size: 0.9rem;
    z-index: 100;
    text-decoration: none;
}

.skip-link:focus {
    left: 0;
}

img, svg {
    display: block;
    max-width: 100%;
}

/* ---------- NAV ---------- */
nav {
    position: sticky;
    top: 0;
    z-index: 20;
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
}

nav .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
    padding-top: 1.1rem;
    padding-bottom: 1.1rem;
}

nav .logo {
    font-weight: 800;
    font-size: 1.05rem;
    letter-spacing: -0.02em;
    text-decoration: none;
    color: var(--text);
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 2.5rem;
}

nav ul {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 1.75rem;
    flex-wrap: wrap;
}

nav ul a {
    display: inline-flex;
    align-items: center;
    padding: 0.65rem 0;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.92rem;
    font-weight: 500;
    transition: color 0.15s ease;
}

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

nav ul a.active {
    color: var(--accent);
}

nav .btn {
    padding: 0.6rem 1.25rem;
    font-size: 0.88rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

nav .btn.visible {
    opacity: 1;
    pointer-events: auto;
}

.nav-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    color: var(--text);
    cursor: pointer;
    padding: 0.4rem;
}

.nav-toggle .icon-close {
    display: none;
}

.nav-toggle[aria-expanded="true"] .icon-open {
    display: none;
}

.nav-toggle[aria-expanded="true"] .icon-close {
    display: block;
}

@media (max-width: 760px) {
    .nav-toggle {
        display: flex;
    }

    .nav-right {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: flex-start;
        gap: 1.25rem;
        padding: 1.5rem var(--container-pad) 2rem;
        background: rgba(255, 255, 255, 0.97);
        backdrop-filter: blur(10px);
        border-bottom: 1px solid var(--border);
        opacity: 0;
        visibility: hidden;
        transform: translateY(-8px);
        transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
    }

    .nav-right.open {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }

    nav ul {
        flex-direction: column;
        align-items: flex-start;
        gap: 1.25rem;
    }

    /* Scroll-based reveal doesn't apply inside a collapsed menu — always show the CTA here */
    .nav-right .btn {
        opacity: 1 !important;
        pointer-events: auto !important;
    }
}

/* ---------- SECTIONS ---------- */
section {
    padding: var(--space) 0;
    border-bottom: 1px solid var(--border);
}

section:last-of-type {
    border-bottom: none;
}

section.alt {
    background: var(--bg-alt);
}

.eyebrow {
    display: inline-block;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--accent);
    margin-bottom: 1rem;
}

h1, h2, h3 {
    letter-spacing: -0.02em;
    color: var(--text);
}

h1 {
    font-size: clamp(2.75rem, 6vw, 4.5rem);
    font-weight: 800;
    line-height: 1.05;
    letter-spacing: -0.03em;
    margin-bottom: 1.5rem;
    text-wrap: balance;
}

.serif-accent {
    font-family: 'Instrument Serif', serif;
    font-style: italic;
    font-weight: 400;
    font-size: 1.15em;
    color: var(--accent);
}

h2 {
    font-size: clamp(1.6rem, 3.6vw, 2.25rem);
    font-weight: 700;
    margin-bottom: 1rem;
}

h3 {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

p {
    color: var(--text-muted);
    max-width: 60ch;
}

.section-head {
    max-width: 640px;
    margin-bottom: 2.25rem;
}

.section-head p {
    font-size: 1.05rem;
}

/* ---------- BUTTONS ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: var(--accent);
    color: var(--white);
    text-decoration: none;
    font-size: 0.92rem;
    font-weight: 600;
    padding: 0.9rem 1.85rem;
    border: 1px solid var(--accent);
    border-radius: 999px;
    cursor: pointer;
    font-family: var(--font);
    transition: background 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.btn:hover {
    background: var(--accent-hover);
    border-color: var(--accent-hover);
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(91, 67, 224, 0.25);
}

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

.btn.btn-outline:hover {
    background: var(--bg-alt);
    border-color: var(--text);
    box-shadow: none;
    color: var(--text);
}

/* ---------- CARD (shared component) ---------- */
.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.card:hover {
    border-color: var(--border-strong);
    box-shadow: 0 16px 32px rgba(22, 22, 26, 0.06);
    transform: translateY(-3px);
}

.icon-mark {
    color: var(--accent);
    flex-shrink: 0;
}

/* ---------- HERO ---------- */
#hero {
    padding-top: clamp(2.5rem, 7vw, 5rem);
}

.hero-grid {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 3.5rem;
}

.hero-byline {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-bottom: 1.25rem;
}

.hero-byline .name {
    font-size: 1rem;
    font-weight: 700;
}

.hero-byline .dot {
    color: var(--accent);
    font-weight: 700;
}

.hero-byline .role {
    font-size: 0.92rem;
    color: var(--text-faint);
}

#hero .lede {
    font-size: clamp(1.05rem, 2vw, 1.2rem);
    margin-bottom: 1rem;
}

#hero .hero-intro {
    margin-bottom: 2.25rem;
}

.hero-photo {
    width: 184px;
    height: 184px;
    object-fit: cover;
    object-position: top;
    border-radius: 50%;
    border: 1px solid var(--border);
    justify-self: center;
    transition-delay: 0.1s;
}

@media (max-width: 760px) {
    .hero-grid {
        grid-template-columns: 1fr;
        text-align: left;
    }

    .hero-photo {
        order: -1;
        width: 136px;
        height: 136px;
    }
}

/* ---------- PROCESS (editorial numbered, staggered) ---------- */
#process {
    position: relative;
    overflow: hidden;
}

/* Lifts the real content above the absolutely-positioned watermark — #process has
   no z-index of its own, so without this the watermark (z-index: 0) would paint
   over this plain, unpositioned container */
#process > .container {
    position: relative;
    z-index: 1;
}

.section-watermark {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-family: 'Instrument Serif', serif;
    font-style: italic;
    font-size: 13rem;
    letter-spacing: 0.08em;
    white-space: nowrap;
    color: var(--accent);
    opacity: 0.09;
    z-index: 0;
    pointer-events: none;
}

.process-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4rem;
    align-items: start;
}

.process-card {
    display: flex;
    align-items: flex-start;
    gap: 1.25rem;
    text-align: left;
}

.process-card:nth-child(2) {
    margin-top: 3.5rem;
    transition-delay: 0.08s;
}

.process-card:nth-child(3) {
    margin-top: 7rem;
    transition-delay: 0.16s;
}

.process-card .step-num {
    flex-shrink: 0;
    font-family: 'Instrument Serif', serif;
    font-style: italic;
    font-size: 3rem;
    color: var(--accent);
    line-height: 1;
}

.process-card-body {
    flex: 1;
    min-width: 0;
    max-width: 260px;
}

@media (max-width: 700px) {
    .process-grid {
        grid-template-columns: 1fr;
        gap: 2.25rem;
    }

    .process-card:nth-child(2),
    .process-card:nth-child(3) {
        margin-top: 0;
    }
}

/* ---------- SERVICES ---------- */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 2.5rem;
}

.service-block {
    text-align: center;
}

.service-block:nth-child(2) {
    transition-delay: 0.08s;
}

.service-block:nth-child(3) {
    transition-delay: 0.16s;
}

.service-icon {
    width: 54px;
    height: 54px;
    margin: 0 auto 1.4rem;
    border-radius: 15px; /* one-off value, not reused elsewhere */
    background: var(--accent-light);
    color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
}

.service-icon svg {
    width: 22px;
    height: 22px;
}

/* ---------- TAG CLOUD ---------- */
.tag-cloud-wrap {
    margin-top: 3rem;
    max-width: 620px;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}

.tag-divider {
    width: 15%;
    max-width: 70px;
    height: 1px;
    background: var(--border-strong);
    margin: 0 auto 1.5rem;
}

.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.6rem;
}

.tag-cloud span {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    padding: 0.5rem 1rem;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--bg-alt);
}

/* ---------- TECH STACK (separator strip between hero and process) ---------- */
.tech-stack-section {
    padding: 2.5rem 0;
    border-top: 1px solid var(--border);
}

.tech-stack-section .tag-cloud {
    gap: 1.75rem;
}

/* Icon + plain text, no pill background */
.tag-cloud .tag-logo {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: none;
    border: none;
    padding: 0;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-muted);
}

.tag-logo svg {
    width: 16px;
    height: 16px;
}

/* ---------- WORK ---------- */
.work-featured {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: var(--gap-cards);
}

.work-feature-card {
    display: flex;
    flex-direction: column;
    padding: 1.75rem;
    text-decoration: none;
}

.work-feature-card:nth-child(2) {
    transition-delay: 0.08s;
}

.work-feature-card p {
    margin-bottom: 0.5rem;
}

.work-thumb {
    aspect-ratio: 16 / 10;
    border-radius: var(--radius-sm);
    background: var(--border);
    border: 1px solid var(--border-strong);
    overflow: hidden;
    margin-bottom: 1.25rem;
}

.work-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top;
}

.work-link {
    display: inline-block;
    margin-top: auto;
    padding-top: 0.5rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--accent);
}

/* ---------- TESTIMONIAL (standalone full-width section, bridges Work and Pricing) ---------- */
.testimonial-section {
    background: var(--accent-light);
}

.testimonial {
    max-width: 720px;
    margin: 0 auto;
    text-align: center;
}

.testimonial blockquote {
    margin: 0 0 1.75rem;
}

.testimonial blockquote p {
    font-family: var(--font);
    font-style: normal;
    font-size: clamp(1.4rem, 2.6vw, 1.9rem);
    font-weight: 600;
    line-height: 1.35;
    color: var(--text);
    max-width: none;
}

.testimonial figcaption {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.9rem;
}

.testimonial-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--white);
    color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.95rem;
    flex-shrink: 0;
}

.testimonial-meta {
    display: flex;
    flex-direction: column;
    text-align: left;
    font-size: 0.9rem;
}

.testimonial-meta strong {
    color: var(--text);
    font-weight: 700;
}

.testimonial-meta span {
    color: var(--text-muted);
}

/* ---------- PRICING ---------- */
.pricing-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--gap-cards);
}

.pricing-card {
    display: flex;
    flex-direction: column;
    width: 100%; /* combined with max-width below, forces one card per row inside the flex-wrap parent — intentional */
    max-width: 320px;
    padding: 2.75rem 2.25rem 2.5rem;
}

.pricing-card:nth-child(2) {
    transition-delay: 0.08s;
}

.pricing-card.featured {
    position: relative;
    border: 2px solid var(--accent);
    box-shadow: 0 18px 40px rgba(91, 67, 224, 0.16);
}

.pricing-card.featured:hover {
    box-shadow: 0 22px 48px rgba(91, 67, 224, 0.22);
}

.pricing-card .badge {
    position: absolute;
    top: 0;
    left: 2.25rem;
    transform: translateY(-50%);
    display: inline-block;
    background: var(--accent);
    color: var(--white);
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.35rem 0.9rem;
    border-radius: 999px;
}

.pricing-card .price.price-custom {
    font-size: 1.9rem;
    font-weight: 700;
}

.pricing-card .tag {
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--text-faint);
    margin-bottom: 0.75rem;
}

.pricing-card .price {
    font-size: 3rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--text);
    margin-bottom: 0.5rem;
    position: relative;
    display: flex;
    align-items: center;
    min-height: 3.6rem;
}

.pricing-card .price .accent-num {
    color: var(--accent);
}

.pricing-card .price-underline {
    width: 36px;
    height: 4px;
    border-radius: 999px;
    background: var(--accent);
    margin-bottom: 1.25rem;
}

.pricing-card .price span.period {
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-faint);
}

.pricing-card .desc {
    font-size: 0.95rem;
    margin-bottom: 1.75rem;
}

.pricing-card .btn {
    margin-top: auto;
    align-self: flex-start;
}

.guarantee {
    display: flex;
    align-items: flex-start;
    gap: 1.1rem;
    margin-top: 2.25rem;
    padding: 1.4rem 1.6rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg-alt);
}

.guarantee .icon-mark {
    width: 22px;
    height: 22px;
    margin-top: 0.1rem;
}

.guarantee p {
    max-width: none;
    font-size: 0.92rem;
}

.guarantee strong {
    color: var(--text);
}

.pricing-note {
    margin-top: 2.75rem;
    padding: 1.4rem 1.6rem;
    border: 1px solid transparent;
    border-radius: var(--radius);
    font-size: 0.98rem;
    text-align: center;
    max-width: none;
}

/* ---------- FAQ ---------- */
.faq-item {
    border: none;
    border-radius: var(--radius);
    background: var(--bg-alt);
    padding: 1.4rem 1.6rem;
    margin-bottom: 1rem;
    transition: background 0.2s ease;
}

.faq-item:last-child {
    margin-bottom: 0;
}

.faq-item:hover,
.faq-item[open] {
    background: var(--accent-light);
}

.faq-item summary {
    cursor: pointer;
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text);
}

.faq-item summary::-webkit-details-marker {
    display: none;
}

.faq-item summary::after {
    content: '+';
    flex-shrink: 0;
    font-size: 1.3rem;
    font-weight: 300;
    color: var(--accent);
}

.faq-item[open] summary::after {
    content: '\2212';
}

.faq-item p {
    margin-top: 0.75rem;
    max-width: none;
}

/* ---------- CONTACT (dark) ---------- */
#contact.section-dark {
    --bg-alt: #0a0a0c;
    --text: #f5f5f6;
    --text-muted: #b2b2ba;
    --text-faint: #86868f;
    --border: #2a2a31;
    --border-strong: #3c3c44;
    --surface: #15151a;
    --accent-light: rgba(91, 67, 224, 0.18);
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.15fr;
    gap: 3.5rem;
    align-items: center;
}

.contact-text h2 {
    margin-bottom: 1.25rem;
}

.contact-text p {
    font-size: 1.05rem;
}

.contact-cal:nth-child(2) {
    transition-delay: 0.08s;
}

#my-cal-inline {
    height: min(650px, 80vh);
}

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

/* ---------- FOOTER ---------- */
footer {
    padding: 2.5rem 0;
}

footer .container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

footer p {
    font-size: 0.85rem;
    color: var(--text-faint);
    max-width: none;
    margin: 0;
}

.footer-bottom {
    justify-content: space-between;
}

.footer-social {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.footer-social a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.7rem;
    color: var(--text-faint);
    transition: color 0.15s ease;
}

.footer-social a:hover {
    color: var(--accent);
}

.footer-social svg {
    width: 18px;
    height: 18px;
}

/* ---------- SCROLL REVEAL ---------- */
.reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

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