/* guard:allow-raw-color - standalone auth documents have no app token layer.
   Video Studio theme for the framework sign-in, sign-up and reset-password
   pages. Injected by server/lib/studio-auth-theme.ts after the framework
   styles; tokens mirror app/global.css (:root / .dark). */

@font-face {
  font-family: "Inter Variable";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url("./inter-latin-wght-normal.woff2") format("woff2-variations");
}
@font-face {
  font-family: "Bricolage Grotesque Variable";
  font-style: normal;
  font-display: swap;
  font-weight: 200 800;
  src: url("./bricolage-grotesque-latin-wght-normal.woff2")
    format("woff2-variations");
}

:root {
  --studio-bg: hsl(0 0% 100%);
  --studio-fg: hsl(0 0% 10%);
  --studio-muted: hsl(0 0% 95%);
  --studio-muted-fg: hsl(0 0% 45%);
  --studio-border: hsl(0 0% 90%);
  --studio-panel: hsl(0 0% 94%);
  --studio-brand: hsl(333 71% 51%);
  --studio-brand-hover: hsl(333 71% 46%);
  --studio-brand-fg: hsl(0 0% 100%);
  --studio-destructive: hsl(0 72% 51%);
  --studio-success: hsl(152 60% 36%);
  --studio-font: "Inter Variable", "Inter", system-ui, sans-serif;
  --studio-display: "Bricolage Grotesque Variable", "Inter Variable",
    system-ui, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --studio-bg: hsl(0 0% 13%);
    --studio-fg: hsl(0 0% 90%);
    --studio-muted: hsl(0 0% 18%);
    --studio-muted-fg: hsl(0 0% 60%);
    --studio-border: hsl(0 0% 24%);
    --studio-panel: hsl(0 0% 10%);
    --studio-brand: hsl(330 81% 60%);
    --studio-brand-hover: hsl(330 81% 55%);
    --studio-destructive: hsl(0 91% 71%);
    --studio-success: hsl(152 55% 55%);
    color-scheme: dark;
  }
}

/* ---- Document ---------------------------------------------------------- */
body,
body.has-marketing,
body.has-marketing .auth-marketing-home {
  background: var(--studio-bg);
  color: var(--studio-fg);
  font-family: var(--studio-font);
  font-feature-settings: "cv02", "cv03", "cv04", "cv11";
  -webkit-font-smoothing: antialiased;
}
body.has-marketing {
  --auth-marketing-left-bg: var(--studio-panel);
  --auth-marketing-right-bg: var(--studio-bg);
  --auth-marketing-foreground: var(--studio-fg);
  --auth-marketing-muted: var(--studio-muted-fg);
  --auth-marketing-subtle: var(--studio-muted-fg);
  --auth-marketing-border: var(--studio-border);
  --auth-marketing-badge-bg: var(--studio-bg);
}
::selection {
  background: color-mix(in srgb, var(--studio-brand) 22%, transparent);
}

/* ---- Studio panel (left) ---------------------------------------------- */
body.has-marketing .auth-marketing-home .marketing-panel,
body.has-marketing .auth-marketing-home .auth-marketing-visual {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(
      ellipse 70% 55% at 60% 34%,
      color-mix(in srgb, var(--studio-brand) 16%, transparent),
      transparent 70%
    ),
    var(--studio-panel);
}
body.has-marketing .auth-marketing-home .auth-marketing-visual {
  padding: 2.5rem 4rem 3.5rem;
}
body.has-marketing .auth-marketing-home .auth-marketing-screenshot-wrap,
body.has-marketing
  .auth-marketing-home
  .auth-marketing-visual
  > [data-agent-native-marketing-background] {
  position: absolute;
  inset: 0;
  z-index: 0;
}
body.has-marketing .auth-marketing-home .auth-marketing-screenshot,
body.has-marketing .auth-marketing-home [data-agent-native-marketing-background] {
  position: absolute;
  inset: 0;
  transform: none;
  background: url("./studio-frames.svg") no-repeat 50% 30% / auto
    min(56vh, 520px);
  animation: studio-auth-float 900ms cubic-bezier(0.16, 1, 0.3, 1) both;
}
body.has-marketing .auth-marketing-home .auth-marketing-visual .marketing-content {
  position: relative;
  z-index: 1;
  min-height: calc(100vh - 6rem);
}
body.has-marketing .auth-marketing-home .app-name {
  gap: 0.5rem;
  color: var(--studio-fg);
  font: 600 1.125rem/1 var(--studio-font);
  letter-spacing: -0.01em;
}
body.has-marketing .auth-marketing-home .app-name img.brand-mark {
  height: 1rem;
  filter: grayscale(1) brightness(0);
}
body.has-marketing .auth-marketing-home .app-status-badge {
  min-height: 0;
  padding: 0.25rem 0.45rem;
  border: 1px solid var(--studio-border);
  border-radius: 0.375rem;
  background: var(--studio-bg);
  color: var(--studio-fg);
  font: 600 0.6875rem/1 var(--studio-font);
  letter-spacing: 0.04em;
}
body.has-marketing .auth-marketing-home .marketing-copy {
  max-width: 34rem;
}
body.has-marketing .auth-marketing-home .auth-marketing-headline {
  color: var(--studio-fg);
  font: 700 clamp(2.25rem, 3.6vw, 3.25rem) / 1.04 var(--studio-display);
  letter-spacing: -0.035em;
  text-wrap: balance;
}
body.has-marketing .auth-marketing-home .auth-marketing-description {
  max-width: 30rem;
  margin-top: 1.125rem;
  color: var(--studio-muted-fg);
  font: 400 1.0625rem/1.5 var(--studio-font);
  text-wrap: pretty;
}
/* The framework links its own open-source repo here; not ours to show. */
body.has-marketing .auth-marketing-home .marketing-actions {
  display: none;
}

