/* =========================================================================
   automotive-cybersecurity.ch — Stylesheet
   ========================================================================= */

:root {
    --bg:        #0a0e1a;
    --bg-alt:    #0f1525;
    --surface:   #131b2e;
    --surface-2: #18223a;
    --border:    #243049;
    --text:      #f2f5fa;
    --text-dim:  #b7c2d6;
    --muted:     #8493ab;
    --accent:    #2de1c2;
    --accent-2:  #36a3ff;
    --accent-dim:#16493f;
    --danger:    #ff6b6b;
    --ok:        #2de1a3;
    --radius:    14px;
    --radius-sm: 9px;
    --maxw:      1140px;
    --shadow:    0 18px 40px -18px rgba(0,0,0,.7);
    --font:      'Inter', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
    --font-head: 'Space Grotesk', var(--font);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    line-height: 1.65;
    overflow-x: hidden;
}

h1, h2, h3, h4 { font-family: var(--font-head); line-height: 1.2; font-weight: 700; margin: 0 0 .6em; }
p { margin: 0 0 1rem; color: var(--text-dim); }
a { color: var(--accent); text-decoration: none; transition: color .2s; }
a:hover { color: var(--accent-2); }
img, svg { max-width: 100%; }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 1.5rem; }
.container.narrow { max-width: 780px; }
.center { text-align: center; }
.muted { color: var(--muted); }

.skip-link {
    position: absolute; left: -999px; top: 0; background: var(--accent); color: #04201b;
    padding: .6rem 1rem; border-radius: 0 0 8px 0; z-index: 1000; font-weight: 600;
}
.skip-link:focus { left: 0; }

/* --- Buttons ----------------------------------------------------------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
    font-family: var(--font-head); font-weight: 600; font-size: .95rem;
    padding: .7rem 1.4rem; border-radius: 999px; border: 1px solid transparent;
    cursor: pointer; transition: transform .15s, box-shadow .2s, background .2s, border-color .2s;
    white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn-lg { padding: .9rem 1.8rem; font-size: 1.02rem; }
.btn-sm { padding: .5rem 1rem; font-size: .85rem; }
.btn-primary { background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #04201b; box-shadow: 0 10px 24px -10px rgba(45,225,194,.6); }
.btn-primary:hover { color: #04201b; box-shadow: 0 14px 30px -10px rgba(45,225,194,.75); }
.btn-ghost { background: rgba(255,255,255,.04); color: var(--text); border-color: var(--border); }
.btn-ghost:hover { color: var(--text); border-color: var(--accent); }
.btn-outline { background: transparent; color: var(--accent); border-color: var(--accent); }
.btn-outline:hover { background: var(--accent-dim); color: var(--accent); }

/* --- Header ------------------------------------------------------------ */
.site-header {
    position: sticky; top: 0; z-index: 100;
    background: #0b0f1c;
    border-bottom: 1px solid var(--border);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 70px; gap: 1rem; }
.brand { display: inline-flex; align-items: center; gap: .6rem; color: var(--text); font-family: var(--font-head); font-weight: 700; }
.brand:hover { color: var(--text); }
.brand-mark { color: var(--accent); display: inline-flex; }
.brand-text { font-size: 1.12rem; letter-spacing: -.01em; }
.brand-accent { color: var(--accent); }

.primary-nav { display: flex; align-items: center; gap: 1.8rem; }
.primary-nav ul { display: flex; gap: 1.4rem; list-style: none; margin: 0; padding: 0; }
.primary-nav a { color: var(--text-dim); font-weight: 500; font-size: .95rem; position: relative; }
.primary-nav a:hover { color: var(--text); }
.primary-nav a.is-active { color: var(--text); }
.primary-nav a.is-active::after {
    content: ''; position: absolute; left: 0; right: 0; bottom: -8px; height: 2px;
    background: linear-gradient(90deg, var(--accent), var(--accent-2)); border-radius: 2px;
}
.nav-extra { display: flex; align-items: center; gap: 1.1rem; }
.lang-switch { display: inline-flex; gap: .35rem; align-items: center; font-size: .85rem; color: var(--muted); font-weight: 600; }
.lang-switch a { color: var(--muted); padding: .1rem .2rem; }
.lang-switch a.is-active { color: var(--accent); }

