:root {
    --brand: #2563eb;
    --brand-dark: #1d4ed8;
    --ink: #0f172a;
    --muted: #64748b;
    --line: #e2e8f0;
    --soft: #f8fafc;
    --surface: #ffffff;
    --surface-2: #f1f5f9;
    --footer: #020617;
    --footer-line: #1e293b;
}

html[data-theme="dark"] {
    color-scheme: dark;
    --brand: #60a5fa;
    --brand-dark: #3b82f6;
    --ink: #f8fafc;
    --muted: #cbd5e1;
    --line: #334155;
    --soft: #0f172a;
    --surface: #111827;
    --surface-2: #1e293b;
    --footer: #020617;
    --footer-line: #1e293b;
}

body {
    font-family: 'Inter', sans-serif;
    color: var(--ink);
    background: var(--soft);
    transition: background 0.2s ease, color 0.2s ease;
}

#scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 70;
    width: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--brand), #93c5fd);
    box-shadow: 0 0 18px rgba(37, 99, 235, 0.35);
    pointer-events: none;
}

.site-nav {
    background: rgba(255, 255, 255, 0.92);
    border-bottom: 1px solid rgba(226, 232, 240, 0.8);
    backdrop-filter: blur(16px);
}

.nav-link {
    color: #334155;
    font-size: 0.94rem;
    font-weight: 600;
    transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
    color: var(--brand);
}

.brand-mark {
    width: 42px;
    height: 42px;
    object-fit: contain;
}

.theme-toggle {
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    min-width: 44px;
    min-height: 44px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: var(--surface);
    color: var(--ink);
    font-weight: 800;
    transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.theme-toggle:hover {
    transform: translateY(-1px);
    border-color: #93c5fd;
}

.mobile-theme-toggle {
    display: flex;
    width: 100%;
    padding: 0.8rem 1rem;
}

.btn-primary,
.btn-secondary,
.btn-ghost {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    min-height: 46px;
    border-radius: 999px;
    font-weight: 700;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.btn-primary {
    background: var(--brand);
    color: #fff;
    box-shadow: 0 14px 30px -18px rgba(37, 99, 235, 0.8);
}

.btn-primary:hover {
    background: var(--brand-dark);
    transform: translateY(-1px);
    box-shadow: 0 18px 38px -20px rgba(37, 99, 235, 0.95);
}

.btn-primary:disabled {
    cursor: wait;
    opacity: 0.72;
    transform: none;
    box-shadow: none;
}

input:disabled,
textarea:disabled,
select:disabled {
    cursor: not-allowed;
    opacity: 0.62;
}

.btn-secondary {
    background: var(--surface);
    color: var(--ink);
    border: 1px solid var(--line);
}

.btn-secondary:hover,
.btn-ghost:hover {
    transform: translateY(-1px);
    border-color: #cbd5e1;
}

.btn-ghost {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.28);
}

.section-kicker {
    color: var(--brand);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hero {
    position: relative;
    overflow: hidden;
    min-height: 92svh;
    background-image:
        linear-gradient(90deg, rgba(15, 23, 42, 0.9) 0%, rgba(15, 23, 42, 0.72) 43%, rgba(15, 23, 42, 0.24) 100%),
        url('../Photo/Main.png');
    background-size: cover;
    background-position: center 44%;
}

.hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.075) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.075) 1px, transparent 1px);
    background-size: 72px 72px;
    mask-image: linear-gradient(90deg, black, transparent 72%);
    pointer-events: none;
}

.hero-panel {
    position: relative;
    z-index: 1;
    max-width: 720px;
}

.hero-passport {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
}

.hero-passport span {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    min-height: 36px;
    padding: 0 0.85rem;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.1);
    color: #dbeafe;
    font-size: 0.86rem;
    font-weight: 800;
    backdrop-filter: blur(10px);
}

.metric-strip {
    border-top: 1px solid rgba(255, 255, 255, 0.18);
    border-bottom: 1px solid rgba(255, 255, 255, 0.18);
}

.surface {
    background: var(--surface);
    border: 1px solid var(--line);
}

.service-tile,
.faq-card,
.doc-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 18px;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.service-tile:hover,
.faq-card:hover {
    transform: translateY(-3px);
    border-color: #cbd5e1;
    box-shadow: 0 24px 60px -40px rgba(15, 23, 42, 0.35);
}

.service-price {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    margin-bottom: 1rem;
    padding: 0 0.8rem;
    border-radius: 999px;
    background: rgba(37, 99, 235, 0.08);
    color: var(--brand);
    font-size: 0.82rem;
    font-weight: 900;
}

