/* ============================================================
   Ted Design — тема (замества стандартния site.css)
   Палитра: тъмен орех + месинг + чертожна синьо-сива
   ============================================================ */

:root {
    --bg: #15100B;
    --bg-2: #1E1711;
    --line: #3A2E23;
    --ink: #ECE3D4;
    --muted: #A2917B;
    --wood: #C99A5B;
    --wood-deep: #A57B3F;
    --blueprint: #7E94A0;
    --f-display: 'Space Grotesk',system-ui,sans-serif;
    --f-body: 'Inter',system-ui,sans-serif;
    --f-mono: 'Space Mono',ui-monospace,monospace;
}

html {
    font-size: 16px;
    scroll-behavior: smooth
}

body {
    background: var(--bg);
    color: var(--ink);
    font-family: var(--f-body);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    min-height: 100%;
}

::selection {
    background: var(--wood);
    color: var(--bg)
}

a {
    color: var(--wood)
}

    a:hover {
        color: #e0ae6a
    }

.mono {
    font-family: var(--f-mono);
    font-size: .72rem;
    letter-spacing: .18em;
    text-transform: uppercase
}

:focus-visible {
    outline: 2px solid var(--wood);
    outline-offset: 3px
}

/* ---------- navbar ---------- */
.td-nav {
    background: color-mix(in srgb,var(--bg) 86%,transparent) !important;
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--line);
    box-shadow: none !important;
}

.td-brand {
    font-family: var(--f-display);
    font-weight: 700;
    font-size: 1.1rem;
    letter-spacing: .02em;
    color: var(--ink) !important;
}

    .td-brand b {
        color: var(--wood)
    }

.td-nav .nav-link {
    font-family: var(--f-mono);
    font-size: .72rem;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--muted) !important;
    transition: color .2s;
}

    .td-nav .nav-link:hover {
        color: var(--ink) !important
    }
/* държи линковете от _LoginPartial видими на тъмен фон */
.td-nav .text-dark {
    color: var(--muted) !important
}

    .td-nav .text-dark:hover {
        color: var(--ink) !important
    }

/* ---------- footer ---------- */
.td-foot {
    background: var(--bg);
    border-top: 1px solid var(--line) !important;
    color: var(--muted) !important;
    padding: 34px 0;
    margin-top: 40px;
}

    .td-foot .foot-inner {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 18px;
        flex-wrap: wrap
    }

.td-brand-sm {
    font-family: var(--f-display);
    font-weight: 700;
    letter-spacing: .02em
}

    .td-brand-sm b {
        color: var(--wood)
    }

.foot-link {
    color: var(--muted) !important
}

    .foot-link:hover {
        color: var(--ink) !important
    }

/* ---------- Bootstrap форми на тъмен фон ---------- */
main legend {
    font-family: var(--f-display);
    font-weight: 500;
    color: var(--ink);
    font-size: 1.15rem;
    letter-spacing: .01em;
    border-bottom: 1px solid var(--line);
    padding-bottom: 8px;
    margin-bottom: 18px
}

main fieldset {
    margin-bottom: 8px
}

main .form-label, main .form-check-label {
    color: var(--ink)
}

main h2 {
    font-family: var(--f-display)
}

.text-muted {
    color: var(--muted) !important
}

/* ============================================================
   Начална страница (Home/Index)
   ============================================================ */

.td-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: var(--f-mono);
    font-size: .78rem;
    letter-spacing: .1em;
    text-transform: uppercase;
    padding: 15px 26px;
    border-radius: 2px;
    text-decoration: none;
    transition: transform .15s,background .2s,color .2s,border-color .2s;
}

.td-btn--primary {
    background: var(--wood);
    color: var(--bg) !important;
    font-weight: 700
}

    .td-btn--primary:hover {
        background: #e0ae6a;
        color: var(--bg) !important;
        transform: translateY(-2px)
    }

.td-btn--ghost {
    border: 1px solid var(--line);
    color: var(--ink) !important
}

    .td-btn--ghost:hover {
        border-color: var(--muted);
        transform: translateY(-2px)
    }

/* hero */
.hero {
    padding: 72px 0 88px
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.05fr .95fr;
    gap: 56px;
    align-items: center
}

