/*
 * Individuelles Design für Shell Tankstelle / Service Station & KFZ Technik Zellner (shell-alpbach).
 * Alle Inhalte kommen zur Laufzeit aus GraphQL (Zero Hardcoded Content).
 */
:root {
  --bg: #ffffff;
  --bg-alt: #f6f7f9;
  --surface: #ffffff;
  --text: #111827;
  --muted: #4b5563;
  --accent: #c8102e;
  --accent-hover: #a50d26;
  --accent-contrast: #ffffff;
  --brand-gold: #fbce07;
  --brand-gold-soft: #fef9c3;
  --border: #e2e8f0;
  --ok: #15803d;
  --ok-bg: #dcfce7;
  --warn: #b45309;
  --warn-bg: #fef3c7;
  --bad: #b91c1c;
  --bad-bg: #fee2e2;
  --radius: 16px;
  --radius-sm: 10px;
  --max: 1200px;
  --font: system-ui, -apple-system, 'Plus Jakarta Sans', 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --font-display: system-ui, -apple-system, 'Space Grotesk', 'Plus Jakarta Sans', sans-serif;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
}

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

html, body {
  margin: 0;
  padding: 0;
  overflow-x: clip;
}
html {
  scroll-behavior: smooth;
  scroll-padding-top: 84px;
}
html:has(dialog[open]) {
  overflow: hidden;
  scrollbar-gutter: stable;
}

img { max-width: 100%; height: auto; display: block; }
[hidden] { display: none !important; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  line-height: 1.2;
  margin: 0 0 0.5em;
  color: var(--text);
  letter-spacing: -0.02em;
}
.hero-title, .brand-name, h1 {
  hyphens: none !important;
  overflow-wrap: normal;
}
.prose, p {
  hyphens: auto;
  overflow-wrap: break-word;
}
h1 { font-size: clamp(1.85rem, 3.6vw, 2.85rem); font-weight: 800; }
h2 { font-size: clamp(1.45rem, 2.6vw, 2.15rem); font-weight: 700; }
h3 { font-size: 1.2rem; font-weight: 700; }

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

.ico { width: 18px; height: 18px; flex-shrink: 0; display: inline-block; vertical-align: middle; }
.wrap { width: min(100% - 2rem, var(--max)); margin-inline: auto; }
.section { padding: clamp(3rem, 6vw, 5.5rem) 0; }
.section.alt { background: var(--bg-alt); border-block: 1px solid var(--border); }

.section-head { margin-bottom: 2rem; max-width: 72ch; }
.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  background: #fff1f2;
  border: 1px solid #fecdd3;
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  margin-bottom: 0.65rem;
}
.section-sub { color: var(--muted); margin: 0.25rem 0 0; font-size: 1.02rem; }

.error { color: var(--bad); background: var(--bad-bg); padding: 0.75rem 1rem; border-radius: var(--radius-sm); }
.success { color: var(--ok); background: var(--ok-bg); padding: 0.75rem 1rem; border-radius: var(--radius-sm); }
.note { color: var(--muted); font-size: 0.9rem; margin: 0.5rem 0 0; }

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--text);
  color: #fff;
  padding: 0.6rem 1rem;
  z-index: 200;
}
.skip-link:focus { left: 0; }

/* Header */
.site-header {
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 3px solid var(--brand-gold);
  box-shadow: 0 4px 20px rgba(15, 23, 42, 0.06);
  backdrop-filter: blur(16px) saturate(1.4);
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-height: 72px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 800;
  color: var(--text);
  text-decoration: none;
  min-width: 0;
}
.logo-frame {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: #ffffff;
  border: 2px solid var(--brand-gold);
  box-shadow: 0 4px 10px rgba(200, 16, 46, 0.12);
  display: grid;
  place-items: center;
  padding: 4px;
  flex-shrink: 0;
}
.logo-frame img { max-height: 36px; width: auto; object-fit: contain; }
.brand-name {
  font-size: clamp(0.95rem, 1.5vw, 1.12rem);
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
}
.nav {
  display: flex;
  align-items: center;
  gap: 1.15rem;
  margin-left: auto;
  overflow-x: auto;
  scrollbar-width: none;
}
.nav a {
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.94rem;
  white-space: nowrap;
  padding: 0.4rem 0;
  transition: color 0.18s ease;
}
.nav a:hover { color: var(--accent); }
.header-cta { display: flex; align-items: center; gap: 0.5rem; flex-shrink: 0; }
@media (max-width: 900px) {
  .nav { display: none; }
  .header-cta { margin-left: auto; }
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.65rem 1.2rem;
  border-radius: var(--radius-sm);
  border: 2px solid var(--accent);
  background: var(--accent);
  color: var(--accent-contrast);
  font: inherit;
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  cursor: pointer;
  min-height: 44px;
  transition: background 0.18s ease, border-color 0.18s ease, transform 0.15s ease;
}
.btn:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn.ghost {
  background: #ffffff;
  color: var(--text);
  border-color: var(--border);
}
.btn.ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: #fff1f2;
}
.btn:disabled { opacity: 0.6; cursor: progress; }
button.link {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  color: var(--accent);
  text-decoration: underline;
  cursor: pointer;
}

