/* ─────────────────────────────────────────────────────────────
   HypeUGC login — styles
   ───────────────────────────────────────────────────────────── */

:root {
  --bg: #0a0807;
  --bg-elev: #14110e;
  --bg-glass: rgba(22, 18, 14, 0.7);
  --border: rgba(255, 240, 220, 0.08);
  --border-strong: rgba(255, 240, 220, 0.16);
  --fg: #f8f3ea;
  --fg-muted: #a89e8d;
  --fg-dim: #6b6358;
  --accent: #ff6b1a;
  --accent-soft: #ff8a3d;
  --accent-glow: rgba(255, 107, 26, 0.35);
  --accent-2: #ef2424;
  --success: #4ade80;
  --radius: 14px;
  --radius-lg: 22px;
  --field-h: 52px;

  --font-display: "Bricolage Grotesque", "Geist", system-ui, sans-serif;
  --font-body: "Geist", "Bricolage Grotesque", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;
}

/* Light theme override */
[data-theme="light"] {
  --bg: #faf6ef;
  --bg-elev: #fffaf3;
  --bg-glass: rgba(255, 252, 246, 0.85);
  --border: rgba(20, 14, 8, 0.08);
  --border-strong: rgba(20, 14, 8, 0.18);
  --fg: #1a1410;
  --fg-muted: #5a4f43;
  --fg-dim: #8c8275;
  --accent-glow: rgba(255, 107, 26, 0.22);
}

/* Accent overrides */
[data-accent="crimson"] { --accent: #ef2424; --accent-soft: #ff4444; --accent-glow: rgba(239, 36, 36, 0.32); }
[data-accent="electric"] { --accent: #7c5cff; --accent-soft: #9d82ff; --accent-glow: rgba(124, 92, 255, 0.32); }
[data-accent="cyan"] { --accent: #00c6c6; --accent-soft: #2ddede; --accent-glow: rgba(0, 198, 198, 0.32); }

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

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--fg);
  min-height: 100vh;
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

a { color: inherit; }

/* ─────────────────────────────────────────────────────────────
   PAGE LAYOUTS — split (default), centered, fullbleed
   ───────────────────────────────────────────────────────────── */

.page {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  min-height: 100vh;
}

[data-layout="centered"] .page,
[data-layout="fullbleed"] .page {
  grid-template-columns: 1fr;
  place-items: center;
  position: relative;
}

/* Showcase pane */
.showcase {
  position: relative;
  overflow: hidden;
  background: radial-gradient(120% 80% at 10% 10%, #1a120a 0%, var(--bg) 55%, #050403 100%);
  border-right: 1px solid var(--border);
}

[data-theme="light"] .showcase {
  background: radial-gradient(120% 80% at 10% 10%, #fff1de 0%, #fbf2e4 55%, #f4ead9 100%);
}

[data-layout="centered"] .showcase,
[data-layout="fullbleed"] .showcase {
  position: absolute;
  inset: 0;
  border-right: 0;
}

[data-layout="centered"] .showcase::after {
  content: "";
  position: absolute; inset: 0;
  background: radial-gradient(60% 50% at 50% 50%, rgba(10,8,7,0.4), rgba(10,8,7,0.92) 100%);
}
[data-theme="light"][data-layout="centered"] .showcase::after {
  background: radial-gradient(60% 50% at 50% 50%, rgba(250,246,239,0.5), rgba(250,246,239,0.95) 100%);
}

/* Form pane */
.form-pane {
  position: relative;
  padding: 40px clamp(28px, 5vw, 72px);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  z-index: 2;
}

[data-layout="centered"] .form-pane {
  min-height: auto;
  width: min(460px, calc(100vw - 32px));
  padding: 36px;
  background: var(--bg-glass);
  backdrop-filter: blur(24px) saturate(140%);
  -webkit-backdrop-filter: blur(24px) saturate(140%);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  box-shadow:
    0 30px 80px -20px rgba(0,0,0,0.6),
    0 0 0 1px var(--border) inset,
    0 0 100px -20px var(--accent-glow);
  margin: auto;
}

[data-layout="fullbleed"] .form-pane {
  min-height: auto;
  width: min(420px, calc(100vw - 32px));
  margin: auto auto 6vh auto;
  padding: 32px;
  background: var(--bg-glass);
  backdrop-filter: blur(24px);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
}

/* ─────────────────────────────────────────────────────────────
   FORM HEADER (logo + powered-by)
   ───────────────────────────────────────────────────────────── */

.brand-block {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 44px;
}
[data-layout="centered"] .brand-block,
[data-layout="fullbleed"] .brand-block {
  margin-bottom: 28px;
  align-items: flex-start;
}

.logo {
  height: 38px;
  width: auto;
  display: block;
}
.logo-dark { display: none; }
.logo-light { display: block; }
[data-theme="light"] .logo-light { display: none; }
[data-theme="light"] .logo-dark { display: block; }

.powered-by {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px 6px 8px;
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--fg-muted);
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 999px;
  width: fit-content;
  font-family: var(--font-mono);
}
.powered-by-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent-glow);
  animation: pulse 2.4s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 1; }
}
.powered-by img {
  height: 13px;
  vertical-align: middle;
  margin-left: 2px;
  margin-top: -2px;
}