.nav-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: 0; cursor: pointer; padding: 8px; }
.nav-toggle span { width: 24px; height: 2px; background: var(--text); border-radius: 2px; transition: .25s; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* --- Hero -------------------------------------------------------------- */
.hero { position: relative; padding: 6rem 0 5rem; overflow: hidden; }
.hero-bg {
    position: absolute; inset: 0; z-index: 0;
    background:
        radial-gradient(60% 50% at 75% 20%, rgba(54,163,255,.18), transparent 70%),
        radial-gradient(50% 50% at 15% 80%, rgba(45,225,194,.16), transparent 70%),
        linear-gradient(180deg, var(--bg), var(--bg-alt));
}
.hero-bg::after {
    content: ''; position: absolute; inset: 0;
    background-image: linear-gradient(var(--border) 1px, transparent 1px), linear-gradient(90deg, var(--border) 1px, transparent 1px);
    background-size: 46px 46px; opacity: .12;
    mask-image: radial-gradient(70% 60% at 50% 30%, #000, transparent 80%);
}
.hero-inner { position: relative; z-index: 1; max-width: 820px; }
.tag {
    display: inline-block; font-family: var(--font-head); font-size: .8rem; font-weight: 600;
    letter-spacing: .08em; text-transform: uppercase; color: var(--accent);
    background: var(--accent-dim); border: 1px solid rgba(45,225,194,.3);
    padding: .35rem .9rem; border-radius: 999px; margin-bottom: 1.4rem;
}
.hero-title { font-size: clamp(2.2rem, 5.2vw, 3.7rem); letter-spacing: -.02em; margin-bottom: 1rem; }
.hero-sub { font-size: clamp(1.05rem, 2vw, 1.25rem); color: var(--text-dim); max-width: 640px; margin-bottom: 2rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 1rem; margin-bottom: 2.4rem; }
.hero-badges { display: flex; flex-wrap: wrap; gap: .6rem; }
.badge {
    font-family: var(--font-head); font-size: .78rem; font-weight: 600; letter-spacing: .04em;
    color: var(--text-dim); background: var(--surface); border: 1px solid var(--border);
    padding: .3rem .8rem; border-radius: 6px;
}

/* --- Sections ---------------------------------------------------------- */
.section { padding: 5rem 0; }
.section-alt { background: var(--bg-alt); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section-head { text-align: center; max-width: 680px; margin: 0 auto 3rem; }
.section-title { font-size: clamp(1.7rem, 3.5vw, 2.4rem); letter-spacing: -.015em; }
.section-subtitle { color: var(--text-dim); font-size: 1.08rem; }
.lead { font-size: 1.12rem; color: var(--text-dim); }

/* --- Cards ------------------------------------------------------------- */
.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.4rem; }
.card {
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
    padding: 1.8rem; transition: transform .2s, border-color .2s, box-shadow .2s; position: relative; overflow: hidden;
}
.card::before {
    content: ''; position: absolute; inset: 0 0 auto 0; height: 3px;
    background: linear-gradient(90deg, var(--accent), var(--accent-2)); opacity: 0; transition: opacity .25s;
}
.card:hover { transform: translateY(-5px); border-color: rgba(45,225,194,.4); box-shadow: var(--shadow); }
.card:hover::before { opacity: 1; }
.card-icon { font-size: 2rem; margin-bottom: .8rem; }
.card h3 { font-size: 1.18rem; margin-bottom: .5rem; }
.card p { margin: 0; font-size: .96rem; }

/* --- Why grid ---------------------------------------------------------- */
.why-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.6rem; }
.why-item { padding: 1.5rem 0; border-top: 1px solid var(--border); }
.why-num { font-family: var(--font-head); font-size: 1.6rem; font-weight: 700; color: var(--accent); display: block; margin-bottom: .5rem; }
.why-item h3 { font-size: 1.1rem; margin-bottom: .4rem; }
.why-item p { font-size: .95rem; margin: 0; }

/* --- Page hero (sub pages) --------------------------------------------- */
.page-hero { padding: 4rem 0 2.5rem; background: linear-gradient(180deg, var(--bg-alt), var(--bg)); border-bottom: 1px solid var(--border); }
.page-hero h1 { font-size: clamp(2rem, 4.5vw, 3rem); letter-spacing: -.02em; }
.page-hero .lead { max-width: 640px; }

/* --- Service list ------------------------------------------------------ */
.service-list { display: flex; flex-direction: column; gap: 1.2rem; }
.service-row {
    display: flex; gap: 1.4rem; align-items: flex-start;
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
    padding: 1.8rem; transition: border-color .2s, transform .2s;
}
.service-row:hover { border-color: rgba(45,225,194,.4); transform: translateX(4px); }
.service-row-icon { font-size: 2.1rem; flex-shrink: 0; line-height: 1; }
.service-row-num { font-family: var(--font-head); font-size: .82rem; color: var(--accent); font-weight: 600; letter-spacing: .1em; }
.service-row-body h2 { font-size: 1.3rem; margin: .2rem 0 .5rem; }
.service-row-body p { margin: 0; }

/* --- Standards --------------------------------------------------------- */
.standards-row { display: flex; flex-wrap: wrap; gap: .9rem; justify-content: center; margin-top: 2rem; }
.standard-chip {
    font-family: var(--font-head); font-weight: 600; color: var(--text);
    background: var(--surface); border: 1px solid var(--border); border-radius: 999px;
    padding: .6rem 1.4rem; font-size: 1rem;
}

/* --- About ------------------------------------------------------------- */
.about-grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: 3rem; align-items: start; }
.about-text p { font-size: 1.05rem; }
.mission-box { margin-top: 1.8rem; padding: 1.5rem; border-left: 3px solid var(--accent); background: var(--surface); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.mission-box h3 { color: var(--accent); font-size: 1.1rem; }
.mission-box p { margin: 0; }
.about-stats { display: flex; flex-direction: column; gap: 1rem; }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.4rem 1.6rem; }
.stat-value { font-family: var(--font-head); font-size: 2rem; font-weight: 700; color: var(--accent); display: block; }
.stat-label { color: var(--text-dim); font-size: .95rem; }

