/* Elektroservice Altlandsberg demo: page CSS. Tokens only; the brand values live in the BRAND block of tokens.css. */

.sr-only, .hp { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: fixed; top: 10px; left: 10px; z-index: 60; padding: 10px 16px; border-radius: 999px; background: var(--accent-bright); color: var(--accent-ink); font-weight: 700; transform: translateY(-160%); transition: transform 180ms var(--ease-out); }
.skip-link:focus { transform: none; }

/* ── Wordmark: round emblem + two-line name ── */
.wordmark { gap: 11px; letter-spacing: -0.02em; }
.wordmark::before { width: 44px; height: 44px; flex: none; }
.wordmark span { display: grid; font-size: 17px; font-weight: 800; line-height: 1.02; }
.wordmark b { font-size: 12px; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; opacity: 0.78; }
.footer-inner .wordmark span { font-size: 18px; }

/* ── Header extras: theme toggle, mobile menu ── */
.theme-toggle, .menu-toggle { display: inline-grid; width: 44px; height: 44px; place-items: center; border: 0; border-radius: 999px; background: transparent; cursor: pointer; transition: background-color 180ms ease; }
.theme-toggle:hover, .menu-toggle:hover { background: color-mix(in srgb, currentColor 10%, transparent); }
.menu-toggle { display: none; gap: 5px; align-content: center; }
.menu-toggle span { display: block; width: 20px; height: 2px; border-radius: 2px; background: currentColor; transition: transform 220ms var(--ease-out); }
.menu-toggle[aria-expanded="true"] span:first-child { transform: translateY(3.5px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:last-child { transform: translateY(-3.5px) rotate(-45deg); }
@media (max-width: 900px) {
  .menu-toggle { display: inline-grid; }
  .nav-links.is-open { position: fixed; inset: var(--header-height) 0 auto 0; display: grid; gap: 0; padding: 8px 20px 24px; background: var(--bg); color: var(--ink); box-shadow: var(--shadow); }
  .nav-links.is-open a { padding-block: 16px; border-bottom: 1px solid var(--line); font-size: 18px; }
  .site-header.menu-open { background: var(--bg); color: var(--ink); }
  .site-header.menu-open .wordmark::before { background-image: var(--brand-mark); }
}
@media (max-width: 560px) {
  .header-cta { display: none; }
  .wordmark::before { width: 38px; height: 38px; }
  .wordmark span { font-size: 15px; }
  .wordmark b { font-size: 11px; }
}

/* ── Hero: navy field, client photo, left copy ── */
.hero-ink .hero-media img { filter: saturate(0.55) contrast(0.95) brightness(0.62); object-position: 70% 40%; }
.hero-ink.hero-left .hero-wash { background:
  linear-gradient(90deg, color-mix(in srgb, var(--ink-field) 94%, transparent) 0%, color-mix(in srgb, var(--ink-field) 78%, transparent) 46%, color-mix(in srgb, var(--ink-field) 22%, transparent) 100%),
  linear-gradient(0deg, color-mix(in srgb, var(--ink-field) 70%, transparent), transparent 45%); }
.hero-left .hero-content { padding-block: 120px 96px; }
.hero-left .display { max-width: 15ch; font-size: clamp(46px, 6.4vw, 96px); letter-spacing: -0.06em; hyphens: manual; }
.hero-left .lead { max-width: 600px; text-wrap: pretty; }
.hero-proof { display: flex; flex-wrap: wrap; gap: 10px 28px; margin-top: 44px; color: var(--on-ink-muted); font-size: var(--fs-small); font-weight: 600; }
.hero-proof li { display: inline-flex; align-items: center; gap: 10px; }
.hero-proof li::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--accent-bright); }
.hero-stamp { width: 96px; height: 96px; }
.hero-stamp::before { width: 70px; height: 70px; }
@media (max-width: 760px) {
  .hero-left .hero-content { padding-block: 104px 88px; }
  .hero-left .display { font-size: clamp(38px, 10.4vw, 48px); }
  .hero-proof { flex-direction: column; margin-top: 30px; }
  .hero-stamp { display: none; }
}