/* ─────────────────────────────────────────────────────────────
   FORM
   ───────────────────────────────────────────────────────────── */

.form-content {
  display: flex;
  flex-direction: column;
  flex: 1;
  max-width: 380px;
  width: 100%;
}
[data-layout="centered"] .form-content,
[data-layout="fullbleed"] .form-content {
  max-width: none;
}

.headline {
  font-family: var(--font-display);
  font-size: clamp(28px, 3.4vw, 44px);
  line-height: 1.05;
  letter-spacing: -0.025em;
  font-weight: 700;
  margin: 0 0 14px;
  text-wrap: balance;
}
[data-layout="centered"] .headline,
[data-layout="fullbleed"] .headline {
  font-size: clamp(24px, 2.6vw, 30px);
}

.headline .accent {
  color: var(--accent);
  font-style: italic;
}
.showcase-title .accent {
  color: var(--accent);
  font-style: italic;
}

.subhead {
  color: var(--fg-muted);
  font-size: 15.5px;
  margin: 0 0 32px;
  max-width: 38ch;
  text-wrap: pretty;
}

/* SSO buttons */
.sso-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 18px;
}
.btn-sso {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: var(--field-h);
  padding: 0 14px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--fg);
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: border-color 0.18s ease, transform 0.18s ease, background 0.18s ease;
}
.btn-sso:hover {
  border-color: var(--border-strong);
  background: color-mix(in oklab, var(--bg-elev) 92%, var(--fg) 8%);
}
.btn-sso:active { transform: translateY(1px); }
.btn-sso svg { width: 18px; height: 18px; flex-shrink: 0; }

.divider {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 18px 0;
  color: var(--fg-dim);
  font-size: 11px;
  font-family: var(--font-mono);
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.divider::before, .divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* Inputs */
.field {
  position: relative;
  margin-bottom: 12px;
}
.field label {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 14px;
  color: var(--fg-dim);
  pointer-events: none;
  transition: all 0.16s ease;
  background: transparent;
  padding: 0 4px;
}
.field input {
  width: 100%;
  height: var(--field-h);
  padding: 0 16px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--fg);
  font: inherit;
  font-size: 15px;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
  outline: none;
}
.field input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-glow);
}
.field input:focus + label,
.field input:not(:placeholder-shown) + label {
  top: 0;
  transform: translateY(-50%) scale(0.85);
  background: var(--bg-elev);
  color: var(--fg-muted);
}
.field-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  margin: 4px 2px 22px;
}
.checkbox {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--fg-muted);
  cursor: pointer;
  user-select: none;
}
.checkbox input {
  appearance: none;
  width: 16px; height: 16px;
  border: 1px solid var(--border-strong);
  border-radius: 4px;
  background: var(--bg-elev);
  cursor: pointer;
  position: relative;
  transition: all 0.16s ease;
}
.checkbox input:checked {
  background: var(--accent);
  border-color: var(--accent);
}
.checkbox input:checked::after {
  content: "";
  position: absolute;
  left: 4px; top: 1px;
  width: 5px; height: 9px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
.link {
  color: var(--fg-muted);
  text-decoration: none;
  border-bottom: 1px dotted var(--border-strong);
  padding-bottom: 1px;
  transition: color 0.18s ease;
}
.link:hover { color: var(--accent); border-color: var(--accent); }

/* Primary CTA */
.btn-primary {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: var(--field-h);
  padding: 0 20px;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-soft) 100%);
  color: #fff;
  border: 0;
  border-radius: var(--radius);
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.005em;
  cursor: pointer;
  overflow: hidden;
  text-decoration: none;
  box-shadow:
    0 10px 30px -10px var(--accent-glow),
    0 0 0 1px rgba(255,255,255,0.08) inset;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow:
    0 14px 40px -10px var(--accent-glow),
    0 0 0 1px rgba(255,255,255,0.12) inset;
}
.btn-primary:active { transform: translateY(0); }
.btn-primary::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent 30%, rgba(255,255,255,0.25) 50%, transparent 70%);
  transform: translateX(-100%);
  transition: transform 0.7s ease;
}
.btn-primary:hover::before { transform: translateX(100%); }
.btn-primary .arrow { transition: transform 0.2s ease; display: inline-block; }
.btn-primary:hover .arrow { transform: translateX(3px); }

