:root {
  --frontend-bg: #020617;
  --frontend-bg-soft: #0f172a;
  --frontend-bg-softer: #111827;
  --frontend-card: rgba(15, 23, 42, 0.88);
  --frontend-card-solid: #0f172a;
  --frontend-border: rgba(255, 255, 255, 0.10);
  --frontend-border-strong: rgba(255, 255, 255, 0.16);
  --frontend-text: #e2e8f0;
  --frontend-text-soft: #94a3b8;
  --frontend-text-muted: #64748b;
  --frontend-muted: #64748b;
  --frontend-white: #ffffff;
  --frontend-primary: #22d3ee;
  --frontend-primary-strong: #06b6d4;
  --frontend-primary-soft: rgba(34, 211, 238, 0.12);
  --frontend-emerald: #34d399;
  --frontend-orange: #fb923c;
  --frontend-yellow: #facc15;
  --frontend-shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
  --frontend-shadow-soft: 0 18px 48px rgba(15, 23, 42, 0.45);
  --frontend-radius-xl: 18px;
  --frontend-radius-2xl: 24px;
  --frontend-radius-3xl: 30px;
  --frontend-radius-4xl: 36px;
  --frontend-container: 1280px;
  --cms-editor-yellow: #facc15;
  --cms-editor-yellow-soft: rgba(250, 204, 21, 0.14);
  --cms-editor-toolbar: rgba(15, 23, 42, 0.92);
}

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

html {
  scroll-behavior: smooth;
}

body,
body.frontend-body {
  margin: 0;
  min-height: 100vh;
  background: var(--frontend-bg);
  color: var(--frontend-text);
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
}

a {
  color: inherit;
}

img {
  max-width: 100%;
  display: block;
}

.grid-bg,
.frontend-grid-bg {
  background-image:
    linear-gradient(rgba(255, 255, 255, .04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .04) 1px, transparent 1px);
  background-size: 30px 30px;
}

.section-title {
  letter-spacing: .22em;
}

.ring-soft,
.frontend-ring-soft {
  border: 1px solid rgba(255, 255, 255, .12);
}

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

.frontend-section {
  padding: 72px 0;
}

.frontend-section-alt {
  border-top: 1px solid var(--frontend-border);
  border-bottom: 1px solid var(--frontend-border);
  background: rgba(15, 23, 42, 0.55);
}

.frontend-section-dark {
  border-top: 1px solid var(--frontend-border);
  border-bottom: 1px solid var(--frontend-border);
  background: linear-gradient(180deg, rgba(2, 6, 23, 1), rgba(15, 23, 42, 1));
}

/* -----------------------------------------------------------------------
   Typography
------------------------------------------------------------------------ */

.frontend-eyebrow,
.frontend-section-eyebrow {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: var(--frontend-primary);
}

.frontend-title {
  margin: 14px 0 0;
  font-size: clamp(34px, 5vw, 56px);
  line-height: 1.04;
  font-weight: 900;
  color: var(--frontend-white);
}

.frontend-subtitle {
  margin: 12px 0 0;
  font-size: clamp(18px, 2vw, 24px);
  line-height: 1.4;
  color: var(--frontend-primary);
  font-weight: 700;
}

.frontend-desc {
  margin: 18px 0 0;
  max-width: 760px;
  font-size: 15px;
  line-height: 1.85;
  color: var(--frontend-text-soft);
}

.frontend-highlight {
  color: var(--frontend-primary);
}

.frontend-section-header {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 24px;
}

.frontend-section-title {
  margin: 0;
  font-size: clamp(28px, 3vw, 40px);
  line-height: 1.1;
  font-weight: 900;
  color: var(--frontend-white);
}

.frontend-section-desc {
  margin: 0;
  max-width: 780px;
  color: var(--frontend-text-soft);
  line-height: 1.8;
  font-size: 15px;
}

/* -----------------------------------------------------------------------
   Header
------------------------------------------------------------------------ */