/* ── Services explorer: tab rows left, image + list right ── */
.services { display: grid; grid-template-columns: minmax(260px, 0.72fr) minmax(0, 1.28fr); gap: clamp(32px, 5vw, 80px); align-items: start; }
.service-tabs { display: grid; border-bottom: 1px solid var(--line-strong); }
.service-tabs button { display: grid; grid-template-columns: 52px 1fr; align-items: baseline; gap: 12px; width: 100%; padding: 26px 0; border: 0; border-top: 1px solid var(--line-strong); background: none; color: var(--muted); cursor: pointer; text-align: left; font-size: clamp(20px, 2vw, 27px); font-weight: 600; line-height: 1.2; letter-spacing: -0.035em; transition: color 180ms ease, padding 260ms var(--ease-out); }
.service-tabs button:hover { color: var(--ink); }
.service-tabs button[aria-selected="true"] { color: var(--ink); padding-left: 8px; }
.service-num { color: var(--muted); font-size: var(--fs-small); font-weight: 800; letter-spacing: 0.04em; font-variant-numeric: tabular-nums; }
.service-tabs button[aria-selected="true"] .service-num { color: var(--accent-deep); }
.service-panel { display: grid; gap: 30px; }
.service-panel[hidden] { display: none; }
.js .service-panel:not([hidden]) { animation: panel-in 520ms var(--ease-out); }
.no-js .service-panel + .service-panel { margin-top: 56px; }
@keyframes panel-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.service-panel .media-panel { min-height: clamp(260px, 30vw, 400px); }
.service-panel figcaption .label { color: var(--on-ink-muted); }
.service-panel figcaption .h3 { margin-top: 6px; }
.service-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px 40px; align-items: start; }
.service-body > p { color: var(--muted); }
.service-body .text-link { grid-column: 2; }
@media (max-width: 1000px) {
  .services { grid-template-columns: 1fr; }
  .service-tabs { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 20px; border-bottom: 0; }
  .service-tabs button { grid-template-columns: 1fr; gap: 6px; padding: 18px 0; font-size: 18px; }
  .service-tabs button[aria-selected="true"] { padding-left: 0; box-shadow: inset 0 2px 0 var(--accent); }
  .service-body { grid-template-columns: 1fr; }
  .service-body .text-link { grid-column: auto; }
}
@media (prefers-reduced-motion: reduce) { .js .service-panel:not([hidden]) { animation: none; } }

/* ── Rule list with six items: three columns, two rows ── */
.band .rule-list { row-gap: 8px; }

/* ── Index list inside a split: title and text in two columns ── */
.split .index-list > li { grid-template-columns: 76px minmax(0, 0.8fr) minmax(0, 1.2fr); }
@media (max-width: 760px) { .split .index-list > li { grid-template-columns: 1fr; } }

/* ── Fields ── */
.field-title { margin-top: 26px; max-width: 16ch; }
.field-text { margin-top: 18px; max-width: 46ch; }
.field-ink { background: radial-gradient(circle at 90% 10%, color-mix(in srgb, var(--accent-bright) 22%, transparent), transparent 40%), var(--ink-field); }
.field-ink .label { color: var(--accent-on-dark); }
.field-badge-round { width: 132px; height: auto; align-self: flex-end; opacity: 0.92; }
.field-sand { --spot: var(--accent-bright); }
.badge-row { display: flex; flex-wrap: wrap; align-items: center; gap: 18px; }
.badge-row img { width: auto; height: 64px; border-radius: 6px; }
.badge-row img + img { height: 34px; }
.field-sky { min-height: 0; }
.field-split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px 60px; align-items: end; }
.field-split .field-text { margin-top: 0; }
@media (max-width: 900px) { .field-split { grid-template-columns: 1fr; } .field-sky { min-height: 0; } }

/* ── About ── */
.about-kv { margin-top: 36px; }

/* ── Assistant band ── */
.assistant { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 0.9fr); gap: clamp(40px, 7vw, 110px); align-items: center; }
.assistant .lead { margin-top: 22px; max-width: 560px; }
.assistant-demo { display: grid; gap: 12px; }
.bubble { max-width: 88%; padding: 14px 18px; border-radius: 18px; font-size: 15px; line-height: 1.5; }
.bubble-user { justify-self: end; border-bottom-right-radius: 6px; background: var(--accent-bright); color: var(--accent-ink); font-weight: 600; }
.bubble-bot { justify-self: start; border-bottom-left-radius: 6px; background: color-mix(in srgb, var(--on-ink) 10%, transparent); color: var(--on-ink); }
@media (max-width: 900px) { .assistant { grid-template-columns: 1fr; } }