.eyebrow {
    display: flex;
    align-items: center;
    gap: 14px;
    color: var(--wood);
    margin-bottom: 24px
}

    .eyebrow::before {
        content: "";
        width: 46px;
        height: 1px;
        background: var(--wood)
    }

.hero-title {
    font-family: var(--f-display);
    font-weight: 600;
    font-size: clamp(2.4rem,5vw,4.2rem);
    line-height: 1.02;
    letter-spacing: -.02em;
    color: var(--ink);
}

    .hero-title em {
        font-style: normal;
        color: var(--wood);
        position: relative;
        white-space: nowrap
    }

        .hero-title em::after {
            content: "";
            position: absolute;
            left: 0;
            right: 0;
            bottom: -12px;
            height: 7px;
            border: 1px solid var(--blueprint);
            border-top: none;
            opacity: .7
        }

.hero-sub {
    margin-top: 38px;
    max-width: 30rem;
    color: var(--muted);
    font-size: 1.05rem
}

.hero-actions {
    display: flex;
    gap: 16px;
    margin-top: 34px;
    flex-wrap: wrap
}

.hero-meta {
    display: flex;
    gap: 34px;
    margin-top: 50px;
    padding-top: 28px;
    border-top: 1px solid var(--line);
    flex-wrap: wrap
}

    .hero-meta .n {
        font-family: var(--f-display);
        font-weight: 600;
        font-size: 1.6rem;
        color: var(--ink)
    }

    .hero-meta .l {
        color: var(--muted);
        font-size: .8rem;
        margin-top: 2px
    }

/* CAD drawing */
.draw {
    position: relative
}

    .draw svg {
        width: 100%;
        height: auto;
        display: block;
        overflow: visible
    }

.dim {
    stroke: var(--blueprint);
    stroke-width: 1;
    fill: none
}

.dim-tick {
    stroke: var(--blueprint);
    stroke-width: 1
}

.panel {
    stroke: var(--wood);
    stroke-width: 1.5;
    fill: none
}

.panel-fill {
    fill: url(#woodgrad);
    stroke: var(--wood-deep);
    stroke-width: 1.4
}

.hair {
    stroke: var(--line);
    stroke-width: 1;
    fill: none
}

.lbl {
    font-family: var(--f-mono);
    font-size: 11px;
    fill: var(--blueprint);
    letter-spacing: .04em
}

.lbl-w {
    fill: var(--wood)
}

.ink path, .ink line, .ink rect {
    stroke-dasharray: 1600;
    stroke-dashoffset: 1600;
    animation: tdDraw 1.7s ease forwards
}

.ink .d2 {
    animation-delay: .35s
}

.ink .d3 {
    animation-delay: .7s
}

.ink text {
    opacity: 0;
    animation: tdFade .8s ease forwards;
    animation-delay: 1.1s
}

@keyframes tdDraw {
    to {
        stroke-dashoffset: 0
    }
}

@keyframes tdFade {
    to {
        opacity: 1
    }
}

/* sections */
.td-block {
    padding: 84px 0;
    border-top: 1px solid var(--line)
}

.sec-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 50px
}

    .sec-head h2 {
        font-family: var(--f-display);
        font-weight: 600;
        font-size: clamp(1.7rem,3vw,2.5rem);
        letter-spacing: -.01em;
        max-width: 18ch;
        line-height: 1.08;
        color: var(--ink)
    }

    .sec-head .idx {
        color: var(--muted)
    }

/* process */
.steps {
    display: grid;
    grid-template-columns: repeat(4,1fr);
    gap: 1px;
    background: var(--line);
    border: 1px solid var(--line)
}

.step {
    background: var(--bg);
    padding: 28px 24px 32px;
    transition: background .25s
}

    .step:hover {
        background: var(--bg-2)
    }

    .step .num {
        font-family: var(--f-mono);
        color: var(--wood);
        font-size: .82rem;
        letter-spacing: .12em
    }

    .step h3 {
        font-family: var(--f-display);
        font-weight: 500;
        font-size: 1.14rem;
        margin: 18px 0 10px;
        color: var(--ink)
    }

    .step p {
        color: var(--muted);
        font-size: .9rem
    }

/* precision */
.spec {
    display: grid;
    grid-template-columns: 1.1fr .9fr;
    gap: 56px;
    align-items: center
}

