/* ===== Theme (defaults from the ShelbyClean logo; overridden at runtime from content.theme) ===== */
:root {
  --color-primary: #C0392B;   /* classic red */
  --color-dark:    #3B434A;   /* charcoal slate */
  --color-light:   #EAE8E0;   /* cream */
  --color-text:    #3B434A;
  --color-accent:  #C0392B;
  --font-family:   'Segoe UI', system-ui, -apple-system, Roboto, Helvetica, Arial, sans-serif;

  --maxw: 1120px;
  --radius: 14px;
  --shadow: 0 8px 30px rgba(0,0,0,.10);
}

* { box-sizing: border-box; }
/* Ensure the [hidden] attribute always wins over display:grid/flex below. */
[hidden] { display: none !important; }

/* Accessibility: skip link + keyboard focus ring */
.skip-link {
  position: absolute; left: 8px; top: -60px; z-index: 100;
  background: var(--color-dark); color: #fff; padding: 10px 16px;
  border-radius: 8px; font-weight: 700; transition: top .15s ease;
}
.skip-link:focus { top: 8px; }
:focus-visible { outline: 3px solid var(--color-primary); outline-offset: 2px; border-radius: 4px; }
#login-form label { font-weight: 600; font-size: .9rem; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-family);
  color: var(--color-text);
  background: var(--color-light);
  line-height: 1.6;
}
img { max-width: 100%; display: block; }
a { color: var(--color-primary); text-decoration: none; }
h1, h2, h3, h4 { line-height: 1.15; color: var(--color-dark); margin: 0 0 .5em; }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.4rem); }
.container { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }
.muted { color: color-mix(in srgb, var(--color-text) 60%, transparent); }
.small { font-size: .85rem; }

/* ===== Header ===== */
.site-header {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; padding: 10px 20px;
  background: color-mix(in srgb, var(--color-light) 88%, white);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(0,0,0,.08);
}
.brand-logo { height: 52px; width: auto; }
.site-nav { display: flex; align-items: center; gap: 22px; }
.site-nav a { color: var(--color-dark); font-weight: 600; }
.site-nav a:hover { color: var(--color-primary); }
.nav-cta {
  background: var(--color-primary); color: #fff !important;
  padding: 8px 16px; border-radius: 999px;
}
.nav-toggle {
  display: none; font-size: 1.5rem; background: none; border: 0;
  color: var(--color-dark); cursor: pointer;
}

/* ===== Hero ===== */
.hero {
  background:
    radial-gradient(1200px 500px at 80% -10%, color-mix(in srgb, var(--color-primary) 22%, transparent), transparent 60%),
    linear-gradient(160deg, var(--color-dark), color-mix(in srgb, var(--color-dark) 70%, black));
  color: var(--color-light);
  padding: clamp(60px, 12vw, 130px) 20px;
  display: flex; align-items: center;
  min-height: clamp(480px, 74vh, 680px);
}
.hero-inner { max-width: var(--maxw); margin: 0 auto; width: 100%; transition: filter 1s ease; }
/* text sits frosted behind the fog until the squeegee reveals it */
.hero.hero-fogging .hero-inner { filter: blur(7px); }