/* Hero Section with Ambient Backdrop & Glass Surface */
.hero {
  position: relative;
  overflow: hidden;
  padding: clamp(2rem, 5vw, 4rem) 0;
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
}
.ambient-backdrop {
  position: absolute;
  inset: -15%;
  background-size: cover;
  background-position: center;
  filter: blur(42px) saturate(1.5) brightness(0.65);
  transform: scale(1.15);
  opacity: 0.45;
  pointer-events: none;
  z-index: 0;
}
.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 1.75rem;
  align-items: stretch;
}
.glass-surface {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(24px) saturate(1.5);
  border: 1px solid rgba(255, 255, 255, 0.75);
  border-top: 5px solid var(--brand-gold);
  border-radius: var(--radius);
  padding: clamp(1.5rem, 3.5vw, 2.5rem);
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.25);
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.eyebrow {
  display: inline-flex;
  align-self: flex-start;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  font-size: 0.78rem;
  font-weight: 800;
  color: #991b1b;
  background: var(--brand-gold-soft);
  border: 1px solid #fde047;
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
  margin: 0 0 0.85rem;
}
.lead {
  font-size: 1.12rem;
  font-weight: 600;
  color: var(--text);
  margin: 0 0 0.75rem;
}
.hero-profile {
  color: var(--muted);
  font-size: 0.96rem;
  margin-bottom: 1rem;
}
.hero-profile p { margin: 0 0 0.5rem; text-align: left !important; }
.status {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0.5rem 0 1.25rem;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: auto;
}

.hero-images {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-auto-rows: minmax(170px, 1fr);
  gap: 0.75rem;
}
.hero-images .hero-img-btn {
  padding: 0;
  border: 2px solid rgba(255, 255, 255, 0.22);
  border-radius: var(--radius);
  overflow: hidden;
  background: #0f172a;
  cursor: zoom-in;
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
}
.hero-images .hero-img-btn:first-child {
  grid-column: 1 / -1;
  min-height: 240px;
}
.hero-images img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}
.hero-images .hero-img-btn:hover img { transform: scale(1.03); }
.hero-images img.low-res { object-fit: contain; background: #fff; }
.hero-images img.portrait { object-position: center 30%; }

@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-images { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 520px) {
  .hero-images { grid-template-columns: 1fr; }
}

/* Status Pills */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin: 0;
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  font-size: 0.84rem;
  font-weight: 700;
  background: #ffffff;
  border: 1px solid var(--border);
}
.pill::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
}
.pill.is-open { color: var(--ok); background: var(--ok-bg); border-color: #86efac; }
.pill.is-opens-later { color: var(--warn); background: var(--warn-bg); border-color: #fcd34d; }
.pill.is-closed { color: var(--bad); background: var(--bad-bg); border-color: #fca5a5; }
.pill.is-appointment { color: var(--muted); background: var(--bg-alt); }

/* Services Grid */
.showcase-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr));
  gap: 1.35rem;
}
.cards.cols-2 { grid-template-columns: repeat(2, 1fr); }
.cards.cols-3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 960px) {
  .showcase-grid, .cards.cols-2, .cards.cols-3 {
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
  }
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.35rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  min-width: 0;
  margin: 0;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.04);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
}
.card.is-highlighted {
  border: 2px solid var(--accent);
  background: linear-gradient(180deg, #ffffff 0%, #fffbfb 100%);
  box-shadow: 0 10px 28px rgba(200, 16, 46, 0.09);
}
.card-media {
  margin: -1.35rem -1.35rem 0.5rem;
  overflow: hidden;
  border-radius: calc(var(--radius) - 2px) calc(var(--radius) - 2px) 0 0;
  aspect-ratio: 16 / 10;
  background: var(--bg-alt);
}
.card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 0;
}
.card-media-placeholder {
  aspect-ratio: 16 / 10;
  margin: -1.35rem -1.35rem 0.5rem;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #f8fafc 0%, #eef2f6 100%);
  background-image: radial-gradient(rgba(15, 23, 42, 0.08) 1.5px, transparent 1.5px);
  background-size: 16px 16px;
}
.badge {
  align-self: flex-start;
  font-size: 0.74rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
  background: var(--brand-gold);
  color: #111827;
}
.card ul.bulletins {
  margin: 0.25rem 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.4rem;
  font-size: 0.92rem;
}
.card ul.bulletins li {
  display: flex;
  align-items: flex-start;
  gap: 0.45rem;
  color: var(--muted);
}
.card ul.bulletins li svg {
  color: var(--accent);
  margin-top: 0.22rem;
}
.clamp {
  display: -webkit-box;
  -webkit-line-clamp: 4;
  line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin: 0;
}
.card .btn { margin-top: auto; align-self: flex-start; }