/* Stacked CTA variant: "Sign in to HypeUGC" + "Powered by HypeVideo" sub */
.btn-primary-cta {
  padding: 18px 22px;
  min-height: 76px;
}
.btn-primary-stack {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  position: relative;
  z-index: 1;
}
.btn-primary-main {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.btn-primary-sub {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  opacity: 0.85;
  font-family: var(--font-mono);
}
.btn-primary-sub img {
  height: 14px;
  width: auto;
  display: block;
  /* In dark mode show white logo; in light, show dark */
}
.btn-primary-sub .logo-light { display: inline-block; }
.btn-primary-sub .logo-dark { display: none; }
[data-theme="light"] .btn-primary-sub .logo-light { display: none; }
[data-theme="light"] .btn-primary-sub .logo-dark { display: inline-block; }

.signup-cue {
  margin-top: 22px;
  font-size: 14px;
  color: var(--fg-muted);
  text-align: center;
}
.signup-cue a {
  color: var(--fg);
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1.5px solid var(--accent);
}
.signup-cue a:hover { color: var(--accent); }

/* Footer */
.form-footer {
  margin-top: auto;
  padding-top: 36px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 11.5px;
  color: var(--fg-dim);
  font-family: var(--font-mono);
  letter-spacing: 0.04em;
}
.form-footer a {
  color: var(--fg-muted);
  text-decoration: none;
  margin-right: 14px;
}
.form-footer a:hover { color: var(--accent); }
.live-stat {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.live-stat .dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 8px rgba(74, 222, 128, 0.6);
  animation: pulse 1.6s ease-in-out infinite;
}

/* ─────────────────────────────────────────────────────────────
   SHOWCASE (left pane)
   ───────────────────────────────────────────────────────────── */

.showcase-inner {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 44px;
  z-index: 4;
  pointer-events: none;
}
.showcase-inner > * { pointer-events: auto; }

.showcase-header,
.showcase-footer {
  position: relative;
  z-index: 4;
  max-width: 320px;
}
.showcase-header {
  text-shadow: 0 2px 24px rgba(10, 8, 7, 0.8);
}
[data-theme="light"] .showcase-header {
  text-shadow: 0 2px 24px rgba(250, 246, 239, 0.8);
}

.showcase-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px 7px 10px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  background: var(--bg-glass);
  backdrop-filter: blur(8px);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg);
  margin-bottom: 18px;
}
.showcase-eyebrow .flame-dot {
  width: 8px; height: 8px;
  background: var(--accent);
  border-radius: 50%;
  box-shadow: 0 0 12px var(--accent);
}
.showcase-title {
  font-family: var(--font-display);
  font-size: clamp(28px, 3vw, 40px);
  line-height: 1.05;
  letter-spacing: -0.025em;
  margin: 0 0 10px;
  font-weight: 600;
  text-wrap: balance;
}
.showcase-title em {
  font-style: italic;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.showcase-sub {
  font-size: 15px;
  color: var(--fg-muted);
  max-width: 36ch;
  margin: 0;
}

.showcase-footer {
  display: flex;
  gap: 28px;
  flex-wrap: wrap;
}
.stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.stat-num {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--fg);
}
.stat-num em {
  font-style: italic;
  color: var(--accent);
}
.stat-label {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg-dim);
}

/* Clip marquee */
.clip-stage {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  padding: 0 32px;
  z-index: 2;
  pointer-events: none;
}
.clip-stage::before,
.clip-stage::after {
  content: "";
  position: absolute;
  left: 0; right: 0;
  height: 140px;
  z-index: 3;
  pointer-events: none;
}
.clip-stage::before { top: 0; background: linear-gradient(to bottom, var(--bg) 0%, transparent 100%); }
.clip-stage::after  { bottom: 0; background: linear-gradient(to top, var(--bg) 0%, transparent 100%); }

/* Left-side fade for legibility of the showcase-header text */
.showcase-fade {
  position: absolute;
  top: 0; bottom: 0; left: 0;
  width: 65%;
  z-index: 3;
  background: linear-gradient(to right,
    var(--bg) 0%,
    var(--bg) 22%,
    rgba(10,8,7,0.85) 50%,
    rgba(10,8,7,0.35) 78%,
    transparent 100%);
  pointer-events: none;
}
[data-theme="light"] .showcase-fade {
  background: linear-gradient(to right,
    var(--bg) 0%,
    var(--bg) 22%,
    rgba(250,246,239,0.85) 50%,
    rgba(250,246,239,0.35) 78%,
    transparent 100%);
}

