:root {
  color-scheme: dark;
  --background: #68605d;
  --charcoal: #3a3334;
  --surface: #514847;
  --text: #fff;
  --text-soft: #e0dcd9;
  --blue: #5ba3d0;
  --blue-light: #a6d5f2;
  --gold: #dab972;
  --border: rgba(255, 255, 255, 0.14);
}

* {
  box-sizing: border-box;
}

html {
  background: var(--background);
  scroll-padding-top: 28px;
}

body {
  margin: 0;
  padding: env(safe-area-inset-top, 0px) env(safe-area-inset-right, 0px) env(safe-area-inset-bottom, 0px) env(safe-area-inset-left, 0px);
  background: linear-gradient(180deg, #625a57 0, var(--background) 850px);
  color: var(--text);
  font-family: "Lexend Deca", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-underline-offset: 4px;
}

a:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 6px;
}

img {
  max-width: 100%;
}

p,
h1,
h2,
h3,
figure {
  margin: 0;
}

h1,
h2,
h3 {
  line-height: 1.15;
}

.page-shell {
  width: min(1120px, calc(100% - 64px));
  margin-inline: auto;
}

.page-back-bar {
  position: sticky;
  top: env(safe-area-inset-top, 0px);
  z-index: 1001;
  padding-block: 6px;
  background: var(--background);
}

.page-back-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 6px 10px;
  color: var(--text);
  font-weight: 650;
  line-height: 1.4;
  text-decoration: none;
}

.page-back-link:hover {
  text-decoration: underline;
}

.skip-link {
  position: absolute;
  z-index: 2;
  left: 20px;
  top: 12px;
  padding: 10px 16px;
  border-radius: 6px;
  background: var(--charcoal);
  transform: translateY(-160%);
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header,
.site-header nav,
.brand,
.hero-actions,
.site-footer,
.site-footer nav {
  display: flex;
  align-items: center;
}

.site-header {
  min-height: 104px;
  justify-content: space-between;
  gap: 24px;
  border-bottom: 1px solid var(--border);
}

.brand {
  min-width: 0;
  gap: 12px;
  font-size: 0.94rem;
  font-weight: 850;
  letter-spacing: 0.06em;
  text-decoration: none;
}

.brand img {
  display: block;
  width: clamp(175px, 28vw, 320px);
  height: auto;
}

@media (max-width: 420px) {
  .site-header {
    justify-content: center;
  }

  .site-header nav {
    display: none;
  }

  .site-header .brand img {
    width: 285px;
  }
}

.site-header nav {
  flex: 0 0 auto;
  gap: 30px;
}

.guide-link {
  color: var(--text-soft);
  font-size: 0.85rem;
  font-weight: 650;
  text-decoration: none;
}

.guide-link:hover,
.text-link:hover,
.site-footer a:hover {
  color: var(--blue-light);
  text-decoration: underline;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  min-height: 54px;
  padding: 13px 22px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  background: var(--blue);
  color: #142e3d;
  font-size: 0.95rem;
  font-weight: 800;
  line-height: 1.5;
  text-decoration: none;
}

.button:hover {
  background: #74b5dc;
}

.button-small {
  min-height: 43px;
  padding: 9px 16px;
  gap: 18px;
  font-size: 0.82rem;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 312px);
  align-items: center;
  gap: clamp(36px, 7vw, 104px);
  padding-block: 70px 82px;
}

.eyebrow {
  margin-bottom: 16px;
  color: var(--gold);
  font-size: 0.73rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero h1 {
  font-size: clamp(2.8rem, 5.5vw, 4.3rem);
  font-weight: 800;
  letter-spacing: -0.055em;
  line-height: 1.07;
}

.product-name {
  display: block;
  margin-bottom: 20px;
  font-size: 1.12rem;
  font-weight: 700;
  letter-spacing: 0;
}

.blue-text {
  color: var(--blue-light);
}

.hero-intro {
  max-width: 570px;
  margin-top: 28px;
  color: var(--text-soft);
  font-size: 1.14rem;
  line-height: 1.65;
}

.hero-detail {
  max-width: 540px;
  margin-top: 15px;
  color: var(--text-soft);
  font-size: 0.96rem;
}

.hero-actions {
  flex-wrap: wrap;
  gap: 18px 28px;
  margin-top: 31px;
}

.text-link {
  font-size: 0.9rem;
  font-weight: 650;
}

.browser-note {
  margin-top: 16px;
  color: var(--text-soft);
  font-size: 0.78rem;
}

.mobile-preview {
  width: 100%;
  max-width: 312px;
  justify-self: center;
}

.mobile-image-frame {
  aspect-ratio: 390 / 720;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 16px;
  background: var(--charcoal);
  box-shadow: 0 16px 35px rgba(31, 23, 25, 0.2);
}

.mobile-image-frame img,
.desktop-preview img {
  display: block;
  width: 100%;
  height: auto;
}

.mobile-image-frame img {
  height: 100%;
  object-fit: cover;
  object-position: center;
}

figcaption {
  margin-top: 16px;
  color: var(--text-soft);
  font-size: 0.78rem;
  line-height: 1.5;
  text-align: center;
}

.how-section {
  padding: 46px 42px 35px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--charcoal);
}

