:root {
  --sky-50: #f5fbff;
  --sky-100: #e5f5ff;
  --sky-200: #c9eaff;
  --sky-400: #78bce8;
  --sky-600: #367fac;
  --ink: #203b54;
  --ink-soft: #587188;
  --cream: #fffdf8;
  --peach: #ffd7c8;
  --sun: #ffe7a3;
  --white: #fff;
  --shadow: 0 24px 70px rgba(43, 91, 126, 0.14);
  --radius: 28px;
  --max: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--sky-50);
  font-family: "Trebuchet MS", "Avenir Next", Avenir, system-ui, sans-serif;
  font-size: 1rem;
  line-height: 1.65;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: var(--sky-600);
  text-underline-offset: 0.2em;
}

a:hover {
  color: var(--ink);
}

:focus-visible {
  outline: 3px solid #b45c3f;
  outline-offset: 4px;
  border-radius: 6px;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 12px;
  left: 12px;
  padding: 0.7rem 1rem;
  border-radius: 999px;
  color: var(--white);
  background: var(--ink);
  transform: translateY(-150%);
}

.skip-link:focus {
  transform: none;
}

.site-header {
  position: absolute;
  z-index: 20;
  top: 0;
  right: 0;
  left: 0;
}

.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(calc(100% - 40px), var(--max));
  margin: 0 auto;
  padding: 22px 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  color: var(--ink);
  font-size: 1.05rem;
  font-weight: 800;
  text-decoration: none;
}

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

.site-nav {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.site-nav a {
  padding: 0.6rem 0.8rem;
  border-radius: 999px;
  color: var(--ink);
  font-weight: 700;
  text-decoration: none;
}

.site-nav a:hover {
  background: rgba(255, 255, 255, 0.65);
}

.nav-toggle {
  display: none;
  width: 46px;
  height: 46px;
  border: 1px solid rgba(32, 59, 84, 0.14);
  border-radius: 50%;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.8);
  font: inherit;
  font-size: 1.3rem;
  cursor: pointer;
}

.hero {
  position: relative;
  display: grid;
  min-height: 760px;
  overflow: hidden;
  background:
    radial-gradient(circle at 83% 14%, rgba(255, 255, 255, 0.9) 0 3%, transparent 3.2%),
    linear-gradient(180deg, #bfe7ff 0%, #e7f6ff 74%, var(--sky-50) 100%);
}

.hero::before,
.hero::after {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.48);
  content: "";
  filter: blur(2px);
}

.hero::before {
  top: 21%;
  left: -7%;
  width: 270px;
  height: 82px;
  box-shadow: 125px -24px 0 24px rgba(255, 255, 255, 0.48);
}

.hero::after {
  right: -4%;
  bottom: 17%;
  width: 220px;
  height: 66px;
  box-shadow: -92px 18px 0 12px rgba(255, 255, 255, 0.48);
}

.hero-inner {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 0.9fr);
  gap: 4rem;
  align-items: center;
  width: min(calc(100% - 40px), var(--max));
  margin: 0 auto;
  padding: 138px 0 86px;
}

.eyebrow {
  margin: 0 0 0.9rem;
  color: #3379a5;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  margin-top: 0;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.035em;
}

h1 {
  max-width: 680px;
  margin-bottom: 1.25rem;
  font-size: clamp(3.3rem, 7vw, 6.8rem);
}

h2 {
  margin-bottom: 1rem;
  font-size: clamp(2.25rem, 4.5vw, 4.25rem);
}

h3 {
  margin-bottom: 0.65rem;
  font-size: 1.45rem;
}

.hero-copy {
  max-width: 600px;
  margin: 0 0 2rem;
  color: #3d607a;
  font-size: clamp(1.12rem, 2vw, 1.35rem);
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 0.75rem 1.25rem;
  border: 2px solid var(--ink);
  border-radius: 999px;
  color: var(--white);
  background: var(--ink);
  font-weight: 800;
  text-decoration: none;
  box-shadow: 0 8px 24px rgba(32, 59, 84, 0.16);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.button:hover {
  color: var(--white);
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(32, 59, 84, 0.24);
}

.button.secondary {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.7);
}

.button.secondary:hover {
  color: var(--ink);
  background: var(--white);
}

.hero-art {
  position: relative;
}

.hero-art img {
  position: relative;
  z-index: 2;
  width: min(100%, 530px);
  margin: 0 auto;
  filter: drop-shadow(0 30px 40px rgba(56, 105, 139, 0.2));
  animation: float 6s ease-in-out infinite;
}

.hero-note {
  position: absolute;
  z-index: 4;
  right: -10px;
  bottom: 6%;
  max-width: 210px;
  padding: 0.9rem 1.1rem;
  border: 1px solid rgba(32, 59, 84, 0.1);
  border-radius: 18px;
  background: rgba(255, 253, 248, 0.94);
  box-shadow: var(--shadow);
  font-size: 0.9rem;
  font-weight: 700;
  transform: rotate(2deg);
}

