/*
Theme Name: Kapoti All
Theme URI: https://kapotiall.ee
Author: Kapoti All OÜ
Description: Kapoti All autoremonditöökoja onepager teema
Version: 1.0.0
License: GNU General Public License v2 or later
Text Domain: kapotiall
*/

/* ============================================
   CSS CUSTOM PROPERTIES
============================================ */
:root {
    --yellow: #F5B800;
    --yellow-dark: #D9A200;
    --black: #0D0D0D;
    --dark: #1A1A1A;
    --dark-card: #222222;
    --white: #FFFFFF;
    --gray: #888888;
    --light-gray: #CCCCCC;
    --font-heading: 'Barlow Condensed', sans-serif;
    --font-body: 'Barlow', sans-serif;
    --transition: 0.3s ease;
    --radius: 4px;
    --max-width: 1200px;
}

/* ============================================
   RESET & BASE
============================================ */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    background-color: var(--black);
    color: var(--white);
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.6;
    overflow-x: hidden;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: inherit;
    text-decoration: none;
    transition: color var(--transition);
}

ul, ol {
    list-style: none;
}

/* ============================================
   TYPOGRAPHY
============================================ */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    line-height: 1.1;
}

h1 { font-size: clamp(3rem, 8vw, 7rem); }
h2 { font-size: clamp(2.2rem, 5vw, 4rem); }
h3 { font-size: clamp(1.4rem, 3vw, 2rem); }
h4 { font-size: 1.3rem; }

p { margin-bottom: 1rem; }
p:last-child { margin-bottom: 0; }

.text-yellow { color: var(--yellow); }
.text-gray { color: var(--gray); }

/* ============================================
   LAYOUT HELPERS
============================================ */
.container {
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 1.5rem;
}

.section {
    padding: 6rem 0;
}

.section-label {
    font-family: var(--font-heading);
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--yellow);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.section-label::before {
    content: '';
    display: inline-block;
    width: 2rem;
    height: 2px;
    background: var(--yellow);
}

.section-title {
    margin-bottom: 1rem;
}

.section-subtitle {
    color: var(--light-gray);
    font-size: 1.1rem;
    max-width: 600px;
    margin-bottom: 3rem;
}

/* ============================================
   BUTTONS
============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.85rem 2rem;
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    border: none;
    cursor: pointer;
    border-radius: var(--radius);
    transition: all var(--transition);
    text-decoration: none;
}

.btn-primary {
    background: var(--yellow);
    color: var(--black);
}

.btn-primary:hover {
    background: var(--yellow-dark);
    color: var(--black);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(245, 184, 0, 0.35);
}

.btn-outline {
    background: transparent;
    color: var(--white);
    border: 2px solid var(--white);
}

.btn-outline:hover {
    background: var(--white);
    color: var(--black);
}

/* ============================================
   HEADER / NAVIGATION
============================================ */
#site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 1rem 0;
    transition: all var(--transition);
}

#site-header.scrolled {
    background: rgba(13, 13, 13, 0.97);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(245, 184, 0, 0.2);
    padding: 0.6rem 0;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.site-logo img {
    height: 48px;
    width: auto;
    transition: height var(--transition);
}

#site-header.scrolled .site-logo img {
    height: 38px;
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.site-nav a {
    font-family: var(--font-heading);
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--light-gray);
    transition: color var(--transition);
    position: relative;
    padding-bottom: 2px;
}

.site-nav a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--yellow);
    transition: width var(--transition);
}

.site-nav a:hover,
.site-nav a.active {
    color: var(--yellow);
}

.site-nav a:hover::after,
.site-nav a.active::after {
    width: 100%;
}

.nav-cta {
    padding: 0.5rem 1.25rem;
    background: var(--yellow);
    color: var(--black) !important;
    border-radius: var(--radius);
    font-weight: 700;
}

.nav-cta::after { display: none !important; }

.nav-cta:hover {
    background: var(--yellow-dark) !important;
    color: var(--black) !important;
}

/* Hamburger */
.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 4px;
    background: none;
    border: none;
}

.nav-toggle span {
    display: block;
    width: 26px;
    height: 2px;
    background: var(--white);
    transition: all var(--transition);
}

.nav-toggle.open span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* ============================================
   HERO SECTION
============================================ */
#hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    background: var(--black);
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 70% 50%, rgba(245, 184, 0, 0.08) 0%, transparent 60%),
        radial-gradient(ellipse at 10% 80%, rgba(245, 184, 0, 0.05) 0%, transparent 50%);
}

.hero-grid-lines {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
    background-size: 60px 60px;
}

.hero-content {
    position: relative;
    z-index: 2;
    padding-top: 6rem;
}

.hero-eyebrow {
    font-family: var(--font-heading);
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--yellow);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.hero-eyebrow::before {
    content: '';
    display: block;
    width: 3rem;
    height: 2px;
    background: var(--yellow);
}

.hero-title {
    font-size: clamp(3.5rem, 10vw, 9rem);
    line-height: 0.95;
    margin-bottom: 1.5rem;
    color: var(--white);
}

