/* ==========================================================================
   TOKO3D – Stylesheet
   ========================================================================== */

@font-face {
    font-family: "Montserrat";
    src: url("../fonts/montserrat-latin-var.woff2") format("woff2");
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
}

:root {
    --bg: #000912;
    --bg-alt: #050f1c;
    --band: #17324d;
    --text: #e6edf3;
    --muted: #a9b6c3;
    --accent: #00c7e8;
    --link: #3d8bff;
    --field: #ffffff;
    --field-text: #111827;
    --line: rgba(255, 255, 255, 0.12);
    --radius: 6px;
    --container: 1180px;
    --header-h: 64px;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: var(--header-h);
    -webkit-text-size-adjust: 100%;
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: "Montserrat", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
    font-weight: 300;
    font-size: 1rem;
    line-height: 1.65;
}

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

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

a:hover,
a:focus-visible {
    text-decoration: underline;
}

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

::selection {
    background: var(--accent);
    color: #000;
}

h1,
h2,
h3 {
    font-weight: 400;
    line-height: 1.25;
    margin: 0 0 0.6em;
}

p {
    margin: 0 0 1em;
}

.container {
    width: 100%;
    max-width: var(--container);
    margin-inline: auto;
    padding-inline: 20px;
}

.container--narrow {
    max-width: 860px;
}

.visually-hidden {
    position: absolute !important;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.skip-link {
    position: absolute;
    left: 12px;
    top: -60px;
    z-index: 100;
    padding: 10px 16px;
    background: var(--accent);
    color: #000;
    border-radius: var(--radius);
}

.skip-link:focus {
    top: 12px;
}

/* --- Header -------------------------------------------------------------- */

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    height: var(--header-h);
    background: rgba(0, 9, 18, 0.88);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--line);
}

.site-header__inner {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #fff;
    font-weight: 500;
    font-size: 1.15rem;
    letter-spacing: 0.12em;
}

.brand:hover {
    text-decoration: none;
}

.brand__accent {
    color: var(--accent);
}

.site-nav {
    display: flex;
    align-items: center;
    gap: clamp(12px, 3vw, 32px);
    font-size: 0.95rem;
}

.site-nav a {
    color: var(--text);
}

.site-nav a:hover {
    color: var(--accent);
    text-decoration: none;
}

.site-nav__cta {
    padding: 6px 14px;
    border: 1px solid var(--accent);
    border-radius: 999px;
}

@media (max-width: 520px) {
    .site-nav a:not(.site-nav__cta) {
        display: none;
    }
}

/* --- Hero ---------------------------------------------------------------- */

.hero {
    background: var(--bg);
    text-align: center;
    padding-bottom: clamp(40px, 7vw, 80px);
}

.hero__media {
    max-width: 1280px;
    margin-inline: auto;
}

.hero__video {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    max-height: 62vh;
    object-fit: cover;
    background: var(--bg);
}

.hero__text h1 {
    font-size: clamp(1.5rem, 3.6vw, 2.6rem);
    font-weight: 300;
    color: #fff;
    max-width: 22em;
    margin: 0 auto 0.5em;
}

.hero__claim {
    font-size: clamp(1rem, 1.8vw, 1.25rem);
    color: var(--accent);
    letter-spacing: 0.04em;
    margin: 0;
}

/* --- Sections ------------------------------------------------------------ */

.section {
    padding-block: clamp(56px, 8vw, 96px);
}

.section__title {
    font-size: clamp(1.6rem, 3vw, 2.2rem);
    text-align: center;
    margin-bottom: clamp(24px, 4vw, 40px);
}

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

/* --- Carousel ------------------------------------------------------------ */

.carousel {
    position: relative;
}

.carousel__track {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    scrollbar-width: none;
    border-radius: var(--radius);
    background: #fff;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
}

.carousel__track::-webkit-scrollbar {
    display: none;
}

.carousel__slide {
    position: relative;
    flex: 0 0 100%;
    margin: 0;
    scroll-snap-align: start;
    scroll-snap-stop: always;
    aspect-ratio: 16 / 9;
}

.carousel__slide a,
.carousel__slide img {
    display: block;
    width: 100%;
    height: 100%;
}

.carousel__slide img {
    object-fit: contain;
    background: #fff;
}

.carousel__btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 50%;
    background: rgba(0, 9, 18, 0.75);
    color: #fff;
    cursor: pointer;
    transition: background 0.2s;
}

.carousel__btn:hover {
    background: var(--accent);
    color: #000;
}

.carousel__btn svg {
    width: 22px;
    height: 22px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.carousel__btn--prev {
    left: 10px;
}

.carousel__btn--next {
    right: 10px;
}

.carousel__dots {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 18px;
}

.carousel__dots a {
    width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
}

.carousel__dots a::before {
    content: "";
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 1px solid var(--accent);
    transition: background 0.2s, transform 0.2s;
}

.carousel__dots a[aria-current="true"]::before {
    background: var(--accent);
    transform: scale(1.2);
}

@media (max-width: 600px) {
    .carousel__btn {
        width: 36px;
        height: 36px;
    }

    .carousel__btn--prev {
        left: 4px;
    }

    .carousel__btn--next {
        right: 4px;
    }
}

/* --- Leistungen ---------------------------------------------------------- */

.services__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: clamp(20px, 3vw, 32px);
}

.service {
    padding: clamp(24px, 3vw, 36px);
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    transition: border-color 0.25s, transform 0.25s;
}

.service:hover {
    border-color: rgba(0, 199, 232, 0.5);
    transform: translateY(-3px);
}

.service__icon {
    width: 48px;
    height: 48px;
    margin-bottom: 18px;
    fill: none;
    stroke: var(--accent);
    stroke-width: 2;
    stroke-linejoin: round;
    stroke-linecap: round;
}