.service-jump a {
    display: grid;
    gap: 0.35rem;
    min-height: 74px;
    padding: 1rem;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: var(--surface);
    font-weight: 900;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.service-jump a:hover {
    transform: translateY(-2px);
    border-color: #93c5fd;
    box-shadow: 0 20px 48px -38px rgba(15, 23, 42, 0.5);
}

.service-jump span {
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 800;
}

.service-meta {
    display: grid;
    gap: 0.55rem;
    margin: -0.25rem 0 1.6rem;
}

.service-meta span {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    color: var(--muted);
    font-size: 0.92rem;
    font-weight: 700;
}

.service-meta span::before {
    content: '';
    width: 0.45rem;
    height: 0.45rem;
    border-radius: 999px;
    background: var(--brand);
    flex: 0 0 auto;
}

.estimate-option {
    min-height: 46px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: var(--surface);
    color: var(--ink);
    font-weight: 800;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.estimate-option:hover {
    transform: translateY(-1px);
    border-color: #93c5fd;
}

.estimate-option.active {
    background: var(--brand);
    border-color: var(--brand);
    color: #fff;
}

.estimate-range {
    accent-color: var(--brand);
}

.work-scope {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
    gap: 2rem;
    align-items: start;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--line);
}

.estimate-map {
    position: relative;
    overflow: hidden;
}

.estimate-map::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(37, 99, 235, 0.08) 1px, transparent 1px),
        linear-gradient(90deg, rgba(37, 99, 235, 0.08) 1px, transparent 1px);
    background-size: 56px 56px;
    opacity: 0.45;
    pointer-events: none;
}

.estimate-map > * {
    position: relative;
    z-index: 1;
}

.blueprint-steps {
    display: grid;
    gap: 1rem;
}

.blueprint-step {
    display: grid;
    grid-template-columns: 3.25rem minmax(0, 1fr);
    gap: 1rem;
    align-items: start;
    padding: 1rem;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.72);
}

.blueprint-step span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.8rem;
    height: 2.8rem;
    border-radius: 999px;
    background: var(--brand);
    color: #fff;
    font-weight: 900;
}

.blueprint-step h3 {
    font-weight: 900;
    margin-bottom: 0.25rem;
}

.blueprint-step p {
    color: var(--muted);
    font-size: 0.94rem;
}

.price-factors {
    display: grid;
    gap: 0.8rem;
}

.price-factors div {
    display: flex;
    align-items: start;
    justify-content: space-between;
    gap: 1.25rem;
    padding-bottom: 0.9rem;
    border-bottom: 1px solid var(--line);
}

.price-factors strong {
    color: var(--ink);
    white-space: nowrap;
}

.price-factors span {
    color: var(--muted);
    text-align: right;
}

.estimate-result {
    background: linear-gradient(180deg, rgba(37, 99, 235, 0.08), rgba(37, 99, 235, 0.02));
    border: 1px solid rgba(37, 99, 235, 0.18);
}

.estimate-price {
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(37, 99, 235, 0.16);
}

.estimate-next {
    background: rgba(15, 23, 42, 0.035);
    border: 1px dashed rgba(37, 99, 235, 0.28);
}

.estimate-feedback {
    max-height: 0;
    overflow: hidden;
    color: var(--brand);
    font-size: 0.88rem;
    font-weight: 900;
    text-align: center;
    transition: max-height 0.2s ease, margin-top 0.2s ease;
}

.estimate-feedback.visible {
    max-height: 2rem;
    margin-top: 0.9rem;
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-auto-rows: 16rem;
    gap: 1.25rem;
}

.portfolio-item {
    overflow: hidden;
    border-radius: 18px;
    background: #e2e8f0;
}

.portfolio-grid .portfolio-item {
    height: auto;
    min-height: 16rem;
}

.portfolio-feature {
    grid-column: span 2;
    grid-row: span 2;
}

.portfolio-img {
    transition: transform 0.55s ease;
}

.portfolio-item:hover .portfolio-img {
    transform: scale(1.045);
}

.portfolio-overlay {
    background: linear-gradient(to top, rgba(15, 23, 42, 0.82), rgba(15, 23, 42, 0.02));
}

.work-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-bottom: 0.75rem;
}

.work-tags span {
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    padding: 0.25rem 0.55rem;
    color: #e0f2fe;
    font-size: 0.72rem;
    font-weight: 800;
}

.lightbox-frame {
    display: grid;
    gap: 0.85rem;
}