.spec-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 20px;
    padding: 18px 0;
    border-bottom: 1px dashed var(--line)
}

    .spec-row:first-child {
        border-top: 1px dashed var(--line)
    }

    .spec-row .k {
        font-size: 1rem;
        color: var(--ink)
    }

    .spec-row .v {
        font-family: var(--f-mono);
        color: var(--wood);
        font-size: .95rem;
        white-space: nowrap
    }

.spec-note {
    margin-top: 24px;
    color: var(--muted);
    font-size: .9rem;
    max-width: 34ch
}

.spec-card {
    background: var(--bg-2);
    border: 1px solid var(--line);
    border-radius: 3px;
    padding: 34px;
    position: relative
}

    .spec-card .big {
        font-family: var(--f-display);
        font-weight: 600;
        font-size: clamp(2.4rem,5vw,3.4rem);
        color: var(--ink);
        line-height: 1;
        margin: 14px 0 6px;
        letter-spacing: -.02em
    }

    .spec-card .unit {
        color: var(--wood);
        font-size: 1.3rem
    }

    .spec-card p {
        color: var(--muted);
        font-size: .9rem;
        margin-top: 12px
    }

.corner {
    position: absolute;
    width: 14px;
    height: 14px;
    border: 1px solid var(--wood)
}

    .corner.tl {
        top: 10px;
        left: 10px;
        border-right: none;
        border-bottom: none
    }

    .corner.tr {
        top: 10px;
        right: 10px;
        border-left: none;
        border-bottom: none
    }

    .corner.bl {
        bottom: 10px;
        left: 10px;
        border-right: none;
        border-top: none
    }

    .corner.br {
        bottom: 10px;
        right: 10px;
        border-left: none;
        border-top: none
    }

/* quality */
.promise {
    display: grid;
    grid-template-columns: repeat(3,1fr);
    gap: 32px
}

.pcard {
    padding-top: 24px;
    border-top: 1px solid var(--wood)
}

    .pcard .mono {
        color: var(--muted)
    }

    .pcard h3 {
        font-family: var(--f-display);
        font-weight: 500;
        font-size: 1.18rem;
        margin: 14px 0 10px;
        color: var(--ink)
    }

    .pcard p {
        color: var(--muted);
        font-size: .92rem
    }

/* final cta */
.td-cta {
    border: 1px solid var(--line);
    border-radius: 3px;
    background: var(--bg-2);
    padding: 60px 40px;
    text-align: center;
    position: relative;
    overflow: hidden
}

    .td-cta::before {
        content: "";
        position: absolute;
        inset: 0;
        background-image: linear-gradient(var(--line) 1px,transparent 1px),linear-gradient(90deg,var(--line) 1px,transparent 1px);
        background-size: 34px 34px;
        opacity: .25;
        -webkit-mask-image: radial-gradient(circle at 50% 40%,#000,transparent 72%);
        mask-image: radial-gradient(circle at 50% 40%,#000,transparent 72%)
    }

    .td-cta > * {
        position: relative
    }

    .td-cta h2 {
        font-family: var(--f-display);
        font-weight: 600;
        font-size: clamp(1.9rem,4vw,2.8rem);
        letter-spacing: -.02em;
        line-height: 1.05;
        color: var(--ink)
    }

    .td-cta p {
        color: var(--muted);
        margin: 16px auto 30px;
        max-width: 40ch
    }

/* reveal */
.reveal {
    opacity: 0;
    transform: translateY(22px);
    transition: opacity .7s ease,transform .7s ease
}

    .reveal.in {
        opacity: 1;
        transform: none
    }

/* responsive */
@media(max-width:880px) {
    .hero-grid {
        grid-template-columns: 1fr;
        gap: 44px
    }

    .draw {
        order: -1;
        max-width: 420px
    }

    .steps {
        grid-template-columns: repeat(2,1fr)
    }

    .spec {
        grid-template-columns: 1fr;
        gap: 38px
    }

    .promise {
        grid-template-columns: 1fr
    }
}

@media(max-width:540px) {
    .steps {
        grid-template-columns: 1fr
    }
}

@media(prefers-reduced-motion:reduce) {
    * {
        animation: none !important;
        transition: none !important
    }

    .reveal {
        opacity: 1;
        transform: none
    }

    html {
        scroll-behavior: auto
    }
}
