:root {
  --bg: #0b0b0f;
  --surface: #141420;
  --surface-2: #1b1b2b;
  --text: #f1f2f6;
  --muted: #b5b8c5;

  --red: #e11d2e;
  --red-2: #ff3b4a;
  --ring: rgba(225, 29, 46, 0.45);

  --border: rgba(255,255,255,0.10);
  --shadow: 0 14px 40px rgba(0,0,0,0.35);
  --radius: 18px;

  color-scheme: dark;
}

:root[data-theme="light"] {
  --bg: #fafafa;
  --surface: #ffffff;
  --surface-2: #f3f4f6;
  --text: #121318;
  --muted: #4b5563;

  --border: rgba(0,0,0,0.10);
  --shadow: 0 14px 40px rgba(0,0,0,0.12);

  color-scheme: light;
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme]) {
    --bg: #fafafa;
    --surface: #ffffff;
    --surface-2: #f3f4f6;
    --text: #121318;
    --muted: #4b5563;
    --border: rgba(0,0,0,0.10);
    --shadow: 0 14px 40px rgba(0,0,0,0.12);
    color-scheme: light;
  }
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background: radial-gradient(1200px 600px at 20% -10%, rgba(225,29,46,0.25), transparent 60%),
              radial-gradient(900px 500px at 90% 0%, rgba(255,59,74,0.18), transparent 55%),
              var(--bg);
  color: var(--text);
}

a { color: inherit; text-decoration: none; }
a.link { color: var(--red-2); font-weight: 600; }
a.link[aria-disabled="true"] { opacity: 0.6; pointer-events: none; }

.container {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 10px;
  padding: 10px 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
}
.skip-link:focus { left: 16px; z-index: 999; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(10, 10, 14, 0.55);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
:root[data-theme="light"] .site-header {
  background: rgba(255,255,255,0.75);
}

.header-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 14px;
  align-items: center;
  padding: 14px 0;
}

.brand { display: flex; gap: 12px; align-items: center; }
.brand-mark {
  width: 42px; height: 42px;
  display: grid; place-items: center;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(225,29,46,0.95), rgba(255,59,74,0.85));
  box-shadow: 0 10px 30px rgba(225,29,46,0.25);
}
.brand-title { font-weight: 800; letter-spacing: 0.2px; }
.brand-subtitle { font-size: 0.9rem; color: var(--muted); }

.nav { display: flex; align-items: center; gap: 10px; }
.nav-toggle {
  display: none;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
}
.nav-links { display: flex; gap: 12px; align-items: center; }
.nav-links a {
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid transparent;
}
.nav-links a:hover {
  border-color: var(--border);
  background: rgba(255,255,255,0.04);
}

.header-actions { display: flex; justify-content: end; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(0,0,0,0.10);
}
.btn:hover { border-color: rgba(225,29,46,0.40); box-shadow: 0 0 0 4px var(--ring); }
.btn.primary {
  border: 1px solid rgba(255,255,255,0.18);
  background: linear-gradient(135deg, rgba(225,29,46,0.98), rgba(255,59,74,0.92));
  box-shadow: 0 16px 40px rgba(225,29,46,0.20);
}
.btn.subtle { background: transparent; }
.btn.small { padding: 10px 12px; border-radius: 12px; }

.hero { padding: 44px 0 18px; }
.hero-grid {
  display: grid;
  grid-template-columns: 1.25fr 0.95fr;
  gap: 22px;
  align-items: stretch;
}
.hero-copy h1 {
  margin: 0 0 10px;
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
}
.lead { color: var(--muted); font-size: 1.05rem; line-height: 1.5; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; margin: 18px 0 10px; }

.notice, .note {
  margin-top: 14px;
  padding: 14px;
  border-radius: var(--radius);
  border: 1px solid rgba(225,29,46,0.25);
  background: linear-gradient(180deg, rgba(225,29,46,0.12), rgba(225,29,46,0.04));
}
.note { border-color: var(--border); background: rgba(255,255,255,0.03); }

.hero-media .media-card {
  height: 100%;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow);
  padding: 16px;
  position: relative;
  overflow: hidden;
}
.media-title { font-weight: 800; margin-bottom: 6px; }
.media-body { color: var(--muted); margin-bottom: 14px; }
.media-aspect {
  width: 100%;
  aspect-ratio: 16 / 10;
  border-radius: 16px;
  border: 1px dashed rgba(225,29,46,0.35);
  background:
    radial-gradient(400px 180px at 30% 30%, rgba(225,29,46,0.18), transparent 60%),
    rgba(255,255,255,0.02);
}

.section { padding: 42px 0; }
.section-head h2 { margin: 0 0 8px; font-size: 1.75rem; }
.section-head p { margin: 0 0 18px; color: var(--muted); }

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
.card, .panel {
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow);
  padding: 16px;
}
.card h3 { margin: 8px 0 6px; }
.muted { color: var(--muted); }

