/* login-desktop.css: split-screen sign-in for desktop (owner request 2026-11-05).
 * Left: Cutflux brand panel (muted reel of real edits, logo, one line, a beat-marker strip).
 * Right: the existing option-G form, larger and vertically centred.
 * Everything is scoped to html.cfd-on (set by login-desktop.js only on a >=1024px, mouse-driven,
 * non-native browser) AND a min-width media query, so phones, tablets and the native app keep
 * login-g.css exactly as it is. Loads after login-g.css; no ids, flows or auth logic change.
 */
.cfd-panel { display: none; }

@media (min-width: 1024px) {
  html.cfd-on .cf-shell {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    min-height: 100vh; min-height: 100dvh;
    background: var(--cf-bg, #0A0A0D) !important;
  }
  /* same hide rule login-g.css uses, restated at this specificity */
  html.cfd-on .cf-shell[style*="display:none"] { display: none !important; }

  /* ---------- brand panel ---------- */
  html.cfd-on .cfd-panel {
    display: flex; flex-direction: column; justify-content: space-between;
    grid-column: 1; grid-row: 1;
    position: relative; overflow: hidden; isolation: isolate;
    margin: 16px 0 16px 16px; min-height: calc(100dvh - 32px);
    border-radius: 20px; border: 1px solid var(--cf-border-subtle, #1F2128);
    background: var(--cf-panel, #0D0E13);
    padding: 32px 36px 32px;
  }
  .cfd-grid {
    position: absolute; inset: 0; z-index: -2; pointer-events: none;
    background-image:
      linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px),
      linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px);
    background-size: 44px 44px;
    -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 40%, #000 30%, transparent 80%);
            mask-image: radial-gradient(ellipse 80% 70% at 50% 40%, #000 30%, transparent 80%);
  }
  .cfd-glow {
    position: absolute; z-index: -2; pointer-events: none; left: 50%; top: 38%;
    width: 70%; aspect-ratio: 1; transform: translate(-50%, -50%); border-radius: 50%;
    background: radial-gradient(circle, rgba(59,130,246,.2) 0%, rgba(59,130,246,.06) 40%, transparent 70%);
  }

  .cfd-brand { display: inline-flex; align-items: center; gap: 10px; color: #fff !important; text-decoration: none !important; align-self: flex-start; position: relative; z-index: 2; }
  .cfd-brand img { width: 34px; height: 34px; border-radius: 10px; }
  .cfd-brand span { font-family: 'Instrument Serif', Georgia, serif; font-style: italic; font-size: 30px; line-height: 1; color: #fff; }

  /* three phone-shaped tiles of real Cutflux edits, fanned */
  .cfd-reel { position: relative; flex: 1; min-height: 260px; margin: 12px 0 8px; z-index: 0; }
  .cfd-tile {
    position: absolute; top: 50%; left: 50%;
    width: min(34%, 31vh); aspect-ratio: 9 / 16;
    border-radius: 18px; overflow: hidden;
    background: #111217; border: 1px solid rgba(255,255,255,.08);
    box-shadow: 0 30px 60px rgba(0,0,0,.55);
    transform: translate(-50%, -50%);
  }
  .cfd-tile video { width: 100%; height: 100%; object-fit: cover; display: block; opacity: 0; transition: opacity .6s ease; }
  .cfd-tile video.is-ready { opacity: 1; }
  .cfd-t1, .cfd-t3 { width: min(28%, 25.5vh); z-index: 0; filter: brightness(.62) saturate(.9); }
  .cfd-t1 { transform: translate(-50%, -50%) translateX(-78%) rotate(-7deg); }
  .cfd-t3 { transform: translate(-50%, -50%) translateX(78%) rotate(7deg); }
  .cfd-t2 { z-index: 1; animation: cfd-thump 1.88s cubic-bezier(.2,.9,.3,1) infinite; }
  /* tiny beat accent on the centre tile: 128 bpm, every other beat */
  @keyframes cfd-thump { 0%, 100% { transform: translate(-50%, -50%) scale(1); } 6% { transform: translate(-50%, -50%) scale(1.012); } }

  /* legibility shade over the bottom of the panel (not a control) */
  .cfd-shade { position: absolute; inset: auto 0 0 0; height: 46%; z-index: 1; pointer-events: none;
    background: linear-gradient(180deg, rgba(13,14,19,0) 0%, rgba(13,14,19,.82) 45%, #0D0E13 100%); }

  .cfd-copy { position: relative; z-index: 2; max-width: 460px; }
  .cfd-line { margin: 0 0 12px; font: 700 clamp(30px, 2.9vw, 44px)/1.04 Inter, system-ui, sans-serif; letter-spacing: -.03em; color: #fff; }
  .cfd-line span { color: rgba(255,255,255,.5); }
  .cfd-sub { margin: 0 0 22px; font-size: 15px; line-height: 1.55; color: var(--cf-text-2, rgba(255,255,255,.7)); max-width: 400px; }

  /* beat-marker strip: a playhead sweeps a bar of 16 beats and each marker flashes as it passes */
  .cfd-track { position: relative; height: 28px; border-radius: 8px; background: rgba(255,255,255,.04); border: 1px solid var(--cf-border-subtle, #1F2128);
    display: grid; grid-template-columns: repeat(16, 1fr); align-items: center; padding: 0 6px; overflow: hidden; }
  .cfd-track i { justify-self: center; width: 2px; height: 10px; border-radius: 2px; background: rgba(255,255,255,.22); animation: cfd-tick 3.76s linear infinite; }
  .cfd-track i:nth-child(4n+1) { height: 16px; background: rgba(255,255,255,.34); }
  .cfd-track b { position: absolute; top: 3px; bottom: 3px; left: 6px; width: 2px; border-radius: 2px; background: var(--cf-accent, #3B82F6);
    box-shadow: 0 0 10px rgba(59,130,246,.8); animation: cfd-sweep 3.76s linear infinite; }
  @keyframes cfd-sweep { from { left: 6px; } to { left: calc(100% - 8px); } }
  @keyframes cfd-tick { 0%, 7%, 100% { background: rgba(255,255,255,.22); transform: scaleY(1); } 1% { background: #3B82F6; transform: scaleY(1.6); } }
  .cfd-track i:nth-child(1)  { animation-delay: .118s; }  .cfd-track i:nth-child(2)  { animation-delay: .353s; }
  .cfd-track i:nth-child(3)  { animation-delay: .588s; }  .cfd-track i:nth-child(4)  { animation-delay: .823s; }
  .cfd-track i:nth-child(5)  { animation-delay: 1.058s; } .cfd-track i:nth-child(6)  { animation-delay: 1.293s; }
  .cfd-track i:nth-child(7)  { animation-delay: 1.528s; } .cfd-track i:nth-child(8)  { animation-delay: 1.763s; }
  .cfd-track i:nth-child(9)  { animation-delay: 1.998s; } .cfd-track i:nth-child(10) { animation-delay: 2.233s; }
  .cfd-track i:nth-child(11) { animation-delay: 2.468s; } .cfd-track i:nth-child(12) { animation-delay: 2.703s; }
  .cfd-track i:nth-child(13) { animation-delay: 2.938s; } .cfd-track i:nth-child(14) { animation-delay: 3.173s; }
  .cfd-track i:nth-child(15) { animation-delay: 3.408s; } .cfd-track i:nth-child(16) { animation-delay: 3.643s; }

  /* ---------- form side ---------- */
  html.cfd-on .cf-body {
    grid-column: 2; grid-row: 1;
    align-items: center !important; justify-content: center !important;
    padding: 48px clamp(32px, 6vw, 96px) !important;
  }
  html.cfd-on .cf-card { max-width: 400px !important; gap: 14px !important; }
  html.cfd-on .cfg-hero { display: none !important; }

  html.cfd-on #flowTitle, html.cfd-on .cf-title { font-size: 30px !important; letter-spacing: -.025em !important; margin: 0 0 8px !important; }
  html.cfd-on #flowSubtitle { display: block !important; text-align: center; font-size: 14px !important; line-height: 1.5; color: var(--cf-text-3, rgba(255,255,255,.5)) !important; margin: 0 0 10px !important; }

  html.cfd-on #googleSignInBtn, html.cfd-on .cfg-apple, html.cfd-on .cf-cta, html.cfd-on #submitBtn { height: 50px !important; }
  html.cfd-on #googleSignInBtn:hover { background: #ECEEF2 !important; border-color: #ECEEF2 !important; }
  html.cfd-on #submitBtn:hover { background: var(--cf-accent-hover, #5B9BFF) !important; }
  html.cfd-on .cf-or { margin: 6px 0 !important; }

  /* visible labels above the fields on desktop (phones keep placeholder-as-label) */
  html.cfd-on .cf-form { gap: 14px !important; }
  html.cfd-on .cf-field:not([hidden]) { display: flex !important; flex-direction: column; gap: 8px !important;
    font: 500 13px/1.2 Inter, system-ui, sans-serif !important; color: var(--cf-text-2, rgba(255,255,255,.7)) !important; letter-spacing: 0 !important; text-transform: none !important; }
  html.cfd-on .cf-field input, html.cfd-on .cf-pw-wrap input { height: 50px !important; background: var(--cf-input, #17181F) !important; font-size: 15px !important; }
  html.cfd-on .cf-field input:hover { border-color: var(--cf-border-strong, #3A3D4A) !important; }
  html.cfd-on .cf-field input:focus { border-color: #3B82F6 !important; box-shadow: 0 0 0 3px rgba(59,130,246,.18) !important; }
  html.cfd-on .cf-pw-eye { font-size: 13px !important; cursor: pointer; }
  html.cfd-on .cf-pw-eye:hover { color: #fff !important; }
  /* the "Forgot password?" row only belongs to sign-in (or when the page hints it after a failed attempt) */
  html.cfd-on .cf-forgot-row:not(.is-visible):not(:has(.is-hint)) { display: none !important; }
  html.cfd-on .cf-forgot-btn { cursor: pointer; }
  html.cfd-on .cf-forgot-btn:hover { color: #fff !important; }

  html.cfd-on .cf-switch-line, html.cfd-on #switchLine { margin: 10px 0 0 !important; font-size: 14px !important; }
  html.cfd-on .cf-switch-btn, html.cfd-on #inlineSwitchBtn { font-size: 14px !important; cursor: pointer; }
  html.cfd-on .cfg-fine { font-size: 12px; margin-top: 4px; }
  html.cfd-on .cfg-fine, html.cfd-on .cfg-fine a { color: rgba(255,255,255,.5); }
  html.cfd-on .cfg-fine a:hover { color: #fff; }

  /* Sign in <-> Create account: the changing text eases in instead of snapping */
  html.cfd-on .cf-card.cfd-swap #flowTitle,
  html.cfd-on .cf-card.cfd-swap #flowSubtitle,
  html.cfd-on .cf-card.cfd-swap #googleBtnLabel,
  html.cfd-on .cf-card.cfd-swap #submitBtn .cf-btn-label,
  html.cfd-on .cf-card.cfd-swap #switchLine,
  html.cfd-on .cf-card.cfd-swap .cf-forgot-row { animation: cfd-swap .32s cubic-bezier(.22,1,.36,1) both; }
  html.cfd-on .cf-card.cfd-swap #googleBtnLabel, html.cfd-on .cf-card.cfd-swap #submitBtn .cf-btn-label { display: inline-block; }
  @keyframes cfd-swap { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

  /* first paint of the split view */
  html.cfd-on .cfd-panel { animation: cfd-in .6s cubic-bezier(.22,1,.36,1) both; }
  html.cfd-on .cf-card { animation: cfd-in .6s .08s cubic-bezier(.22,1,.36,1) both; }
  @keyframes cfd-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
}

@media (min-width: 1024px) and (max-height: 780px) {
  html.cfd-on .cfd-panel { padding: 24px 28px; }
  .cfd-line { font-size: 30px; }
  .cfd-sub { margin-bottom: 16px; font-size: 14px; }
  html.cfd-on #flowTitle { font-size: 26px !important; }
}

@media (min-width: 1024px) and (prefers-reduced-motion: reduce) {
  .cfd-t2, .cfd-track i, .cfd-track b, html.cfd-on .cfd-panel, html.cfd-on .cf-card,
  html.cfd-on .cf-card.cfd-swap * { animation: none !important; }
  .cfd-track b { display: none; }
  .cfd-tile video { transition: none; }
}
