/* Eyes On Your AI — frosted glass pass (visual only).
   Scoped to surfaces, not fixed navigation or data behavior.
   Keep after cinematic.css and workspace-premium.css. */

html[data-theme="dark"] {
  --frost-surface:rgba(9,27,57,.43);
  --frost-surface-strong:rgba(9,27,57,.64);
  --frost-stroke:rgba(135,205,255,.32);
  --frost-highlight:rgba(198,237,255,.18);
  --frost-shadow:0 18px 54px rgba(1,9,28,.24);
  --frost-blue:rgba(46,144,245,.13);
}
html[data-theme="light"] {
  --frost-surface:rgba(255,255,255,.30);
  --frost-surface-strong:rgba(247,251,255,.49);
  --frost-stroke:rgba(255,255,255,.74);
  --frost-highlight:rgba(255,255,255,.92);
  --frost-shadow:0 18px 52px rgba(29,68,119,.12);
  --frost-blue:rgba(81,150,244,.10);
}

/* A tinted canvas makes genuine translucency visible without external images. */
html[data-theme="light"] body:not([data-workspace="true"]) {
  background:
    radial-gradient(ellipse 58% 44% at 7% 12%,rgba(84,195,242,.28),transparent 78%),
    radial-gradient(ellipse 60% 58% at 90% 35%,rgba(117,142,246,.22),transparent 74%),
    radial-gradient(ellipse 55% 45% at 40% 92%,rgba(115,210,232,.17),transparent 78%),
    linear-gradient(145deg,#deeffd,#e2e9fa 63%,#e5f3ff);
  background-attachment:fixed;
}
html[data-theme="dark"] body:not([data-workspace="true"]) {
  background:
    radial-gradient(ellipse 62% 50% at 5% 8%,rgba(20,113,204,.25),transparent 75%),
    radial-gradient(ellipse 65% 55% at 95% 54%,rgba(66,78,179,.23),transparent 73%),
    linear-gradient(155deg,#030817,#081a35 55%,#050e21);
  background-attachment:fixed;
}

/* Marketing cards, featured prices, explanatory panels and CTAs.
   Background colors retain meaningful opacity for contrast. */
body:not([data-workspace="true"]) :is(
  .feature-card,
  .plan-card,
  .overview-strip,
  .faq-section details,
  .how-steps .card,
  .how-proof,
  .how-cta,
  .premium-intro,
  .premium-tier,
  .auth-card,
  .cinematic-hero .hero-visual,
  .hero-visual
) {
  background:linear-gradient(138deg,var(--frost-highlight) -165%,var(--frost-surface) 43%,var(--frost-blue) 100%);
  border:1px solid var(--frost-stroke);
  box-shadow:inset 0 1px 0 var(--frost-highlight),var(--frost-shadow);
  -webkit-backdrop-filter:blur(24px) saturate(155%);
  backdrop-filter:blur(24px) saturate(155%);
  border-radius:20px;
}

/* Blue-edge glass for the selected plan, without an opaque solid fill. */
body:not([data-workspace="true"]) .plan-card.featured,
body:not([data-workspace="true"]) .premium-tier.highlighted {
  background:linear-gradient(140deg,rgba(92,163,255,.19),var(--frost-surface-strong) 54%,rgba(140,123,251,.11));
  border:1px solid rgba(90,163,255,.61);
  outline:1px solid rgba(91,168,255,.16);
  box-shadow:inset 0 1px 0 var(--frost-highlight),0 18px 56px rgba(63,104,202,.15);
}

/* Technology panels remain a deeper glass for legibility over the page. */
body:not([data-workspace="true"]) .overview-strip,
body:not([data-workspace="true"]) .how-intro,
body:not([data-workspace="true"]) .cinematic-hero {
  background:linear-gradient(116deg,rgba(4,17,42,.77),rgba(8,32,68,.57) 62%,rgba(25,58,112,.44));
  border:1px solid rgba(117,203,255,.33);
  box-shadow:inset 0 1px 0 rgba(228,248,255,.15),0 19px 65px rgba(8,29,66,.22);
  -webkit-backdrop-filter:blur(20px) saturate(145%);
  backdrop-filter:blur(20px) saturate(145%);
}
body:not([data-workspace="true"]) .overview-strip :is(h2,p,.eyebrow),
body:not([data-workspace="true"]) .how-intro :is(h1,.lead,.eyebrow) {
  color:#edf7ff;
}
body:not([data-workspace="true"]) .overview-strip .btn.ghost {
  background:rgba(28,65,109,.38);
  color:#f2f8ff;
  border-color:rgba(166,223,255,.38);
}

/* Preserve hero legibility with its dark surface, but frost its inset graphic. */
body:not([data-workspace="true"]) .cinematic-hero .hero-visual {
  background:linear-gradient(145deg,rgba(10,37,77,.48),rgba(5,20,47,.58));
}

/* Form surface sits over an image: use a stronger tint to keep fields readable. */
html[data-theme="light"] body:not([data-workspace="true"]) .auth-card {
  background:rgba(247,251,255,.78);
}
html[data-theme="dark"] body:not([data-workspace="true"]) .auth-card {
  background:rgba(7,23,48,.77);
}

/* Light theme: remove legacy white-on-white or dark-panel-only copy rules. */
html[data-theme="light"] body:not([data-workspace="true"]) :is(
  .premium-intro,
  .premium-tier.highlighted
) {
  color:#15253d;
}
html[data-theme="light"] body:not([data-workspace="true"]) :is(
  .premium-intro p,
  .premium-tier.highlighted p,
  .premium-tier.highlighted small
) {
  color:#4d617e;
}
html[data-theme="light"] body:not([data-workspace="true"]) :is(
  .feature-card h3,
  .plan-card h3,
  .plan-card .plan-price,
  .premium-intro h2,
  .premium-tier.highlighted strong
) {
  color:#15253d;
}

/* Signed-in workspace panels get the same glass language, no nav positioning changes. */
body[data-workspace="true"] :is(
  .card.glass,
  .stat.glass,
  .setup-panel,
  .setup-step,
  .event,
  .workspace-page-head,
  .dashboard-hero,
  .workspace-education,
  .empty,
  .premium-intro,
  .premium-tier,
  .coverage-agent
) {
  background:linear-gradient(142deg,var(--frost-surface-strong),var(--frost-surface) 68%,var(--frost-blue));
  border:1px solid var(--frost-stroke);
  box-shadow:inset 0 1px 0 var(--frost-highlight),var(--frost-shadow);
  -webkit-backdrop-filter:blur(22px) saturate(145%);
  backdrop-filter:blur(22px) saturate(145%);
}

/* Keep dark premium callouts high-contrast across both themes. */
html[data-theme="light"] body[data-workspace="true"] :is(
  .dashboard-hero,
  .premium-intro,
  .premium-tier.highlighted,
  .workspace-education
) {
  color:#15253d;
}
html[data-theme="light"] body[data-workspace="true"] :is(
  .dashboard-hero p,
  .premium-intro p,
  .premium-tier.highlighted p,
  .premium-tier.highlighted small,
  .workspace-education p
) {
  color:#4d617e;
}
body[data-workspace="true"] .premium-tier.highlighted {
  border-color:rgba(90,163,255,.61);
  background:linear-gradient(140deg,rgba(94,164,249,.17),var(--frost-surface-strong));
}
body[data-workspace="true"] :is(.input,.setup-progress) {
  -webkit-backdrop-filter:blur(12px);
  backdrop-filter:blur(12px);
}
html[data-theme="light"] body[data-workspace="true"] .input {
  background:rgba(255,255,255,.68);
}

/* Accessible glass: robust when transparency is unsupported or undesired. */
@supports not ((backdrop-filter:blur(1px)) or (-webkit-backdrop-filter:blur(1px))) {
  html[data-theme="light"] { --frost-surface:rgba(250,253,255,.94); --frost-surface-strong:rgba(250,253,255,.97); }
  html[data-theme="dark"] { --frost-surface:rgba(8,24,48,.94); --frost-surface-strong:rgba(8,24,48,.97); }
}
@media (prefers-reduced-transparency:reduce), (prefers-contrast:more) {
  html[data-theme="light"] { --frost-surface:rgba(250,253,255,.97); --frost-surface-strong:rgba(250,253,255,.99); }
  html[data-theme="dark"] { --frost-surface:rgba(8,24,48,.96); --frost-surface-strong:rgba(8,24,48,.99); }
  body:not([data-workspace="true"]) :is(.overview-strip,.how-intro,.cinematic-hero) {
    background:rgba(6,22,48,.97);
  }
}
@media (max-width:760px) {
  body:not([data-workspace="true"]) :is(.feature-card,.plan-card,.overview-strip,.how-steps .card,.premium-intro),
  body[data-workspace="true"] :is(.card.glass,.stat.glass,.event) {
    -webkit-backdrop-filter:blur(14px) saturate(135%);
    backdrop-filter:blur(14px) saturate(135%);
  }
}
@media (prefers-reduced-motion:reduce) {
  body:not([data-workspace="true"]) :is(.feature-card,.plan-card),
  body[data-workspace="true"] .setup-step { transition:none; }
}

/* Release-branch compatibility: production uses .landing without .cinematic-landing. */
body:not([data-workspace="true"]) .view .overview-strip {
  background:linear-gradient(113deg,rgba(5,18,43,.84),rgba(7,31,67,.73) 58%,rgba(16,55,99,.65));
  border:1px solid rgba(128,205,255,.38);
  color:#f3faff;
}
body:not([data-workspace="true"]) .view .overview-strip :is(h2,p,.eyebrow) {
  color:#f3faff;
}
body:not([data-workspace="true"]) .hero-visual {
  background:linear-gradient(145deg,rgba(10,37,77,.58),rgba(5,20,47,.64));
  border-color:rgba(133,211,255,.38);
}
body:not([data-workspace="true"]) .topbar {
  background:rgba(5,18,39,.80);
  -webkit-backdrop-filter:blur(18px) saturate(145%);
  backdrop-filter:blur(18px) saturate(145%);
}

/* Keep the colored mesh behind every section while scrolling.
   Fixed backgrounds can paint only the initial viewport in full-page captures. */
html[data-theme="light"] body:not([data-workspace="true"]),
html[data-theme="dark"] body:not([data-workspace="true"]) {
  background-attachment:scroll;
}