/* ===== Hero: dirty-window glass layers ===== */
.hero-bg-pic { display: contents; }
.hero-bg {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: center; z-index: 0;
}
.hero-scrim {
  position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background:
    linear-gradient(90deg, rgba(28,32,36,.82) 0%, rgba(28,32,36,.45) 45%, rgba(28,32,36,.12) 100%),
    linear-gradient(0deg, rgba(28,32,36,.55) 0%, rgba(28,32,36,0) 45%);
}
.hero h1, .hero-sub { text-shadow: 0 2px 14px rgba(0,0,0,.45); }
.hero-fog {
  position: absolute; inset: 0; width: 100%; height: 100%;
  z-index: 3; pointer-events: none;
}
.hero-squeegee {
  position: absolute; top: 0; left: 0; width: 22px; height: 96px;
  z-index: 4; pointer-events: none; opacity: 0;
  transform: translate(-100px, -100px);
  will-change: transform, opacity; transition: opacity .28s ease;
  border-radius: 6px;
  background: linear-gradient(90deg, #8b929a 0%, #eef1f4 22%, #c9cfd6 50%, #6b727a 78%, #464c53 100%);
  box-shadow: 0 6px 16px rgba(0,0,0,.4), 0 0 20px rgba(255,255,255,.25);
}
.hero-squeegee::before { /* chrome ferrule */
  content: ""; position: absolute; left: 0; right: 0; top: 8px; height: 16px;
  background: linear-gradient(90deg, #6b727a, #e9edf1 50%, #565c63);
  border-radius: 4px;
}
.hero-squeegee::after { /* rubber blade edge */
  content: ""; position: absolute; left: 3px; right: 3px; bottom: -6px; height: 12px;
  background: linear-gradient(180deg, #3a4046, #23282d);
  border-radius: 0 0 5px 5px;
  box-shadow: 0 3px 8px rgba(0,0,0,.45);
}
.hero-squeegee.on { opacity: 1; }
.hero-hint {
  position: absolute; left: 50%; bottom: 22px; transform: translateX(-50%);
  z-index: 4; pointer-events: none; opacity: 0;
  background: rgba(20,24,28,.6); color: #fff; font-size: .85rem; font-weight: 600;
  padding: 7px 15px; border-radius: 999px; backdrop-filter: blur(3px);
  transition: opacity .5s ease;
}
.hero-hint.show { opacity: 1; }
.hero-eyebrow {
  letter-spacing: .18em; text-transform: uppercase; font-size: .8rem; font-weight: 700;
  color: color-mix(in srgb, var(--color-primary) 55%, white);
  margin: 0 0 14px;
}
.hero h1 {
  color: #fff; font-size: clamp(2.1rem, 6vw, 4rem); max-width: 16ch; margin-bottom: .3em;
}
.hero-sub { font-size: clamp(1.05rem, 2.4vw, 1.35rem); max-width: 55ch; opacity: .92; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 28px; }

.hero { position: relative; overflow: hidden; }
.hero-inner { position: relative; z-index: 2; }

/* ===== Physics sweeping broom (bottom of the About section) ===== */
#ueber { position: relative; overflow: hidden; padding-bottom: 104px; }
.broom-stage {
  position: absolute; left: 0; right: 0; bottom: 0; height: 100px;
  pointer-events: auto; cursor: crosshair; z-index: 1;   /* tap/click to add dirt */
}
.broom-dust { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.broom-hint {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  background: rgba(20, 24, 28, .62); color: #fff; font-size: .85rem; font-weight: 600;
  padding: 7px 15px; border-radius: 999px; white-space: nowrap; pointer-events: none;
  opacity: 0; transition: opacity .5s ease;
  -webkit-user-select: none; user-select: none;
}
.broom-hint.show { opacity: 1; }
.broom-hand {
  position: absolute; left: 0; top: 0; font-size: 2.7rem; line-height: 1;
  transform: translate(-100px, 0); transform-origin: 60% 92%;
  filter: drop-shadow(0 5px 6px rgba(0,0,0,.3)); will-change: transform;
  -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none;
  -webkit-touch-callout: none; pointer-events: none;
}
@media (prefers-reduced-motion: reduce) {
  .broom-stage { display: none; }
  .hero-fog, .hero-squeegee, .hero-hint { display: none; }
}

/* logo image in the hours section (replaces the old CSS text emblem) */
.hours-logo { max-width: 260px; margin: 0 auto; filter: drop-shadow(0 12px 26px rgba(0,0,0,.18)); }

/* editable "Und außerdem" chips */
.chips li { display: inline-flex; align-items: center; gap: 6px; }
.chips .del-btn { width: 18px; height: 18px; font-size: .8rem; margin: 0; }

/* ===== Buttons ===== */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 13px 26px; border-radius: 999px; font-weight: 700; cursor: pointer;
  border: 2px solid transparent; transition: transform .08s ease, filter .15s ease;
  font-size: 1rem;
}
.btn:hover { transform: translateY(-1px); filter: brightness(1.05); }
.btn-primary { background: var(--color-primary); color: #fff !important; }
.btn-ghost { background: transparent; border-color: currentColor; color: inherit; }
.btn-dark { background: var(--color-dark); color: #fff !important; }

/* ===== Sections ===== */
.section { padding: clamp(50px, 8vw, 90px) 0; }
.section-alt { background: color-mix(in srgb, var(--color-dark) 6%, var(--color-light)); }
.section-intro { max-width: 60ch; margin: -.2em 0 2em; font-size: 1.1rem; }

/* ===== Service cards ===== */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 22px; }
.card {
  background: #fff; border-radius: var(--radius); padding: 28px 24px;
  box-shadow: var(--shadow); border-top: 4px solid var(--color-primary);
}
.card .card-icon { font-size: 2.2rem; line-height: 1; }
.card h3 { margin: 14px 0 8px; }
.card p { margin: 0; }

.more-services { margin-top: 42px; }
.chips { display: flex; flex-wrap: wrap; gap: 10px; padding: 0; list-style: none; margin: 14px 0 0; }
.chips li {
  background: #fff; border: 1px solid rgba(0,0,0,.1); border-radius: 999px;
  padding: 8px 16px; font-weight: 600; font-size: .95rem;
}

/* ===== About ===== */
.about-grid { display: grid; grid-template-columns: 220px 1fr; gap: 40px; align-items: center; }
.about-badge img { filter: drop-shadow(0 10px 24px rgba(0,0,0,.18)); }
.ticks { list-style: none; padding: 0; margin: 18px 0 0; }
.ticks li { padding-left: 30px; position: relative; margin-bottom: 10px; font-weight: 600; }
.ticks li::before {
  content: '✓'; position: absolute; left: 0; top: 0;
  color: #fff; background: var(--color-primary); width: 20px; height: 20px;
  border-radius: 50%; display: grid; place-items: center; font-size: .7rem;
}

/* ===== Gallery ===== */
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.gallery figure { margin: 0; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); background: #fff; }
.gallery img { aspect-ratio: 4/3; object-fit: cover; width: 100%; }
.gallery-empty { margin-top: 10px; }

/* ===== Hours ===== */
.hours-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
.hours { width: 100%; border-collapse: collapse; max-width: 420px; }
.hours td { padding: 11px 4px; border-bottom: 1px solid rgba(0,0,0,.1); }
.hours td:last-child { text-align: right; font-weight: 700; }
.hours-emblem { display: grid; place-items: center; }
.emblem {
  width: 230px; height: 230px; border-radius: 50%;
  background: var(--color-primary); color: var(--color-light);
  display: grid; place-content: center; text-align: center; gap: 4px;
  border: 8px solid var(--color-dark);
  box-shadow: var(--shadow), inset 0 0 0 4px color-mix(in srgb, var(--color-light) 30%, transparent);
}
.emblem-star { font-size: 1.4rem; }
.emblem strong { color: var(--color-light); font-size: 2rem; letter-spacing: .04em; }
.emblem em { font-style: normal; letter-spacing: .28em; text-transform: uppercase; font-size: .72rem; }

/* ===== Contact ===== */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
.contact-actions { display: flex; flex-wrap: wrap; gap: 14px; margin: 22px 0; }
.contact-address { font-style: normal; line-height: 1.9; }
.address-link { color: var(--color-primary); font-weight: 700; text-decoration: none; }
.address-link:hover { text-decoration: underline; }
.address-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.addr-btn {
  display: inline-flex; align-items: center; gap: 6px;
  background: #fff; border: 1px solid rgba(0,0,0,.15); color: var(--color-dark);
  padding: 7px 14px; border-radius: 999px; font: inherit; font-size: .85rem; font-weight: 600; cursor: pointer;
}
.addr-btn:hover { border-color: var(--color-primary); color: var(--color-primary); }
.map-wrap { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); min-height: 320px; background: #ddd; }
.map-wrap iframe { width: 100%; height: 100%; min-height: 320px; border: 0; }

/* ===== Footer ===== */
.site-footer { background: var(--color-dark); color: color-mix(in srgb, var(--color-light) 85%, transparent); padding: 26px 0; }
.footer-inner { display: flex; flex-wrap: wrap; gap: 16px; justify-content: space-between; align-items: center; }
.site-footer a { color: var(--color-light); margin-left: 18px; }
.site-footer nav a:first-child { margin-left: 0; }

/* ===== Legal pages ===== */
.legal-page { max-width: 780px; margin: 0 auto; padding: 60px 20px; }
.legal-page a.back { display: inline-block; margin-bottom: 20px; font-weight: 700; }
.legal-content h2 { margin-top: 0; }
.legal-content h3 { margin-top: 1.6em; }

/* ===== Login modal ===== */
.modal { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; background: rgba(0,0,0,.5); }
.modal-box { background: #fff; padding: 30px; border-radius: var(--radius); width: min(380px, 92vw); position: relative; box-shadow: var(--shadow); }
.modal-close { position: absolute; top: 8px; right: 12px; font-size: 1.6rem; background: none; border: 0; cursor: pointer; color: var(--color-dark); }
#login-form { display: grid; gap: 14px; margin-top: 10px; }
#login-form input { padding: 12px 14px; border: 1px solid rgba(0,0,0,.2); border-radius: 10px; font-size: 1rem; }
.login-error { color: var(--color-primary); font-weight: 600; margin: 0; }

/* ===== Edit UI ===== */
.edit-bar {
  position: fixed; bottom: 16px; left: 50%; transform: translateX(-50%);
  z-index: 55; display: flex; gap: 8px; align-items: center;
  background: #fff; padding: 10px 14px; border-radius: 999px; box-shadow: var(--shadow);
  border: 1px solid rgba(0,0,0,.1);
}
.edit-bar .btn { padding: 9px 18px; font-size: .9rem; }
.edit-status { font-size: .85rem; font-weight: 600; }
.design-panel {
  position: fixed; bottom: 78px; right: 16px; z-index: 55; background: #fff;
  padding: 18px; border-radius: var(--radius); box-shadow: var(--shadow); width: 240px;
  border: 1px solid rgba(0,0,0,.1);
}
.design-panel h4 { margin-top: 0; }
.design-panel label { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 10px; font-weight: 600; font-size: .9rem; }
.design-panel input[type=color] { width: 44px; height: 30px; border: 0; background: none; cursor: pointer; }
.seo-panel { width: 300px; }
.seo-panel label { flex-direction: column; align-items: stretch; gap: 5px; }
.seo-panel input, .seo-panel textarea {
  width: 100%; padding: 8px 10px; border: 1px solid rgba(0,0,0,.2);
  border-radius: 8px; font: inherit; font-size: .85rem; resize: vertical;
}

body.editing [data-key],
body.editing [data-list] > * [data-key] {
  outline: 2px dashed color-mix(in srgb, var(--color-primary) 60%, transparent);
  outline-offset: 3px; border-radius: 4px; cursor: text;
}
body.editing [data-img-key], body.editing .gallery img {
  outline: 2px dashed var(--color-primary); outline-offset: 3px; cursor: pointer;
}
.editing .add-btn, .editing .del-btn { display: inline-flex; }
.add-btn, .del-btn { display: none; }
.del-btn {
  background: var(--color-primary); color: #fff; border: 0; border-radius: 50%;
  width: 26px; height: 26px; cursor: pointer; font-weight: 700; margin-bottom: 8px;
}
.add-btn {
  margin-top: 16px; background: var(--color-dark); color: #fff; border: 0;
  padding: 10px 18px; border-radius: 999px; cursor: pointer; font-weight: 700;
}

.toast {
  position: fixed; bottom: 84px; left: 50%; transform: translateX(-50%);
  background: var(--color-dark); color: #fff; padding: 12px 22px; border-radius: 999px;
  z-index: 70; box-shadow: var(--shadow); font-weight: 600;
}

/* ===== Mobile ===== */
@media (max-width: 820px) {
  .nav-toggle { display: block; }
  .site-nav {
    display: none; position: absolute; top: 100%; right: 0; left: 0;
    flex-direction: column; gap: 0; background: var(--color-light);
    border-bottom: 1px solid rgba(0,0,0,.1); padding: 8px 20px 16px;
  }
  .site-nav.open { display: flex; }
  .site-nav a { padding: 12px 0; width: 100%; }
  .about-grid, .hours-grid, .contact-grid { grid-template-columns: 1fr; }
  .about-badge { max-width: 180px; margin: 0 auto; }
  .hours-emblem { order: -1; }
  .emblem { width: 180px; height: 180px; }
  .emblem strong { font-size: 1.5rem; }
}
