:root {
  --primary: #0ea5e9;
  --secondary: #f43f5e;
  --accent: #fef08a;
  --surface: #ffffff;
  --ink: #1e293b;
  --muted: #64748b;
  --line: rgba(255,255,255,0.4);
  --card: rgba(255,255,255,0.58);
  --shadow: 0 30px 80px rgba(15, 23, 42, 0.12);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(244,63,94,0.18), transparent 28%),
    radial-gradient(circle at top right, rgba(14,165,233,0.18), transparent 30%),
    linear-gradient(180deg, #fffdfa 0%, #f8fbff 100%);
  font-family: "Quicksand", "Trebuchet MS", "Segoe UI", sans-serif;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
iframe { width: 100%; border: 0; min-height: 420px; }
.container { width: min(1180px, calc(100% - 2rem)); margin: 0 auto; }
.glass-panel {
  background: linear-gradient(180deg, rgba(255,255,255,0.72), rgba(255,255,255,0.5));
  border: 1px solid rgba(255,255,255,0.55);
  box-shadow: var(--shadow);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
}
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .65rem;
  padding: .95rem 1.4rem;
  border-radius: 999px;
  font-weight: 700;
  border: 0;
  cursor: pointer;
}
.button.primary {
  background: linear-gradient(135deg, var(--secondary), var(--primary));
  color: #fff;
}
.button.ghost {
  background: rgba(255,255,255,0.82);
  color: var(--ink);
  border: 1px solid rgba(148,163,184,0.2);
}
.button.wide { width: 100%; }
.eyebrow {
  letter-spacing: .28em;
  text-transform: uppercase;
  font-size: .75rem;
  font-weight: 700;
  color: var(--primary);
}
h1, h2, h3, h4 {
  font-family: "Fredoka", "Arial Rounded MT Bold", "Trebuchet MS", sans-serif;
  margin: 0 0 1rem;
  line-height: .95;
}
p { line-height: 1.7; color: var(--muted); }

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  margin: 1rem auto 0;
  width: min(1180px, calc(100% - 2rem));
  border-radius: 999px;
}
.nav-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .8rem 1rem;
}
.brand { display: flex; align-items: center; gap: .8rem; }
.brand img { width: 56px; height: 56px; border-radius: 18px; object-fit: cover; }
.brand strong { display: block; font-family: 'Fredoka', sans-serif; font-size: 1.15rem; }
.brand small { color: var(--primary); font-weight: 700; letter-spacing: .18em; text-transform: uppercase; }
.main-nav { display: flex; align-items: center; gap: .45rem; flex-wrap: wrap; }
.main-nav a { padding: .75rem 1rem; border-radius: 999px; font-weight: 700; color: var(--muted); }
.main-nav a.active, .main-nav a:hover { background: rgba(14,165,233,0.08); color: var(--primary); }

.page-hero { padding: 7rem 0 2rem; }
.page-hero.compact { padding-bottom: 1rem; }
.page-hero h1 { font-size: clamp(2.8rem, 7vw, 5.8rem); }

.content-section { padding: 3rem 0; }
.section-inner { width: min(var(--section-width, 1180px), 100%); }
.hero-card {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: 1.6rem;
  align-items: stretch;
}
.hero-copy, .hero-media, .site-form, .info-card, .blog-post, .install-card, .maintenance-card {
  border-radius: 34px;
}
.hero-copy { padding: 2.5rem; display: flex; flex-direction: column; justify-content: center; }
.hero-copy h2 { font-size: clamp(2.8rem, 6vw, 5.8rem); }
.hero-actions { display: flex; gap: .85rem; flex-wrap: wrap; margin-top: 1.4rem; }
.hero-media { overflow: hidden; min-height: 420px; }
.hero-media img, .feature-image, .card-banner, .gallery-item img { width: 100%; height: 100%; object-fit: cover; }

.rich-text, .site-form, .glass-panel { padding: 2rem; }
.rich-text h2 { font-size: clamp(2rem, 5vw, 3.6rem); }
.split-copy { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }
.split-copy h3 { font-size: 1.7rem; }
.lead-copy { font-size: 1.2rem; max-width: 760px; }