/* ── Contact ── */
.contact { display: grid; grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr); gap: clamp(40px, 6vw, 96px); align-items: start; }
.contact-info .lead { margin-top: 22px; }
.contact-kv { margin-top: 36px; }
.contact-kv a:not(.text-link) { font-weight: 700; transition: color 180ms ease; }
.contact-kv a:hover { color: var(--accent-deep); }
.contact-kv .text-link { margin-top: 8px; }
.contact-form-panel { display: block; min-height: 0; padding: clamp(26px, 4vw, 52px); }
@media (max-width: 1000px) { .contact { grid-template-columns: 1fr; } }

.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 22px; margin-top: 22px; }
.input-wide, .field-anrede { grid-column: 1 / -1; }
.input { display: grid; gap: 8px; font-size: var(--fs-small); font-weight: 600; color: var(--muted-strong); }
.input input, .input select, .input textarea { width: 100%; min-height: 50px; padding: 12px 16px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: var(--bg); color: var(--ink); font-size: 16px; font-weight: 500; transition: border-color 180ms ease, box-shadow 180ms ease; }
.input textarea { resize: vertical; min-height: 120px; }
.input input:focus, .input select:focus, .input textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.input [aria-invalid="true"] { border-color: var(--field-rose-spot); }
fieldset { margin: 0; padding: 0; border: 0; }
legend { margin-bottom: 10px; font-size: var(--fs-small); font-weight: 600; color: var(--muted-strong); }
.radio-row { display: flex; flex-wrap: wrap; gap: 10px; }
.radio-row label { position: relative; display: inline-flex; min-height: 44px; align-items: center; padding: 0 18px; border: 1px solid var(--line-strong); border-radius: 999px; cursor: pointer; font-size: 15px; font-weight: 600; transition: background-color 180ms ease, border-color 180ms ease; }
.radio-row input { position: absolute; opacity: 0; pointer-events: none; }
.radio-row label:has(input:checked) { border-color: transparent; background: var(--accent-bright); color: var(--accent-ink); }
.radio-row label:has(input:focus-visible) { outline: 3px solid var(--accent); outline-offset: 3px; }
.consent { display: grid; grid-template-columns: 24px 1fr; gap: 12px; align-items: start; color: var(--muted); font-size: var(--fs-small); cursor: pointer; }
.consent input { width: 22px; height: 22px; margin: 1px 0 0; accent-color: var(--accent-bright); }
.consent a { border-bottom: 1px solid currentColor; }
.error { min-height: 0; color: var(--field-rose-spot); font-size: 13px; font-weight: 600; }
.error:empty { display: none; }
.form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px; margin-top: 28px; }
.form-actions .muted { max-width: 34ch; }
.form-error { margin-top: 14px; }
.lead-form button[type="submit"][aria-busy="true"] { opacity: 0.7; pointer-events: none; }
.form-success { display: grid; gap: 16px; justify-items: start; padding-block: 20px; }
.form-state[hidden] { display: none; }
.form-success { scroll-margin-top: calc(var(--header-height) + 32px); }
.form-success:focus { outline: none; }
.success-mark { display: grid; width: 56px; height: 56px; place-items: center; border-radius: 16px; background: var(--accent-bright); color: var(--accent-ink); font-size: 26px; font-weight: 800; animation: pop 520ms var(--ease-out); }
.success-mark::before { content: "\2713"; }
@keyframes pop { from { transform: scale(0.6); opacity: 0; } to { transform: none; opacity: 1; } }
@media (max-width: 620px) { .form-grid { grid-template-columns: 1fr; } }

/* ── Footer ── */
.footer-brand { display: grid; gap: 16px; align-content: start; }
.footer-brand img { width: 196px; height: auto; padding: 8px; border-radius: 8px; background: var(--on-ink); }
.footer-cols span { line-height: 1.6; }