.lightbox-caption {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    color: #fff;
    font-weight: 800;
}

.process-line {
    position: relative;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1.25rem;
}

.process-line::before {
    content: '';
    position: absolute;
    top: 0.62rem;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--line);
}

.process-step {
    position: relative;
    border-left: 0;
    padding: 2rem 0 0;
}

.process-step::before {
    content: '';
    position: absolute;
    left: -0.43rem;
    top: 0.2rem;
    width: 0.85rem;
    height: 0.85rem;
    border-radius: 999px;
    background: var(--brand);
    box-shadow: 0 0 0 6px #dbeafe;
}

.process-step small {
    display: block;
    margin-top: 0.75rem;
    color: var(--brand);
    font-weight: 800;
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.28s ease, padding-bottom 0.28s ease;
}

.faq-item.open .faq-answer {
    max-height: 520px;
    padding-bottom: 1.35rem;
}

.faq-item.open .faq-icon {
    transform: rotate(180deg);
}

.faq-icon {
    transition: transform 0.2s ease;
}

.faq-highlights {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
}

.faq-highlights div {
    min-height: 150px;
    padding: 1.1rem;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: var(--surface);
}

.faq-highlights span {
    color: var(--brand);
    font-size: 0.78rem;
    font-weight: 900;
}

.faq-highlights strong {
    display: block;
    margin: 0.45rem 0 0.4rem;
    font-weight: 900;
}

.faq-highlights p {
    color: var(--muted);
    font-size: 0.9rem;
}

.reveal {
    opacity: 0;
    transform: translateY(26px);
    transition: opacity 0.65s ease, transform 0.65s ease;
}

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

#lightbox {
    display: none;
}

#lightbox.active {
    display: flex;
}

#scroll-top {
    opacity: 0;
    pointer-events: none;
}

#scroll-top.visible {
    opacity: 1;
    pointer-events: auto;
}

.doc-prose h2 {
    margin-top: 2rem;
    margin-bottom: 0.75rem;
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--ink);
}

.doc-prose p,
.doc-prose li {
    color: #475569;
    line-height: 1.75;
}

.doc-prose ul {
    margin: 0.75rem 0 1rem 1.25rem;
    list-style: disc;
}

html[data-theme="dark"] .site-nav {
    background: rgba(15, 23, 42, 0.9);
    border-bottom-color: rgba(51, 65, 85, 0.9);
}

html[data-theme="dark"] .nav-link,
html[data-theme="dark"] .text-slate-900,
html[data-theme="dark"] .text-slate-800,
html[data-theme="dark"] .text-slate-700 {
    color: #e2e8f0 !important;
}

html[data-theme="dark"] .nav-link:hover,
html[data-theme="dark"] .nav-link.active {
    color: var(--brand) !important;
}

html[data-theme="dark"] .text-slate-600,
html[data-theme="dark"] .text-slate-500,
html[data-theme="dark"] .text-slate-400 {
    color: #cbd5e1 !important;
}

html[data-theme="dark"] .bg-white,
html[data-theme="dark"] .bg-slate-50,
html[data-theme="dark"] .surface,
html[data-theme="dark"] .service-tile,
html[data-theme="dark"] .faq-card,
html[data-theme="dark"] .doc-card {
    background-color: var(--surface) !important;
    border-color: var(--line) !important;
}

html[data-theme="dark"] .estimate-result {
    background: linear-gradient(180deg, rgba(96, 165, 250, 0.14), rgba(15, 23, 42, 0.2));
    border-color: rgba(96, 165, 250, 0.28);
}

html[data-theme="dark"] .estimate-price {
    background: rgba(15, 23, 42, 0.58);
    border-color: rgba(96, 165, 250, 0.24);
}

html[data-theme="dark"] .blueprint-step,
html[data-theme="dark"] .estimate-next,
html[data-theme="dark"] .service-jump a,
html[data-theme="dark"] .faq-highlights div {
    background: rgba(15, 23, 42, 0.54);
    border-color: var(--line);
}

html[data-theme="dark"] .bg-slate-950,
html[data-theme="dark"] .bg-slate-900 {
    background-color: var(--footer) !important;
}

html[data-theme="dark"] .border-slate-800,
html[data-theme="dark"] .border-slate-300,
html[data-theme="dark"] .border-slate-200,
html[data-theme="dark"] .border-slate-100 {
    border-color: var(--line) !important;
}

html[data-theme="dark"] input,
html[data-theme="dark"] textarea,
html[data-theme="dark"] select {
    background-color: #0f172a !important;
    border-color: #334155 !important;
    color: #f8fafc !important;
}