.cards-grid, .gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
}
.info-card { min-height: 100%; }
.info-card h3 { font-size: 1.6rem; }
.mini-label { color: var(--secondary); font-weight: 700; letter-spacing: .12em; text-transform: uppercase; font-size: .78rem; }
.card-avatar {
  width: 110px;
  height: 110px;
  border-radius: 28px;
  object-fit: cover;
  margin-bottom: 1rem;
}
.stat-value { display: block; font-size: 3rem; font-family: 'Fredoka', sans-serif; color: var(--primary); }
.stat-label { margin: 0; text-transform: uppercase; letter-spacing: .2em; font-size: .8rem; }

.gallery-item { aspect-ratio: 1 / 1; border-radius: 34px; overflow: hidden; }
.gallery-trigger {
  display: block;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}
.gallery-filters {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  margin-bottom: 1.25rem;
}
.gallery-filters .is-active { border-color: var(--primary); }
.gallery-modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: rgba(15, 23, 42, .78);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 1.5rem;
}
.gallery-modal-card {
  max-width: min(92vw, 960px);
  max-height: 88vh;
  overflow: hidden;
}
.gallery-modal-card img { max-height: 72vh; width: 100%; object-fit: contain; background: #0f172a; }
.gallery-modal-close,
.gallery-modal-nav {
  border: 0;
  border-radius: 999px;
  width: 3rem;
  height: 3rem;
  font-size: 1.6rem;
  cursor: pointer;
}
.gallery-modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
}
.gallery-modal-meta { padding: 1rem 1.25rem 1.25rem; }
.sortable-item { cursor: move; }
.sortable-item.dragging { opacity: .4; }
.sortable-item[draggable="false"] { cursor: default; }
[data-layout-block] { cursor: move; }
[data-layout-block] input,
[data-layout-block] textarea,
[data-layout-block] select,
[data-layout-block] button,
[data-layout-block] label,
.sortable-item input,
.sortable-item textarea,
.sortable-item select,
.sortable-item button,
.sortable-item label { cursor: auto; }
.sortable-list { gap: 1rem; }
body.modal-open { overflow: hidden; }
.map-frame { border-radius: 34px; overflow: hidden; }
.map-frame iframe { min-height: 520px; }

