/* Short Studio design tokens — warm near-black + lime accent (Phase 9.5 redesign).
   Shared by index.html, auth.html, app.html, tos.html, privacy.html. */

:root {
  color-scheme: dark;
  --accent: #C6F32E;
  --accent-on: #141903;

  --bg-base: #0D0C0A;
  --bg-panel: #0F0E0B;
  --bg-inset: #12100C;
  --bg-deep: #0B0A08;

  --border-strong: #2B251B;
  --border-default: #221E17;
  --border-hair: #17140E;
  --border-hair-2: #1A1712;
  --border-hover-btn: #38311F;

  --text-primary: #F5EFE3;
  --text-body: #EDE8DF;
  --text-soft: #C4BBA9;
  --text-muted: #A79D8C;
  --text-faint: #8C8474;
  --text-ghost: #756B58;
  --label-mono: #B0A797;

  --warn: #C9A96A;
  --warn-bg: rgba(201, 169, 106, 0.06);
  --warn-border: #4A3A20;

  /* Failures/errors — red, distinct from the amber warn (retention countdowns etc.). */
  --error: #E8837A;
  --error-bg: rgba(232, 131, 122, 0.07);
  --error-border: #5A2F2A;

  --success: #7FD98A;
  --success-bg: rgba(95, 208, 104, 0.08);
  --success-border: #2C4A2E;
}

body { background: var(--bg-base); font-family: 'General Sans', ui-sans-serif, system-ui, sans-serif; }
.font-mono { font-family: 'JetBrains Mono', ui-monospace, monospace; }

/* UI body font — self-hosted General Sans (Fontshare / ITF Free Font License; see fonts/GeneralSans-NOTICE.txt). */
@font-face { font-family: 'General Sans'; src: url('/fonts/GeneralSans-Regular.woff2') format('woff2'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'General Sans'; src: url('/fonts/GeneralSans-Medium.woff2') format('woff2'); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: 'General Sans'; src: url('/fonts/GeneralSans-Semibold.woff2') format('woff2'); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: 'General Sans'; src: url('/fonts/GeneralSans-Bold.woff2') format('woff2'); font-weight: 700; font-style: normal; font-display: swap; }

/* Landing headings — self-hosted Zodiak (Fontshare / ITF Free Font License; see fonts/Zodiak-NOTICE.txt). Only index.html references the Zodiak family, so other pages never fetch it. */
@font-face { font-family: 'Zodiak'; src: url('/fonts/Zodiak-Regular.woff2') format('woff2'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'Zodiak'; src: url('/fonts/Zodiak-Bold.woff2') format('woff2'); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: 'Zodiak'; src: url('/fonts/Zodiak-Extrabold.woff2') format('woff2'); font-weight: 800; font-style: normal; font-display: swap; }

/* Subtitle fonts (create-form caption preview) — same files the pipeline burns
   (pipeline/assets/fonts/); keep families in sync with SUBTITLE_FONTS in
   api/src/validation.ts. */
@font-face {
  font-family: 'Anton';
  src: url('/fonts/Anton-Regular.ttf') format('truetype');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'Bebas Neue';
  src: url('/fonts/BebasNeue-Regular.ttf') format('truetype');
  font-weight: 400;
  font-display: swap;
}
[x-cloak] { display: none !important; }

.mono-label {
  font: 500 11px 'JetBrains Mono', monospace;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--label-mono);
}

/* Create-form section headers (Voice, Visuals & captions, …) — louder than a plain
   field label so the form's sections read clearly. Accent bar + brighter, bolder text. */
.section-label {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font: 600 12.5px 'JetBrains Mono', monospace;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--text-body);
}
.section-label::before {
  content: "";
  width: 3px;
  height: 15px;
  border-radius: 2px;
  background: var(--accent);
  box-shadow: 0 0 8px color-mix(in srgb, var(--accent) 45%, transparent);
}

/* Create-form section cards — the near-black panels blend into the page, so lift each
   with a stronger edge + shadow and band the header so sections read as separate blocks. */
.form-section {
  background: var(--bg-panel);
  border: 1px solid var(--border-strong);
  box-shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 12px 26px -20px rgba(0, 0, 0, .9);
}
.form-section-head {
  border-bottom: 1px solid var(--border-strong);
  background: color-mix(in srgb, var(--accent) 4%, transparent);
  border-radius: 10px 10px 0 0;
}

/* Cookie notice — public pages (landing + auth) only; dismiss flag shared via localStorage. */
.cookie-notice {
  position: fixed;
  z-index: 60;
  left: 16px;
  right: 16px;
  bottom: 16px;
  max-width: 380px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 13px 14px;
  background: var(--bg-panel);
  border: 1px solid color-mix(in srgb, var(--accent) 18%, var(--border-strong));
  border-radius: 12px;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .35), 0 20px 44px -14px rgba(0, 0, 0, .85);
}
.cookie-notice p { margin: 0; font-size: 12.5px; line-height: 1.55; color: var(--text-muted); }
.cookie-notice a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
.cookie-notice a:hover { color: color-mix(in srgb, var(--accent) 80%, white); }
.cookie-notice button { flex-shrink: 0; margin-top: 1px; color: var(--text-faint); transition: color .15s; }
.cookie-notice button svg { display: block; width: 15px; height: 15px; }
.cookie-notice button:hover { color: var(--text-primary); }

/* Soft top-of-section accent wash — hero, final CTA, auth backdrop. */
.accent-wash {
  background: radial-gradient(65% 50% at 50% 0%, color-mix(in srgb, var(--accent) 7%, transparent) 0%, transparent 70%);
}