/* ---- Form panel (right) ----------------------------------------------- */
body.has-marketing .auth-marketing-home .form-panel {
  padding: 0 4rem;
  background: var(--studio-bg);
  border-inline-start: 1px solid var(--studio-border);
}
body.has-marketing .auth-marketing-home .form-panel > .card {
  width: min(24rem, 100%);
  max-width: 24rem;
}
.card {
  background: transparent;
  border: 0;
  color: var(--studio-fg);
}
.card h1,
body.has-marketing .auth-marketing-home .card h1 {
  margin-bottom: 0.5rem;
  color: var(--studio-fg);
  font: 700 2rem/1.1 var(--studio-display);
  letter-spacing: -0.03em;
  text-align: center;
  text-wrap: balance;
}
.card .subtitle,
body.has-marketing .auth-marketing-home .card .subtitle {
  margin-bottom: 2rem;
  color: var(--studio-muted-fg);
  font: 400 0.9375rem/1.45 var(--studio-font);
  text-align: center;
}

.tabs {
  padding: 3px;
  margin-bottom: 1.25rem;
  background: var(--studio-muted);
  border-radius: 0.625rem;
}
.tab {
  padding: 0.45rem 0.75rem;
  color: var(--studio-muted-fg);
  font: 500 0.8125rem/1.2 var(--studio-font);
  border-radius: 0.5rem;
  transition: background-color 150ms, color 150ms;
}
.tab:hover:not(.active) {
  color: var(--studio-fg);
}
.tab.active {
  background: var(--studio-bg);
  color: var(--studio-fg);
  box-shadow:
    0 1px 2px rgb(0 0 0 / 0.08),
    0 0 0 1px var(--studio-border);
}

label {
  margin-bottom: 0.375rem;
  color: var(--studio-fg);
  font: 500 0.8125rem/1.3 var(--studio-font);
}
input,
body.has-marketing .auth-marketing-home .card input {
  height: 2.5rem;
  padding: 0 0.75rem;
  margin-bottom: 1rem;
  background: var(--studio-bg);
  border: 1px solid var(--studio-border);
  border-radius: 0.5rem;
  color: var(--studio-fg);
  font: 400 0.875rem/1 var(--studio-font);
  transition:
    border-color 150ms,
    box-shadow 150ms;
}
input::placeholder,
body.has-marketing .auth-marketing-home .card input::placeholder {
  color: var(--studio-muted-fg);
  opacity: 1;
}
input:focus,
body.has-marketing .auth-marketing-home .card input:focus {
  border-color: var(--studio-brand);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--studio-brand) 22%, transparent);
}

button[type="submit"],
.btn-primary,
body.has-marketing .auth-marketing-home .card .btn-primary,
body.has-marketing .auth-marketing-home .card button[type="submit"] {
  min-height: 2.5rem;
  padding: 0.5rem 1rem;
  background: var(--studio-brand);
  color: var(--studio-brand-fg);
  border: 0;
  border-radius: 0.625rem;
  font: 600 0.875rem/1.2 var(--studio-font);
  box-shadow: 0 8px 22px -12px var(--studio-brand);
  transition:
    background-color 150ms,
    transform 150ms;
}
button[type="submit"]:hover,
.btn-primary:hover {
  background: var(--studio-brand-hover);
}
button[type="submit"]:active,
.btn-primary:active {
  transform: translateY(1px);
}
button[type="submit"]:focus-visible,
.btn-primary:focus-visible,
.tab:focus-visible,
.link-button:focus-visible,
.btn-google:focus-visible {
  outline: 2px solid var(--studio-brand);
  outline-offset: 2px;
}

