/* tonsofbadideas.games — the TOBI studio look (R50).
 *
 * Palette from https://tobicycles.com/brand. Contrast rule (checked, WCAG 2.x):
 *   text is BLACK on Lemon (17:1), Seafoam (16:1), Orange (6.5:1) and Purplish (6.6:1);
 *   text is WHITE or LEMON on black (21:1 / 17:1). Never white on Lemon (1.2:1), and never
 *   Orange or Purplish as text on white (~3.2:1): they are fills and borders only.
 *   Focus ring (non-text, needs 3:1): BLACK on white (21:1), Lemon (17:1) and Seafoam (16:1);
 *   LEMON in the black footer (17:1). Orange failed on Lemon (2.6:1) and Seafoam (2.5:1).
 *
 * Type: the TOBI site uses licensed webfonts (Skidoos for the brand, Maison Neue Black for
 * titles, MD IO for text), none on Google Fonts. This page uses system stacks that sit close
 * (a black grotesk for titles, a monospace-flavoured text face) and loads no font files.
 * If the owner licenses the real faces for web, self-host them and put them first below. */

:root {
  --white: #ffffff;
  --black: #000000;
  --lemon: #faeb32;
  --orange: #ff5228;
  --seafoam: #d8e6d8;
  --purplish: #968bab;

  --font-title: "Maison Neue", "Arial Black", "Helvetica Neue", Helvetica, Arial, system-ui, sans-serif;
  --font-text: "MD IO", ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;

  --edge: 3px solid var(--black);
  --shadow: 5px 5px 0 var(--black);
  --gutter: 16px;
  --max: 1080px;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--white);
  color: var(--black);
  font-family: var(--font-text);
  font-size: 1rem;
  line-height: 1.6;
}

h1, h2, h3 {
  font-family: var(--font-title);
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -0.01em;
  margin: 0 0 0.6em;
}
h2 { font-size: clamp(1.6rem, 4vw, 2.4rem); text-transform: uppercase; }

a { color: inherit; text-decoration-thickness: 2px; text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--orange); }

:focus-visible { outline: 3px solid var(--black); outline-offset: 3px; }
.foot :focus-visible { outline-color: var(--lemon); }