/* --- CTA band ---------------------------------------------------------- */
.cta-band { background: linear-gradient(135deg, var(--accent-dim), var(--bg-alt)); border-top: 1px solid var(--border); padding: 3.5rem 0; }
.cta-band-inner { display: flex; align-items: center; justify-content: space-between; gap: 2rem; flex-wrap: wrap; }
.cta-band h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); margin-bottom: .3rem; }
.cta-band p { margin: 0; color: var(--text-dim); }

/* --- Contact ----------------------------------------------------------- */
.contact-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 3rem; align-items: start; }
.contact-form { display: flex; flex-direction: column; gap: 1.1rem; }
.form-row { display: flex; flex-direction: column; gap: .4rem; }
.form-row label { font-weight: 600; font-size: .9rem; color: var(--text); }
.contact-form input[type=text], .contact-form input[type=email], .contact-form textarea {
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm);
    padding: .8rem 1rem; color: var(--text); font-family: var(--font); font-size: 1rem; transition: border-color .2s, box-shadow .2s;
}
.contact-form input:focus, .contact-form textarea:focus {
    outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(45,225,194,.15);
}
.contact-form .has-error { border-color: var(--danger); }
.form-consent .checkbox { flex-direction: row; display: flex; gap: .6rem; align-items: flex-start; font-weight: 400; font-size: .9rem; color: var(--text-dim); cursor: pointer; }
.form-consent input { margin-top: .25rem; accent-color: var(--accent); }
.hp { position: absolute; left: -9999px; height: 0; overflow: hidden; }

.alert { padding: 1rem 1.2rem; border-radius: var(--radius-sm); margin-bottom: 1.4rem; font-size: .96rem; border: 1px solid; }
.alert-ok { background: rgba(45,225,163,.1); border-color: rgba(45,225,163,.4); color: var(--ok); }
.alert-err { background: rgba(255,107,107,.1); border-color: rgba(255,107,107,.4); color: var(--danger); }

.contact-info h2 { font-size: 1.3rem; }
.contact-list { list-style: none; padding: 0; margin: 0 0 1.6rem; display: flex; flex-direction: column; gap: 1.1rem; }
.contact-list li { display: flex; flex-direction: column; gap: .15rem; }
.ci-label { font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 600; }
.contact-badges { display: flex; gap: .6rem; flex-wrap: wrap; }

/* --- Legal pages ------------------------------------------------------- */
.legal h2 { margin-top: 2rem; font-size: 1.3rem; }
.legal h3 { margin-top: 1.4rem; font-size: 1.1rem; }
.legal p { color: var(--text-dim); }

/* --- Landingpage: Anker-Offset, Standards, Timeline, Zahlen ------------- */
section[id] { scroll-margin-top: 84px; }

