:root {
  color-scheme: light;
  --background: #f5f7fb;
  --surface: rgba(255, 255, 255, 0.65);
  --surface-strong: rgba(255, 255, 255, 0.85);
  --ink: #1f1f2b;
  --muted: #4a4a63;
  --primary: #4461ff;
  --primary-dark: #2b3cb2;
  --accent: #47d7c8;
  --shadow: 0 20px 60px rgba(15, 22, 43, 0.16);
  --glass-border: rgba(255, 255, 255, 0.5);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: "Plus Jakarta Sans", sans-serif;
  background: radial-gradient(circle at top, #eef2ff 0%, #f5f7fb 35%, #eef3f8 100%);
  color: var(--ink);
  min-height: 100vh;
  overflow-x: hidden;
}

a {
  text-decoration: none;
  color: inherit;
}

.background-orbs span {
  position: fixed;
  border-radius: 50%;
  filter: blur(0px);
  z-index: -1;
  opacity: 0.45;
  animation: float 16s ease-in-out infinite;
}

.background-orbs span:nth-child(1) {
  width: 380px;
  height: 380px;
  background: radial-gradient(circle, rgba(68, 97, 255, 0.4), transparent 60%);
  top: -120px;
  left: -80px;
}

.background-orbs span:nth-child(2) {
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(71, 215, 200, 0.4), transparent 60%);
  bottom: 0;
  right: -80px;
  animation-delay: 4s;
}

.background-orbs span:nth-child(3) {
  width: 240px;
  height: 240px;
  background: radial-gradient(circle, rgba(182, 120, 255, 0.35), transparent 60%);
  top: 40%;
  right: 15%;
  animation-delay: 8s;
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(20px);
  }
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(14px);
  background: rgba(245, 247, 251, 0.7);
  border-bottom: 1px solid rgba(255, 255, 255, 0.7);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.2rem 6vw;
  gap: 1rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  font-weight: 600;
}

.logo small {
  display: block;
  font-weight: 400;
  color: var(--muted);
  font-size: 0.8rem;
}

.logo-mark {
  width: 40px;
  height: 40px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #ffffff, #d2ddff);
  box-shadow: var(--shadow);
  font-weight: 700;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.4rem;
  color: var(--muted);
  font-weight: 500;
}

.button {
  border: none;
  padding: 0.85rem 1.8rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.button.primary {
  background: linear-gradient(135deg, #4461ff, #6c7cff);
  color: white;
  box-shadow: 0 12px 30px rgba(68, 97, 255, 0.35);
}

.button.primary:hover {
  transform: translateY(-2px);
}

.button.ghost {
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid var(--glass-border);
  color: var(--ink);
}

.button.danger {
  background: rgba(255, 120, 120, 0.2);
  border: 1px solid rgba(255, 120, 120, 0.4);
}

.hero {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 3rem;
  padding: 4rem 8vw 2rem;
  align-items: center;
}

.hero-content h1 {
  font-size: clamp(2.4rem, 3vw, 3.6rem);
  margin: 1rem 0;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.3em;
  font-size: 0.75rem;
  color: var(--primary-dark);
}

.lead {
  color: var(--muted);
  font-size: 1.1rem;
  line-height: 1.6;
}

.hero-actions {
  margin: 1.8rem 0;
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.hero-stats h3 {
  font-size: 1.6rem;
}

.hero-card .glass-card {
  padding: 2rem;
}

.glass-card {
  background: var(--surface);
  border: 1px solid var(--glass-border);
  border-radius: 28px;
  padding: 1.8rem;
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.viewer-mini {
  margin-top: 1.4rem;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(68, 97, 255, 0.2), rgba(71, 215, 200, 0.25));
  position: relative;
  overflow: hidden;
  height: 220px;
}

.viewer-mini-grid {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image: linear-gradient(rgba(255, 255, 255, 0.3) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.3) 1px, transparent 1px);
  background-size: 40px 40px;
  mix-blend-mode: screen;
}

.viewer-mini-overlay {
  position: absolute;
  bottom: 16px;
  left: 16px;
  background: rgba(255, 255, 255, 0.7);
  padding: 0.8rem 1rem;
  border-radius: 14px;
  font-size: 0.85rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
}

.viewer-section,
.plans-section,
.accounts-section,
.dashboard-section {
  padding: 3.5rem 8vw;
}

.section-title {
  margin-bottom: 2rem;
}

.section-title h2 {
  font-size: clamp(2rem, 3vw, 2.8rem);
}

.section-title p {
  color: var(--muted);
  margin-top: 0.6rem;
}

.viewer-shell {
  align-items: start;
  display: grid;
  grid-template-columns: minmax(0, 2.2fr) minmax(0, 1fr);
  gap: 2rem;
}

.viewer-canvas {
  position: relative;
  background: radial-gradient(circle at top, #1f2a44, #0c1220);
  border-radius: 24px;
  overflow: hidden;
  box-shadow: var(--shadow);
  min-height: 400px;
  height: clamp(420px, 62vh, 760px);
  align-self: start;
}

.viewer-canvas canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.viewer-hud {
  position: absolute;
  z-index: 2;
  top: 1.2rem;
  left: 1.2rem;
  display: grid;
  gap: 0.8rem;
}

.hud-row {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.pill {
  background: rgba(255, 255, 255, 0.15);
  color: white;
  padding: 0.4rem 0.8rem;
  border-radius: 999px;
  font-size: 0.75rem;
  letter-spacing: 0.02em;
}

.icon-button {
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.15);
  color: white;
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  font-size: 0.75rem;
  cursor: pointer;
}

.hud-load {
  align-items: center;
}

.hud-label {
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.72rem;
  letter-spacing: 0.03em;
}

.hud-input {
  width: min(44vw, 520px);
  min-width: 220px;
  max-width: 100%;
  padding: 0.45rem 0.75rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.12);
  color: white;
  outline: none;
  font-size: 0.78rem;
}

.hud-input::placeholder {
  color: rgba(255, 255, 255, 0.55);
}

.pill.subtle {
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.85);
}

.floorplans {
  max-height: clamp(320px, 62vh, 760px);
  overflow: auto;
  background: var(--surface-strong);
  border-radius: 24px;
  padding: 1.6rem;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.floorplan-tabs {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.tab {
  background: rgba(68, 97, 255, 0.1);
  border: 1px solid rgba(68, 97, 255, 0.2);
  color: var(--primary-dark);
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 600;
}

.tab.active {
  background: linear-gradient(135deg, rgba(68, 97, 255, 0.9), rgba(108, 124, 255, 0.8));
  color: white;
}

.floorplan-map {
  background: rgba(255, 255, 255, 0.7);
  border-radius: 18px;
  padding: 1rem;
  display: grid;
  place-items: center;
  min-height: 220px;
}

.floorplan-map svg {
  width: 100%;
  height: auto;
}

.room-info {
  background: rgba(255, 255, 255, 0.8);
  border-radius: 18px;
  padding: 1rem;
  display: grid;
  gap: 0.8rem;
}

.room-actions {
  display: flex;
  gap: 0.8rem;
  flex-wrap: wrap;
}

.plans-grid,
.account-grid,
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.8rem;
}

.plan-card,
.listing-card {
  background: var(--surface-strong);
  border-radius: 24px;
  padding: 1.8rem;
  box-shadow: var(--shadow);
  display: grid;
  gap: 1rem;
}

.plan-card.highlight {
  border: 2px solid rgba(68, 97, 255, 0.4);
}

.plan-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.tag {
  background: rgba(71, 215, 200, 0.2);
  color: #1a5c56;
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  font-size: 0.75rem;
}

.plan-card ul {
  list-style: none;
  display: grid;
  gap: 0.5rem;
  color: var(--muted);
}

.plan-card li::before {
  content: "✦";
  margin-right: 0.5rem;
  color: var(--primary);
}

.account-grid label {
  display: grid;
  gap: 0.4rem;
  margin-bottom: 1rem;
  font-size: 0.9rem;
  color: var(--muted);
}

.account-grid input {
  padding: 0.7rem 0.9rem;
  border-radius: 12px;
  border: 1px solid rgba(99, 112, 150, 0.2);
  background: rgba(255, 255, 255, 0.8);
}

.account-grid textarea {
  padding: 0.7rem 0.9rem;
  border-radius: 12px;
  border: 1px solid rgba(99, 112, 150, 0.2);
  background: rgba(255, 255, 255, 0.8);
  resize: vertical;
  font-family: inherit;
}

.request-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem;
  margin-bottom: 0.8rem;
}

@media (max-width: 720px) {
  .request-fields {
    grid-template-columns: 1fr;
  }
}

.request-options {
  display: grid;
  gap: 0.8rem;
  margin: 1rem 0;
}

.option-card {
  border-radius: 18px;
  border: 1px solid rgba(68, 97, 255, 0.2);
  padding: 0.8rem 1rem;
  display: flex;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.6);
  cursor: pointer;
  font-weight: 600;
}