.clip-col {
  display: flex;
  flex-direction: column;
  gap: 22px;
  overflow: hidden;
}
.clip-track {
  display: flex;
  flex-direction: column;
  gap: 22px;
  animation: scrollUp 38s linear infinite;
}
.clip-col:nth-child(2) .clip-track { animation: scrollDown 44s linear infinite; }
.clip-col:nth-child(3) .clip-track { animation: scrollUp 50s linear infinite; }
.clip-col:nth-child(1) { padding-top: 60px; }
.clip-col:nth-child(2) { padding-top: 0; }
.clip-col:nth-child(3) { padding-top: 100px; }

@keyframes scrollUp {
  0%   { transform: translateY(0); }
  100% { transform: translateY(-50%); }
}
@keyframes scrollDown {
  0%   { transform: translateY(-50%); }
  100% { transform: translateY(0); }
}

/* Individual clip card */
.clip {
  aspect-ratio: 9 / 16;
  border-radius: 18px;
  position: relative;
  overflow: hidden;
  background: #222;
  border: 1px solid var(--border-strong);
  box-shadow:
    0 24px 50px -14px rgba(0,0,0,0.55),
    0 0 0 1px rgba(255,255,255,0.04) inset;
  flex-shrink: 0;
}
.clip-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

/* Floating flame ember */
.ember {
  position: absolute;
  width: 4px; height: 4px;
  background: var(--accent);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--accent), 0 0 16px var(--accent-soft);
  animation: rise linear infinite;
  z-index: 3;
  pointer-events: none;
  opacity: 0;
}
@keyframes rise {
  0%   { transform: translateY(0) translateX(0); opacity: 0; }
  10%  { opacity: 1; }
  90%  { opacity: 0.8; }
  100% { transform: translateY(-110vh) translateX(20px); opacity: 0; }
}

/* ─────────────────────────────────────────────────────────────
   AMBIENT BACKGROUND VARIANTS
   ───────────────────────────────────────────────────────────── */

.ambient {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}
.ambient.aurora::after {
  content: "";
  position: absolute;
  inset: -20%;
  background:
    radial-gradient(40% 30% at 30% 30%, var(--accent-glow), transparent 60%),
    radial-gradient(45% 35% at 70% 70%, rgba(239, 36, 36, 0.18), transparent 60%),
    radial-gradient(35% 25% at 50% 50%, rgba(124, 92, 255, 0.12), transparent 60%);
  filter: blur(20px);
  animation: drift 24s ease-in-out infinite alternate;
}
@keyframes drift {
  0%   { transform: translate(0, 0) rotate(0deg) scale(1); }
  100% { transform: translate(40px, -30px) rotate(8deg) scale(1.15); }
}

/* Hide showcase clips when bg variant is non-clips */
[data-bg="aurora"] .clip-stage,
[data-bg="static"] .clip-stage { display: none; }
[data-bg="aurora"] .ambient { display: block; }
[data-bg="static"] .ambient { display: none; }
[data-bg="clips"] .ambient { display: none; }

/* Centered/fullbleed mode hides showcase content overlays */
[data-layout="centered"] .showcase-inner > .showcase-header,
[data-layout="centered"] .showcase-inner > .showcase-footer,
[data-layout="fullbleed"] .showcase-inner > .showcase-header,
[data-layout="fullbleed"] .showcase-inner > .showcase-footer {
  display: none;
}

/* ─────────────────────────────────────────────────────────────
   RESPONSIVE
   ───────────────────────────────────────────────────────────── */

@media (max-width: 860px) {
  .page { grid-template-columns: 1fr; }
  .showcase {
    min-height: 240px;
    max-height: 280px;
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }
  .showcase-inner { padding: 28px; }
  .showcase-footer { display: none; }
  .clip-stage { padding: 0 24px; gap: 14px; }
  .form-pane { min-height: auto; padding: 32px 24px 40px; }
  .headline { font-size: 32px; }
  .form-footer { font-size: 10.5px; flex-direction: column; align-items: flex-start; }
}

@media (max-width: 540px) {
  .sso-grid { grid-template-columns: 1fr; }
  .clip-stage { grid-template-columns: repeat(2, 1fr); }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .clip-track, .ember, .ambient::after, .powered-by-dot, .live-stat .dot {
    animation: none !important;
  }
}