.section-title.center { text-align: center; }
.section .lead + .lead { margin-top: 1rem; }

.reg-chip {
    display: inline-block; font-family: var(--font-head); font-weight: 700; font-size: .8rem;
    letter-spacing: .03em; color: var(--accent); background: var(--accent-dim);
    border: 1px solid rgba(45,225,194,.3); padding: .25rem .7rem; border-radius: 6px; margin-bottom: .8rem;
}

/* Timeline */
.timeline { list-style: none; margin: 0; padding: 0; position: relative; max-width: 820px; margin: 0 auto; }
.timeline::before { content: ''; position: absolute; left: 84px; top: 6px; bottom: 6px; width: 2px; background: var(--border); }
.tl-item { position: relative; display: grid; grid-template-columns: 84px 1fr; gap: 1.4rem; padding-bottom: 1.6rem; }
.tl-item:last-child { padding-bottom: 0; }
.tl-year { font-family: var(--font-head); font-weight: 700; font-size: 1.05rem; color: var(--accent); text-align: right; padding-top: .9rem; }
.tl-item::before {
    content: ''; position: absolute; left: 78px; top: 1.25rem; width: 13px; height: 13px; border-radius: 50%;
    background: var(--accent); border: 3px solid var(--bg); box-shadow: 0 0 0 1px var(--accent);
}
.tl-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.2rem 1.4rem; }
.tl-card h3 { font-size: 1.1rem; margin-bottom: .3rem; }
.tl-card p { margin: 0; font-size: .95rem; }

/* Zahlen */
.facts-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1.4rem; }
.fact { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.8rem 1.4rem; text-align: center; }
.fact-value { display: block; font-family: var(--font-head); font-size: 2.4rem; font-weight: 800; color: var(--accent); line-height: 1; }
.fact-label { display: block; margin-top: .6rem; color: var(--text-dim); font-size: .95rem; }

.disclaimer { margin-top: 1.8rem; font-size: .85rem; color: var(--muted); }

@media (max-width: 560px) {
    .timeline::before { left: 7px; }
    .tl-item { grid-template-columns: 1fr; gap: .5rem; padding-left: 28px; }
    .tl-year { text-align: left; padding-top: 0; }
    .tl-item::before { left: 1px; top: .35rem; }
}

/* --- Footer ------------------------------------------------------------ */
.site-footer { background: var(--bg-alt); border-top: 1px solid var(--border); padding-top: 3.5rem; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1.3fr; gap: 2rem; padding-bottom: 2.5rem; }
.footer-tagline { color: var(--text-dim); margin-top: 1rem; max-width: 280px; }
.footer-col h4 { font-size: .85rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-bottom: 1rem; }
.footer-col ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: .6rem; }
.footer-col a { color: var(--text-dim); font-size: .95rem; }
.footer-col a:hover { color: var(--accent); }
.footer-bottom { border-top: 1px solid var(--border); padding: 1.4rem 0; }
.footer-bottom-inner { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; font-size: .88rem; color: var(--muted); }

/* --- Responsive -------------------------------------------------------- */
@media (max-width: 880px) {
    .nav-toggle { display: flex; }
    .primary-nav {
        position: fixed; inset: 70px 0 auto 0; flex-direction: column; align-items: stretch; gap: 0;
        background: var(--bg-alt); border-bottom: 1px solid var(--border); padding: 1rem 1.5rem 1.5rem;
        transform: translateY(-120%); transition: transform .3s ease; box-shadow: var(--shadow);
    }
    .primary-nav.open { transform: translateY(0); }
    .primary-nav ul { flex-direction: column; gap: 0; }
    .primary-nav ul li { border-bottom: 1px solid var(--border); }
    .primary-nav ul a { display: block; padding: .9rem 0; }
    .primary-nav a.is-active::after { display: none; }
    .nav-extra { justify-content: space-between; margin-top: 1rem; }
    .about-grid, .contact-grid { grid-template-columns: 1fr; gap: 2rem; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .cta-band-inner { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 520px) {
    .footer-grid { grid-template-columns: 1fr; }
    .hero { padding: 4rem 0 3.5rem; }
    .section { padding: 3.5rem 0; }
    .service-row { flex-direction: column; gap: .8rem; }
}

@media (prefers-reduced-motion: reduce) {
    * { transition: none !important; scroll-behavior: auto !important; }
}