.skip {
  position: absolute; left: -9999px; top: 0;
  background: var(--black); color: var(--lemon); padding: 8px 12px; z-index: 10;
}
.skip:focus { left: 8px; top: 8px; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.narrow { max-width: 680px; }

/* ---- header / wordmark ---------------------------------------------------------- */

.top {
  max-width: var(--max); margin: 0 auto;
  padding: 12px var(--gutter);
  display: flex; align-items: center;
}
.wordmark { display: inline-flex; align-items: center; text-decoration: none; min-height: 44px; }
.wordmark-img { display: none; height: 48px; width: auto; }
.wordmark-text {
  font-family: var(--font-title); font-weight: 900; text-transform: uppercase;
  font-size: 1.35rem; letter-spacing: 0.02em;
  background: var(--lemon); border: var(--edge); padding: 4px 10px; box-shadow: 4px 4px 0 var(--black);
}
/* main.js adds .has-logo once the PNG has actually loaded. */
.wordmark.has-logo .wordmark-img { display: block; }
.wordmark.has-logo .wordmark-text {
  position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}

/* ---- hero ----------------------------------------------------------------------------- */

/* Phones: clip, then Follow (R20: the main action must be in the first screen at 375x812), then
 * the three sentences. The clip is capped at 52% of the viewport height so Follow fits under
 * it. Wide screens: clip on the left spanning both rows, text and Follow on the right. */
.hero {
  max-width: var(--max); margin: 0 auto;
  padding: 0 var(--gutter) 48px;
  display: grid; gap: 20px;
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas: "clip" "follow" "intro";
}
.clip { grid-area: clip; }
.intro { grid-area: intro; }
.follow { grid-area: follow; }
@media (min-width: 760px) {
  .hero {
    grid-template-columns: minmax(0, 380px) minmax(0, 1fr);
    grid-template-areas: "clip intro" "clip follow";
    column-gap: 48px; row-gap: 28px;
  }
  .intro { align-self: end; }
  .follow { align-self: start; }
}

.clip {
  margin: 0; position: relative;
  border: var(--edge); box-shadow: var(--shadow);
  background: var(--seafoam);
  aspect-ratio: 9 / 16;
  /* width follows the height cap so the 9:16 box never distorts */
  width: min(100%, 380px, calc(52vh * 9 / 16));
  width: min(100%, 380px, calc(52svh * 9 / 16));
  justify-self: center;
  overflow: hidden;
}
@media (min-width: 760px) {
  .clip { width: min(100%, 380px, calc(78vh * 9 / 16)); }
}
.clip-video { display: block; width: 100%; height: 100%; object-fit: cover; }
.clip figcaption { position: absolute; left: 10px; right: 10px; bottom: 10px; }
/* Pause/Play for the loop (WCAG 2.2.2). Over moving video, the focus ring gets a Lemon halo. */
.clip-toggle {
  position: absolute; top: 10px; right: 10px; z-index: 1;
  min-width: 64px; min-height: 44px; padding: 6px 12px;
  font-family: var(--font-title); font-weight: 900; font-size: 0.85rem; text-transform: uppercase;
  color: var(--black); background: var(--white); border: var(--edge); box-shadow: 3px 3px 0 var(--black);
  cursor: pointer;
}
.clip-toggle[hidden] { display: none; }
.clip-toggle:focus-visible { outline-offset: 0; box-shadow: 0 0 0 6px var(--lemon); }
.premise {
  display: inline; margin: 0;
  font-size: clamp(1.05rem, 4.4vw, 1.6rem);
  background: var(--lemon); color: var(--black);
  padding: 2px 6px; box-decoration-break: clone; -webkit-box-decoration-break: clone;
  line-height: 1.45;
}

.intro p { margin: 0 0 1em; font-size: 1.05rem; max-width: 60ch; }

/* ---- buttons ---------------------------------------------------------------------------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 10px 18px;
  font-family: var(--font-title); font-weight: 900; font-size: 1rem; text-transform: uppercase;
  color: var(--black); text-decoration: none;
  border: var(--edge); box-shadow: 4px 4px 0 var(--black);
  cursor: pointer; transition: transform 80ms ease, box-shadow 80ms ease;
}
.btn:hover { transform: translate(-1px, -1px); box-shadow: 5px 5px 0 var(--black); }
.btn:active { transform: translate(3px, 3px); box-shadow: 1px 1px 0 var(--black); }
.btn-primary { background: var(--orange); }
.btn-follow { background: var(--white); width: 100%; }
.btn-follow:hover { background: var(--lemon); }

.follow-title { font-size: 1.1rem; text-transform: uppercase; margin-bottom: 10px; }
.follow-list {
  list-style: none; margin: 0; padding: 0;
  display: grid; gap: 12px; grid-template-columns: repeat(2, minmax(0, 1fr));
}
@media (min-width: 1000px) { .follow-list { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.follow-list li:nth-child(1) .btn-follow { background: var(--lemon); }
.follow-list li:nth-child(2) .btn-follow { background: var(--seafoam); }
.follow-list li:nth-child(3) .btn-follow { background: var(--orange); }
.follow-list li:nth-child(4) .btn-follow { background: var(--purplish); }
.follow-list .btn-follow:hover { background: var(--white); }

/* ---- bands ------------------------------------------------------------------------------- */

.band { padding: 56px 0; border-top: var(--edge); }
.band-lemon { background: var(--lemon); }
.band-seafoam { background: var(--seafoam); }

/* ---- sign-up ------------------------------------------------------------------------------ */

.signup label { display: block; font-weight: 700; margin-bottom: 6px; }
.signup-row { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 14px; }
.signup input[type="email"], .signup input[name="heard_about"] {
  flex: 1 1 220px; min-width: 0; min-height: 48px; padding: 10px 12px;
  font: inherit; font-size: 1rem; color: var(--black); background: var(--white);
  border: var(--edge); border-radius: 0;
}
.signup input[type="email"]::placeholder { color: #555; }
.signup input[name="heard_about"] { width: 100%; }
.signup .btn { flex: 0 0 auto; }
.consent { font-size: 0.9rem; margin: 12px 0 0; }
.signup-status, .signup-error { font-weight: 700; margin: 10px 0 0; min-height: 1.6em; }
.signup-error { background: var(--black); color: var(--lemon); padding: 4px 8px; display: inline-block; }
.signup-status:empty, .signup-error:empty { display: none; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---- latest shorts ------------------------------------------------------------------------ */

.shorts {
  list-style: none; margin: 0; padding: 0;
  display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}
.short { aspect-ratio: 9 / 16; border: var(--edge); background: var(--white); box-shadow: var(--shadow); max-width: 260px; width: 100%; justify-self: center; }
.short iframe { width: 100%; height: 100%; border: 0; display: block; }
.short-placeholder a {
  height: 100%; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 4px;
  text-decoration: none; font-family: var(--font-title); font-weight: 900; text-transform: uppercase;
  background-image:
    linear-gradient(rgba(0, 0, 0, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 0, 0, 0.08) 1px, transparent 1px);
  background-size: 24px 24px;
}

/* ---- footer ---------------------------------------------------------------------------------- */

.foot { background: var(--black); color: var(--white); padding: 28px 0; }
.foot a { color: var(--lemon); }
.foot-row { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.foot-row p { margin: 0; font-size: 0.9rem; }
.foot-mascot { height: 56px; width: auto; }
/* Optional brand images stay hidden until main.js sees them load (the PNGs may be absent). */
[data-optional-img] { display: none; }
[data-optional-img].is-loaded { display: block; }

/* ---- plain pages (privacy, confirm, unsubscribe) ---------------------------------------------- */

.plain-main { max-width: 680px; margin: 0 auto; padding: 40px var(--gutter) 64px; }
.plain-main h1 { font-size: clamp(1.8rem, 6vw, 2.6rem); text-transform: uppercase; }
.plain-main h2 { font-size: 1.2rem; margin-top: 1.6em; }
.plain-main form { margin: 20px 0; }
.placeholder { background: var(--lemon); padding: 0 4px; }

/* ---- motion --------------------------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  .btn, .btn:hover, .btn:active { transition: none; transform: none; }
}

.signup-fields { border: 0; margin: 0; padding: 0; min-width: 0; }
.signup-fields:disabled .btn { cursor: not-allowed; opacity: 0.6; }
