@font-face {
  font-family: "Geist";
  src: url("../fonts/geist/Geist-Variable.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --red: #c8102e;
  --green: #008c45;
  --cream: #fff8ec;
  --ink: #2b1d14;
  --muted: #7a6656;
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  font-family: "Geist", system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--ink);
  background-color: var(--cream);
  /* Oven glow: bright in the middle, warm towards the edges */
  background-image: radial-gradient(ellipse at 50% 45%, #fffdf8 0%, var(--cream) 35%, #ffe2bf 75%, #ffc9a3 100%);
  background-attachment: fixed;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(1.75rem, 4vh, 3.5rem);
  text-align: center;
  padding: 2rem 1rem;
}

main p { margin: 0; }

/* Small phones (e.g. iPhone SE): more compact so nothing scrolls */
@media (max-height: 700px) {
  main {
    gap: 1.25rem;
    padding-block: .75rem;
  }
}

h1 {
  margin: 0;
  font-size: clamp(2rem, 6vw, 3.75rem);
  font-weight: 600;
  letter-spacing: -.02em;
  line-height: 1.1;
  color: var(--muted);
}

.answer {
  /* ~80% of the width on phones, capped from ~490px */
  font-size: clamp(6rem, 52vw, 16rem);
  font-weight: 900;
  line-height: .9;
  letter-spacing: -.05em;
  color: var(--red);
  text-shadow: 0 .04em .2em rgba(200, 16, 46, .22);
  animation: pop .6s cubic-bezier(.2, 1.6, .4, 1) both;
}

/* Tricolore bar below the JA!, disabled for now.
   The border keeps the white visible against the light background.
.answer::after {
  content: "";
  display: block;
  width: 100%;
  height: max(.06em, 8px);
  margin: -.04em auto 0;
  border: 1.5px solid rgba(43, 29, 20, .22);
  border-radius: 999px;
  background: linear-gradient(90deg, var(--green) 0 33.33%, #fff 0 66.66%, var(--red) 0) border-box;
}
*/

/* Pizza clock */
.pizza {
  width: min(16rem, 50vw, 26vh);
  min-width: 11rem;
  aspect-ratio: 1;
  background: none;
  border: 0;
  padding: 0;
  border-radius: 50%;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.pizza svg { display: block; width: 100%; height: 100%; }
.pizza:focus-visible { outline: 3px dashed var(--green); outline-offset: 8px; }

@media (prefers-reduced-motion: no-preference) {
  .pizza { transition: transform .25s cubic-bezier(.2, 1.6, .4, 1); }
  .pizza:hover { transform: rotate(-6deg) scale(1.04); }
  .pizza:active { transform: scale(.96); }
}

.status {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .75rem;
}

.reason {
  max-width: 32rem;
  font-size: clamp(1.125rem, 2.5vw, 1.375rem);
  font-weight: 500;
}

.clock {
  font-variant-numeric: tabular-nums;
  color: var(--muted);
}

footer {
  padding: 1.5rem 1rem;
  text-align: center;
  font-size: .85rem;
  color: var(--muted);
}

footer p { margin: .35rem 0; }

footer a {
  color: inherit;
  text-underline-offset: .2em;
}
footer a:hover { color: var(--red); }

.slice {
  position: fixed;
  top: -10vh;
  pointer-events: none;
  font-size: 2rem;
  animation: fall linear forwards;
}

@keyframes pop {
  from { transform: scale(.3); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}
@keyframes fall {
  to { transform: translateY(120vh) rotate(var(--rot)); }
}

@media (prefers-reduced-motion: reduce) {
  .answer { animation: none; }
}
