/* e36-electronic.com: one stylesheet */

:root {
    --bg: #f3f4f6;
    --surface: #ffffff;
    --text: #1b1f24;
    --muted: #5b6470;
    --line: #e2e5ea;
    --accent: #1c69d4;          /* BMW blue */
    --accent-hover: #1557b3;
    --accent-soft: #e8f0fc;
    --header: #14171c;
    --warn-bg: #fff4e0;
    --warn-line: #f0b44c;
    --warn-text: #6b4300;
    --danger: #c62828;
    --radius: 14px;
    --shadow: 0 1px 2px rgb(16 24 40 / 6%), 0 4px 16px rgb(16 24 40 / 6%);
    color-scheme: light;
}

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

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font: 16px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); }
a:hover { color: var(--accent-hover); }
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; letter-spacing: -.01em; }
h2 { font-size: 1.6rem; }
h3 { font-size: 1.05rem; }

/* for screen readers and search engines only (the page's heading) */
.visually-hidden { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

.wrap { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 16px; }

/* ---- header and footer ---------------------------------------------------------------------- */

.site-header {
    background: var(--header);
    border-bottom: 3px solid var(--accent);
    position: sticky;
    top: 0;
    z-index: 10;
}
.header-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 72px; flex-wrap: wrap; }
.brand img { width: 260px; }
.site-nav { display: flex; gap: 4px; flex-wrap: wrap; }
.site-nav a {
    color: #c9d1db;
    text-decoration: none;
    font-size: .92rem;
    padding: 8px 12px;
    border-radius: 8px;
}
.site-nav a:hover { color: #fff; background: rgb(255 255 255 / 8%); }
.site-nav .nav-contact { color: #fff; background: var(--accent); }
.site-nav .nav-contact:hover { background: var(--accent-hover); }

.site-footer { margin-top: 48px; padding: 24px 0; border-top: 1px solid var(--line); color: var(--muted); font-size: .9rem; }
.footer-row { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

/* ---- page parts ----------------------------------------------------------------------------- */

.hero { padding: 32px 0 20px; max-width: 720px; }
.hero p { color: var(--muted); font-size: 1.1rem; margin: 0; }

.notice {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: baseline;
    background: var(--warn-bg);
    border: 1px solid var(--warn-line);
    color: var(--warn-text);
    border-radius: var(--radius);
    padding: 14px 18px;
    margin-bottom: 24px;
}

.card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 28px;
    margin-bottom: 24px;
    scroll-margin-top: 96px;
}
.message { max-width: 640px; margin: 48px auto; text-align: center; }
.message .button { margin-top: 8px; }


/* ---- products ------------------------------------------------------------------------------- */

.product {
    display: grid;
    grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
    gap: 28px 40px;
}
.product-media img, .gallery { border-radius: 10px; overflow: hidden; }
.product-details {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 28px 40px;
    border-top: 1px solid var(--line);
    padding-top: 24px;
}
.lede { color: var(--muted); }

/* the SAP photos fade from one to the next, as the old site's crossfade.js did */
.gallery { position: relative; aspect-ratio: 300 / 208; background: #000; }
.gallery img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; animation: fade 8s infinite; }
/* 4 s each, fading in over the one before: the first starts already shown, the second waits its turn (hidden till then) */
.gallery img:nth-child(1) { animation-delay: -1s; }
.gallery img:nth-child(2) { animation-delay: 3s; }
@keyframes fade {
    0% { opacity: 0; }
    12.5%, 62.5% { opacity: 1; }
    75%, 100% { opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
    .gallery img { animation: none; }
    .gallery img:first-child { opacity: 1; }
}

/* ---- the order forms ------------------------------------------------------------------------ */

.order-form label[for] { display: block; font-weight: 600; margin-bottom: 6px; }
.order-form select {
    width: 100%;
    font: inherit;
    color: var(--text);
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 10px 12px;
}
.order-form select:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.order-form select.invalid { border-color: var(--danger); }
.field-error { color: var(--danger); font-size: .9rem; margin: 6px 0 0; }

.price { font-weight: 700; font-variant-numeric: tabular-nums; }
.price-large { font-size: 2rem; margin: 16px 0 12px; }

.button {
    display: inline-block;
    font: inherit;
    font-weight: 600;
    color: #fff;
    background: var(--accent);
    border: 1px solid var(--accent);
    border-radius: 10px;
    padding: 12px 22px;
    cursor: pointer;
    text-decoration: none;
}
.button:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: #fff; }
.order-form .button { width: 100%; }
.button-outline { background: transparent; color: var(--accent); }
.button-outline:hover { background: var(--accent-soft); color: var(--accent); }
.fine { color: var(--muted); font-size: .88rem; margin: 10px 0 0; }

/* ---- features and FAQ ----------------------------------------------------------------------- */

.checks { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.checks li { position: relative; padding-left: 28px; }
.checks li::before {
    content: "";
    position: absolute;
    left: 0;
    top: .35em;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--accent-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 8.5l2.5 2.5L12 5.5' fill='none' stroke='%231c69d4' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 12px no-repeat;
}

details { border-bottom: 1px solid var(--line); padding: 10px 0; }
details:first-of-type { border-top: 1px solid var(--line); }
summary { cursor: pointer; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; color: var(--muted); font-weight: 400; }
details[open] summary::after { content: "\2212"; }
details p { margin: 8px 0 4px; color: var(--muted); }

/* ---- small screens -------------------------------------------------------------------------- */

@media (max-width: 760px) {
    .product { grid-template-columns: 1fr; }
    .card { padding: 20px; }
    .brand img { width: 180px; }
    .header-row { padding-block: 10px; flex-wrap: nowrap; }
    .site-nav a:not(.nav-contact) { display: none; }
    .site-header { position: static; }
    .hero { padding-top: 32px; }
}