/* ProfileBlocks (Über uns & Details) */
.profile-blocks {
  display: grid;
  gap: 1.75rem;
}
.pblock {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: clamp(1.35rem, 3vw, 2.25rem);
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 2rem;
  align-items: center;
  box-shadow: 0 6px 20px rgba(15, 23, 42, 0.04);
}
.pblock:nth-child(even) {
  grid-template-columns: 1fr 320px;
}
.pblock:nth-child(even) .pblock-media {
  order: 2;
}
.pblock.no-side-img {
  grid-template-columns: 1fr;
}
.pblock.has-bg {
  position: relative;
  overflow: hidden;
  color: #ffffff;
  border: 0;
  background: #0f172a;
  padding: clamp(2rem, 4.5vw, 3.25rem);
}
.pblock.has-bg .pblock-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.32;
  z-index: 0;
}
.pblock.has-bg .pblock-body {
  position: relative;
  z-index: 1;
  max-width: 78ch;
}
.pblock.has-bg h3, .pblock.has-bg a { color: #ffffff; }
.pblock.has-bg a { text-decoration: underline; color: var(--brand-gold); }
.pblock-media img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}
.pblock-body h3 {
  font-size: clamp(1.25rem, 2.2vw, 1.55rem);
  margin-bottom: 0.75rem;
}
.pblock-body ul {
  padding-left: 1.25rem;
  margin: 0.75rem 0;
  display: grid;
  gap: 0.4rem;
}
@media (max-width: 820px) {
  .pblock, .pblock:nth-child(even) {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }
  .pblock:nth-child(even) .pblock-media { order: 0; }
  .pblock-media img { max-width: 420px; margin-inline: auto; }
}

/* Gallery */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr));
  gap: 1rem;
}
.gallery-item {
  padding: 0;
  border: 1px solid var(--border);
  background: var(--surface);
  cursor: zoom-in;
  border-radius: var(--radius-sm);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  text-align: left;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.gallery-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.1);
}
.gallery-item img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
}
.gallery-caption {
  padding: 0.6rem 0.8rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text);
}

/* Downloads */
.download-card {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 1.25rem;
  align-items: center;
}
.download-thumb {
  width: 110px;
  aspect-ratio: 210 / 297;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: #fff;
}
@media (max-width: 520px) {
  .download-card { grid-template-columns: 1fr; }
}

/* Reviews */
.review blockquote {
  margin: 0;
  font-size: 0.98rem;
  color: var(--text);
}
.review-stars {
  color: #f59e0b;
  font-size: 1.1rem;
  letter-spacing: 0.08em;
}
.review figcaption {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-top: auto;
  padding-top: 0.5rem;
  border-top: 1px solid var(--border);
}
.review figcaption img {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
}
.avatar {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-contrast);
  font-weight: 700;
  flex: none;
}

/* Locations & Opening Hours */
.location-shell {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: clamp(1.35rem, 3vw, 2.25rem);
  box-shadow: 0 8px 28px rgba(15, 23, 42, 0.05);
  display: grid;
  gap: 1.75rem;
}
.location-top {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 1.75rem;
  align-items: start;
}
.location-photo img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}
address {
  font-style: normal;
  font-size: 1.08rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
}
.phone-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.65rem;
  margin: 1rem 0;
}
.phone-chip {
  display: flex;
  flex-direction: column;
  padding: 0.65rem 0.9rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-alt);
  text-decoration: none;
  color: var(--text);
  transition: border-color 0.18s ease, background 0.18s ease;
}
.phone-chip:hover {
  border-color: var(--accent);
  background: #fff1f2;
}
.phone-chip small {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  font-weight: 700;
}
.phone-chip strong {
  font-size: 1rem;
  color: var(--accent);
}
.hours-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: 1.25rem;
}
.hours-plan {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1.15rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.hours-title {
  margin: 0;
  font-size: 1.05rem;
}
.hours {
  border-collapse: collapse;
  width: 100%;
  font-size: 0.92rem;
}
.hours th, .hours td {
  text-align: left;
  padding: 0.3rem 0.4rem;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
.hours th { font-weight: 600; width: 38%; }
.hours tr.is-today {
  background: #ffffff;
  font-weight: 700;
  color: var(--accent);
}
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  list-style: none;
  margin: 0.75rem 0 0;
  padding: 0;
}
.tags li {
  font-size: 0.84rem;
  font-weight: 600;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.2rem 0.7rem;
}
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin: 1rem 0 0;
}
@media (max-width: 860px) {
  .location-top { grid-template-columns: 1fr; }
}