.section-heading h2,
.play-section h2 {
  font-size: clamp(1.8rem, 3.4vw, 2.55rem);
  font-weight: 750;
  letter-spacing: -0.035em;
}

.section-heading p:last-child {
  margin-top: 14px;
  color: var(--text-soft);
}

.steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 30px;
  padding: 0;
  margin: 40px 0 32px;
  list-style: none;
}

.step-number {
  display: block;
  margin-bottom: 14px;
  color: var(--blue-light);
  font-size: 0.82rem;
  font-weight: 750;
}

.steps h3 {
  min-height: 2.5em;
  font-size: 1.03rem;
  line-height: 1.35;
}

.steps p {
  margin-top: 10px;
  color: var(--text-soft);
  font-size: 0.875rem;
  line-height: 1.7;
}

.tile-guide {
  display: flex;
  flex-wrap: wrap;
  gap: 20px 38px;
  padding-top: 27px;
  border-top: 1px solid var(--border);
}

.tile-example {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text-soft);
  font-size: 0.8rem;
}

.letter-tile {
  display: grid;
  position: relative;
  flex: 0 0 auto;
  place-items: center;
  width: 42px;
  height: 44px;
  padding-bottom: 3px;
  border-radius: 6px;
  color: var(--text);
  font-size: 1.3rem;
  font-weight: 800;
}

.revealed {
  background: var(--blue);
}

.letter-tile::after {
  content: "";
  position: absolute;
  width: 19px;
  height: 3px;
  bottom: 6px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.12);
}

.unlocked::after {
  background: var(--gold);
}

.hidden-letter {
  border: 1px solid var(--border);
  background: var(--charcoal);
}

.desktop-preview {
  margin-top: 38px;
}

.desktop-preview img {
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--charcoal);
}

.languages-section {
  padding-block: 76px;
}

.language-list {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
  padding: 0;
  margin: 32px 0 0;
  list-style: none;
}

.language-list li {
  padding: 20px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  font-size: 0.82rem;
  font-weight: 600;
}

.language-code {
  display: block;
  margin-bottom: 9px;
  color: var(--blue-light);
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.035em;
}

.play-section {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  padding: 38px 42px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--charcoal);
}

.play-section .eyebrow {
  margin-bottom: 12px;
}

.play-section p:last-child {
  margin-top: 12px;
  color: var(--text-soft);
  font-size: 0.9rem;
}

.play-section .button {
  flex: 0 0 auto;
}

.site-footer {
  justify-content: space-between;
  gap: 20px;
  padding-block: 34px;
  color: var(--text-soft);
  font-size: 0.78rem;
}

.site-footer strong {
  color: var(--text);
  font-weight: 650;
}

.site-footer nav {
  flex-wrap: wrap;
  gap: 20px;
}

@media (max-width: 960px) {
  .hero {
    grid-template-columns: minmax(0, 1fr) 250px;
    gap: 36px;
    padding-block: 55px 64px;
  }

  .hero h1 {
    font-size: clamp(2.65rem, 5.5vw, 3.65rem);
  }

  .steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 30px 40px;
  }

  .steps h3 {
    min-height: 0;
  }

  .language-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .play-section {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 700px) {
  .page-shell {
    width: calc(100% - 36px);
  }

  .site-header {
    min-height: 86px;
    gap: 16px;
  }

  .site-header nav {
    gap: 14px;
  }

  .brand {
    gap: 8px;
    font-size: 0.78rem;
  }

  .brand img {
    width: 285px;
    height: auto;
  }

  .guide-link {
    display: none;
  }

  .button-small {
    min-height: 42px;
    gap: 10px;
    padding-inline: 12px;
    font-size: 0.78rem;
  }

  .hero {
    grid-template-columns: minmax(0, 1fr);
    gap: 38px;
    padding-block: 43px 48px;
  }

  .hero h1 {
    font-size: clamp(2.7rem, 9.2vw, 4rem);
  }

  .hero-intro {
    margin-top: 22px;
    font-size: 1.04rem;
  }

  .hero-detail {
    font-size: 0.92rem;
  }

  .mobile-preview {
    max-width: 280px;
  }

  .how-section {
    padding: 30px 24px;
  }

  .steps {
    grid-template-columns: minmax(0, 1fr);
    gap: 26px;
    margin-top: 28px;
  }

  .step-number {
    margin-bottom: 8px;
  }

  .steps p {
    margin-top: 7px;
  }

  .tile-guide {
    gap: 18px;
  }

  .tile-example {
    flex: 1 1 160px;
  }

  .desktop-preview {
    margin-top: 28px;
  }

  .languages-section {
    padding-block: 48px;
  }

  .language-list {
    gap: 10px;
    margin-top: 24px;
  }

  .language-list li {
    padding: 15px 12px;
    font-size: 0.78rem;
  }

  .play-section {
    padding: 30px 24px;
  }

  .site-footer {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
    padding-block: 28px;
  }
}

@media (max-width: 360px) {
  .language-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hero h1 {
    font-size: 2.55rem;
  }

  .brand {
    letter-spacing: 0.02em;
  }
}