.card-badge {
  display: inline-flex;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(225,29,46,0.35);
  background: rgba(225,29,46,0.10);
  color: var(--text);
  font-size: 0.85rem;
  font-weight: 700;
}

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.list { margin: 12px 0 0; padding-left: 18px; color: var(--muted); }
.kv { display: grid; gap: 10px; margin-top: 10px; }
.kv > div { display: flex; gap: 10px; justify-content: space-between; }
.kv span:first-child { color: var(--muted); }

.map-shell {
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow);
  overflow: hidden;
  min-height: 320px;
  display: grid;
  place-items: center;
}
.map-placeholder {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 18px;
  border-radius: 16px;
  border: 1px dashed rgba(225,29,46,0.35);
  background: rgba(255,255,255,0.02);
}
.map-pin { font-size: 1.8rem; }
.map-title { font-weight: 800; margin-bottom: 2px; }

.site-footer {
  border-top: 1px solid var(--border);
  padding: 26px 0;
  background: rgba(255,255,255,0.02);
}
.footer-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  flex-wrap: wrap;
}
.footer-title { font-weight: 800; }
.footer-links { display: flex; gap: 12px; }
.footer-links a { padding: 8px 10px; border-radius: 12px; }
.footer-links a:hover { background: rgba(255,255,255,0.04); }

@media (max-width: 920px) {
  .hero-grid { grid-template-columns: 1fr; }
  .card-grid { grid-template-columns: 1fr; }
  .split { grid-template-columns: 1fr; }

  .header-row { grid-template-columns: 1fr auto; }
  .nav { grid-column: 1 / -1; justify-content: space-between; }
  .nav-toggle { display: inline-flex; }
  .nav-links {
    display: none;
    width: 100%;
    padding: 10px;
    border-radius: 16px;
    border: 1px solid var(--border);
    background: var(--surface);
    flex-direction: column;
    align-items: stretch;
  }
  .nav-links a { width: 100%; }
  .nav-links.open { display: flex; }
}

/* ---------------------------
   Gallery
--------------------------- */
.hero-gallery code {
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.03);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 0.95em;
}

.gallery-controls { display: grid; gap: 12px; margin-top: 10px; }
.field { display: grid; gap: 6px; }
.field-label { font-size: 0.9rem; color: var(--muted); }

.input, .select {
  width: 100%;
  padding: 12px 12px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.03);
  color: var(--text);
  outline: none;
}
.input:focus, .select:focus {
  border-color: rgba(225,29,46,0.40);
  box-shadow: 0 0 0 4px var(--ring);
}

.gallery-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }

.gallery-item {
  text-align: left;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 0;
  cursor: pointer;
  overflow: hidden;
  transition: transform 120ms ease, box-shadow 120ms ease, border-color 120ms ease;
}
.gallery-item:hover {
  transform: translateY(-2px);
  border-color: rgba(225,29,46,0.40);
  box-shadow: 0 0 0 4px var(--ring);
}

.thumb {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  background:
    radial-gradient(400px 200px at 30% 20%, rgba(225,29,46,0.16), transparent 55%),
    rgba(255,255,255,0.02);
  overflow: hidden;
  border-bottom: 1px solid var(--border);
}
.thumb img, .thumb video { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb-badge {
  position: absolute;
  left: 10px;
  bottom: 10px;
  display: inline-flex;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.18);
  background: rgba(0,0,0,0.40);
  backdrop-filter: blur(8px);
  font-size: 0.85rem;
  font-weight: 700;
}

.gallery-meta { padding: 12px 12px 14px; }
.gallery-title { font-weight: 800; margin: 0 0 4px; }
.gallery-sub { font-size: 0.9rem; }
.empty-state { margin-top: 14px; }

/* ---------------------------
   Modal (Preview)
--------------------------- */
.modal { position: fixed; inset: 0; display: none; z-index: 100; }
.modal.open { display: block; }

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.62);
  backdrop-filter: blur(6px);
}

.modal-card {
  position: relative;
  width: min(980px, calc(100% - 28px));
  margin: 32px auto;
  border-radius: calc(var(--radius) + 4px);
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: 0 30px 90px rgba(0,0,0,0.55);
  overflow: hidden;
}

.modal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 14px 14px;
  border-bottom: 1px solid var(--border);
  background: rgba(255,255,255,0.02);
}
.modal-title { font-weight: 900; }

.modal-body {
  padding: 14px;
  display: grid;
  place-items: center;
  background: rgba(255,255,255,0.015);
}

.preview-media {
  width: 100%;
  max-height: min(68vh, 680px);
  object-fit: contain;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(0,0,0,0.20);
}

.modal-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  padding: 14px;
  border-top: 1px solid var(--border);
  background: rgba(255,255,255,0.02);
}
.modal-meta { flex: 1; text-align: right; min-width: 220px; }

@media (max-width: 1100px) { .gallery-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 920px)  { .gallery-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px)  { .gallery-grid { grid-template-columns: 1fr; } .modal-meta { text-align: left; min-width: auto; } }
