/* ==========================================================================
   Tulpar Kauçuk — design system
   Palette: rubber ink, technical paper, machine steel blue, furnace heat
   Type:    Barlow Condensed (display) / Barlow (body) / IBM Plex Mono (spec)
   ========================================================================== */

:root {
    --paper: #F2F3F0;
    --paper-2: #E9EBE6;
    --ink: #17191D;
    --ink-soft: #40454D;
    --ink-mute: #6B7078;
    --steel: #2B62A0;
    --steel-deep: #142A3F;
    --heat: #E8571C;
    --heat-deep: #B93C09;
    --line: rgba(23, 25, 29, 0.16);
    --line-light: rgba(242, 243, 240, 0.22);

    --font-display: 'Barlow Condensed', 'Arial Narrow', sans-serif;
    --font-body: 'Barlow', -apple-system, 'Segoe UI', sans-serif;
    --font-mono: 'IBM Plex Mono', ui-monospace, 'Courier New', monospace;

    --nav-h: 72px;
    --container: 1200px;
}

/* --- Reset --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 16px); }

body {
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.6;
    color: var(--ink);
    background: var(--paper);
    -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: var(--steel); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
ul { list-style: none; }
button { font: inherit; cursor: pointer; background: none; border: none; color: inherit; }

:focus-visible { outline: 2px solid var(--heat-deep); outline-offset: 3px; }

.container { max-width: var(--container); margin-inline: auto; padding-inline: clamp(20px, 4vw, 40px); }

.skip-link {
    position: absolute; top: -48px; left: 16px; z-index: 200;
    background: var(--ink); color: var(--paper);
    padding: 10px 18px; font-family: var(--font-mono); font-size: 0.8rem;
}
.skip-link:focus { top: 8px; }

/* --- Shared typographic parts --- */
.eyebrow {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--heat-deep);
    margin-bottom: 18px;
}
.eyebrow-light { color: var(--heat); }

.section { padding-block: clamp(72px, 9vw, 120px); }

.section-title {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(2.4rem, 5vw, 3.8rem);
    line-height: 0.98;
    letter-spacing: 0.01em;
    text-transform: uppercase;
    margin-bottom: 24px;
}

.section-head { max-width: 720px; margin-bottom: clamp(48px, 6vw, 80px); }
.section-sub { color: var(--ink-soft); font-size: 1.1rem; max-width: 60ch; }
.lead { color: var(--ink-soft); font-size: 1.1rem; margin-bottom: 32px; max-width: 58ch; }

.mono-tag {
    display: block;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--ink-mute);
}

.mono-caption {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    letter-spacing: 0.06em;
    color: var(--ink-mute);
    margin-top: 12px;
}

/* --- Buttons --- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 15px 28px;
    font-family: var(--font-display);
    font-size: 1.05rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    line-height: 1;
    border-radius: 2px;
    border: 1px solid transparent;
    transition: background-color 0.2s, color 0.2s, border-color 0.2s, transform 0.15s;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }

.btn-primary { background: var(--heat-deep); color: #fff; }
.btn-primary:hover { background: #A03306; color: #fff; }

.btn-ghost { border-color: rgba(242, 243, 240, 0.45); color: var(--paper); }
.btn-ghost:hover { background: rgba(242, 243, 240, 0.1); }

.btn-outline { border-color: var(--ink); color: var(--ink); }
.btn-outline:hover { background: var(--ink); color: var(--paper); }

.btn-small { padding: 10px 18px; font-size: 0.95rem; }

/* --- Navbar --- */
.navbar {
    position: fixed;
    inset: 0 0 auto 0;
    z-index: 100;
    height: var(--nav-h);
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    transition: box-shadow 0.25s;
}
.navbar.scrolled { box-shadow: 0 6px 24px rgba(23, 25, 29, 0.1); }

.nav-inner {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.nav-brand { display: flex; align-items: center; gap: 12px; }
.nav-brand:hover { text-decoration: none; }
.nav-logo { height: 44px; width: 44px; object-fit: contain; }

.nav-wordmark { display: flex; flex-direction: column; line-height: 1.05; }
.nav-title {
    font-family: var(--font-display);
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--ink);
}
.nav-sub {
    font-family: var(--font-mono);
    font-size: 0.58rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--ink-mute);
}

.nav-menu { display: flex; align-items: center; gap: clamp(16px, 2.5vw, 32px); }

.nav-link {
    font-family: var(--font-display);
    font-size: 1.05rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--ink-soft);
    padding: 6px 2px;
    border-bottom: 2px solid transparent;
}
.nav-link:hover { color: var(--ink); text-decoration: none; }
.nav-link.active { color: var(--ink); border-bottom-color: var(--heat-deep); }

.lang-switch {
    display: flex;
    align-items: center;
    border: 1px solid var(--line);
    border-radius: 2px;
    overflow: hidden;
}
.lang-btn {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 500;
    padding: 7px 12px;
    color: var(--ink-mute);
}
.lang-btn.active { background: var(--ink); color: var(--paper); }

.hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    padding: 10px;
}
.hamburger span {
    display: block;
    height: 2px;
    width: 100%;
    background: var(--ink);
    transition: transform 0.25s, opacity 0.2s;
}
.hamburger.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* --- Hero --- */
.hero {
    position: relative;
    min-height: clamp(600px, 94vh, 960px);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    background: var(--ink);
    padding-top: var(--nav-h);
}

.hero-media {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(100deg, rgba(13, 15, 19, 0.92) 25%, rgba(13, 15, 19, 0.55) 60%, rgba(13, 15, 19, 0.3)),
        url('img/kafa.jpg');
    background-size: cover;
    background-position: center right;
}

.hero-content {
    position: relative;
    z-index: 1;
    width: 100%;
    padding-block: clamp(64px, 10vh, 140px);
}

.hero-title {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(3.4rem, 9vw, 7.2rem);
    line-height: 0.94;
    letter-spacing: 0.005em;
    text-transform: uppercase;
    color: var(--paper);
}
.hero-title .accent { color: var(--heat); }

.hero-sub {
    color: rgba(242, 243, 240, 0.78);
    font-size: clamp(1rem, 1.4vw, 1.2rem);
    max-width: 54ch;
    margin-top: 28px;
}

.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 40px; }

/* --- Signature: extrusion band --- */
.band {
    position: relative;
    z-index: 1;
    background: rgba(13, 15, 19, 0.86);
    border-top: 1px solid var(--line-light);
    overflow: hidden;
    padding-block: 20px;
}

.band-track {
    display: flex;
    width: max-content;
    animation: extrude 70s linear infinite;
}

.band-set {
    display: flex;
    align-items: center;
    gap: clamp(48px, 6vw, 88px);
    padding-right: clamp(48px, 6vw, 88px);
}

.band-item { display: flex; align-items: center; gap: 16px; }

.profile-svg { width: 46px; height: 46px; fill: rgba(242, 243, 240, 0.9); flex-shrink: 0; }

.band-label {
    font-family: var(--font-mono);
    font-size: 0.68rem;
    letter-spacing: 0.16em;
    color: rgba(242, 243, 240, 0.5);
    white-space: nowrap;
}

@keyframes extrude {
    to { transform: translateX(-50%); }
}

/* --- Spec bar --- */
.specbar {
    background: var(--paper);
    border-bottom: 1px solid var(--line);
}

.spec-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
}

.spec-cell {
    padding: clamp(28px, 4vw, 44px) clamp(16px, 3vw, 40px);
    border-left: 1px solid var(--line);
}
.spec-cell:first-child { border-left: none; padding-left: 0; }

.spec-label {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: 400;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--ink-mute);
    margin-bottom: 10px;
}

.spec-value {
    font-family: var(--font-mono);
    font-size: clamp(2rem, 3.6vw, 2.9rem);
    font-weight: 500;
    line-height: 1;
    color: var(--ink);
}

/* --- About --- */
.about-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: clamp(40px, 6vw, 88px);
    align-items: start;
}

.about-points { margin-top: 16px; }
.about-points li {
    border-top: 1px solid var(--line);
    padding-block: 22px;
}
.about-points h3 {
    font-family: var(--font-display);
    font-size: 1.35rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin-bottom: 6px;
}
.about-points p { color: var(--ink-soft); max-width: 52ch; }

.about-media img,
.custom-media img,
.product-media img {
    border: 1px solid var(--line);
    aspect-ratio: 4 / 3;
    object-fit: cover;
    width: 100%;
}

/* --- Products --- */
.section-products { background: var(--paper-2); }

.product {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: clamp(36px, 5vw, 72px);
    align-items: center;
    border-top: 1px solid var(--line);
    padding-block: clamp(48px, 6vw, 80px);
}
.product:last-child { padding-bottom: 0; }

.product-media { position: relative; }

.product-index {
    position: absolute;
    top: -0.55em;
    left: -0.08em;
    z-index: 1;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(4.2rem, 8vw, 6.8rem);
    line-height: 1;
    letter-spacing: 0.02em;
    color: transparent;
    -webkit-text-stroke: 1.5px var(--ink);
    pointer-events: none;
}

.product-alt .product-media { order: 2; }
.product-alt .product-body { order: 1; }
.product-alt .product-index { left: auto; right: -0.08em; }

.product-title {
    font-family: var(--font-display);
    font-size: clamp(1.8rem, 3vw, 2.5rem);
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    line-height: 1;
    margin: 10px 0 14px;
}

.product-desc { color: var(--ink-soft); margin-bottom: 26px; max-width: 52ch; }

.product-apps {
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 28px;
}
.product-apps li {
    position: relative;
    padding: 10px 0 10px 22px;
    border-bottom: 1px solid var(--line);
    font-size: 0.95rem;
}
.product-apps li::before {
    content: '—';
    position: absolute;
    left: 0;
    color: var(--heat-deep);
    font-family: var(--font-mono);
    font-size: 0.8rem;
}

/* --- Custom production --- */
.section-custom {
    background:
        radial-gradient(720px 420px at 78% 60%, rgba(232, 87, 28, 0.14), transparent 70%),
        var(--steel-deep);
    color: var(--paper);
}