.service h3 {
    font-size: 1.4rem;
    color: #fff;
}

.service p {
    color: var(--muted);
}

.service p:last-child {
    margin-bottom: 0;
}

/* --- Leidenschaft -------------------------------------------------------- */

.passion {
    background: var(--band);
    padding-block: clamp(40px, 6vw, 64px);
}

.passion__inner {
    display: grid;
    grid-template-columns: minmax(160px, 260px) 1fr;
    align-items: center;
    gap: clamp(24px, 5vw, 64px);
}

.passion h2 {
    color: var(--accent);
    font-size: clamp(1.5rem, 3vw, 2.1rem);
}

.passion p {
    font-size: clamp(1.1rem, 2vw, 1.4rem);
    font-weight: 400;
    color: #fff;
    margin: 0;
}

@media (max-width: 640px) {
    .passion__inner {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .printer {
        max-width: 180px;
        margin-inline: auto;
    }
}

/* Animierter 3D-Drucker (ersetzt die externe Lottie-Animation) */
.printer svg {
    width: 100%;
    height: auto;
}

.printer__frame {
    fill: rgba(0, 0, 0, 0.2);
    stroke: rgba(255, 255, 255, 0.5);
    stroke-width: 3;
}

.printer__rail {
    stroke: rgba(255, 255, 255, 0.5);
    stroke-width: 3;
    stroke-linecap: round;
}

.printer__bed {
    fill: rgba(255, 255, 255, 0.6);
}

.printer__print rect {
    fill: var(--accent);
    opacity: 0;
    animation: layer 6s infinite;
}

.printer__print rect:nth-child(2) { animation-delay: 1s; }
.printer__print rect:nth-child(3) { animation-delay: 2s; }
.printer__print rect:nth-child(4) { animation-delay: 3s; }
.printer__print rect:nth-child(5) { animation-delay: 4s; }

.printer__head {
    fill: #fff;
    animation: head 1s ease-in-out infinite alternate;
}

@keyframes layer {
    0% { opacity: 0; }
    6%, 90% { opacity: 1; }
    100% { opacity: 0; }
}

@keyframes head {
    from { transform: translateX(-30px); }
    to { transform: translateX(30px); }
}

@media (prefers-reduced-motion: reduce) {
    .printer__print rect {
        animation: none;
        opacity: 1;
    }

    .printer__head {
        animation: none;
    }

    .service {
        transition: none;
    }
}

/* --- Kontakt ------------------------------------------------------------- */

.contact-form {
    display: grid;
    gap: 18px;
}

.contact-form__row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
}

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

.field {
    display: grid;
    gap: 6px;
}

.field label {
    font-size: 0.9rem;
    color: var(--muted);
}

.field input,
.field textarea {
    width: 100%;
    padding: 12px 14px;
    font: inherit;
    font-weight: 400;
    color: var(--field-text);
    background: var(--field);
    border: 2px solid transparent;
    border-radius: var(--radius);
}

.field textarea {
    resize: vertical;
    min-height: 140px;
}

.field input:focus,
.field textarea:focus {
    outline: none;
    border-color: var(--accent);
}

.field [aria-invalid="true"] {
    border-color: #ff6b6b;
}

.field--check {
    grid-template-columns: auto 1fr;
    align-items: start;
    gap: 12px;
}

.field--check input {
    width: 20px;
    height: 20px;
    margin: 3px 0 0;
    accent-color: var(--accent);
}

.field--check label {
    font-size: 0.9rem;
}

.hp {
    position: absolute;
    left: -10000px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.form-hint {
    color: #ff8f8f;
    margin: 0;
}

.form-status {
    margin-bottom: 24px;
}

.form-status p {
    margin: 0;
    padding: 14px 18px;
    border-radius: var(--radius);
}

.form-status__ok {
    background: rgba(0, 199, 232, 0.12);
    border: 1px solid var(--accent);
}

.form-status__error {
    background: rgba(255, 107, 107, 0.12);
    border: 1px solid #ff6b6b;
}

.btn {
    justify-self: start;
    display: inline-block;
    padding: 12px 28px;
    font: inherit;
    font-weight: 500;
    color: #000;
    background: var(--accent);
    border: 0;
    border-radius: var(--radius);
    cursor: pointer;
    transition: filter 0.2s;
}

.btn:hover {
    filter: brightness(1.12);
    text-decoration: none;
}

.btn[disabled] {
    opacity: 0.6;
    cursor: wait;
}

/* --- Rechtstexte --------------------------------------------------------- */

.legal h1 {
    font-size: clamp(1.8rem, 4vw, 2.6rem);
    margin-bottom: 1em;
}

.legal h2 {
    font-size: 1.35rem;
    color: var(--accent);
    margin-top: 2em;
}

.legal h3 {
    font-size: 1.1rem;
    font-weight: 500;
    margin-top: 1.6em;
}

.legal p,
.legal li {
    color: var(--muted);
    overflow-wrap: anywhere;
}

/* --- Footer -------------------------------------------------------------- */

.site-footer {
    background: #000;
    border-top: 1px solid var(--line);
    padding-top: 48px;
    font-size: 0.92rem;
}

.site-footer__grid {
    display: flex;
    flex-wrap: wrap;
    gap: 32px 80px;
}

.site-footer__address {
    font-style: normal;
    line-height: 1.9;
}

.site-footer__nav {
    display: flex;
    flex-direction: column;
    line-height: 1.9;
}

.site-footer__bottom {
    margin-top: 40px;
    padding-block: 20px;
    border-top: 1px solid var(--line);
    color: var(--muted);
    font-size: 0.82rem;
}

.site-footer__bottom p {
    margin: 0;
}