.btn-google,
body.has-marketing .auth-marketing-home .card .btn-google {
  min-height: 2.5rem;
  background: var(--studio-bg);
  color: var(--studio-fg);
  border: 1px solid var(--studio-border);
  border-radius: 0.625rem;
  font: 500 0.875rem/1.2 var(--studio-font);
}
.btn-google:hover {
  background: var(--studio-muted);
}
.btn-secondary {
  color: var(--studio-muted-fg);
  border-color: var(--studio-border);
  border-radius: 0.625rem;
}
.btn-secondary:hover {
  color: var(--studio-fg);
  border-color: var(--studio-muted-fg);
}

.divider,
body.has-marketing .auth-marketing-home .card .divider {
  color: var(--studio-muted-fg);
  font: 400 0.8125rem/1.3 var(--studio-font);
}
.divider::before,
.divider::after {
  background: var(--studio-border);
}

.link-button,
.local-dev-full-options,
body.has-marketing .auth-marketing-home .card .auth-mode-link {
  color: var(--studio-muted-fg);
  font-family: var(--studio-font);
}
.link-button:hover,
.local-dev-full-options:hover,
body.has-marketing .auth-marketing-home .card .auth-mode-link:hover {
  color: var(--studio-brand);
}
.local-dev-description {
  color: var(--studio-muted-fg);
}

.msg.error,
.google-error {
  color: var(--studio-destructive);
}
.msg.success {
  color: var(--studio-success);
}
.legal-note,
body.has-marketing .auth-marketing-home .card .legal-note {
  color: var(--studio-muted-fg);
  font-family: var(--studio-font);
}

/* Sign-up verification steps */
.progress-step.complete span,
.progress-step.current span {
  background: var(--studio-brand);
  border-color: var(--studio-brand);
  color: var(--studio-brand-fg);
}
.verification-panel {
  border-color: var(--studio-border);
  background: var(--studio-muted);
  border-radius: 0.75rem;
}

/* Language picker */
.locale-trigger {
  color: var(--studio-muted-fg);
}
.locale-trigger:hover {
  color: var(--studio-fg);
}
.locale-menu {
  background: var(--studio-bg);
  border-color: var(--studio-border);
  color: var(--studio-fg);
}
.locale-menu-item:hover,
.locale-menu-item:focus-visible {
  background: var(--studio-muted);
}

/* ---- Reset password (standalone card, no studio panel) ----------------- */
body:not(.has-marketing) {
  background:
    radial-gradient(
      ellipse 60% 45% at 50% 0%,
      color-mix(in srgb, var(--studio-brand) 12%, transparent),
      transparent 70%
    ),
    var(--studio-bg);
}
.reset-password-card {
  max-width: 24rem;
  padding: 2rem;
  background: var(--studio-bg);
  border: 1px solid var(--studio-border);
  border-radius: 1rem;
  box-shadow: 0 24px 48px -28px rgb(0 0 0 / 0.25);
}
.reset-password-card h1 {
  font-size: 1.625rem;
}
.reset-password-card .subtitle {
  margin-bottom: 1.5rem;
}
.reset-password-card .back {
  color: var(--studio-muted-fg);
}
.reset-password-card .back:hover {
  color: var(--studio-brand);
}

@keyframes studio-auth-float {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  body.has-marketing .auth-marketing-home .auth-marketing-screenshot,
  body.has-marketing .auth-marketing-home [data-agent-native-marketing-background] {
    animation: none;
  }
}
@media (prefers-color-scheme: dark) {
  body.has-marketing .auth-marketing-home .app-name img.brand-mark {
    filter: grayscale(1) brightness(0) invert(1);
  }
}

/* ---- Small screens: framework hides the studio panel -------------------- */
@media not all and (min-width: 901px) {
  body.has-marketing .auth-marketing-home .form-panel {
    padding: max(2rem, env(safe-area-inset-top)) 1.25rem
      max(1.5rem, env(safe-area-inset-bottom));
    border-inline-start: 0;
  }
  body.has-marketing .auth-marketing-home .card h1 {
    font-size: 1.75rem;
  }
  body.has-marketing .auth-marketing-home .card input {
    font-size: 1rem;
  }
}