.card {
  background: var(--bg-panel);
  border: 1px solid var(--border-default);
  border-radius: 12px;
}
.card-popular {
  background: var(--bg-inset);
  border: 1px solid color-mix(in srgb, var(--accent) 32%, var(--bg-base));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 6%, transparent);
}

.field {
  width: 100%;
  background: var(--bg-inset);
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  color: var(--text-body);
  padding: 0.55rem 0.8rem;
  font-size: 0.875rem;
  transition: border-color .15s, box-shadow .15s;
}
.field::placeholder { color: var(--text-ghost); }
.field:focus { outline: none; border-color: color-mix(in srgb, var(--accent) 55%, transparent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent); }

.btn-primary {
  background: var(--accent);
  color: var(--accent-on);
  border-radius: 10px;
  font-weight: 700;
  box-shadow: 0 10px 30px -8px color-mix(in srgb, var(--accent) 50%, transparent);
  transition: filter .15s, opacity .15s;
}
.btn-primary:hover:not(:disabled) { filter: brightness(1.06); }
.btn-ghost {
  background: transparent;
  border: 1px solid var(--border-hover-btn);
  color: var(--text-body);
  border-radius: 10px;
  font-weight: 600;
  transition: background .15s;
}
.btn-ghost:hover:not(:disabled) { background: color-mix(in srgb, var(--text-body) 6%, transparent); }

input[type="range"] { -webkit-appearance: none; appearance: none; width: 100%; background: transparent; height: 18px; cursor: pointer; }
input[type="range"]::-webkit-slider-runnable-track { height: 3px; border-radius: 99px; background: var(--border-default); }
input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; height: 11px; width: 11px; margin-top: -4px; border-radius: 50%; background: var(--text-primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 20%, transparent); }
input[type="range"]::-moz-range-track { height: 3px; border-radius: 99px; background: var(--border-default); }
input[type="range"]::-moz-range-thumb { height: 11px; width: 11px; border: none; border-radius: 50%; background: var(--text-primary); }

.dd-scroll::-webkit-scrollbar { width: 8px; }
.dd-scroll::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 99px; }

.nav-blur { background: rgba(13, 12, 10, 0.82); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.phone { box-shadow: 0 40px 70px -30px rgba(0, 0, 0, 0.85); }

/* History grid tile hover reveal (info scrim + download chip). */
.vc { transition: transform .18s ease, border-color .18s ease; }
.vc:hover { transform: translateY(-4px); }
.vc .vi, .vc .vd { opacity: 0; transition: opacity .18s ease, transform .18s ease; }
.vc .vi { transform: translateY(5px); }
.vc:hover .vi, .vc:hover .vd { opacity: 1; transform: none; }
/* Tile action chips (download/upload): visible hover + press feedback in the
   theme accent. !important beats the chips' inline base styles. */
.va { transition: border-color .15s ease, color .15s ease, background .15s ease, opacity .18s ease, transform .1s ease; }
.va:hover:not(:disabled) { border-color: var(--accent) !important; color: var(--accent) !important; background: rgba(28,25,20,.92) !important; }
.va:active:not(:disabled) { transform: scale(.88); }
.quiet-btn { transition: color .15s ease, transform .1s ease; }
.quiet-btn:hover { color: var(--text-primary) !important; }
.quiet-btn:active { transform: scale(.94); }

/* Account menu (profile avatar + dropdown) — app.html top-bar and index.html nav. */
.avatar-btn {
  width: 36px; height: 36px; border-radius: 10px;
  border: none; background: transparent; color: var(--accent);
  display: flex; align-items: center; justify-content: center;
  transition: background .15s ease;
}
.avatar-btn:hover, .avatar-btn.is-open { background: color-mix(in srgb, var(--text-body) 8%, transparent); }
.acct-menu {
  background: var(--bg-panel); border: 1px solid var(--border-default); border-radius: 13px;
  box-shadow: 0 18px 40px -14px rgba(0, 0, 0, .75), 0 0 0 1px rgba(0, 0, 0, .2);
}
.acct-item {
  display: flex; align-items: center; gap: 11px; width: 100%;
  padding: 9px 11px; border-radius: 9px;
  font-size: 13.5px; font-weight: 500; color: var(--text-soft);
  transition: background .13s ease, color .13s ease;
}
.acct-item:hover { background: color-mix(in srgb, var(--text-body) 6%, transparent); color: var(--text-primary); }
.acct-item svg { width: 16px; height: 16px; color: var(--text-faint); transition: color .13s ease; }
.acct-item:hover svg { color: var(--text-soft); }
.acct-item.danger:hover { background: var(--error-bg); color: var(--error); }
.acct-item.danger:hover svg { color: var(--error); }

.legal h1 { font-size: 1.875rem; font-weight: 700; color: var(--text-primary); margin-bottom: .25rem; letter-spacing: -0.02em; }
.legal .meta { color: var(--text-ghost); font-size: .875rem; margin-bottom: 2.5rem; }
.legal h2 { font-size: 1.125rem; font-weight: 700; color: var(--text-primary); margin-top: 2.25rem; margin-bottom: .5rem; }
.legal p { line-height: 1.75; margin-bottom: 1rem; color: var(--text-soft); }
.legal ul { list-style: disc; padding-left: 1.5rem; margin-bottom: 1rem; }
.legal li { line-height: 1.75; margin-bottom: .375rem; color: var(--text-soft); }
.legal a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
.legal a:hover { color: color-mix(in srgb, var(--accent) 80%, white); }
.legal strong { color: var(--text-primary); font-weight: 600; }
.legal hr { border: none; border-top: 1px solid var(--border-default); margin: 2.5rem 0; }