/* ── Chat widget ── */
.chat { position: fixed; right: 20px; bottom: 20px; z-index: 50; display: grid; justify-items: end; gap: 12px; }
.chat-launcher { display: inline-flex; min-height: 54px; align-items: center; gap: 10px; padding: 0 22px 0 18px; border: 0; border-radius: 999px; background: var(--brand-navy); color: var(--on-ink); cursor: pointer; font-weight: 700; font-size: 15px; box-shadow: var(--shadow); transition: transform 180ms var(--ease-out); }
.chat-launcher:hover { transform: translateY(-2px); }
.chat-launcher-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--accent-bright); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent-bright) 30%, transparent); animation: pulse 2.4s ease-in-out 3; }
@keyframes pulse { 50% { box-shadow: 0 0 0 8px color-mix(in srgb, var(--accent-bright) 0%, transparent); } }
.chat.is-open .chat-launcher { display: none; }
.chat-panel { display: grid; grid-template-rows: auto 1fr auto auto; width: min(400px, calc(100vw - 24px)); height: min(620px, calc(100svh - 40px)); overflow: hidden; border-radius: 20px; background: var(--surface); box-shadow: var(--shadow); transform-origin: bottom right; animation: chat-in 320ms var(--ease-out); }
.chat-panel[hidden] { display: none; }
@keyframes chat-in { from { opacity: 0; transform: translateY(14px) scale(0.97); } to { opacity: 1; transform: none; } }
.chat-head { display: grid; grid-template-columns: 42px 1fr 44px; gap: 12px; align-items: center; padding: 14px 12px 14px 16px; background: var(--ink-field); color: var(--on-ink); }
.chat-avatar { width: 42px; height: 42px; border-radius: 50%; background: var(--brand-mark-on-dark) center / 34px no-repeat, color-mix(in srgb, var(--on-ink) 10%, transparent); }
.chat-title { font-weight: 800; font-size: 15px; line-height: 1.2; }
.chat-sub { color: var(--on-ink-muted); font-size: 12px; }
.chat-close { display: grid; width: 44px; height: 44px; place-items: center; border: 0; border-radius: 999px; background: transparent; color: inherit; cursor: pointer; }
.chat-close:hover { background: color-mix(in srgb, var(--on-ink) 12%, transparent); }
.chat-log { display: grid; align-content: start; gap: 10px; padding: 18px 16px; overflow-y: auto; overscroll-behavior: contain; background: var(--bg); }
.msg { max-width: 86%; padding: 11px 15px; border-radius: 16px; font-size: 14.5px; line-height: 1.5; white-space: pre-line; animation: msg-in 260ms var(--ease-out); }
.msg-bot { justify-self: start; border-bottom-left-radius: 5px; background: var(--surface-2); color: var(--ink); }
.msg-user { justify-self: end; border-bottom-right-radius: 5px; background: var(--accent-bright); color: var(--accent-ink); font-weight: 600; }
.msg a { border-bottom: 1px solid currentColor; font-weight: 700; }
.msg-typing { display: inline-flex; gap: 4px; }
.msg-typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--muted); animation: blink 1s infinite; }
.msg-typing i:nth-child(2) { animation-delay: 150ms; } .msg-typing i:nth-child(3) { animation-delay: 300ms; }
@keyframes blink { 50% { opacity: 0.25; } }
@keyframes msg-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.chat-quick { display: flex; flex-wrap: wrap; gap: 8px; padding: 10px 14px 0; background: var(--surface); }
.chat-quick:empty { display: none; }
.chat-quick button { min-height: 44px; padding: 0 14px; border: 1px solid var(--line-strong); border-radius: 999px; background: var(--surface); color: var(--ink); cursor: pointer; font-size: 13px; font-weight: 700; transition: background-color 180ms ease, border-color 180ms ease; }
.chat-quick button:hover { border-color: var(--accent); background: var(--accent-faint); }
.chat-input { display: grid; grid-template-columns: 1fr auto; gap: 8px; padding: 12px 14px 14px; background: var(--surface); }
.chat-input input { min-height: 44px; padding: 0 14px; border: 1px solid var(--line-strong); border-radius: 999px; background: var(--bg); color: var(--ink); font-size: 16px; }
.chat-input input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.chat-input .button { min-height: 44px; }
@media (max-width: 560px) {
  .chat { right: 12px; bottom: 12px; }
  .chat-panel { height: min(620px, calc(100svh - 24px)); }
}
@media (prefers-reduced-motion: reduce) { .chat-panel, .msg, .success-mark { animation: none; } .chat-launcher-dot { animation: none; } }
@media print { .chat, .theme-toggle, .menu-toggle { display: none !important; } }
