/* Xideo — brand tokens and every page's styles. See docs/brand.md for the reasoning.
   One dark theme, on purpose: the pictures are the product and the page should recede. */

@font-face { font-family: "Inter"; src: url("fonts/Inter-Regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Inter"; src: url("fonts/Inter-Medium.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Inter"; src: url("fonts/Inter-SemiBold.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Inter"; src: url("fonts/Inter-Bold.woff2") format("woff2"); font-weight: 700; font-display: swap; }

:root {
  color-scheme: dark;
  /* Screening room: near-black with a little blue, so skin tones and warm light look right on it */
  --ink: #0b0b0f;        /* the page */
  --surface: #15151c;    /* cards */
  --raised: #1e1e27;     /* controls, hover */
  --line: #2b2b37;       /* dividers and card edges: meant to be quiet */
  --edge: #5f5f74;       /* the edge of something you type in or tick: 3:1 against the page */
  --screen: #f3f0e8;     /* text: a warm white, like light off a screen */
  --dim: #a9a6b2;        /* secondary text */
  /* Marigold: the one accent. Projector light, golden hour; nothing else on the page is yellow */
  --accent: #ffb224;
  --accent-hi: #ffc552;
  --on-accent: #1a1200;
  --good: #4cc38a;
  --bad: #ff7a6b;
  --text: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --display: var(--text);   /* one family for now; a display face can be swapped in here alone */
  --r-card: 16px; --r-ctl: 10px;
  /* layout colours, used only on the internal review page */
  --window: #ffd60a; --stack: #5ac8fa; --fit: #5ed67d;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }  /* so a hidden button or card stays hidden whatever its own display rule */
html { background: var(--ink); }
body { margin: 0; font: 15px/1.55 var(--text); color: var(--screen); background: var(--ink); -webkit-font-smoothing: antialiased; min-height: 100vh; display: flex; flex-direction: column; }
a { color: var(--screen); text-underline-offset: 3px; }
a:hover { color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
h1, h2, h3 { font-family: var(--display); letter-spacing: -0.02em; line-height: 1.15; margin: 0; }
h1 { font-size: 28px; font-weight: 700; } h2 { font-size: 19px; font-weight: 600; margin: 30px 0 10px; }
.sub { color: var(--dim); margin: 6px 0 22px; max-width: 68ch; }
.hint, label small { color: var(--dim); font-size: 13px; font-weight: 400; }
.num { font-variant-numeric: tabular-nums; }

/* -- frame ------------------------------------------------------------------------------------ */
header.site { display: flex; align-items: center; gap: 28px; padding: 14px 28px; border-bottom: 1px solid var(--line); }
.brand { display: inline-flex; align-items: center; gap: 10px; font: 700 19px/1 var(--display); letter-spacing: -0.03em; color: var(--screen); text-decoration: none; }
.brand:hover { color: var(--screen); } .brand svg { display: block; }
header.site nav { display: flex; gap: 22px; flex: 1; }
header.site nav a { text-decoration: none; color: var(--dim); font-weight: 500; }
header.site nav a:hover, header.site nav a[aria-current=page] { color: var(--screen); }
header.site .who { color: var(--dim); font-size: 14px; display: flex; gap: 14px; align-items: center; }
.credits-chip { text-decoration: none; color: var(--screen); border: 1px solid var(--line); border-radius: 999px; padding: 4px 12px; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.credits-chip:hover { border-color: var(--accent); color: var(--screen); }
.balance { font: 700 44px/1 var(--display); letter-spacing: -0.03em; margin: 0 0 14px; } .balance span { font-size: 18px; font-weight: 500; color: var(--dim); letter-spacing: 0; }
main { width: 100%; max-width: 1160px; margin: 0 auto; padding: 34px 28px 80px; flex: 1; }
footer.site { border-top: 1px solid var(--line); padding: 20px 28px; color: var(--dim); font-size: 13px; display: flex; gap: 18px; flex-wrap: wrap; justify-content: space-between; }

/* -- controls --------------------------------------------------------------------------------- */
button, .button { font: 500 15px/1.2 var(--text); padding: 10px 16px; border-radius: var(--r-ctl); border: 1px solid var(--line); background: var(--raised); color: var(--screen); cursor: pointer; text-decoration: none; display: inline-block; }
button:hover, .button:hover { border-color: #3d3d4c; color: var(--screen); }
button.primary, .button.primary { background: var(--accent); color: var(--on-accent); border-color: var(--accent); font-weight: 600; }
button.primary:hover, .button.primary:hover { background: var(--accent-hi); border-color: var(--accent-hi); color: var(--on-accent); }
.button.big, button.big { padding: 14px 22px; font-size: 16px; }
button.danger { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 55%, transparent); background: transparent; }
button.quiet { background: transparent; border-color: transparent; color: var(--dim); padding-left: 0; } button.quiet:hover { color: var(--bad); border-color: transparent; }
button[disabled] { opacity: .45; cursor: not-allowed; }
button.link { border: 0; background: none; color: var(--screen); padding: 0; text-decoration: underline; text-underline-offset: 3px; font-weight: 400; }
label { display: block; font-weight: 600; margin: 16px 0 6px; }
input[type=text], input[type=email], input[type=number], select { font: inherit; padding: 10px 12px; border-radius: var(--r-ctl); border: 1px solid var(--edge); background: var(--ink); color: var(--screen); width: 100%; max-width: 440px; }
input::placeholder { color: #8a8794; }
input[type=file] { color: var(--dim); max-width: 100%; }
input[type=file]::file-selector-button { font: 500 14px/1.2 var(--text); padding: 9px 14px; margin-right: 12px; border-radius: var(--r-ctl); border: 1px solid var(--line); background: var(--raised); color: var(--screen); cursor: pointer; }
input[type=checkbox], input[type=radio] { accent-color: var(--accent); }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; max-width: 62ch; } .check input { margin-top: 4px; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.errors { color: var(--bad); margin: 12px 0 0; padding-left: 18px; }

/* -- surfaces --------------------------------------------------------------------------------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); padding: 20px 22px; margin-bottom: 16px; }
.card.alert { border-color: color-mix(in srgb, var(--bad) 45%, var(--line)); }
.card.waiting { border-color: color-mix(in srgb, var(--accent) 35%, var(--line)); } .card.waiting .eyebrow { color: var(--accent); }
.card.ready { border-color: color-mix(in srgb, var(--accent) 55%, var(--line)); }
.pill { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 600; border: 1px solid var(--line); color: var(--dim); white-space: nowrap; }
.pill.good { color: var(--good); border-color: color-mix(in srgb, var(--good) 45%, transparent); }
.pill.warn { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 45%, transparent); }
.pill.bad { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 45%, transparent); }
.bar { height: 6px; background: var(--line); border-radius: 3px; overflow: hidden; margin: 12px 0 8px; } .bar div { height: 100%; width: 0; background: var(--accent); transition: width .4s; }
table { border-collapse: collapse; width: 100%; } th, td { text-align: left; padding: 10px 10px; border-bottom: 1px solid var(--line); font-size: 14px; vertical-align: top; } th { color: var(--dim); font-weight: 500; }
tr:last-child td { border-bottom: 0; }
.toasts { position: fixed; right: 18px; bottom: 18px; display: flex; flex-direction: column; gap: 8px; z-index: 20; }
.toast { background: var(--screen); color: var(--ink); padding: 11px 15px; border-radius: 10px; max-width: 360px; box-shadow: 0 8px 30px #0009; font-weight: 500; } .toast.bad { background: var(--bad); color: #2a0703; }
dialog { border: 1px solid var(--line); border-radius: var(--r-card); padding: 22px; max-width: 440px; background: var(--surface); color: var(--screen); } dialog::backdrop { background: #000a; }
dialog h2 { margin: 0 0 8px; } dialog p { color: var(--dim); margin: 0; } dialog .row { justify-content: flex-end; margin-top: 20px; }

/* -- the phone: how a portrait video is always shown --------------------------------------------- */
.phone { background: #000; border: 6px solid #24242e; border-radius: 30px; overflow: hidden; aspect-ratio: 9/16; box-shadow: 0 30px 80px #000a; }
.phone video, .phone img { display: block; width: 100%; height: 100%; object-fit: cover; }
.frame { border-radius: 12px; overflow: hidden; background: #000; border: 1px solid var(--line); } .frame video { display: block; width: 100%; }
.eyebrow { font-size: 12px; font-weight: 600; letter-spacing: .09em; text-transform: uppercase; color: var(--dim); margin: 0 0 8px; }

/* -- home ------------------------------------------------------------------------------------- */
.hero { display: grid; grid-template-columns: minmax(0, .82fr) minmax(0, 1.18fr); gap: 44px; align-items: center; padding: 28px 0 56px; }
.hero h1 { font-size: clamp(34px, 4.6vw, 54px); letter-spacing: -0.035em; line-height: 1.04; }
.hero h1 em { font-style: normal; color: var(--accent); }
.hero .lede { color: var(--dim); font-size: 18px; margin: 18px 0 26px; max-width: 46ch; }
.hero .eyebrow { color: var(--accent); }
.signin-box { max-width: 420px; } .signin-box .hint { margin: 12px 0 0; }
.devbox { margin-top: 22px; padding-top: 18px; border-top: 1px dashed var(--line); } .devbox label { margin-top: 0; font-size: 13px; color: var(--dim); font-weight: 500; }
.transform { position: relative; padding: 0 0 46px; }
.transform .frame { width: 86%; } .transform .phone { position: absolute; right: 0; bottom: 0; width: 36%; }
.transform .tag { position: absolute; font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--dim); }
.transform .tag.a { left: 2px; top: -24px; } .transform .tag.b { right: 38%; bottom: 8px; color: var(--accent); white-space: nowrap; }
.steps, .abilities { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.steps .card, .abilities .card { margin: 0; } .steps b, .abilities b { display: block; font: 600 17px/1.25 var(--display); letter-spacing: -0.01em; margin-bottom: 6px; }
.steps p, .abilities p { margin: 0; color: var(--dim); }
.steps .n { font: 700 13px/1 var(--text); color: var(--accent); letter-spacing: .08em; margin-bottom: 12px; display: block; }
.section-head { margin: 50px 0 16px; } .section-head h2 { margin: 0; font-size: 24px; }
.promise { margin-top: 40px; color: var(--dim); max-width: 70ch; }
.notice { max-width: 460px; margin: 9vh auto 0; text-align: center; } .notice .card { padding: 28px; margin-top: 18px; }

/* a small phone outline that shows a way of framing: used on the home page and as the style choices */
.glyph { width: 30px; aspect-ratio: 9/16; border: 2px solid var(--dim); border-radius: 6px; display: grid; gap: 2px; padding: 2px; flex: none; }
.glyph i { background: var(--dim); border-radius: 2px; display: block; }
.glyph.split { grid-template-rows: 1fr 1fr; }
.glyph.whole { grid-template-rows: 1fr 1fr 1fr; } .glyph.whole i:first-child, .glyph.whole i:last-child { background: transparent; }
.glyph.auto { place-items: center; padding: 0; } .glyph.auto i { background: transparent; font: 700 11px/1 var(--text); font-style: normal; color: var(--dim); }
.abilities .glyph { width: 34px; margin-bottom: 14px; border-color: var(--accent); } .abilities .glyph i { background: var(--accent); }

/* -- my videos -------------------------------------------------------------------------------- */
.head-row { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 22px; }
.library { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 18px; }
.tile-video { display: block; text-decoration: none; color: var(--screen); }
.tile-video .poster { aspect-ratio: 9/16; border-radius: 16px; background: var(--surface) no-repeat; border: 1px solid var(--line); background-size: 1000% auto; display: grid; place-items: center; color: var(--dim); font-size: 13px; text-align: center; padding: 14px; transition: border-color .15s; }
a.tile-video:hover .poster { border-color: var(--accent); }
.tile-video .name { font-weight: 600; margin: 10px 0 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tile-video .meta { color: var(--dim); font-size: 13px; margin-top: 4px; }
.empty { text-align: center; padding: 54px 24px; } .empty p { color: var(--dim); max-width: 46ch; margin: 8px auto 20px; }

/* -- upload ----------------------------------------------------------------------------------- */
.narrow { max-width: 680px; margin: 0 auto; }
.drop { border: 2px dashed var(--line); border-radius: var(--r-card); padding: 26px; text-align: center; color: var(--dim); } .drop.over { border-color: var(--accent); color: var(--screen); }
.drop b { color: var(--screen); }

/* -- one video -------------------------------------------------------------------------------- */
.stage { display: grid; grid-template-columns: minmax(260px, 340px) minmax(0, 1fr); gap: 34px; align-items: start; margin-top: 8px; }
.watch .caption { color: var(--dim); font-size: 13px; margin: 12px 4px 0; }
.detail > .card:first-child { margin-top: 0; }
.detail .frame { max-width: 400px; }
.styles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 14px 0 18px; }
.styles label { margin: 0; font-weight: 400; display: flex; gap: 12px; align-items: center; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; cursor: pointer; background: var(--ink); }
.styles label:hover { border-color: #3d3d4c; }
.styles input { position: absolute; opacity: 0; pointer-events: none; }
.styles label:has(input:checked) { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 7%, var(--ink)); }
.styles label:has(input:checked) .glyph { border-color: var(--accent); } .styles label:has(input:checked) .glyph i { background: var(--accent); } .styles label:has(input:checked) .glyph.auto i { background: transparent; color: var(--accent); }
.styles label:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.styles b { display: block; font-weight: 600; } .styles span span { color: var(--dim); font-size: 13px; }
.page-foot { margin-top: 46px; padding-top: 18px; border-top: 1px solid var(--line); }

/* -- admin and the internal review page ---------------------------------------------------------- */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; margin: 12px 0; } .tile { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 12px 16px; }
.tile b { display: block; font-size: 22px; font-variant-numeric: tabular-nums; } .tile span { color: var(--dim); font-size: 13px; }
.internal { border: 1px dashed var(--line); border-radius: 10px; padding: 8px 12px; color: var(--dim); font-size: 13px; margin-bottom: 18px; }
.share { display: flex; height: 26px; border-radius: 7px; overflow: hidden; font-size: 12px; font-weight: 600; color: #111; margin: 4px 0 14px; } .share div { display: flex; align-items: center; justify-content: center; white-space: nowrap; overflow: hidden; }
.share .WINDOW, .pill.WINDOW { background: var(--window); } .share .STACK, .pill.STACK { background: var(--stack); } .share .FIT, .pill.FIT { background: var(--fit); }
.pill.WINDOW, .pill.STACK, .pill.FIT { color: #111; border-color: transparent; }
.review { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 24px; align-items: start; }
.review .watch { position: sticky; top: 14px; } .review .watch video { display: block; height: min(calc(100vh - 80px), 620px); aspect-ratio: 9/16; border-radius: 12px; background: #000; }
.review .detail > video { display: block; width: 100%; max-width: 520px; aspect-ratio: 16/9; border-radius: 12px; background: #000; }
.shots { list-style: none; margin: 0; padding: 0; } .shots li { display: grid; grid-template-columns: 120px 68px minmax(0, 1fr); gap: 12px; align-items: center; padding: 8px; border-radius: 10px; cursor: pointer; border: 1px solid transparent; }
.shots li:hover { background: var(--surface); border-color: var(--line); } .shots li.now { background: var(--surface); border-color: var(--accent); }
.shots .thumb { background-repeat: no-repeat; border-radius: 4px; } .shots .t-src { width: 120px; height: 67.5px; } .shots .t-por { width: 68px; height: 120px; }
.shots p { margin: 2px 0 0; color: var(--dim); font-size: 13px; }

@media (max-width: 860px) {
  header.site { padding: 12px 16px; gap: 16px; } header.site .who span { display: none; } main { padding: 24px 16px 60px; }
  .hero { grid-template-columns: 1fr; gap: 44px; padding-top: 8px; } .steps, .abilities { grid-template-columns: 1fr; }
  .stage, .review { grid-template-columns: 1fr; } .watch { max-width: 320px; } .review .watch { position: static; } .review .watch video { height: auto; width: min(100%, 320px); }
  .styles { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) { .bar div { transition: none; } }