.custom-grid {
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    gap: clamp(40px, 6vw, 88px);
    align-items: center;
}

.section-custom .lead { color: rgba(242, 243, 240, 0.75); }
.custom-media img { border-color: var(--line-light); }
.section-custom .mono-caption { color: rgba(242, 243, 240, 0.55); }

/* --- Contact --- */
.contact-grid {
    display: grid;
    grid-template-columns: 0.9fr 1.1fr;
    gap: clamp(40px, 6vw, 80px);
    align-items: start;
}

.contact-row {
    border-top: 1px solid var(--line);
    padding-block: 22px;
}
.contact-row p { font-size: 1.1rem; max-width: 40ch; }
.contact-row .mono-tag { margin-bottom: 8px; }
.contact-note {
    font-family: var(--font-mono);
    font-size: 0.75rem !important;
    color: var(--ink-mute);
    margin-top: 4px;
}

.contact-map {
    border: 1px solid var(--line);
    aspect-ratio: 4 / 3;
}
.contact-map iframe {
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
    filter: grayscale(1) contrast(1.04);
    transition: filter 0.4s;
}
.contact-map:hover iframe { filter: none; }

/* --- Footer --- */
.footer {
    background: var(--ink);
    color: rgba(242, 243, 240, 0.65);
    padding-block: clamp(48px, 6vw, 72px) 28px;
}

.footer-grid {
    display: flex;
    justify-content: space-between;
    gap: 40px;
    flex-wrap: wrap;
    padding-bottom: 40px;
}

.footer-brand { display: flex; gap: 18px; align-items: flex-start; max-width: 420px; }
.footer-logo { height: 44px; width: 44px; object-fit: contain; filter: invert(1); opacity: 0.95; }

.footer-name {
    font-family: var(--font-display);
    font-size: 1.4rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--paper);
    line-height: 1.1;
    margin-bottom: 6px;
}
.footer-tag { font-size: 0.95rem; }

.footer-nav { display: flex; flex-direction: column; gap: 10px; }
.footer-nav a {
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(242, 243, 240, 0.65);
}
.footer-nav a:hover { color: var(--paper); text-decoration: none; }

.footer-bottom {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    border-top: 1px solid var(--line-light);
    padding-top: 24px;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    letter-spacing: 0.04em;
}
.footer-bottom a { color: rgba(242, 243, 240, 0.85); }

/* --- Floating controls --- */
.whatsapp-float {
    position: fixed;
    right: 22px;
    bottom: 22px;
    z-index: 90;
    width: 54px;
    height: 54px;
    border-radius: 50%;
    background: #1DA851;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 24px rgba(23, 25, 29, 0.28);
    transition: transform 0.2s;
}
.whatsapp-float:hover { transform: scale(1.08); }
.whatsapp-float svg { width: 28px; height: 28px; }

.back-to-top {
    position: fixed;
    right: 29px;
    bottom: 92px;
    z-index: 90;
    width: 40px;
    height: 40px;
    border: 1px solid var(--line);
    border-radius: 2px;
    background: var(--paper);
    color: var(--ink);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transform: translateY(8px);
    transition: opacity 0.25s, transform 0.25s;
}
.back-to-top.visible { opacity: 1; pointer-events: auto; transform: none; }
.back-to-top svg { width: 16px; height: 16px; }

/* --- Reveal on scroll --- */
.reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.revealed { opacity: 1; transform: none; }

/* --- Reduced motion --- */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .band-track { animation: none; }
    .reveal { opacity: 1; transform: none; transition: none; }
    .btn:hover, .whatsapp-float:hover { transform: none; }
}

/* --- Responsive --- */
@media (max-width: 960px) {
    .hamburger { display: flex; }

    .nav-menu {
        position: fixed;
        top: var(--nav-h);
        left: 0;
        right: 0;
        bottom: 0;
        background: var(--paper);
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
        padding: 32px clamp(20px, 4vw, 40px);
        transform: translateX(100%);
        transition: transform 0.3s ease;
        overflow-y: auto;
    }
    .nav-menu.open { transform: none; }
    .nav-link { font-size: 1.6rem; padding-block: 10px; }
    .nav-catalog { margin-top: 16px; }
    .lang-switch { margin-top: 24px; }

    .about-grid, .custom-grid, .contact-grid { grid-template-columns: 1fr; }
    .custom-media { order: 2; }

    .product { grid-template-columns: 1fr; gap: 48px; }
    .product-alt .product-media { order: 0; }
    .product-alt .product-body { order: 1; }
    .product-alt .product-index { right: auto; left: -0.08em; }
}

@media (max-width: 640px) {
    .spec-grid { grid-template-columns: 1fr 1fr; }
    .spec-cell { border-left: none; border-top: 1px solid var(--line); padding-left: 0; }
    .spec-cell:nth-child(-n+2) { border-top: none; }
    .spec-cell:nth-child(even) { border-left: 1px solid var(--line); padding-left: 20px; }

    .product-apps { grid-template-columns: 1fr; }

    .footer-grid { flex-direction: column; }
}