.option-card.active {
  border-color: rgba(68, 97, 255, 0.6);
  box-shadow: 0 12px 30px rgba(68, 97, 255, 0.18);
}

.estimate {
  display: flex;
  justify-content: space-between;
  background: rgba(71, 215, 200, 0.2);
  border-radius: 16px;
  padding: 0.8rem 1rem;
  margin-bottom: 1rem;
}

.listing-header {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
}

.listing-actions {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.site-footer {
  padding: 3rem 8vw 4rem;
  display: grid;
  gap: 2rem;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  background: rgba(255, 255, 255, 0.6);
  border-top: 1px solid rgba(255, 255, 255, 0.8);
}

.site-footer p {
  color: var(--muted);
}

@media (max-width: 980px) {
  .nav {
    flex-direction: column;
    align-items: flex-start;
  }

  .nav-links {
    flex-wrap: wrap;
  }

  .viewer-shell {
  align-items: start;
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .nav {
    padding: 1rem 6vw;
  }

  .hero {
    padding: 3rem 6vw 2rem;
  }

  .viewer-section,
  .plans-section,
  .accounts-section,
  .dashboard-section {
    padding: 3rem 6vw;
  }
}

/* Viewer toggles */
.hud-toggles {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.22);
  box-shadow: 0 10px 30px rgba(0,0,0,0.18);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  font-size: 12px;
  letter-spacing: 0.01em;
}

.toggle input {
  accent-color: #7cc7ff;
}

/* Viewer tuning panel */
.tuning-panel {
  margin-top: 0.75rem;
  padding: 0.85rem;
  border-radius: 18px;
  background: rgba(10, 18, 32, 0.55);
  border: 1px solid rgba(140, 200, 255, 0.22);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(14px);
}

.tuning-panel.hidden { display: none; }

.tuning-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem 0.9rem;
  align-items: end;
}

@media (max-width: 720px) {
  .tuning-grid { grid-template-columns: 1fr; }
}

.tune {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.35rem;
  font-size: 0.82rem;
  color: rgba(235, 245, 255, 0.92);
}

.tune span,
.tune em {
  font-style: normal;
  opacity: 0.9;
}

.tune input[type="range"] {
  width: 100%;
}

.tune > span:last-child,
.tune > em:last-child {
  justify-self: end;
  font-size: 0.78rem;
  opacity: 0.75;
}

.tuning-actions {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 0.25rem;
}