.frontend-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--frontend-border);
  background: rgba(2, 6, 23, 0.80);
  backdrop-filter: blur(18px);
}

.frontend-header-inner {
  width: min(calc(100% - 32px), var(--frontend-container));
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 16px 0;
}

.frontend-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.frontend-brand-badge {
  border-radius: 12px;
  background: rgba(34, 211, 238, 0.15);
  padding: 6px 12px;
  font-size: 14px;
  font-weight: 700;
  color: var(--frontend-primary);
}

.frontend-brand-subtitle {
  color: var(--frontend-text-soft);
  font-size: 14px;
}

.frontend-nav {
  display: flex;
  align-items: center;
  gap: 28px;
}

.frontend-nav-link {
  text-decoration: none;
  color: var(--frontend-text-soft);
  font-size: 14px;
  transition: color 180ms ease;
}

.frontend-nav-link:hover {
  color: var(--frontend-white);
}

.frontend-header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* -----------------------------------------------------------------------
   Buttons
------------------------------------------------------------------------ */

.frontend-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 28px;
}

.frontend-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 12px 18px;
  border-radius: 16px;
  font-size: 14px;
  font-weight: 800;
  text-decoration: none;
  transition:
    transform 180ms ease,
    background 180ms ease,
    border-color 180ms ease,
    color 180ms ease,
    box-shadow 180ms ease;
}

.frontend-btn:hover {
  transform: translateY(-1px);
}

.frontend-btn-primary {
  background: var(--frontend-primary);
  border: 1px solid rgba(34, 211, 238, 0.28);
  color: #042f2e;
}

.frontend-btn-primary:hover {
  background: #67e8f9;
}

.frontend-btn-outline {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--frontend-border);
  color: var(--frontend-text);
}

.frontend-btn-outline:hover {
  background: rgba(255, 255, 255, 0.08);
}

/* -----------------------------------------------------------------------
   Hero / image blocks
------------------------------------------------------------------------ */

.frontend-hero-wrap {
  position: relative;
  overflow: hidden;
}

.frontend-hero-bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom right,
    rgba(6, 182, 212, 0.18),
    rgba(2, 6, 23, 1),
    rgba(52, 211, 153, 0.10)
  );
}

.frontend-hero-container {
  position: relative;
  width: min(calc(100% - 32px), var(--frontend-container));
  margin: 0 auto;
  display: grid;
  gap: 56px;
  padding: 64px 0 96px;
}

.frontend-hero-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.frontend-badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  color: var(--frontend-text-soft);
  font-size: 14px;
  margin-top: 24px;
}

.frontend-chip {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  border: 1px solid rgba(34, 211, 238, 0.20);
  background: rgba(34, 211, 238, 0.10);
  color: #bae6fd;
  font-size: 12px;
  font-weight: 700;
  padding: 8px 14px;
}

.frontend-live-pill {
  display: inline-flex;
  width: fit-content;
  margin-top: 20px;
  border-radius: 999px;
  background: rgba(52, 211, 153, 0.12);
  color: #bbf7d0;
  font-size: 12px;
  font-weight: 700;
  padding: 8px 14px;
}

.frontend-hero-media {
  display: grid;
  gap: 24px;
}

.frontend-hero-media-grid {
  display: grid;
  gap: 24px;
}

.hero-photo,
.scene-photo,
.feature-photo,
.case-photo,
.cta-photo,
.mosaic-tile,
.frontend-bg-cover {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  background-size: cover;
  background-position: center;
}

.hero-photo::before,
.scene-photo::before,
.feature-photo::before,
.case-photo::before,
.cta-photo::before,
.mosaic-tile::before,
.frontend-bg-cover::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(2, 6, 23, .10), rgba(2, 6, 23, .68) 70%, rgba(2, 6, 23, .88)),
    radial-gradient(circle at top, rgba(34, 211, 238, .22), transparent 35%);
  z-index: 0;
}

