/* Atlas layer — premium visual system (loads after generator-studio.css) */

:root {
  --font-display: "Syne", "Plus Jakarta Sans", system-ui, sans-serif;
  --font-ui: "Outfit", "Inter", system-ui, sans-serif;
  --accent-champagne: #d4af37;
  --noise: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.035'/%3E%3C/svg%3E");
  --glow-a: rgba(37, 99, 235, 0.2);
  --glow-b: rgba(139, 92, 246, 0.14);
}

html[data-studio-accent="nebula"] {
  --brand: #7c5cff;
  --brand-2: #a78bfa;
  --brand-3: #c4b5fd;
  --gold: #d4af37;
  --success: #5eead4;
  --glow-a: rgba(37, 99, 235, 0.2);
  --glow-b: rgba(139, 92, 246, 0.14);
}

html[data-studio-accent="ember"] {
  --brand: #f97316;
  --brand-2: #fb923c;
  --brand-3: #fdba74;
  --gold: #fcd34d;
  --success: #4ade80;
  --glow-a: rgba(249, 115, 22, 0.4);
  --glow-b: rgba(251, 191, 36, 0.22);
}

html[data-studio-accent="glacier"] {
  --brand: #22d3ee;
  --brand-2: #67e8f9;
  --brand-3: #a5f3fc;
  --gold: #fef3c7;
  --success: #86efac;
  --glow-a: rgba(34, 211, 238, 0.38);
  --glow-b: rgba(99, 102, 241, 0.2);
}

html[data-studio-density="compact"] {
  --space-xs: 6px;
  --space-sm: 12px;
  --space-md: 18px;
  --space-lg: 26px;
  --space-xl: 36px;
  --space-2xl: 48px;
  --radius-xl: 26px;
  --radius-lg: 18px;
  --radius-md: 14px;
}

html[data-studio-motion="reduced"] *,
html[data-studio-motion="reduced"] *::before,
html[data-studio-motion="reduced"] *::after {
  animation-duration: 0.01ms !important;
  animation-iteration-count: 1 !important;
  transition-duration: 0.01ms !important;
}

body {
  font-family: var(--font-ui);
  background-color: #03040a;
  background-image:
    var(--noise),
    radial-gradient(ellipse 90% 65% at 0% -4%, rgba(37, 99, 235, 0.2), transparent 55%),
    radial-gradient(ellipse 70% 55% at 50% -8%, rgba(139, 92, 246, 0.14), transparent 52%),
    radial-gradient(ellipse 80% 60% at 100% 0%, rgba(212, 175, 55, 0.08), transparent 50%),
    radial-gradient(ellipse 55% 45% at 88% 18%, rgba(244, 114, 182, 0.07), transparent 48%),
    radial-gradient(ellipse 75% 55% at 50% 108%, rgba(20, 184, 166, 0.1), transparent 58%),
    radial-gradient(ellipse 50% 40% at 12% 85%, rgba(99, 102, 241, 0.09), transparent 52%),
    radial-gradient(ellipse 40% 35% at 75% 70%, rgba(56, 189, 248, 0.05), transparent 50%),
    linear-gradient(165deg, #03040a 0%, #080a14 24%, #0e101c 56%, #060810 100%);
  background-attachment: fixed;
}

h1 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.045em;
}

.gradient-text {
  background: linear-gradient(
    125deg,
    #ffffff 0%,
    var(--brand-3) 35%,
    var(--brand-2) 55%,
    #ffffff 95%
  );
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  background-size: 220% 220%;
}

.generator-head h2 {
  font-family: var(--font-display);
  font-weight: 700;
}

.hero-shell {
  border-radius: calc(var(--radius-xl) + 4px);
  border: 1px solid rgba(129, 140, 248, 0.14);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.02) 42%, rgba(255, 255, 255, 0.05) 100%),
    linear-gradient(165deg, rgba(14, 16, 30, 0.94) 0%, rgba(6, 8, 18, 0.98) 100%);
  box-shadow:
    0 50px 140px rgba(0, 0, 0, 0.55),
    0 0 0 1px rgba(255, 255, 255, 0.06) inset,
    0 1px 0 rgba(255, 255, 255, 0.08) inset;
  backdrop-filter: blur(28px) saturate(1.35);
}

.generator-card {
  border-radius: calc(var(--radius-xl) - 4px);
  background: linear-gradient(165deg, rgba(14, 16, 28, 0.97) 0%, rgba(6, 8, 18, 0.99) 100%);
  border: 1px solid rgba(129, 140, 248, 0.14);
  box-shadow:
    0 40px 120px rgba(0, 0, 0, 0.52),
    0 0 0 1px rgba(255, 255, 255, 0.05) inset,
    0 0 80px color-mix(in srgb, var(--brand) 12%, transparent);
}

.form-surface {
  border-radius: calc(var(--radius-lg) + 4px);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.11);
  backdrop-filter: blur(22px) saturate(1.2);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

input,
select,
.ms-trigger {
  border-radius: calc(var(--radius-md) + 2px);
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.03));
  font-family: var(--font-ui);
}

input:focus,
select:focus,
.ms-trigger:focus {
  border-color: color-mix(in srgb, var(--brand-2) 70%, white);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 22%, transparent);
}

