/*
Theme Name: The Button
Theme URI: https://whatisthebutton.com/
Author: The Button
Description: Minimal black-and-white theme for The Button.
Version: 0.3.0
Text Domain: the-button
*/

:root {
  --tb-bg: #ffffff;
  --tb-text: #000000;
  --tb-muted: #777777;
  --tb-border: #000000;
  --tb-max: 700px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--tb-bg);
  color: var(--tb-text);
  font-family: Arial, Helvetica, sans-serif;
}

body {
  min-height: 100vh;
}

a {
  color: inherit;
}

.tb-shell {
  width: min(calc(100% - 40px), var(--tb-max));
  margin: 0 auto;
  min-height: 100vh;
  padding: 32px 0;
}

.tb-scene {
  min-height: calc(100vh - 64px);
}

/* Normal scenes always center the whole content stack vertically.
   The total height of the heading, copy, and however many buttons exist
   is treated as one unit, so adding/removing buttons automatically
   re-centers the scene. */
.tb-layout-standard {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* Exception pages can opt out and use the full canvas instead. */
.tb-layout-random,
.tb-layout-free {
  display: block;
  min-height: calc(100vh - 64px);
}

.tb-scene h1,
.entry-title {
  margin: 0 0 24px;
  font-size: clamp(42px, 7vw, 68px);
  line-height: 1.02;
  font-weight: 800;
  letter-spacing: -0.035em;
}

.tb-copy,
.entry-content {
  font-size: clamp(22px, 3.3vw, 34px);
  line-height: 1.45;
}

.tb-copy p,
.entry-content p {
  margin: 0 0 28px;
}

.tb-buttons {
  display: grid;
  gap: 40px;
  margin-top: 72px;
}

.tb-button {
  width: 100%;
  min-height: 82px;
  padding: 14px 24px;
  border: 3px solid var(--tb-border);
  border-radius: 0;
  background: #fff;
  color: #000;
  font: inherit;
  font-size: clamp(30px, 5vw, 48px);
  line-height: 1.1;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  appearance: none;
}

.tb-button:hover,
.tb-button:focus {
  background: #000;
  color: #fff;
  outline: none;
}

.tb-random-stage {
  position: relative;
  min-height: 72vh;
  margin-top: 50px;
  overflow: hidden;
}

.tb-random-stage .tb-button {
  position: absolute;
  width: auto;
  min-width: 150px;
  max-width: 75%;
  min-height: 58px;
  font-size: clamp(20px, 4vw, 34px);
  padding: 10px 20px;
}

.tb-admin-note {
  font-size: 14px;
  color: var(--tb-muted);
  margin-top: 50px;
}

@media (max-width: 600px) {
  .tb-shell { width: min(calc(100% - 36px), var(--tb-max)); padding: 24px 0; }
  .tb-scene { min-height: calc(100vh - 48px); }
  .tb-scene h1, .entry-title { font-size: 48px; }
  .tb-copy, .entry-content { font-size: 27px; }
  .tb-buttons { gap: 34px; margin-top: 62px; }
  .tb-button { min-height: 76px; font-size: 39px; border-width: 2px; }
}


/* v0.3 — force the normal Button Scene to center as one complete stack. */
body.single-tb_scene .tb-shell {
  min-height: 100svh;
  padding-top: 24px;
  padding-bottom: 24px;
  display: flex;
  flex-direction: column;
}

body.single-tb_scene .tb-scene.tb-layout-standard {
  flex: 1 0 auto;
  width: 100%;
  min-height: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* Exception scenes deliberately opt out of centered-stack behavior. */
body.single-tb_scene .tb-scene.tb-layout-random,
body.single-tb_scene .tb-scene.tb-layout-free {
  flex: 1 0 auto;
  width: 100%;
  min-height: calc(100svh - 48px);
  display: block;
}

@supports not (height: 100svh) {
  body.single-tb_scene .tb-shell { min-height: 100vh; }
}