.hero-photo > *,
.scene-photo > *,
.feature-photo > *,
.case-photo > *,
.cta-photo > *,
.mosaic-tile > *,
.frontend-bg-cover > * {
  position: relative;
  z-index: 1;
}

.frontend-rounded-hero {
  border-radius: var(--frontend-radius-3xl);
}

.frontend-rounded-cta {
  border-radius: var(--frontend-radius-4xl);
}

/* -----------------------------------------------------------------------
   Cards / hover / sections
------------------------------------------------------------------------ */

.frontend-card {
  border: 1px solid var(--frontend-border);
  background: var(--frontend-card);
  border-radius: var(--frontend-radius-3xl);
  box-shadow: var(--frontend-shadow);
  backdrop-filter: blur(12px);
}

.frontend-card-body {
  padding: 28px;
}

.card-hover {
  transition:
    transform .28s ease,
    border-color .28s ease,
    box-shadow .28s ease;
}

.card-hover:hover {
  transform: translateY(-5px);
  border-color: rgba(34, 211, 238, .38);
  box-shadow: 0 18px 48px rgba(15, 23, 42, .45);
}

.scene-card {
  overflow: hidden;
  border-radius: var(--frontend-radius-3xl);
  border: 1px solid var(--frontend-border);
  background: var(--frontend-card-solid);
}

.scene-image-inner {
  transition: transform .45s ease;
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
}

.scene-card:hover .scene-image-inner {
  transform: scale(1.06);
}

.frontend-item-card {
  border: 1px solid var(--frontend-border);
  background: rgba(15, 23, 42, 0.84);
  border-radius: var(--frontend-radius-2xl);
  padding: 22px;
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    background 180ms ease,
    box-shadow 180ms ease;
}

.frontend-item-card:hover,
.card-hover:hover {
  background: rgba(15, 23, 42, 0.94);
}

.frontend-item-label {
  font-size: 12px;
  line-height: 1.4;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--frontend-primary);
  font-weight: 700;
}

.frontend-item-title {
  margin: 10px 0 0;
  font-size: 20px;
  line-height: 1.3;
  font-weight: 800;
  color: var(--frontend-white);
}

.frontend-item-price {
  margin-top: 10px;
  font-size: 18px;
  line-height: 1.4;
  color: var(--frontend-primary);
  font-weight: 800;
}

.frontend-item-desc {
  margin-top: 10px;
  color: var(--frontend-text-soft);
  font-size: 14px;
  line-height: 1.8;
}

.frontend-item-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
  text-decoration: none;
  color: var(--frontend-primary);
  font-size: 14px;
  font-weight: 700;
}

.frontend-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  border: 1px solid rgba(34, 211, 238, 0.22);
  background: rgba(34, 211, 238, 0.12);
  color: #a5f3fc;
}

.frontend-empty {
  border: 1px dashed var(--frontend-border);
  border-radius: var(--frontend-radius-2xl);
  padding: 24px;
  color: var(--frontend-text-soft);
  font-size: 14px;
  text-align: center;
  background: rgba(255, 255, 255, 0.02);
}

/* -----------------------------------------------------------------------
   Stats / utilities
------------------------------------------------------------------------ */

.frontend-hero-layout {
  display: grid;
  gap: 22px;
  align-items: stretch;
}

.frontend-hero-panel {
  padding: 34px;
}

.frontend-hero-side {
  padding: 24px;
}

.frontend-stat-list {
  display: grid;
  gap: 14px;
}

.frontend-stat-card {
  border: 1px solid var(--frontend-border);
  border-radius: 18px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.03);
}

.frontend-stat-title {
  font-size: 13px;
  color: var(--frontend-text-soft);
  margin: 0;
}

.frontend-stat-value {
  margin: 8px 0 0;
  font-size: 20px;
  font-weight: 800;
  color: var(--frontend-white);
}

.mock-screen {
  background:
    radial-gradient(circle at top, rgba(34, 211, 238, .20), transparent 32%),
    linear-gradient(180deg, rgba(15, 23, 42, 1), rgba(2, 6, 23, 1));
}