.surface-meter b {
  background: linear-gradient(135deg, color-mix(in srgb, var(--brand) 35%, transparent), rgba(255, 255, 255, 0.06));
  border: 1px solid color-mix(in srgb, var(--brand-2) 45%, transparent);
  letter-spacing: 0.12em;
}

.generate-btn {
  font-family: var(--font-display);
  letter-spacing: 0.04em;
  text-transform: none;
  font-weight: 700;
  border-radius: 999px;
  background: linear-gradient(
    135deg,
    color-mix(in srgb, var(--brand) 92%, #1a1030),
    color-mix(in srgb, var(--brand-2) 75%, #0f172a)
  );
  border: 1px solid color-mix(in srgb, var(--brand-3) 55%, transparent);
  box-shadow:
    0 18px 48px color-mix(in srgb, var(--brand) 35%, transparent),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.generate-btn:hover {
  filter: brightness(1.06) saturate(1.05);
  transform: translateY(-2px);
}

.preview-card {
  border: 1px solid rgba(129, 140, 248, 0.12);
  background: linear-gradient(165deg, rgba(12, 14, 26, 0.97), rgba(6, 8, 18, 0.99));
}

.ring {
  background: conic-gradient(var(--brand-2) 0 295deg, rgba(255, 255, 255, 0.1) 295deg 360deg);
}

.studio-deck {
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02));
  backdrop-filter: blur(20px);
}

.clock-card {
  transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.35s ease, box-shadow 0.45s ease;
}

.clock-card:hover {
  transform: translateY(-3px);
  border-color: color-mix(in srgb, var(--brand-2) 35%, rgba(255, 255, 255, 0.2));
  box-shadow: 0 24px 56px rgba(0, 0, 0, 0.35);
}

.loadingPanel {
  border: 1px solid rgba(129, 140, 248, 0.12);
  background: linear-gradient(165deg, rgba(12, 14, 26, 0.96), rgba(6, 8, 18, 0.99));
  backdrop-filter: blur(24px) saturate(1.2);
}

.loadingSpinner {
  border-color: rgba(255, 255, 255, 0.12);
  border-top-color: var(--brand-2);
}

.loadingBarFill {
  background: linear-gradient(90deg, var(--brand), var(--brand-2), var(--brand-3));
}

/* —— Display dock (configuration toolbar) —— */
.display-dock {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(16px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.display-dock__label {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(232, 239, 255, 0.55);
  margin-right: 4px;
}

.display-dock__group {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding-right: 12px;
  margin-right: 4px;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.display-dock__group:last-of-type {
  border-right: 0;
  padding-right: 0;
  margin-right: 0;
}

.dock-seg {
  appearance: none;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  color: rgba(246, 249, 255, 0.85);
  font-family: var(--font-ui);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 8px 12px;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.25s ease, border-color 0.25s ease, color 0.2s ease, transform 0.2s ease;
}

.dock-seg:hover {
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.07);
}

.dock-seg[aria-pressed="true"] {
  border-color: color-mix(in srgb, var(--brand-2) 55%, transparent);
  background: color-mix(in srgb, var(--brand) 22%, rgba(255, 255, 255, 0.06));
  color: #fff;
  box-shadow: 0 0 24px color-mix(in srgb, var(--brand) 18%, transparent);
}

.dock-seg:focus-visible {
  outline: 2px solid var(--brand-2);
  outline-offset: 2px;
}

/* Template strip — visual presets for the marketing column */
.template-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: var(--space-md);
}

.template-chip {
  flex: 1 1 140px;
  min-width: 120px;
  text-align: left;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  cursor: pointer;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.3s ease, box-shadow 0.4s ease;
  font-family: var(--font-ui);
  color: inherit;
}

.template-chip:hover {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--brand-2) 40%, rgba(255, 255, 255, 0.15));
}

.template-chip[aria-selected="true"] {
  border-color: color-mix(in srgb, var(--brand) 50%, transparent);
  box-shadow: 0 16px 40px color-mix(in srgb, var(--brand) 15%, transparent);
  background: rgba(255, 255, 255, 0.06);
}

.template-chip__name {
  display: block;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.template-chip__meta {
  display: block;
  margin-top: 4px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(232, 239, 255, 0.5);
}

/* Quality meter — interactive */
.quality-meter {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.quality-meter__track {
  flex: 1 1 120px;
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
  max-width: 200px;
}

.quality-meter__fill {
  height: 100%;
  width: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--brand), var(--brand-2));
  transform-origin: left center;
  transform: scaleX(1);
  transition: transform 0.55s cubic-bezier(0.16, 1, 0.3, 1);
}

html[data-studio-quality="standard"] .quality-meter__fill {
  transform: scaleX(0.72);
}

html[data-studio-quality="express"] .quality-meter__fill {
  transform: scaleX(0.48);
}

.surface-meter {
  flex-wrap: wrap;
  gap: 10px;
}

.surface-meter .quality-meter {
  margin-left: auto;
}

@media (max-width: 900px) {
  .display-dock {
    border-radius: 20px;
    justify-content: flex-start;
  }

  .display-dock__group {
    border-right: 0;
    padding-right: 0;
    flex-wrap: wrap;
  }
}

.topbar {
  flex-wrap: wrap;
  row-gap: 12px;
}

.topbar-right {
  max-width: 100%;
  justify-content: flex-end;
}