/* Chips */
.chips { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1.25rem; }
.chip {
  border: 1px solid var(--border);
  background: #fff;
  border-radius: 999px;
  padding: 0.35rem 0.9rem;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  min-height: 40px;
}
.chip.is-active {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-contrast);
}

/* Footer */
.site-footer {
  background: #0f172a;
  color: #cbd5e1;
  border-top: 4px solid var(--brand-gold);
  padding: 2rem 0;
  font-size: 0.95rem;
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
}
.site-footer button.link { color: #f8fafc; }

/* Native Top-Layer Dialogs (Rule 7: position: fixed; inset: 0; margin: auto) */
dialog.modal {
  position: fixed;
  inset: 0;
  margin: auto;
  width: min(100% - 2rem, 680px);
  max-height: calc(100dvh - 2rem);
  overflow: hidden;
  border: 0;
  border-radius: var(--radius);
  padding: 0;
  color: var(--text);
  background: var(--surface);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.35);
  opacity: 0;
  transform: translateY(14px) scale(0.97);
  transition:
    opacity 0.22s ease-out,
    transform 0.22s cubic-bezier(0.2, 0, 0, 1),
    overlay 0.22s ease-out allow-discrete,
    display 0.22s ease-out allow-discrete;
}
dialog.modal[open] {
  opacity: 1;
  transform: translateY(0) scale(1);
}
@starting-style {
  dialog.modal[open] {
    opacity: 0;
    transform: translateY(14px) scale(0.97);
  }
}
dialog.modal::backdrop {
  background: rgba(15, 23, 42, 0);
  backdrop-filter: blur(0px);
  transition:
    background 0.22s ease-out,
    backdrop-filter 0.22s ease-out,
    overlay 0.22s ease-out allow-discrete,
    display 0.22s ease-out allow-discrete;
}
dialog.modal[open]::backdrop {
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
}
@starting-style {
  dialog.modal[open]::backdrop {
    background: rgba(15, 23, 42, 0);
    backdrop-filter: blur(0px);
  }
}

.modal-box {
  padding: 1.5rem;
  max-height: calc(100dvh - 2rem);
  overflow-y: auto;
}
.lightbox-box { width: 100%; }
#lightbox { width: min(100% - 1.5rem, 1040px); }

.modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}
.modal-header h2 { margin: 0; font-size: 1.35rem; }
.modal-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  flex-shrink: 0;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--bg-alt);
  color: var(--text);
  cursor: pointer;
}
.modal-close:hover { background: #fee2e2; color: var(--accent); border-color: #fca5a5; }
.modal-close svg { display: block; }

.modal-media {
  margin: 0 0 1rem;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--bg-alt);
}
.modal-media img {
  width: 100%;
  max-height: 62dvh;
  object-fit: contain;
  margin: 0 auto;
  opacity: 1;
  transition: opacity 0.22s ease;
}
.modal-media img.is-loading { opacity: 0; }

.dialog-actions {
  display: flex;
  gap: 0.6rem;
  justify-content: flex-end;
  flex-wrap: wrap;
  margin-top: 1.25rem;
}
#contact-form { display: grid; gap: 0.85rem; }
#contact-form label { display: grid; gap: 0.3rem; font-weight: 600; font-size: 0.94rem; }
#contact-form label.check { display: flex; align-items: center; gap: 0.5rem; font-weight: 400; flex-wrap: wrap; }
#contact-form input:not([type='checkbox']),
#contact-form textarea,
#contact-form select {
  font: inherit;
  padding: 0.65rem 0.8rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  width: 100%;
}
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.imp { border-collapse: collapse; width: 100%; font-size: 0.95rem; }
.imp th, .imp td {
  text-align: left;
  vertical-align: top;
  padding: 0.45rem 0.6rem;
  border-bottom: 1px solid var(--border);
  overflow-wrap: anywhere;
}
.imp th { width: 36%; color: var(--muted); }

/* Scroll-Driven Reveal */
@keyframes reveal-up {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: no-preference) {
  @supports ((animation-timeline: view()) and (animation-range: entry)) {
    .reveal-on-scroll {
      animation: reveal-up linear both;
      animation-timeline: view();
      animation-range: entry 8% cover 24%;
    }
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  dialog.modal, dialog.modal[open] {
    transform: none;
    transition-duration: 0.1s;
  }
  .reveal-on-scroll {
    transform: none;
    animation: none;
    opacity: 1;
  }
}