/* -----------------------------------------------------------------------
   Grid
------------------------------------------------------------------------ */

.frontend-grid {
  display: grid;
  gap: 18px;
}

.frontend-grid-4 {
  grid-template-columns: repeat(1, minmax(0, 1fr));
}

.frontend-grid-3 {
  grid-template-columns: repeat(1, minmax(0, 1fr));
}

.frontend-grid-2 {
  grid-template-columns: repeat(1, minmax(0, 1fr));
}

/* -----------------------------------------------------------------------
   Media helpers
------------------------------------------------------------------------ */

.frontend-media {
  display: block;
  width: 100%;
  border-radius: var(--frontend-radius-2xl);
  object-fit: cover;
  background: rgba(255, 255, 255, 0.04);
}

.frontend-media-16x9 {
  aspect-ratio: 16 / 9;
}

.frontend-media-4x3 {
  aspect-ratio: 4 / 3;
}

.frontend-media-1x1 {
  aspect-ratio: 1 / 1;
}

.frontend-list {
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 12px;
}

.frontend-list li {
  color: var(--frontend-text-soft);
  font-size: 14px;
  line-height: 1.8;
}

/* -----------------------------------------------------------------------
   Footer
------------------------------------------------------------------------ */

.frontend-footer {
  border-top: 1px solid var(--frontend-border);
  padding: 32px 0 48px;
  color: var(--frontend-text-muted);
  font-size: 13px;
}

.frontend-footer-inner {
  width: min(calc(100% - 32px), var(--frontend-container));
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.frontend-footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}

.frontend-footer-link {
  color: var(--frontend-text-soft);
  text-decoration: none;
  transition: color 180ms ease;
}

.frontend-footer-link:hover {
  color: var(--frontend-white);
}

/* -----------------------------------------------------------------------
   CMS Visual Editor
------------------------------------------------------------------------ */

.frontend-visual-editor {
  padding-top: 58px;
}

.frontend-visual-editor .sticky.top-0 {
  top: 58px;
}

.cms-editor-toolbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 120;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 58px;
  padding: 10px 18px;
  border-bottom: 1px solid rgba(250, 204, 21, 0.28);
  background: var(--cms-editor-toolbar);
  backdrop-filter: blur(14px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.28);
}

.cms-editor-toolbar-title {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #fde68a;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: .02em;
}

.cms-editor-toolbar-meta {
  color: #cbd5e1;
  font-size: 12px;
  font-weight: 600;
}

.cms-editor-toolbar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.cms-editor-toolbar-actions a {
  text-decoration: none;
  padding: 8px 12px;
  border-radius: 12px;
  border: 1px solid rgba(250, 204, 21, 0.22);
  background: rgba(250, 204, 21, 0.08);
  color: #fef3c7;
  font-size: 13px;
  font-weight: 700;
  transition: background 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.cms-editor-toolbar-actions a:hover {
  background: rgba(250, 204, 21, 0.14);
  border-color: rgba(250, 204, 21, 0.36);
  transform: translateY(-1px);
}

.cms-editable {
  position: relative;
  isolation: isolate;
}

.cms-editable-section {
  border-radius: 28px;
}

.cms-editable-panel {
  border-radius: 28px;
}

.cms-editable-hero-main,
.cms-editable-hero-side {
  border-radius: 32px;
}

.cms-editable-header,
.cms-editable-footer {
  border-radius: 0;
}

.cms-edit-overlay {
  cursor: pointer;
  position: absolute;
  inset: 0;
  z-index: 90;
  display: block;
  width: 100%;
  height: 100%;
  border: 4px solid var(--cms-editor-yellow);
  border-radius: inherit;
  background: var(--cms-editor-yellow-soft);
  box-shadow:
    inset 0 0 0 1px rgba(2, 6, 23, 0.55),
    0 0 0 2px rgba(250, 204, 21, 0.12);
  text-decoration: none;
  transition: background 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.cms-edit-overlay:hover {
  background: rgba(250, 204, 21, 0.20);
  box-shadow:
    inset 0 0 0 1px rgba(2, 6, 23, 0.55),
    0 0 0 3px rgba(250, 204, 21, 0.24),
    0 18px 40px rgba(0, 0, 0, 0.24);
}

.cms-edit-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: calc(100% - 24px);
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.94);
  border: 1px solid rgba(250, 204, 21, 0.44);
  color: #fef08a;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  white-space: nowrap;
}