.hero-title span {
    color: var(--yellow);
    display: block;
}

.hero-desc {
    font-size: 1.15rem;
    color: var(--light-gray);
    max-width: 540px;
    margin-bottom: 2.5rem;
    line-height: 1.7;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 4rem;
}

.hero-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 2.5rem;
    padding-top: 3rem;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.stat-item {}

.stat-number {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--yellow);
    line-height: 1;
}

.stat-label {
    font-size: 0.85rem;
    color: var(--gray);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-top: 0.3rem;
}

.hero-badge {
    position: absolute;
    right: 5%;
    top: 50%;
    transform: translateY(-40%);
    width: clamp(200px, 30vw, 380px);
    opacity: 0.15;
    z-index: 1;
}

.hero-scroll {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    color: var(--gray);
    font-size: 0.75rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    animation: bounce 2s infinite;
}

.hero-scroll svg {
    width: 20px;
    height: 20px;
    color: var(--yellow);
}

@keyframes bounce {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(6px); }
}

/* ============================================
   TICKER / MARQUEE
============================================ */
.ticker-wrap {
    background: var(--yellow);
    padding: 0.8rem 0;
    overflow: hidden;
    white-space: nowrap;
}

.ticker-track {
    display: inline-flex;
    animation: ticker 30s linear infinite;
}

.ticker-item {
    display: inline-flex;
    align-items: center;
    gap: 1.5rem;
    padding: 0 2rem;
    font-family: var(--font-heading);
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--black);
}

.ticker-item::after {
    content: '●';
    font-size: 0.5rem;
}

@keyframes ticker {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* ============================================
   SERVICES SECTION
============================================ */
#teenused {
    background: var(--dark);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1.5rem;
}

.service-card {
    background: var(--dark-card);
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: var(--radius);
    padding: 2rem 1.75rem;
    transition: all var(--transition);
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 3px;
    height: 0;
    background: var(--yellow);
    transition: height 0.4s ease;
}

.service-card:hover {
    border-color: rgba(245, 184, 0, 0.25);
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0,0,0,0.4);
}

.service-card:hover::before {
    height: 100%;
}

.service-icon {
    width: 48px;
    height: 48px;
    background: rgba(245, 184, 0, 0.12);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.25rem;
    transition: background var(--transition);
}

.service-card:hover .service-icon {
    background: rgba(245, 184, 0, 0.2);
}

.service-icon svg {
    width: 24px;
    height: 24px;
    color: var(--yellow);
}

.service-title {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--white);
    margin-bottom: 0.5rem;
}

.service-desc {
    font-size: 0.9rem;
    color: var(--gray);
    line-height: 1.6;
}

/* ============================================
   ABOUT SECTION
============================================ */
#meist {
    background: var(--black);
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5rem;
    align-items: center;
}

.about-image {
    position: relative;
}

.about-image-inner {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--dark);
    aspect-ratio: 4/3;
    display: flex;
    align-items: center;
    justify-content: center;
}


.about-logo-placeholder {
    opacity: 0.15;
    width: 80%;
}

.about-badge {
    position: absolute;
    bottom: -1.5rem;
    right: -1.5rem;
    width: 120px;
    height: 120px;
    background: var(--yellow);
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.about-badge-year {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 800;
    color: var(--black);
    line-height: 1;
}

.about-badge-text {
    font-family: var(--font-heading);
    font-size: 0.65rem;
    font-weight: 700;
    color: var(--black);
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.about-content {}

.about-features {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    margin-top: 2rem;
}

.about-feature {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.about-feature-icon {
    width: 40px;
    height: 40px;
    min-width: 40px;
    background: rgba(245, 184, 0, 0.1);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 2px;
}

.about-feature-icon svg {
    width: 20px;
    height: 20px;
    color: var(--yellow);
}

.about-feature-title {
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.25rem;
}

.about-feature-desc {
    font-size: 0.9rem;
    color: var(--gray);
}

/* ============================================
   CONTACT SECTION
============================================ */
#kontakt {
    background: var(--dark);
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
}

.contact-info {}

.contact-items {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-top: 2rem;
    margin-bottom: 2.5rem;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.contact-item-icon {
    width: 44px;
    height: 44px;
    min-width: 44px;
    background: rgba(245, 184, 0, 0.1);
    border: 1px solid rgba(245, 184, 0, 0.2);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
}

.contact-item-icon svg {
    width: 20px;
    height: 20px;
    color: var(--yellow);
}

.contact-item-label {
    font-family: var(--font-heading);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--gray);
    margin-bottom: 0.2rem;
}

.contact-item-value {
    font-size: 1rem;
    color: var(--white);
    font-weight: 500;
}

.contact-item-value a:hover {
    color: var(--yellow);
}

.contact-hours {
    background: var(--dark-card);
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: var(--radius);
    padding: 1.25rem 1.5rem;
    margin-top: 1rem;
}

.contact-hours-title {
    font-family: var(--font-heading);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--yellow);
    margin-bottom: 0.75rem;
}

.hours-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.95rem;
    padding: 0.3rem 0;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.hours-row:last-child { border-bottom: none; }
.hours-row .day { color: var(--gray); }
.hours-row .time { color: var(--white); font-weight: 600; }

/* Contact Form */
.contact-form-wrap {
    background: var(--dark-card);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: var(--radius);
    padding: 2.5rem;
}

.contact-form-title {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
}

.contact-form-subtitle {
    font-size: 0.9rem;
    color: var(--gray);
    margin-bottom: 2rem;
}

.form-group {
    margin-bottom: 1.25rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form-label {
    display: block;
    font-family: var(--font-heading);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--gray);
    margin-bottom: 0.5rem;
}

.form-control {
    width: 100%;
    background: var(--dark);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: var(--radius);
    padding: 0.85rem 1rem;
    color: var(--white);
    font-family: var(--font-body);
    font-size: 0.95rem;
    transition: border-color var(--transition), box-shadow var(--transition);
    outline: none;
}

.form-control:focus {
    border-color: var(--yellow);
    box-shadow: 0 0 0 3px rgba(245, 184, 0, 0.12);
}

.form-control::placeholder {
    color: rgba(255,255,255,0.2);
}

textarea.form-control {
    resize: vertical;
    min-height: 130px;
}

.form-submit {
    width: 100%;
    padding: 1rem;
    font-size: 1rem;
}

.form-status {
    margin-top: 1rem;
    padding: 0.85rem 1rem;
    border-radius: var(--radius);
    font-size: 0.9rem;
    display: none;
}

.form-status.success {
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.3);
    color: #4ade80;
    display: block;
}