@keyframes float {
  0%, 100% { transform: translateY(0) rotate(-1deg); }
  50% { transform: translateY(-13px) rotate(1deg); }
}

.section {
  padding: 104px 0;
}

.section-inner {
  width: min(calc(100% - 40px), var(--max));
  margin: 0 auto;
}

.section-heading {
  max-width: 720px;
  margin-bottom: 3rem;
}

.section-heading p:last-child {
  color: var(--ink-soft);
  font-size: 1.13rem;
}

.intro-grid,
.loop-grid,
.status-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.card {
  padding: 2rem;
  border: 1px solid rgba(54, 127, 172, 0.12);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: 0 14px 40px rgba(43, 91, 126, 0.08);
}

.card-number {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  margin-bottom: 1.4rem;
  border-radius: 50%;
  color: var(--ink);
  background: var(--sun);
  font-weight: 900;
}

.card p,
.loop-card p,
.status-card p {
  margin-bottom: 0;
  color: var(--ink-soft);
}

.loops {
  position: relative;
  overflow: hidden;
  background: var(--cream);
}

.loop-card {
  position: relative;
  min-height: 330px;
  padding: 2.25rem;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--sky-100);
}

.loop-card:nth-child(2) {
  background: #fff1eb;
}

.loop-card::after {
  position: absolute;
  right: -36px;
  bottom: -52px;
  width: 150px;
  height: 100px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.7);
  box-shadow: -68px 16px 0 -15px rgba(255, 255, 255, 0.7);
  content: "";
}

.loop-grid {
  grid-template-columns: 1fr 1fr;
}

.loop-label {
  display: inline-block;
  margin-bottom: 4rem;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  color: var(--sky-600);
  background: rgba(255, 255, 255, 0.7);
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.visual-layout {
  display: grid;
  grid-template-columns: 1.18fr 0.82fr;
  gap: 1.4rem;
}

.scene-panel {
  position: relative;
  min-height: 540px;
  overflow: hidden;
  border-radius: 36px;
  background: #a9d7f4;
  box-shadow: var(--shadow);
}

.scene-panel img {
  width: 100%;
  height: 100%;
  min-height: 540px;
  object-fit: cover;
}

.scene-caption {
  position: absolute;
  right: 24px;
  bottom: 24px;
  left: 24px;
  padding: 1rem 1.2rem;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 12px 40px rgba(32, 59, 84, 0.16);
  backdrop-filter: blur(10px);
}

.scene-caption strong {
  display: block;
}

.scene-caption span {
  color: var(--ink-soft);
}

.play-panels {
  display: grid;
  gap: 1.4rem;
}

.screenshot-gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.4rem;
  margin-top: 1.4rem;
}

.screenshot {
  margin: 0;
  overflow: hidden;
  border: 1px solid rgba(54, 127, 172, 0.12);
  border-radius: 24px;
  background: var(--white);
  box-shadow: 0 14px 40px rgba(43, 91, 126, 0.1);
}

.screenshot img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.screenshot figcaption {
  display: grid;
  gap: 0.2rem;
  padding: 1.1rem 1.2rem 1.25rem;
}

.screenshot figcaption span {
  color: var(--ink-soft);
  font-size: 0.92rem;
}

.play-panel {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 255px;
  padding: 2rem;
  border-radius: var(--radius);
  background: var(--ink);
  color: var(--white);
}

.play-panel:last-child {
  color: var(--ink);
  background: var(--peach);
}

.guess-pill {
  align-self: flex-start;
  margin: 0 0 0.65rem;
  padding: 0.45rem 0.8rem;
  border-radius: 999px;
  color: var(--ink);
  background: var(--white);
  font-weight: 800;
}

.guess-pill:nth-child(2) {
  margin-left: 12%;
  opacity: 0.82;
}

.guess-pill:nth-child(3) {
  margin-left: 25%;
  opacity: 0.64;
}

.score {
  font-size: 3.6rem;
  font-weight: 900;
  letter-spacing: -0.06em;
  line-height: 1;
}

.status {
  background: #dcefff;
}

.status-grid {
  grid-template-columns: 1.25fr 0.75fr;
}

.status-card {
  padding: 2.5rem;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.8);
}

.status-card.primary {
  background: var(--white);
  box-shadow: var(--shadow);
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  margin-bottom: 1.4rem;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  color: #256644;
  background: #ddf7e9;
  font-size: 0.8rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.status-badge::before {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #319160;
  content: "";
}

.site-footer {
  padding: 62px 0 34px;
  color: #dbeafa;
  background: var(--ink);
}

.footer-inner {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2rem;
  align-items: end;
  width: min(calc(100% - 40px), var(--max));
  margin: 0 auto;
}

.footer-brand {
  color: var(--white);
  font-size: 1.4rem;
  font-weight: 900;
}

.footer-copy {
  max-width: 580px;
  margin: 0.4rem 0 0;
  color: #b9cee0;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 1rem;
}

.footer-links a {
  color: var(--white);
}

.copyright {
  grid-column: 1 / -1;
  margin: 2rem 0 0;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.13);
  color: #9fb8cc;
  font-size: 0.88rem;
}