html[data-theme="dark"] input:disabled,
html[data-theme="dark"] textarea:disabled,
html[data-theme="dark"] select:disabled {
    background-color: #111827 !important;
    color: #64748b !important;
}

html[data-theme="dark"] input::placeholder,
html[data-theme="dark"] textarea::placeholder {
    color: #94a3b8 !important;
}

html[data-theme="dark"] .bg-green-50 {
    background: rgba(20, 83, 45, 0.18) !important;
}

html[data-theme="dark"] .border-green-200 {
    border-color: rgba(74, 222, 128, 0.35) !important;
}

html[data-theme="dark"] .text-green-800 {
    color: #bbf7d0 !important;
}

html[data-theme="dark"] .bg-red-50 {
    background: rgba(127, 29, 29, 0.2) !important;
}

html[data-theme="dark"] .border-red-200 {
    border-color: rgba(248, 113, 113, 0.35) !important;
}

html[data-theme="dark"] .text-red-800 {
    color: #fecaca !important;
}

html[data-theme="dark"] .btn-secondary {
    background: #0f172a;
    color: #f8fafc;
    border-color: #334155;
}

html[data-theme="dark"] #mobile-menu {
    background: #0f172a !important;
    border-color: #334155 !important;
}

html[data-theme="dark"] #mobile-menu-btn {
    color: #f8fafc !important;
    border-color: #334155 !important;
}

html[data-theme="dark"] .process-step {
    border-left-color: #475569;
}

html[data-theme="dark"] .process-line::before {
    background: #475569;
}

html[data-theme="dark"] .process-step::before {
    box-shadow: 0 0 0 6px rgba(96, 165, 250, 0.18);
}

html[data-theme="dark"] .doc-prose p,
html[data-theme="dark"] .doc-prose li {
    color: #cbd5e1;
}

html[data-theme="dark"] .shadow-slate-200,
html[data-theme="dark"] .shadow-2xl,
html[data-theme="dark"] .shadow-lg {
    box-shadow: none !important;
}

@media (max-width: 768px) {
    .site-nav .h-20 {
        height: 4.25rem;
    }

    .hero {
        min-height: 82svh;
        background-image:
            linear-gradient(180deg, rgba(15, 23, 42, 0.82), rgba(15, 23, 42, 0.74)),
            url('../Photo/Main.png');
        background-position: center top;
    }

    .brand-mark {
        width: 38px;
        height: 38px;
    }

    .site-nav .text-xl {
        font-size: 1.05rem;
    }

    #mobile-menu .nav-link,
    #mobile-menu .mobile-link {
        min-height: 46px;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 14px;
    }

    .hero h1 {
        font-size: clamp(2.35rem, 12vw, 3.5rem);
    }

    .hero p {
        font-size: 1rem;
    }

    .metric-strip {
        grid-template-columns: 1fr;
        gap: 0.9rem;
    }

    .hero-passport {
        gap: 0.45rem;
    }

    .hero-passport span {
        min-height: 32px;
        font-size: 0.76rem;
    }

    .work-scope {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .price-factors div {
        display: grid;
        gap: 0.35rem;
    }

    .price-factors span {
        text-align: left;
    }

    .portfolio-grid {
        grid-template-columns: 1fr;
        grid-auto-rows: auto;
    }

    .portfolio-feature {
        grid-column: auto;
        grid-row: auto;
    }

    .process-line {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .process-line::before {
        top: 0;
        left: 0.42rem;
        right: auto;
        width: 1px;
        height: 100%;
    }

    .process-step {
        padding: 0 0 0 1.75rem;
    }

    .service-tile,
    .faq-card,
    .doc-card {
        border-radius: 16px;
    }

    .faq-highlights {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .portfolio-item {
        height: 16rem;
    }

    .doc-card {
        padding: 1.25rem !important;
    }
}

@media (max-width: 480px) {
    .site-nav .h-20 {
        height: 4rem;
    }

    .site-nav .text-xs {
        display: none;
    }

    .brand-mark {
        width: 34px;
        height: 34px;
    }

    .btn-primary,
    .btn-secondary,
    .btn-ghost {
        width: 100%;
        min-height: 48px;
    }

    .hero {
        min-height: 78svh;
        padding-top: 5rem;
        padding-bottom: 2rem;
    }

    .hero-panel {
        max-width: 100%;
    }

    section {
        scroll-margin-top: 5rem;
    }

    .process-step {
        padding-left: 1.4rem;
    }

    .faq-highlights {
        grid-template-columns: 1fr;
    }
}
