:root {
  --ink: #172b49;
  --ink-soft: #58708a;
  --cream: #f7f2e8;
  --paper: #fffdf8;
  --line: #d9d0c1;
  --yellow: #ffc83d;
  --yellow-edge: #dca50c;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--ink);
  background: var(--cream);
  font-family: "Avenir Next", Avenir, "Segoe UI", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

.is-locked,
.is-locked body { overflow: hidden; }

.access-gate {
  position: fixed;
  inset: 0;
  z-index: 1000;
  padding: 24px;
  display: grid;
  place-items: center;
  background: var(--cream);
}

.access-gate[hidden] { display: none; }

.access-card {
  width: min(440px, 100%);
  padding: 34px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--paper);
  box-shadow: 0 18px 50px rgba(23, 43, 73, 0.12);
}

.access-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.access-brand img {
  width: 42px;
  height: 42px;
  object-fit: contain;
}

.access-brand strong {
  font-size: 27px;
  letter-spacing: -0.055em;
}

.access-card h1 {
  margin: 32px 0 8px;
  font-size: 38px;
  line-height: 1;
  letter-spacing: -0.05em;
}

.access-card > p:not(.access-error) {
  margin: 0 0 26px;
  color: var(--ink-soft);
  font-size: 16px;
}

.access-card label {
  display: block;
  margin-bottom: 8px;
  font-size: 12px;
  font-weight: 750;
}

.access-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

.access-controls input,
.access-controls button {
  min-height: 50px;
  border-radius: 11px;
  font: inherit;
}

.access-controls input {
  min-width: 0;
  padding: 0 14px;
  border: 1px solid var(--line);
  color: var(--ink);
  background: #fff;
}

.access-controls input:focus-visible {
  outline: 3px solid rgba(75, 143, 209, 0.35);
  border-color: #4b8fd1;
}

.access-controls button {
  padding: 0 18px;
  border: 1px solid var(--yellow-edge);
  color: var(--ink);
  background: var(--yellow);
  font-weight: 800;
  cursor: pointer;
}

.access-error {
  margin: 12px 0 0;
  color: #a73b32;
  font-size: 13px;
  font-weight: 700;
}

.hero {
  min-height: 100svh;
  display: grid;
  grid-template-columns: minmax(470px, 40%) minmax(0, 60%);
}

.copy-panel {
  min-height: 100svh;
  padding: clamp(30px, 3vw, 50px) clamp(30px, 3.6vw, 62px) clamp(24px, 2.7vw, 42px);
  display: flex;
  flex-direction: column;
}

.site-header { flex: 0 0 auto; }

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  line-height: 1;
  text-decoration: none;
}

.brand img {
  width: 42px;
  height: 42px;
  object-fit: contain;
}

.brand strong {
  font-size: 29px;
  letter-spacing: -0.055em;
}

.hero-copy {
  width: min(520px, 100%);
  margin: auto 0;
  padding: 64px 0;
}

h1 {
  margin: 0;
  font-size: clamp(54px, 4.6vw, 78px);
  line-height: 0.98;
  letter-spacing: -0.065em;
}

h1 span { white-space: nowrap; }

.hero-copy > p:not(.compatibility) {
  max-width: 480px;
  margin: 30px 0 0;
  color: var(--ink-soft);
  font-size: clamp(17px, 1.35vw, 21px);
  font-weight: 580;
  line-height: 1.55;
}

.downloads {
  margin-top: 38px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.download-button {
  min-height: 78px;
  padding: 15px 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--paper);
  text-decoration: none;
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.download-button.mac {
  border-color: var(--yellow-edge);
  background: var(--yellow);
}

.download-button:hover {
  transform: translateY(-2px);
  border-color: #9a8f7c;
  box-shadow: 0 8px 20px rgba(23, 43, 73, 0.09);
}

.download-button:focus-visible {
  outline: 3px solid #4b8fd1;
  outline-offset: 4px;
}

.download-button.detected { box-shadow: 0 0 0 4px rgba(255, 200, 61, 0.25); }

.download-button img {
  width: 32px;
  height: 32px;
  object-fit: contain;
  flex: 0 0 auto;
}

.download-button > span {
  display: grid;
  line-height: 1.05;
}

.download-button small {
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.02em;
}

.download-button strong {
  margin-top: 5px;
  font-size: 18px;
  letter-spacing: -0.025em;
}

.compatibility {
  margin: 21px 0 0;
  color: #6e7d8c;
  font-size: 12px;
  font-weight: 650;
  line-height: 1.5;
}

footer {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  color: #77766f;
  font-size: 10px;
  line-height: 1.55;
}

footer p { margin: 0; }
footer > span { flex: 0 0 auto; font-weight: 700; }

.replay-panel {
  min-width: 0;
  min-height: 100svh;
  padding: clamp(22px, 2vw, 34px) clamp(22px, 2vw, 34px) clamp(22px, 2vw, 34px) 0;
  display: flex;
  align-items: center;
}

.replay-frame {
  width: 100%;
  aspect-ratio: 2250 / 1740;
  overflow: hidden;
  border: 1px solid #cfc5b5;
  border-radius: 22px;
  background: #eee8dc;
  box-shadow: 0 18px 50px rgba(23, 43, 73, 0.13);
}

.replay-frame img {
  display: block;
  width: auto;
  max-width: none;
  height: 100%;
}

@media (max-width: 1120px) {
  .hero { grid-template-columns: minmax(410px, 42%) minmax(0, 58%); }
  .copy-panel { padding-left: 34px; padding-right: 34px; }
  .downloads { grid-template-columns: 1fr; }
  .download-button { max-width: 300px; }
  h1 span { white-space: normal; }
}

@media (max-width: 860px) {
  .hero { display: block; min-height: auto; }
  .copy-panel { min-height: auto; padding: 28px 24px 32px; }
  .hero-copy { width: 100%; margin: 70px 0; padding: 0; }
  .hero-copy > p:not(.compatibility) { max-width: 560px; }
  .downloads { max-width: 520px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .download-button { max-width: none; }
  footer { margin-top: 30px; }
  .replay-panel { min-height: auto; padding: 0 18px 24px; }
  .replay-frame { border-radius: 17px; }
}

@media (max-width: 560px) {
  .access-card { padding: 26px 22px; }
  .access-controls { grid-template-columns: 1fr; }
  .copy-panel { padding-inline: 18px; }
  .brand strong { font-size: 26px; }
  .hero-copy { margin: 54px 0; }
  h1 { font-size: clamp(46px, 13vw, 62px); }
  .hero-copy > p:not(.compatibility) { margin-top: 23px; font-size: 17px; }
  .downloads { grid-template-columns: 1fr; margin-top: 30px; }
  .download-button { min-height: 72px; }
  footer { display: grid; align-items: start; }
  .replay-panel { padding-inline: 10px; }
  .replay-frame { border-radius: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; }
}
