:root {
  --bg: #1d140c;
  --panel: #2b1e12;
  --line: #4a3520;
  --text: #f3e6c8;
  --muted: #c9b48f;
  --gold: #e3a93b;
  --gold-dark: #b97f1c;
  --good: #9fd38a;
  --bad: #f19a7c;
  color-scheme: dark;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.5 Georgia, "Times New Roman", serif;
}

h1, h2, .kicker, .button, .cards b {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: bold;
}

/* Hero: the painting with the pitch over its lower part. */
.hero {
  position: relative;
  overflow: hidden;
  border-bottom: 3px solid var(--gold-dark);
}
.hero-art {
  display: block;
  width: 100%;
  height: auto;
  min-height: 320px;
  max-height: 88vh;
  object-fit: cover;
  object-position: 50% 40%;
}
.hero-text {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 72px 24px 24px;
  background: linear-gradient(to bottom, rgba(29, 20, 12, 0), rgba(29, 20, 12, 0.86) 45%, rgba(29, 20, 12, 0.96));
}
.hero-text > * { max-width: 640px; margin-left: auto; margin-right: auto; }
.kicker { margin: 0 auto; color: var(--gold); text-transform: uppercase; font-size: 0.85rem; letter-spacing: 0.14em; }
h1 { margin: 4px auto 8px; font-size: clamp(2rem, 6vw, 3.4rem); line-height: 1.05; }
.pitch { margin-top: 0; margin-bottom: 16px; color: var(--text); }

.button {
  display: inline-block;
  padding: 12px 22px;
  min-height: 44px;
  border: 2px solid #f7cf7a;
  border-radius: 6px;
  background: var(--gold);
  color: #2a1a08;
  font-size: 1.05rem;
  font-weight: bold;
  text-decoration: none;
  cursor: pointer;
}
.button:hover { background: #f0b94c; }
.button:focus-visible, input:focus-visible { outline: 3px solid #fff2c8; outline-offset: 2px; }
.button[disabled] { opacity: 0.6; cursor: progress; }

main { max-width: 1040px; margin: 0 auto; padding: 8px 16px 40px; }
section { padding-top: 32px; }
h2 { font-size: 1.8rem; margin: 0 0 4px; }

/* Class cards */
.cards {
  list-style: none;
  margin: 16px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
}
.cards li {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.cards img {
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  border-radius: 4px;
  image-rendering: pixelated;
}
.cards b { font-size: 1.05rem; margin-top: 4px; text-align: center; }

/* Sign-up */
.join { max-width: 560px; margin: 0 auto; }
form {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 12px;
  padding: 18px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
}
label { font-weight: bold; margin-top: 6px; }
input {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid #6b5132;
  border-radius: 6px;
  background: #140d07;
  color: var(--text);
  font: 16px/1.3 Georgia, serif;
}
input::placeholder { color: #8c7758; }
form .button { margin-top: 14px; align-self: flex-start; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.status { min-height: 1.5em; margin: 8px 0 0; }
.status.good { color: var(--good); }
.status.bad { color: var(--bad); }
.fine { color: var(--muted); font-size: 0.85rem; margin-top: 12px; }

/* Phones, portrait */
@media (max-width: 600px) {
  body { font-size: 16px; }
  .hero-art { min-height: 0; aspect-ratio: 4 / 3; }
  .hero-text { position: static; padding: 16px; background: var(--bg); }
  .cards { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  form .button { align-self: stretch; }
}

/* Phones, landscape (844 x 390): keep the hero short so the pitch and button fit. */
@media (max-height: 480px) and (orientation: landscape) {
  .hero-art { max-height: none; height: 100vh; height: 100svh; min-height: 0; }
  .hero-text { padding: 40px 24px 14px; }
  h1 { font-size: 2rem; }
  .pitch { font-size: 0.95rem; margin-bottom: 10px; }
  .cards { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }
}

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}