.legal-header {
  position: relative;
  padding: 146px 0 64px;
  background: linear-gradient(180deg, #c6eaff, #eef9ff);
}

.legal-header .section-inner {
  max-width: 860px;
}

.legal-header h1 {
  font-size: clamp(2.8rem, 6vw, 5.2rem);
}

.updated {
  color: var(--ink-soft);
  font-weight: 700;
}

.legal-main {
  background: var(--cream);
}

.legal-content {
  width: min(calc(100% - 40px), 860px);
  margin: 0 auto;
  padding: 76px 0 100px;
}

.legal-content h2 {
  margin-top: 3rem;
  font-size: 2rem;
}

.legal-content h3 {
  margin-top: 2rem;
  font-size: 1.25rem;
}

.legal-content p,
.legal-content li {
  color: #3f586d;
}

.legal-content li + li {
  margin-top: 0.5rem;
}

.legal-summary {
  margin-bottom: 2.5rem;
  padding: 1.5rem;
  border-left: 5px solid var(--sky-400);
  border-radius: 0 18px 18px 0;
  background: var(--sky-100);
}

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 600ms ease, transform 600ms ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

@media (max-width: 860px) {
  .nav-toggle {
    display: grid;
    place-items: center;
  }

  .site-nav {
    position: absolute;
    top: 82px;
    right: 20px;
    display: none;
    min-width: 210px;
    padding: 0.6rem;
    border: 1px solid rgba(32, 59, 84, 0.1);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.97);
    box-shadow: var(--shadow);
  }

  .site-nav.is-open {
    display: grid;
  }

  .hero-inner {
    grid-template-columns: 1fr;
    gap: 2rem;
    padding-top: 132px;
    text-align: center;
  }

  .hero-copy,
  .button-row {
    justify-content: center;
    margin-right: auto;
    margin-left: auto;
  }

  .hero-art img {
    width: min(78vw, 470px);
  }

  .hero-note {
    right: 8%;
  }

  .intro-grid {
    grid-template-columns: 1fr;
  }

  .visual-layout,
  .status-grid,
  .screenshot-gallery {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .brand span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
  }

  .section {
    padding: 76px 0;
  }

  .hero {
    min-height: auto;
  }

  .hero-inner {
    padding-bottom: 74px;
  }

  h1 {
    font-size: clamp(3rem, 16vw, 4.4rem);
  }

  .loop-grid {
    grid-template-columns: 1fr;
  }

  .loop-card {
    min-height: 285px;
  }

  .scene-panel,
  .scene-panel img {
    min-height: 410px;
  }

  .footer-inner {
    grid-template-columns: 1fr;
  }

  .footer-links {
    justify-content: flex-start;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}

/* Minimal landing page */
.home {
  background: #f7fcff;
}

.logo-hero {
  display: grid;
  min-height: 78vh;
  place-items: center;
  padding: 5rem 1.5rem;
  background: #dff4ff;
}

.logo-hero img {
  width: min(620px, 82vw, 62vh);
  filter: drop-shadow(0 24px 36px rgba(55, 105, 138, 0.16));
}

.home-intro,
.home-closing {
  display: grid;
  justify-items: center;
  padding: 8rem 1.5rem;
  text-align: center;
}

.home-intro h1,
.home-closing h2 {
  max-width: 900px;
  margin-bottom: 1.5rem;
  font-size: clamp(2.5rem, 6vw, 5rem);
}

.home-intro p,
.home-closing p {
  max-width: 760px;
  margin: 0;
  color: var(--ink-soft);
  font-size: clamp(1.15rem, 2vw, 1.4rem);
}

.home-gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  width: min(calc(100% - 40px), 1280px);
  margin: 0 auto;
  padding: 0 0 8rem;
}

.home-gallery img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 18px;
  box-shadow: 0 16px 42px rgba(43, 91, 126, 0.13);
}

.home-closing {
  background: #dff4ff;
}

.home-closing h2 {
  font-size: clamp(2.3rem, 5vw, 4.5rem);
}

.home-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  align-items: center;
  justify-content: space-between;
  padding: 2rem max(1.5rem, calc((100% - 1180px) / 2));
  color: #9fb8cc;
  background: var(--ink);
  font-size: 0.9rem;
}

.home-footer p {
  margin: 0;
}

.home-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
}

.home-footer a {
  color: var(--white);
}

@media (max-width: 760px) {
  .logo-hero {
    min-height: 68vh;
  }

  .home-intro,
  .home-closing {
    padding: 6rem 1.25rem;
  }

  .home-gallery {
    grid-template-columns: 1fr;
    padding-bottom: 6rem;
  }

  .home-footer {
    align-items: flex-start;
    flex-direction: column;
  }
}
