/* TakeTwo visual identity: clapperboard black and white, diagonal stripes, slate labels, record red */
@import url("https://fonts.googleapis.com/css2?family=Archivo+Black&family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@500&display=swap");

:root {
  --ink: #111111;
  --paper: #f4f1ea;
  --card: #ffffff;
  --text: #111111;
  --muted: #5d5a54;
  --line: #111111;
  --soft: #e6e1d6;
  --red: #e0242b;
  --red-ink: #ffffff;
  --ok: #1f8a4c;
  --warn: #b26a00;
  --stripe-a: #111111;
  --stripe-b: #ffffff;
  --display: "Archivo Black", "Arial Black", Impact, sans-serif;
  --body: "Inter", -apple-system, system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Menlo, monospace;
  /* the moving top stick and the fixed bottom band have stripes in opposite directions, forming chevrons when closed */
  --stripes: repeating-linear-gradient(-45deg, var(--stripe-a) 0 18px, var(--stripe-b) 18px 36px);
  --stripes-fixed: repeating-linear-gradient(45deg, var(--stripe-a) 0 18px, var(--stripe-b) 18px 36px);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #121212; --card: #1c1c1c; --text: #f4f1ea; --muted: #a9a49a; --line: #f4f1ea; --soft: #2b2b2b;
    --stripe-a: #f4f1ea; --stripe-b: #121212;
  }
}
:root[data-theme="dark"] {
  --paper: #121212; --card: #1c1c1c; --text: #f4f1ea; --muted: #a9a49a; --line: #f4f1ea; --soft: #2b2b2b;
  --stripe-a: #f4f1ea; --stripe-b: #121212;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--text); font-family: var(--body); font-size: 16px; line-height: 1.5; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--display); font-weight: 400; line-height: 1.1; letter-spacing: 0.01em; margin: 0 0 0.5em; }
h1 { font-size: clamp(30px, 5vw, 48px); }
h2 { font-size: clamp(22px, 3.2vw, 30px); }
h3 { font-size: 19px; }
p { margin: 0 0 1em; }
.muted { color: var(--muted); }
.mono { font-family: var(--mono); }
img, video, canvas { max-width: 100%; }

/* Clapper stick: the striped bar */
.stripes { height: 22px; background: var(--stripes); border-bottom: 3px solid var(--line); }
.stripes.thin { height: 10px; border-bottom-width: 2px; }

/* Slate label: small caps text as written on a clapperboard */
.slate-label { font-family: var(--mono); font-size: 12px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted); }

/* Slate grid: boxed fields like SCENE / TAKE / ROLL */
.slate { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); border: 3px solid var(--line); background: var(--ink); color: #f4f1ea; }
.slate > div { padding: 10px 14px; border-right: 2px solid #f4f1ea33; border-bottom: 2px solid #f4f1ea33; min-width: 0; }
.slate .slate-label { color: #b9b4aa; }
.slate .value { font-family: var(--display); font-size: 22px; overflow-wrap: anywhere; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: 600 15px var(--body); padding: 10px 18px; border: 2px solid var(--line); background: var(--card); color: var(--text); cursor: pointer; text-decoration: none; border-radius: 0; min-height: 44px; }
.btn:hover { background: var(--soft); }
.btn.primary { background: var(--red); border-color: var(--red); color: var(--red-ink); text-transform: uppercase; letter-spacing: 0.06em; }
.btn.primary:hover { filter: brightness(1.08); }
.btn.dark { background: var(--line); color: var(--paper); }
.btn.small { min-height: 34px; padding: 5px 12px; font-size: 14px; }
.btn:disabled { opacity: 0.45; cursor: default; }
.row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }

/* Cards */
.card { background: var(--card); border: 3px solid var(--line); padding: 20px; }
.card + .card { margin-top: 16px; }
.card.striped { padding-top: 0; }
.card.striped::before { content: ""; display: block; height: 14px; margin: 0 -20px 18px; background: var(--stripes); border-bottom: 3px solid var(--line); }

/* Forms */
label { display: block; font-weight: 600; font-size: 14px; margin: 0 0 4px; }
input[type=text], input[type=email], input[type=date], input[type=number], input[type=search], select, textarea {
  width: 100%; font: 16px var(--body); padding: 10px 12px; border: 2px solid var(--line); background: var(--card); color: var(--text); border-radius: 0;
}
textarea { min-height: 140px; resize: vertical; line-height: 1.45; }
.field { margin-bottom: 16px; }
.fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 0 16px; }
.check { display: flex; gap: 8px; align-items: center; font-weight: 500; }

/* Status pills */
.pill { display: inline-block; font: 600 12px var(--mono); letter-spacing: 0.08em; text-transform: uppercase; padding: 3px 9px; border: 2px solid var(--line); }
.pill.open { background: var(--card); }
.pill.submitted { background: var(--ok); border-color: var(--ok); color: #fff; }
.pill.closed { background: var(--soft); color: var(--muted); border-color: var(--soft); }
.pill.rec { background: var(--red); border-color: var(--red); color: #fff; }

.notice { border: 2px solid var(--line); border-left-width: 8px; padding: 10px 14px; background: var(--card); margin: 0 0 16px; }
.notice.error { border-color: var(--red); }
.notice.ok { border-color: var(--ok); }

table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 10px 8px; border-bottom: 2px solid var(--soft); vertical-align: top; }
th { font: 600 12px var(--mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.table-wrap { overflow-x: auto; }

/* Wordmark: TAKE 2 with the 2 in a slate box */
.wordmark { display: inline-flex; align-items: center; gap: 10px; font-family: var(--display); font-size: 22px; text-decoration: none; letter-spacing: 0.02em; }
.wordmark img { width: 34px; height: 34px; }

/* OAuth consent page */
body.consent main.card { max-width: 520px; margin: 40px auto; }
@media (max-width: 560px) { body.consent main.card { margin: 16px; } }