.site-form h2 { font-size: 2rem; }
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}
.form-grid label, .install-form label {
  display: grid;
  gap: .5rem;
  font-weight: 700;
  color: var(--ink);
}
.form-grid label span,
.install-form label span,
.admin-grid label span,
.stack label span {
  display: block;
  margin-left: .35rem;
  font-size: .62rem;
  font-weight: 900;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: #94a3b8;
}
.form-grid label.full, .install-form .full { grid-column: 1 / -1; }
input, textarea, select {
  width: 100%;
  padding: .95rem 1rem;
  border-radius: 1rem;
  border: 2px solid #f1f5f9;
  background: #fff;
  font: inherit;
  color: var(--ink);
  box-shadow: inset 0 1px 1px rgba(15, 23, 42, 0.02);
  transition: border-color .2s ease, box-shadow .2s ease, background-color .2s ease;
}
input:focus, textarea:focus, select:focus {
  outline: 0;
  border-color: #38bdf8;
  box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.14);
}
input[type="checkbox"] {
  width: 1rem;
  height: 1rem;
  border-radius: .4rem;
  box-shadow: none;
}
textarea { min-height: 140px; resize: vertical; }
.form-success, .flash, .empty-state { border-radius: 24px; margin-bottom: 1rem; }
.flash { padding: 1rem 1.2rem; }
.flash-error { background: rgba(254,226,226,0.92); color: #991b1b; }
.flash-success { background: rgba(220,252,231,0.92); color: #166534; }

.listing-wrap, .blog-post-wrap { padding: 3rem 0 5rem; }
.blog-post { padding: 2rem; }
.feature-image, .card-banner { border-radius: 28px; margin: 1rem 0 1.25rem; aspect-ratio: 16 / 9; object-fit: cover; }
.back-link { display: inline-block; margin: 1rem 0 1.2rem; color: var(--primary); font-weight: 700; }
.two-col { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.sitemap-list { list-style: none; padding: 0; margin: 0; display: grid; gap: .65rem; }

.site-footer { margin-top: 4rem; padding: 3rem 0 1rem; }
.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr .9fr .9fr .8fr;
  gap: 1.2rem;
}
.footer-grid p, .footer-grid a { color: inherit; opacity: .85; }
.footer-links, .social-list { display: grid; gap: .5rem; padding: 0; margin: 0; list-style: none; }
.admin-link { margin-top: 1rem; display: inline-block; font-weight: 700; }
.footer-bottom { padding-top: 1rem; border-top: 1px solid rgba(255,255,255,0.12); opacity: .8; }

.install-shell, .admin-shell, .maintenance-wrap {
  min-height: 100vh;
  display: grid;
}
.install-screen, .maintenance-wrap { place-items: center; padding: 2rem; }
.install-card, .maintenance-card {
  width: min(980px, 100%);
  padding: 2rem;
}
.install-copy h1, .maintenance-card h1 { font-size: clamp(2.5rem, 6vw, 5rem); }
.install-form { margin-top: 1rem; }

.admin-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 1.5rem;
  min-height: 100vh;
  padding: 1.2rem;
}
.admin-sidebar {
  padding: 1.5rem;
  border-radius: 30px;
}
.admin-sidebar nav { display: grid; gap: .4rem; margin-top: 1.4rem; }
.admin-sidebar nav a {
  padding: .85rem 1rem;
  border-radius: 18px;
  color: var(--muted);
  font-weight: 700;
}
.admin-sidebar nav a:hover { background: rgba(14,165,233,0.08); color: var(--primary); }
.admin-main { padding: .2rem 0 2rem; }
.admin-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}
.admin-card {
  border-radius: 28px;
  padding: 1.4rem;
  margin-bottom: 1rem;
}
.admin-card.glass-panel {
  background: #fff;
  border: 2px solid #f1f5f9;
  box-shadow: 0 20px 45px rgba(15, 23, 42, 0.08);
}
.admin-card h2,
.admin-card h3 {
  margin: 0 0 1rem;
  font-family: "Fredoka", "Arial Rounded MT Bold", "Trebuchet MS", sans-serif;
  font-weight: 900;
  letter-spacing: -.03em;
  color: #0f172a;
}
.admin-card p {
  color: #64748b;
}
.admin-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}
.admin-grid label,
.stack label {
  display: grid;
  gap: .55rem;
  font-weight: 800;
  color: #0f172a;
}
.admin-grid label.full,
.stack label.full {
  grid-column: 1 / -1;
}
.table-wrap { overflow: auto; }
table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: #fff;
}
th, td {
  padding: 1rem;
  text-align: left;
  border-bottom: 1px solid rgba(148,163,184,0.12);
  vertical-align: top;
}
th {
  font-size: .62rem;
  font-weight: 900;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: #94a3b8;
  background: #f8fafc;
}
tbody tr:hover td {
  background: rgba(248, 250, 252, 0.8);
}
.stack { display: grid; gap: 1rem; }
.inline-actions { display: flex; gap: .6rem; flex-wrap: wrap; }
.empty-inline { color: var(--muted); }
.split-copy {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  align-items: start;
}
.html-content .split-copy > div {
  min-width: 0;
}
.html-content .split-copy p,
.html-content .split-copy h3 {
  max-width: none;
}
.mini-label {
  color: #94a3b8;
  font-size: .62rem;
  font-weight: 900;
  letter-spacing: .18em;
  text-transform: uppercase;
}
.table-wrap pre {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
  font-size: .78rem;
  line-height: 1.5;
  color: #475569;
}
.sortable-list > .sortable-item {
  margin-bottom: 0;
}
.sortable-item .inline-actions {
  align-items: center;
}
.stack > .button.primary,
.stack > .button.ghost {
  justify-self: start;
}
.inline-actions .button {
  min-height: 2.5rem;
  padding: .72rem 1rem;
}
.button {
  min-height: 2.9rem;
  padding: .9rem 1.35rem;
  border-radius: 1.1rem;
  font-size: .68rem;
  font-weight: 900;
  letter-spacing: .18em;
  text-transform: uppercase;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}
.button.primary {
  background: #0f172a;
  color: #fff;
  border-bottom: 4px solid #020617;
}
.button.primary:hover {
  background: #0ea5e9;
}
.button.ghost {
  background: #fff;
  color: #475569;
  border: 2px solid #e2e8f0;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.04);
}
.button.ghost:hover {
  color: #0284c7;
  border-color: #bae6fd;
  background: #f8fcff;
}

@media (max-width: 980px) {
  body { padding-bottom: 7.5rem; }
  .hero-card, .cards-grid, .gallery-grid, .footer-grid, .two-col, .admin-grid, .split-copy, .form-grid {
    grid-template-columns: 1fr;
  }
  .nav-row, .main-nav, .admin-topbar { flex-direction: column; align-items: flex-start; }
  .site-header { border-radius: 28px; }
  .admin-layout { grid-template-columns: 1fr; }
}
