:root {
  --house: #28211a;
  --house-deep: #17130f;
  --stock: #f3ead8;
  --ink: #2b241a;
  --ink-muted: #6b5f4b;
  --band: #a8322a;
  --brass: #b08d3f;
  --line: rgba(243, 234, 216, 0.2);
}

* { box-sizing: border-box; }

html { color-scheme: dark; }

body {
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at 50% -10%, rgba(176, 141, 63, 0.17), transparent 34rem),
    var(--house);
  color: var(--stock);
  font-family: "Arial Narrow", "Avenir Next Condensed", system-ui, sans-serif;
  line-height: 1.55;
}

a { color: inherit; text-underline-offset: 0.22em; }
a:hover { color: #fff7e8; }
a:focus-visible {
  border-radius: 0.2rem;
  outline: 3px solid #e0b75a;
  outline-offset: 3px;
}

.site-header,
footer {
  width: min(72rem, calc(100% - 2rem));
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.site-header {
  min-height: 5.5rem;
  border-bottom: 1px solid var(--line);
}

.wordmark {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  color: var(--stock);
  font: 700 0.9rem/1 ui-monospace, "SFMono-Regular", Menlo, monospace;
  letter-spacing: 0.42em;
  text-decoration: none;
}

nav { display: flex; gap: 0.5rem; }
nav a {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  padding: 0 0.45rem;
  color: #d7cbb7;
  font-size: 0.9rem;
  text-decoration: none;
}
nav a[aria-current="page"] { color: #fff7e8; text-decoration: underline; }

main { width: min(72rem, calc(100% - 2rem)); margin: 0 auto; }

.hero {
  min-height: calc(100vh - 11rem);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(18rem, 28rem);
  gap: clamp(2rem, 7vw, 7rem);
  align-items: center;
  padding: 4rem 0 6rem;
}

.eyebrow {
  color: var(--brass);
  font: 700 0.76rem/1.3 ui-monospace, "SFMono-Regular", Menlo, monospace;
  letter-spacing: 0.24em;
  text-transform: uppercase;
}
.ticket-label {
  color: #7b251f;
  font: 700 0.76rem/1.3 ui-monospace, "SFMono-Regular", Menlo, monospace;
  letter-spacing: 0.24em;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 600;
  letter-spacing: -0.025em;
}

h1 { max-width: 11ch; margin: 1rem 0; font-size: clamp(3.2rem, 9vw, 7rem); line-height: 0.92; }
h2 { margin-top: 2.6rem; font-size: clamp(1.65rem, 4vw, 2.3rem); }
h3 { margin-top: 2rem; font-size: 1.25rem; }

.lede { max-width: 34rem; color: #d7cbb7; font-size: clamp(1.05rem, 2vw, 1.3rem); }

.actions { display: flex; flex-wrap: wrap; gap: 0.8rem; margin-top: 2rem; }
.button {
  display: inline-block;
  border: 1px solid var(--brass);
  border-radius: 0.3rem;
  padding: 0.8rem 1.1rem;
  color: var(--stock);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-decoration: none;
}
.button.secondary { border-color: var(--line); color: #d7cbb7; }

.ticket {
  position: relative;
  overflow: hidden;
  transform: rotate(1.4deg);
  border-radius: 0.5rem;
  background: var(--stock);
  color: var(--ink);
  padding: 2rem;
  box-shadow: 0 2.2rem 4rem rgba(0, 0, 0, 0.38);
}

.ticket::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.2;
  background-image: repeating-linear-gradient(91deg, transparent 0 3px, rgba(43, 36, 26, 0.09) 4px);
}

.ticket-band { margin: 1.5rem -2rem; padding: 0.65rem 2rem; background: var(--band); color: var(--stock); letter-spacing: 0.16em; }
.ticket h2 { margin: 0.65rem 0 0.3rem; font-size: 2.15rem; }
.ticket p { color: var(--ink-muted); }
.ticket-meta { border-top: 1px dashed rgba(43, 36, 26, 0.36); padding-top: 1.2rem; font-family: ui-monospace, Menlo, monospace; font-size: 0.78rem; }

.document {
  width: min(48rem, 100%);
  margin: 4rem auto 7rem;
  border-radius: 0.55rem;
  background: var(--stock);
  color: var(--ink);
  padding: clamp(1.5rem, 6vw, 4rem);
  box-shadow: 0 1.5rem 4rem rgba(0, 0, 0, 0.28);
}

.document h1 { max-width: none; margin-top: 0; font-size: clamp(2.4rem, 7vw, 4.8rem); }
.document h2 { border-top: 1px solid rgba(43, 36, 26, 0.16); padding-top: 1.6rem; }
.document a { color: #7b251f; }
.document table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
.document th, .document td { border-bottom: 1px solid rgba(43, 36, 26, 0.16); padding: 0.7rem 0.5rem; text-align: left; vertical-align: top; }

footer { min-height: 5.5rem; border-top: 1px solid var(--line); color: #a99d89; font-size: 0.82rem; }

@media (max-width: 760px) {
  .hero { grid-template-columns: 1fr; padding-top: 3rem; }
  .ticket { transform: none; }
  .site-header { align-items: flex-start; padding: 1.5rem 0; }
  nav { gap: 0.8rem; }
}

@media (prefers-reduced-motion: no-preference) {
  .ticket { animation: settle 650ms cubic-bezier(.2,.8,.2,1) both; }
  @keyframes settle { from { opacity: 0; transform: translateY(1rem) rotate(0deg); } }
}

/* Tutorials: clips recorded by scripts/demo publish. Portrait phone
   captures, so cap their height and let the caption carry the text. */
.demo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: clamp(1.5rem, 4vw, 2.75rem);
  margin: 2.5rem 0 1rem;
}
.demo { margin: 0; }
.demo video {
  width: 100%;
  height: auto;
  max-height: 70vh;
  border-radius: 14px;
  background: #14100b;
  border: 1px solid rgba(215, 203, 183, 0.18);
}
.demo figcaption h2 { margin: 1rem 0 0.35rem; font-size: 1.3rem; }
.demo figcaption p { margin: 0.35rem 0; color: #d7cbb7; }
.demo-meta {
  font: 500 0.76rem/1.4 ui-monospace, "SFMono-Regular", Menlo, monospace;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(215, 203, 183, 0.62);
}
@media (prefers-reduced-motion: reduce) {
  .demo video { scroll-behavior: auto; }
}