.form-status.error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #f87171;
    display: block;
}

/* Map */
.contact-map {
    margin-top: 2rem;
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.06);
}

.contact-map iframe {
    width: 100%;
    height: 200px;
    display: block;
    filter: invert(90%) hue-rotate(180deg);
}

/* ============================================
   FOOTER
============================================ */
#site-footer {
    background: var(--black);
    border-top: 1px solid rgba(255,255,255,0.06);
    padding: 3rem 0 2rem;
}

.footer-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

.footer-logo img { 
	width: auto;
    height: 58px;
    max-width: none;
    object-fit: contain;
}

.footer-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.footer-nav a {
    font-family: var(--font-heading);
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--gray);
    transition: color var(--transition);
}

.footer-nav a:hover { color: var(--yellow); }

.footer-bottom {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.footer-copy {
    font-size: 0.85rem;
    color: var(--gray);
}

.footer-reg {
    font-size: 0.85rem;
    color: var(--gray);
}

.footer-yellow {
    color: var(--yellow);
}

/* ============================================
   BACK TO TOP
============================================ */
#back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 44px;
    height: 44px;
    background: var(--yellow);
    color: var(--black);
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 999;
    opacity: 0;
    transform: translateY(16px);
    transition: all var(--transition);
    box-shadow: 0 4px 16px rgba(245, 184, 0, 0.4);
}

#back-to-top.visible {
    opacity: 1;
    transform: translateY(0);
}

#back-to-top:hover {
    background: var(--yellow-dark);
    transform: translateY(-2px);
}

#back-to-top svg {
    width: 20px;
    height: 20px;
}

/* ============================================
   LOADING SPINNER
============================================ */
.btn-loading {
    position: relative;
    pointer-events: none;
    opacity: 0.7;
}

.btn-loading::after {
    content: '';
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    border: 2px solid rgba(0,0,0,0.3);
    border-top-color: var(--black);
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}

@keyframes spin {
    to { transform: translateY(-50%) rotate(360deg); }
}

/* ============================================
   RESPONSIVE
============================================ */
@media (max-width: 1024px) {
    .about-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .about-image {
        max-width: 500px;
    }

    .contact-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
}

@media (max-width: 768px) {
    .site-nav {
        position: fixed;
        top: 0;
        right: -100%;
        bottom: 0;
        width: 280px;
        background: var(--dark);
        flex-direction: column;
        align-items: flex-start;
        justify-content: center;
        padding: 2rem;
        gap: 1.5rem;
        transition: right var(--transition);
        z-index: 999;
        border-left: 1px solid rgba(245, 184, 0, 0.15);
    }

    .site-nav.open {
        right: 0;
    }

    .site-nav a {
        font-size: 1.4rem;
    }

    .nav-toggle {
        display: flex;
        z-index: 1000;
    }

    .nav-cta {
        width: 100%;
        text-align: center;
        justify-content: center;
    }

    .hero-badge {
        opacity: 0.06;
    }

    .hero-stats {
        gap: 1.5rem;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .contact-form-wrap {
        padding: 1.5rem;
    }

    .footer-inner {
        flex-direction: column;
        align-items: flex-start;
    }

    .footer-bottom {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 480px) {
    .section { padding: 4rem 0; }

    .hero-actions {
        flex-direction: column;
    }

    .btn {
        width: 100%;
        justify-content: center;
    }

    .services-grid {
        grid-template-columns: 1fr;
    }
}