.cms-edit-badge::before {
  content: "✦";
  color: #facc15;
}

.cms-editable-header .cms-edit-overlay,
.cms-editable-footer .cms-edit-overlay {
  cursor: pointer;
  border-radius: 0;
}

.cms-editable > *:not(.cms-edit-overlay) {
  position: relative;
  z-index: 1;
}

.cms-editable .cms-edit-overlay {
  cursor: pointer;
  pointer-events: auto;
}

/* -----------------------------------------------------------------------
   Responsive
------------------------------------------------------------------------ */

@media (min-width: 768px) {
  .frontend-grid-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .frontend-grid-3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .frontend-grid-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .frontend-footer-inner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

@media (min-width: 1100px) {
  .frontend-grid-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .frontend-grid-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .frontend-hero-container {
    grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  }

  .frontend-hero-media-grid {
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  }

  .frontend-hero-layout {
    grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
  }
}

@media (max-width: 1024px) {
  .frontend-nav {
    display: none;
  }

  .frontend-brand-subtitle {
    display: none;
  }
}

@media (max-width: 768px) {
  .frontend-shell,
  .frontend-header-inner,
  .frontend-footer-inner,
  .frontend-hero-container {
    width: min(calc(100% - 24px), var(--frontend-container));
  }

  .frontend-section {
    padding: 56px 0;
  }

  .frontend-card-body,
  .frontend-hero-panel,
  .frontend-hero-side {
    padding: 22px;
  }

  .frontend-actions,
  .frontend-header-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .frontend-btn {
    width: 100%;
  }

  .frontend-header-inner {
    gap: 16px;
  }

  .frontend-header-actions .frontend-btn,
  .frontend-header-actions a {
    width: 100%;
  }

  .cms-editor-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .frontend-visual-editor {
    padding-top: 88px;
  }

  .frontend-visual-editor .sticky.top-0 {
    top: 88px;
  }

  .cms-edit-badge {
    font-size: 11px;
    max-width: calc(100% - 18px);
  }
}

@media (min-width: 769px) {
  .feature-photo[data-desktop-bg] {
    background-image: var(--family-desktop-bg);
  }
}

[data-item-id].is-dragging {
  opacity: 0.55;
  transform: scale(0.99);
}

[data-sortable-list] [data-item-id] {
  cursor: grab;
}

[data-sortable-list] [data-item-id]:active {
  cursor: grabbing;
}

.media-preview-empty {
  display: inline-flex;
  padding: 12px;
  color: #94a3b8;
}

/* -----------------------------------------------------------------------
   Hero visual CMS layout refinement
   Main copy + tracking visual, then reassurance cards.
------------------------------------------------------------------------ */
.frontend-hero-focus-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(360px, 0.98fr);
  align-items: center;
  gap: 56px;
}

.hero-tracking-visual {
  min-height: 520px;
}

.frontend-visual-editor .frontend-hero-focus-grid {
  align-items: stretch;
}

.frontend-visual-editor .cms-editable-hero-side {
  border-radius: 28px;
}

@media (max-width: 1024px) {
  .frontend-hero-focus-grid {
    grid-template-columns: 1fr;
    gap: 36px;
  }

  .hero-tracking-visual {
    min-height: auto;
  }
}

@media (max-width: 768px) {
  .frontend-hero-focus-grid {
    gap: 28px;
  }
}
