:root {
  --paper: #f2eee3;
  --paper-deep: #e8e2d3;
  --ink: #10172a;
  --ink-soft: #48516a;
  --blue: #2348ff;
  --blue-dark: #1731b8;
  --yellow: #ffdb4d;
  --coral: #ff7452;
  --mint: #9decc2;
  --white: #fffdf8;
  --line: rgba(16, 23, 42, 0.16);
  --shadow: 8px 8px 0 var(--ink);
  --radius-sm: 10px;
  --radius-md: 20px;
  --radius-lg: 34px;
  --display: "Bricolage Grotesque", "Avenir Next Condensed", "Trebuchet MS", sans-serif;
  --mono: "DM Mono", "SFMono-Regular", Menlo, monospace;
  --page-pad: clamp(20px, 4vw, 64px);
}

* {
  box-sizing: border-box;
}

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

body {
  min-width: 320px;
  margin: 0;
  overflow-x: hidden;
  color: var(--ink);
  background:
    radial-gradient(circle at 88% 9%, rgba(255, 219, 77, 0.42), transparent 24rem),
    radial-gradient(circle at 4% 55%, rgba(157, 236, 194, 0.34), transparent 29rem),
    var(--paper);
  font-family: var(--display);
  font-size: 18px;
  line-height: 1.5;
}

button,
input {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  color: inherit;
}

a {
  color: inherit;
}

::selection {
  color: var(--white);
  background: var(--blue);
}

.page-grain {
  position: fixed;
  z-index: 100;
  inset: 0;
  pointer-events: none;
  opacity: 0.13;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 160 160' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.23'/%3E%3C/svg%3E");
  mix-blend-mode: multiply;
}

.topbar {
  position: relative;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(100%, 1500px);
  min-height: 92px;
  margin: 0 auto;
  padding: 20px var(--page-pad);
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: var(--ink);
  font-size: 1.42rem;
  font-weight: 800;
  letter-spacing: -0.06em;
  text-decoration: none;
}

.wordmark em {
  color: var(--blue);
  font-style: normal;
}

.wordmark-mark {
  display: grid;
  width: 37px;
  height: 37px;
  place-items: center;
  border: 2px solid var(--ink);
  border-radius: 10px;
  background: var(--blue);
  box-shadow: 3px 3px 0 var(--ink);
  transform: rotate(-4deg);
}

.wordmark-mark svg {
  width: 23px;
  fill: var(--yellow);
}

.topnav {
  display: flex;
  align-items: center;
  gap: 12px;
}

.ocean-nav-link {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 42px;
  padding: 8px 15px;
  border: 1.5px solid var(--ink);
  border-radius: 999px;
  color: var(--white);
  background: #087b80;
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.07em;
  text-decoration: none;
  text-transform: uppercase;
  transition: transform 160ms ease, background 160ms ease;
}

.ocean-nav-link:hover {
  background: var(--coral);
  transform: translateY(-2px);
}

.ocean-nav-dot {
  width: 8px;
  height: 8px;
  border: 1px solid currentColor;
  border-radius: 50%;
  background: var(--mint);
  box-shadow: 0 0 0 3px rgba(157, 236, 194, 0.18);
}

.language-button,
.main-site-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding: 8px 15px;
  border: 1.5px solid var(--ink);
  border-radius: 999px;
  background: rgba(255, 253, 248, 0.62);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.07em;
  text-decoration: none;
  text-transform: uppercase;
  transition: transform 160ms ease, background 160ms ease, color 160ms ease;
  backdrop-filter: blur(12px);
}

.language-button {
  cursor: pointer;
}

.language-button span:last-child {
  color: var(--blue);
  font-size: 1rem;
}

.main-site-link {
  color: var(--white);
  background: var(--ink);
}

.language-button:hover,
.main-site-link:hover {
  transform: translateY(-2px);
}

.main-site-link:hover {
  background: var(--blue);
}

main,
footer {
  position: relative;
  z-index: 1;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(320px, 0.68fr);
  gap: clamp(44px, 7vw, 108px);
  align-items: center;
  width: min(100%, 1500px);
  min-height: min(790px, calc(100svh - 94px));
  margin: 0 auto;
  padding: 48px var(--page-pad) 88px;
}

.hero-copy {
  max-width: 880px;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 24px;
  color: var(--ink-soft);
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.pulse-dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--blue);
  box-shadow: 0 0 0 0 rgba(35, 72, 255, 0.36);
  animation: pulse 2.4s infinite;
}

.hero h1 {
  max-width: 900px;
  margin: 0;
  font-size: clamp(4.15rem, 9.7vw, 9.25rem);
  font-weight: 800;
  letter-spacing: -0.082em;
  line-height: 0.81;
}

.hero h1 span {
  display: block;
}

.title-accent {
  position: relative;
  z-index: 0;
  width: max-content;
  max-width: 100%;
  color: var(--white);
  transform: translateX(-0.02em);
}

.title-accent::before {
  position: absolute;
  z-index: -1;
  top: 0.08em;
  right: -0.08em;
  bottom: 0.02em;
  left: -0.04em;
  border-radius: 0.08em;
  background: var(--blue);
  content: "";
  transform: rotate(-1.3deg);
}

.hero-intro {
  max-width: 650px;
  margin: 36px 0 0;
  color: var(--ink-soft);
  font-size: clamp(1.05rem, 1.55vw, 1.35rem);
  line-height: 1.5;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 25px;
  margin-top: 34px;
}

.primary-button,
.daily-button,
.start-button,
.secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  min-height: 54px;
  padding: 13px 22px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  cursor: pointer;
  font-family: var(--display);
  font-size: 1rem;
  font-weight: 750;
  text-decoration: none;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.primary-button,
.start-button {
  color: var(--white);
  background: var(--ink);
  box-shadow: 4px 4px 0 var(--blue);
}

.primary-button:hover,
.start-button:hover {
  box-shadow: 2px 2px 0 var(--blue);
  transform: translate(2px, 2px);
}

.text-link {
  padding-bottom: 3px;
  border-bottom: 1.5px solid var(--ink);
  font-size: 0.9rem;
  font-weight: 650;
  text-decoration: none;
}

.text-link:hover {
  color: var(--blue);
  border-color: var(--blue);
}

.local-score {
  display: flex;
  gap: 0;
  width: max-content;
  max-width: 100%;
  margin: 54px 0 0;
}

.local-score div {
  min-width: 145px;
  padding: 0 24px;
  border-left: 1px solid var(--line);
}

.local-score div:first-child {
  padding-left: 0;
  border-left: 0;
}

.local-score dt {
  margin-bottom: 3px;
  color: var(--ink-soft);
  font-family: var(--mono);
  font-size: 0.64rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.local-score dd {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 750;
  letter-spacing: -0.035em;
}

.local-score .unit {
  margin-left: 3px;
  color: var(--ink-soft);
  font-family: var(--mono);
  font-size: 0.72rem;
}

.daily-card {
  position: relative;
  width: min(100%, 440px);
  min-height: 510px;
  margin-left: auto;
  padding: 58px 38px 30px;
  border: 2.5px solid var(--ink);
  border-radius: var(--radius-lg) var(--radius-lg) 78px var(--radius-lg);
  background: var(--yellow);
  box-shadow: var(--shadow), 18px 30px 0 rgba(35, 72, 255, 0.1);
  transform: rotate(1.6deg);
}

.daily-card::before {
  position: absolute;
  top: 23px;
  right: 29px;
  width: 62px;
  height: 62px;
  border: 2px solid var(--ink);
  border-radius: 50%;
  content: "";
  background: repeating-radial-gradient(circle, transparent 0 4px, rgba(16, 23, 42, 0.18) 5px 6px);
}

.daily-card::after {
  position: absolute;
  right: 35px;
  bottom: 25px;
  width: 43px;
  height: 16px;
  border-radius: 50%;
  background: rgba(16, 23, 42, 0.2);
  content: "";
  filter: blur(5px);
  transform: rotate(-8deg);
}

.daily-sticker {
  position: absolute;
  top: -25px;
  left: 30px;
  display: grid;
  width: 94px;
  height: 94px;
  place-items: center;
  border: 2px solid var(--ink);
  border-radius: 50%;
  color: var(--white);
  background: var(--coral);
  font-family: var(--mono);
  font-size: 0.66rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-align: center;
  text-transform: uppercase;
  transform: rotate(-11deg);
  box-shadow: 4px 4px 0 var(--ink);
}

.daily-kicker,
.game-index {
  margin: 0 0 15px;
  font-family: var(--mono);
  font-size: 0.66rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.daily-kicker {
  margin-left: 74px;
}

.daily-card h2 {
  margin: 0;
  font-size: 2.35rem;
  font-weight: 800;
  letter-spacing: -0.06em;
  line-height: 0.96;
}

.daily-game {
  margin: 45px 0 5px;
  font-size: 1.35rem;
  font-weight: 750;
  letter-spacing: -0.04em;
}

.daily-goal {
  min-height: 54px;
  margin: 0 0 24px;
  color: var(--ink-soft);
  font-size: 0.96rem;
  line-height: 1.4;
}

.daily-button {
  justify-content: space-between;
  width: 100%;
  color: var(--white);
  background: var(--ink);
}

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

.button-orbit {
  display: grid;
  width: 33px;
  height: 33px;
  place-items: center;
  border-radius: 50%;
  color: var(--ink);
  background: var(--yellow);
  transition: transform 260ms ease;
}

.daily-button:hover .button-orbit {
  transform: rotate(120deg);
}

.daily-progress {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 20px;
  font-family: var(--mono);
  font-size: 0.63rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.daily-bars {
  display: flex;
  gap: 4px;
}

.daily-bars i {
  display: block;
  width: 15px;
  height: 19px;
  border: 1px solid var(--ink);
  border-radius: 3px;
  background: transparent;
}

.daily-card.is-complete .daily-bars i {
  background: var(--blue);
}

.places {
  width: min(100%, 1500px);
  margin: 0 auto;
  padding: 88px var(--page-pad) 110px;
  border-top: 1.5px solid var(--line);
}

.ocean-gate {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 0.82fr) minmax(0, 1.18fr);
  min-height: 470px;
  overflow: hidden;
  border: 2.5px solid var(--ink);
  border-radius: 42px 42px 110px 42px;
  color: var(--white);
  background: var(--ink);
  text-decoration: none;
  box-shadow: 0 0 0 var(--ink);
  transition: box-shadow 220ms ease, transform 220ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.ocean-gate:hover,
.ocean-gate:focus-visible {
  outline: none;
  box-shadow: 11px 11px 0 var(--ink);
  transform: translate(-5px, -5px);
}

.ocean-gate:focus-visible {
  outline: 3px solid var(--white);
  outline-offset: -8px;
}

.ocean-gate-copy {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  padding: clamp(32px, 5vw, 68px);
  background:
    radial-gradient(circle at 12% 100%, rgba(255, 116, 82, 0.2), transparent 19rem),
    var(--ink);
}

.ocean-gate-copy::after {
  position: absolute;
  top: 31px;
  right: 30px;
  width: 17px;
  height: 17px;
  border: 1.5px solid rgba(255, 253, 248, 0.5);
  border-radius: 50%;
  content: "";
  box-shadow: 0 0 0 8px rgba(255, 253, 248, 0.06);
}

.ocean-gate-kicker {
  margin-bottom: 24px;
  color: var(--mint);
  font-family: var(--mono);
  font-size: 0.64rem;
  letter-spacing: 0.09em;
}

.ocean-gate-copy strong {
  max-width: 490px;
  font-size: clamp(3.2rem, 6.2vw, 6.6rem);
  font-weight: 780;
  letter-spacing: -0.077em;
  line-height: 0.84;
}

.ocean-gate-description {
  max-width: 470px;
  margin-top: 28px;
  color: rgba(255, 253, 248, 0.69);
  font-size: 1rem;
  line-height: 1.45;
}

.ocean-gate-cta {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-top: 34px;
  padding-bottom: 4px;
  border-bottom: 1.5px solid var(--mint);
  color: var(--mint);
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.ocean-gate-cta i {
  display: inline-grid;
  width: 25px;
  height: 25px;
  place-items: center;
  border-radius: 50%;
  color: var(--ink);
  background: var(--mint);
  font-style: normal;
  transition: transform 180ms ease;
}

.ocean-gate:hover .ocean-gate-cta i {
  transform: translateX(4px) rotate(-8deg);
}

.ocean-gate-art {
  position: relative;
  display: block;
  min-width: 0;
  overflow: hidden;
  background: #ef8e6f;
}

.ocean-gate-art svg {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 470px;
  object-fit: cover;
  transition: transform 700ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.ocean-gate:hover .ocean-gate-art svg {
  transform: scale(1.025);
}

.ocean-gate-stamp {
  position: absolute;
  top: 24px;
  left: 24px;
  display: grid;
  width: 73px;
  height: 73px;
  place-items: center;
  border: 1.5px solid rgba(16, 23, 42, 0.75);
  border-radius: 50%;
  color: var(--ink);
  background: rgba(255, 253, 248, 0.78);
  font-family: var(--mono);
  font-size: 0.58rem;
  letter-spacing: 0.1em;
  line-height: 1.3;
  text-align: center;
  transform: rotate(-9deg);
  backdrop-filter: blur(6px);
}

.gate-wave {
  transform-box: fill-box;
  transform-origin: center;
  animation: gate-wave 5s ease-in-out infinite alternate;
}

.gate-wave-b {
  animation-delay: -2.4s;
  animation-duration: 6.5s;
}

.gate-duck {
  transform-box: fill-box;
  transform-origin: center bottom;
  animation: gate-bob 3.1s ease-in-out infinite;
}

.gate-duckling {
  transform-box: fill-box;
  transform-origin: center bottom;
  animation: gate-bob 2.4s ease-in-out -0.7s infinite;
}

.gate-duckling-two {
  animation-delay: -1.4s;
  animation-duration: 2.8s;
}

.gate-fish {
  transform-box: fill-box;
  transform-origin: center;
  animation: gate-drift 7s ease-in-out infinite alternate;
}

.gate-fish-b {
  animation-delay: -3.5s;
  animation-duration: 9s;
}

.gate-ripple {
  animation: gate-ripple 4s ease-in-out infinite;
}

@keyframes gate-bob {
  50% {
    transform: translateY(-7px) rotate(-0.8deg);
  }
}

@keyframes gate-drift {
  to {
    transform: translate(44px, -7px);
  }
}

@keyframes gate-wave {
  to {
    transform: translateX(18px) scaleX(1.03);
  }
}

@keyframes gate-ripple {
  50% {
    opacity: 0.22;
    transform: translateX(-20px) scaleX(0.92);
  }
}

.arcade {
  width: min(100%, 1500px);
  margin: 0 auto;
  padding: 90px var(--page-pad) 110px;
  border-top: 1.5px solid var(--line);
}

.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
  margin-bottom: 40px;
}

.section-heading .eyebrow {
  margin-bottom: 14px;
}

.section-heading h2 {
  max-width: 760px;
  margin: 0;
  font-size: clamp(2.2rem, 4.7vw, 4.8rem);
  font-weight: 760;
  letter-spacing: -0.067em;
  line-height: 0.95;
}

.section-heading > p {
  max-width: 220px;
  margin: 0 0 8px;
  color: var(--ink-soft);
  font-family: var(--mono);
  font-size: 0.68rem;
  line-height: 1.5;
  text-align: right;
  text-transform: uppercase;
}

.game-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(18px, 2.7vw, 38px);
}

.game-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 390px;
  overflow: hidden;
  padding: 27px 27px 82px;
  border: 2px solid var(--ink);
  border-radius: var(--radius-lg);
  cursor: pointer;
  text-align: left;
  box-shadow: 0 0 0 var(--ink);
  transition: transform 220ms cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 220ms ease;
}

.game-card:hover,
.game-card:focus-visible {
  z-index: 2;
  outline: none;
  box-shadow: 9px 9px 0 var(--ink);
  transform: translate(-4px, -4px) rotate(-0.4deg);
}

.game-card:focus-visible {
  outline: 3px solid var(--white);
  outline-offset: -7px;
}

.card-star {
  color: var(--white);
  background: var(--blue);
}

.card-echo {
  color: var(--ink);
  background: var(--yellow);
}

.card-memory {
  color: var(--ink);
  background: var(--coral);
}

.card-word {
  color: var(--ink);
  background: var(--mint);
}

.card-number {
  position: absolute;
  top: 23px;
  right: 25px;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
}

.card-copy {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  width: 56%;
  margin-top: auto;
  margin-bottom: 30px;
}

.card-tag {
  margin-bottom: 8px;
  font-family: var(--mono);
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.1em;
}

.card-copy strong {
  margin-bottom: 10px;
  font-size: clamp(2.1rem, 3.7vw, 3.8rem);
  font-weight: 800;
  letter-spacing: -0.065em;
  line-height: 0.9;
}

.card-copy > span:last-child {
  max-width: 340px;
  font-size: 0.92rem;
  line-height: 1.35;
  opacity: 0.83;
}

.card-best {
  position: absolute;
  bottom: 28px;
  left: 27px;
  display: flex;
  align-items: baseline;
  gap: 7px;
  font-family: var(--mono);
  font-size: 0.61rem;
  letter-spacing: 0.07em;
}

.card-best b {
  font-family: var(--display);
  font-size: 1.05rem;
  letter-spacing: -0.03em;
}

.card-arrow {
  position: absolute;
  right: 25px;
  bottom: 23px;
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 1.5px solid currentColor;
  border-radius: 50%;
  font-size: 1.15rem;
  transition: transform 180ms ease, background 180ms ease, color 180ms ease;
}

.game-card:hover .card-arrow {
  color: var(--ink);
  background: var(--white);
  transform: rotate(45deg);
}

.card-art {
  position: absolute;
  top: 30px;
  right: 25px;
  width: 45%;
  height: 56%;
  pointer-events: none;
}

.big-star,
.small-star,
.tiny-star {
  position: absolute;
  display: block;
  background: var(--yellow);
  clip-path: polygon(50% 0%, 61% 36%, 100% 38%, 69% 60%, 79% 100%, 50% 76%, 21% 100%, 31% 60%, 0% 38%, 39% 36%);
}

.big-star {
  top: 15%;
  right: 8%;
  width: 130px;
  height: 130px;
  transform: rotate(8deg);
}

.small-star {
  top: 58%;
  left: 13%;
  width: 54px;
  height: 54px;
  background: var(--coral);
  transform: rotate(-15deg);
}

.tiny-star {
  top: 21%;
  left: 19%;
  width: 27px;
  height: 27px;
  background: var(--white);
  transform: rotate(15deg);
}

.echo-art i {
  position: absolute;
  display: block;
  border: 2px solid var(--ink);
  border-radius: 50%;
}

.echo-art i:nth-child(1) {
  top: 50%;
  left: 50%;
  width: 30px;
  height: 30px;
  background: var(--blue);
  transform: translate(-50%, -50%);
}

.echo-art i:nth-child(2) {
  top: 50%;
  left: 50%;
  width: 88px;
  height: 88px;
  transform: translate(-50%, -50%);
}

.echo-art i:nth-child(3) {
  top: 50%;
  left: 50%;
  width: 152px;
  height: 152px;
  border-color: rgba(16, 23, 42, 0.45);
  transform: translate(-50%, -50%);
}

.echo-art i:nth-child(4) {
  top: 50%;
  left: 50%;
  width: 220px;
  height: 220px;
  border-color: rgba(16, 23, 42, 0.2);
  transform: translate(-50%, -50%);
}

.memory-art {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 9px;
  padding: 15px;
  border: 1.5px solid var(--ink);
  border-radius: 22px;
  background: rgba(255, 253, 248, 0.3);
  transform: rotate(4deg);
}

.memory-art i {
  display: grid;
  place-items: center;
  border: 1.5px solid var(--ink);
  border-radius: 12px;
  background: var(--yellow);
  font-size: 1.5rem;
  font-style: normal;
}

.memory-art i:nth-child(2),
.memory-art i:nth-child(3) {
  background: var(--blue);
  color: var(--white);
}

.word-art {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  width: 39%;
  transform: rotate(-4deg);
}

.word-art i {
  display: grid;
  min-height: 68px;
  place-items: center;
  border: 1.5px solid var(--ink);
  border-radius: 8px;
  background: var(--white);
  font-family: var(--mono);
  font-size: 1.65rem;
  font-style: normal;
  font-weight: 500;
  box-shadow: 3px 3px 0 var(--ink);
}

.word-art i:nth-child(2) {
  background: var(--yellow);
}

.word-art i:nth-child(3) {
  background: var(--blue);
  color: var(--white);
}

.manifesto {
  position: relative;
  width: min(calc(100% - (2 * var(--page-pad))), 1372px);
  margin: 0 auto 120px;
  padding: 70px clamp(28px, 8vw, 130px) 42px;
  overflow: hidden;
  border: 2px solid var(--ink);
  border-radius: 46px;
  color: var(--white);
  background: var(--ink);
  text-align: center;
}

.manifesto::before,
.manifesto::after {
  position: absolute;
  width: 190px;
  height: 190px;
  border-radius: 50%;
  content: "";
}

.manifesto::before {
  top: -80px;
  left: -60px;
  background: var(--blue);
}

.manifesto::after {
  right: -70px;
  bottom: -100px;
  background: var(--yellow);
}

.manifesto-mark {
  position: relative;
  z-index: 1;
  margin-bottom: 18px;
  color: var(--yellow);
  font-size: 2rem;
}

.manifesto p {
  position: relative;
  z-index: 1;
  max-width: 900px;
  margin: 0 auto;
  font-size: clamp(1.65rem, 3.35vw, 3.6rem);
  font-weight: 650;
  letter-spacing: -0.052em;
  line-height: 1.08;
}

.manifesto-rule {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 18px;
  margin-top: 55px;
  color: rgba(255, 253, 248, 0.6);
  font-family: var(--mono);
  font-size: 0.65rem;
  letter-spacing: 0.12em;
}

.manifesto-rule i {
  flex: 1;
  height: 1px;
  background: rgba(255, 253, 248, 0.24);
}

footer {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  width: min(100%, 1500px);
  margin: 0 auto;
  padding: 30px var(--page-pad) 42px;
  border-top: 1.5px solid var(--line);
  font-family: var(--mono);
  font-size: 0.67rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.footer-brand {
  font-family: var(--display);
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  text-decoration: none;
}

.footer-brand span {
  color: var(--blue);
}

footer p {
  margin: 0;
  color: var(--ink-soft);
  text-align: center;
}

footer a:last-child {
  justify-self: end;
  text-decoration: none;
}

footer a:last-child:hover {
  color: var(--blue);
}

/* Game dialog */

.game-dialog {
  width: min(calc(100% - 30px), 1080px);
  max-width: none;
  max-height: calc(100dvh - 30px);
  padding: 0;
  overflow: auto;
  border: 0;
  border-radius: 30px;
  color: var(--ink);
  background: var(--paper);
  box-shadow: 0 28px 100px rgba(16, 23, 42, 0.42);
}

.game-dialog::backdrop {
  background: rgba(16, 23, 42, 0.72);
  backdrop-filter: blur(6px);
}

.game-dialog[open] {
  animation: dialog-in 220ms cubic-bezier(0.2, 0.85, 0.2, 1);
}

.game-shell {
  min-height: min(720px, calc(100dvh - 30px));
  padding: clamp(20px, 4vw, 44px);
}

.game-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding-bottom: 20px;
  border-bottom: 1.5px solid var(--line);
}

.game-header .game-index {
  margin-bottom: 6px;
  color: var(--blue);
}

.game-header h2 {
  margin: 0;
  font-size: clamp(2.1rem, 5vw, 4rem);
  font-weight: 800;
  letter-spacing: -0.065em;
  line-height: 0.92;
}

.close-button {
  display: grid;
  flex: 0 0 auto;
  width: 45px;
  height: 45px;
  place-items: center;
  border: 1.5px solid var(--ink);
  border-radius: 50%;
  cursor: pointer;
  background: var(--white);
  font-size: 1.55rem;
  line-height: 1;
  transition: color 160ms ease, background 160ms ease, transform 160ms ease;
}

.close-button:hover {
  color: var(--white);
  background: var(--ink);
  transform: rotate(8deg);
}

.game-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 15px 0 20px;
  color: var(--ink-soft);
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.game-topline p {
  margin: 0;
}

.game-topline b {
  color: var(--ink);
  font-family: var(--display);
  font-size: 1rem;
}

.game-stage {
  position: relative;
  min-height: 450px;
  overflow: hidden;
  border: 2px solid var(--ink);
  border-radius: 24px;
  background: var(--white);
}

.game-hud {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  padding: 16px;
  border-bottom: 1.5px solid var(--line);
  background: var(--paper-deep);
}

.hud-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 2px 10px;
  border-left: 1px solid var(--line);
}

.hud-item:first-child {
  border-left: 0;
}

.hud-item span {
  color: var(--ink-soft);
  font-family: var(--mono);
  font-size: 0.58rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hud-item b {
  font-size: 1.45rem;
  font-weight: 750;
  letter-spacing: -0.04em;
}

.game-start,
.game-result {
  position: absolute;
  z-index: 5;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 30px;
  background: rgba(255, 253, 248, 0.93);
  text-align: center;
  backdrop-filter: blur(7px);
}

.game-start-symbol {
  display: grid;
  width: 78px;
  height: 78px;
  margin-bottom: 20px;
  place-items: center;
  border: 2px solid var(--ink);
  border-radius: 24px;
  color: var(--white);
  background: var(--blue);
  font-size: 2.2rem;
  box-shadow: 5px 5px 0 var(--ink);
  transform: rotate(-4deg);
}

.game-start h3,
.game-result h3 {
  margin: 0 0 8px;
  font-size: clamp(1.8rem, 4vw, 3rem);
  font-weight: 800;
  letter-spacing: -0.055em;
  line-height: 1;
}

.game-start p,
.game-result p {
  max-width: 480px;
  margin: 0 0 23px;
  color: var(--ink-soft);
  font-size: 0.97rem;
  line-height: 1.45;
}

.result-score {
  display: block;
  margin-bottom: 3px;
  color: var(--blue);
  font-size: clamp(3.8rem, 10vw, 7rem);
  font-weight: 800;
  letter-spacing: -0.08em;
  line-height: 0.82;
}

.result-label {
  display: block;
  margin-bottom: 20px;
  color: var(--ink-soft);
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.result-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

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

.secondary-button:hover {
  background: var(--paper-deep);
  transform: translateY(-2px);
}

.no-script {
  padding: 20px;
  font-family: var(--mono);
  font-size: 0.75rem;
}

/* Star Catch */

.star-field {
  position: absolute;
  inset: 70px 0 0;
  overflow: hidden;
  background:
    radial-gradient(circle at 18% 18%, rgba(157, 236, 194, 0.24) 0 1px, transparent 2px),
    radial-gradient(circle at 71% 42%, rgba(255, 219, 77, 0.32) 0 1px, transparent 2px),
    radial-gradient(circle at 43% 78%, rgba(255, 255, 255, 0.22) 0 1px, transparent 2px),
    var(--ink);
  background-size: 41px 41px, 67px 67px, 83px 83px, auto;
  cursor: crosshair;
  touch-action: manipulation;
}

.starcatch-star {
  position: absolute;
  display: block;
  width: var(--star-size, 54px);
  height: var(--star-size, 54px);
  padding: 0;
  border: 0;
  cursor: pointer;
  background: var(--yellow);
  clip-path: polygon(50% 0%, 61% 36%, 100% 38%, 69% 60%, 79% 100%, 50% 76%, 21% 100%, 31% 60%, 0% 38%, 39% 36%);
  filter: drop-shadow(0 0 10px rgba(255, 219, 77, 0.8));
  animation: star-in 140ms ease-out;
  transform: translate(-50%, -50%);
  transition: width 180ms ease, height 180ms ease;
}

.starcatch-star:nth-child(3n) {
  background: var(--coral);
  filter: drop-shadow(0 0 10px rgba(255, 116, 82, 0.78));
}

.starcatch-star:nth-child(4n) {
  background: var(--mint);
  filter: drop-shadow(0 0 10px rgba(157, 236, 194, 0.75));
}

.starcatch-star:focus-visible {
  outline: 2px solid var(--white);
  outline-offset: 3px;
}

.combo-burst {
  position: absolute;
  z-index: 2;
  color: var(--yellow);
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 500;
  pointer-events: none;
  animation: float-up 650ms ease-out forwards;
}

/* Echo */

.echo-wrap {
  display: grid;
  min-height: 450px;
  place-items: center;
  padding: 25px;
  background:
    linear-gradient(rgba(16, 23, 42, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(16, 23, 42, 0.045) 1px, transparent 1px),
    var(--paper);
  background-size: 26px 26px;
}

.echo-board {
  display: grid;
  grid-template-columns: repeat(2, minmax(90px, 160px));
  gap: 13px;
  padding: 16px;
  border: 2px solid var(--ink);
  border-radius: 26px;
  background: var(--ink);
  box-shadow: 8px 8px 0 rgba(35, 72, 255, 0.22);
  transform: rotate(1.2deg);
}

.echo-pad {
  aspect-ratio: 1;
  border: 0;
  border-radius: 18px;
  cursor: pointer;
  opacity: 0.55;
  transition: opacity 80ms ease, transform 80ms ease, filter 80ms ease;
}

.echo-pad[data-pad="0"] {
  background: var(--blue);
}

.echo-pad[data-pad="1"] {
  background: var(--yellow);
}

.echo-pad[data-pad="2"] {
  background: var(--coral);
}

.echo-pad[data-pad="3"] {
  background: var(--mint);
}

.echo-pad.is-lit {
  opacity: 1;
  filter: brightness(1.22) saturate(1.1);
  transform: scale(0.96);
}

.echo-pad.is-wrong {
  background: #e32929;
  opacity: 1;
}

.echo-hint {
  margin: 26px 0 0;
  color: var(--ink-soft);
  font-family: var(--mono);
  font-size: 0.67rem;
  letter-spacing: 0.04em;
  text-align: center;
  text-transform: uppercase;
}

/* Pair Loop */

.pair-wrap {
  min-height: 450px;
  padding: clamp(14px, 3vw, 28px);
  background:
    radial-gradient(circle at 20% 30%, rgba(255, 219, 77, 0.22), transparent 220px),
    var(--coral);
}

.pair-board {
  display: grid;
  grid-template-columns: repeat(4, minmax(52px, 96px));
  gap: clamp(7px, 1.5vw, 12px);
  justify-content: center;
  margin: 0 auto;
}

.pair-card {
  position: relative;
  aspect-ratio: 1;
  padding: 0;
  border: 1.5px solid var(--ink);
  border-radius: 15px;
  cursor: pointer;
  background: transparent;
  perspective: 700px;
}

.pair-card-inner {
  position: absolute;
  inset: 0;
  border-radius: 13px;
  transition: transform 320ms cubic-bezier(0.2, 0.8, 0.2, 1);
  transform-style: preserve-3d;
}

.pair-card.is-flipped .pair-card-inner,
.pair-card.is-matched .pair-card-inner {
  transform: rotateY(180deg);
}

.pair-face {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 13px;
  backface-visibility: hidden;
}

.pair-back {
  color: var(--yellow);
  background:
    linear-gradient(45deg, transparent 44%, rgba(255, 219, 77, 0.22) 45% 55%, transparent 56%),
    var(--blue);
  background-size: 16px 16px;
  font-size: 1.15rem;
}

.pair-front {
  background: var(--white);
  font-size: clamp(1.45rem, 3vw, 2.15rem);
  transform: rotateY(180deg);
}

.pair-card.is-matched {
  cursor: default;
}

.pair-card.is-matched .pair-front {
  background: var(--mint);
}

.pair-card.is-miss .pair-front {
  animation: shake 280ms ease;
}

/* Word Warp */

.word-wrap {
  min-height: 450px;
  padding: clamp(22px, 5vw, 50px);
  background:
    radial-gradient(circle at 50% 10%, rgba(255, 255, 255, 0.7), transparent 300px),
    var(--mint);
}

.word-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 330px;
  text-align: center;
}

.word-clue {
  max-width: 540px;
  margin: 0 0 20px;
  color: var(--ink-soft);
  font-size: 0.9rem;
}

.scramble {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-bottom: 27px;
}

.scramble-letter {
  display: grid;
  width: clamp(38px, 6vw, 54px);
  height: clamp(43px, 6.7vw, 60px);
  place-items: center;
  border: 1.5px solid var(--ink);
  border-radius: 8px;
  background: var(--white);
  font-family: var(--mono);
  font-size: clamp(1.15rem, 2.5vw, 1.6rem);
  font-weight: 500;
  box-shadow: 3px 3px 0 var(--ink);
  transform: rotate(var(--tilt, 0deg));
}

.scramble-letter:nth-child(odd) {
  background: var(--yellow);
  transform: rotate(-2deg);
}

.scramble-letter:nth-child(even) {
  transform: rotate(1.5deg);
}

.word-form {
  display: flex;
  width: min(100%, 470px);
  gap: 9px;
}

.word-input {
  width: 100%;
  min-width: 0;
  height: 52px;
  padding: 0 18px;
  border: 1.5px solid var(--ink);
  border-radius: 999px;
  outline: 0;
  color: var(--ink);
  background: var(--white);
  font-family: var(--mono);
  font-size: 0.92rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.word-input:focus {
  box-shadow: 0 0 0 3px rgba(35, 72, 255, 0.25);
}

.word-submit {
  flex: 0 0 auto;
  min-width: 92px;
  border: 1.5px solid var(--ink);
  border-radius: 999px;
  cursor: pointer;
  color: var(--white);
  background: var(--ink);
  font-size: 0.88rem;
  font-weight: 700;
}

.word-feedback {
  min-height: 23px;
  margin: 14px 0 0;
  color: var(--ink-soft);
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.word-feedback.is-wrong {
  color: #a51d1d;
}

.word-wrap.is-correct {
  animation: correct-flash 330ms ease;
}

.word-wrap.is-wrong {
  animation: wrong-flash 260ms ease;
}

/* Toast */

.toast {
  position: fixed;
  z-index: 200;
  right: 22px;
  bottom: 22px;
  max-width: min(360px, calc(100% - 44px));
  padding: 13px 18px;
  border: 1.5px solid var(--ink);
  border-radius: 999px;
  color: var(--white);
  background: var(--ink);
  box-shadow: 4px 4px 0 var(--blue);
  font-family: var(--mono);
  font-size: 0.68rem;
  opacity: 0;
  pointer-events: none;
  transform: translateY(15px);
  transition: opacity 180ms ease, transform 180ms ease;
}

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

/* Motion */

.reveal {
  opacity: 0;
  animation: reveal-up 700ms cubic-bezier(0.2, 0.78, 0.2, 1) forwards;
}

.reveal-1 {
  animation-delay: 80ms;
}

.reveal-2 {
  animation-delay: 150ms;
}

.reveal-3 {
  animation-delay: 250ms;
}

.reveal-4 {
  animation-delay: 350ms;
}

@keyframes reveal-up {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(35, 72, 255, 0.36);
  }
  60% {
    box-shadow: 0 0 0 8px rgba(35, 72, 255, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(35, 72, 255, 0);
  }
}

@keyframes dialog-in {
  from {
    opacity: 0;
    transform: translateY(16px) scale(0.985);
  }
}

@keyframes star-in {
  from {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.4) rotate(-30deg);
  }
}

@keyframes float-up {
  to {
    opacity: 0;
    transform: translateY(-36px);
  }
}

@keyframes shake {
  0%,
  100% {
    transform: translateX(0);
  }
  25% {
    transform: translateX(-5px);
  }
  75% {
    transform: translateX(5px);
  }
}

@keyframes correct-flash {
  40% {
    background: var(--yellow);
  }
}

@keyframes wrong-flash {
  40% {
    background: #ffbbb2;
  }
}

@media (max-width: 980px) {
  .hero {
    grid-template-columns: 1fr;
    min-height: 0;
    padding-top: 35px;
  }

  .daily-card {
    width: min(100%, 640px);
    min-height: 440px;
    margin: 20px 0 0;
    transform: rotate(-1deg);
  }

  .daily-card h2 {
    font-size: 3rem;
  }

  .game-card {
    min-height: 350px;
  }

  .card-copy {
    width: 62%;
  }

  .places {
    padding-top: 70px;
  }

  .ocean-gate {
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    min-height: 430px;
    border-radius: 36px 36px 88px 36px;
  }

  .ocean-gate-copy {
    padding: 38px;
  }

  .ocean-gate-art svg {
    min-height: 430px;
  }
}

@media (max-width: 760px) {
  body {
    font-size: 16px;
  }

  .topbar {
    min-height: 76px;
    padding-top: 15px;
    padding-bottom: 15px;
  }

  .main-site-link span:first-child {
    display: none;
  }

  .main-site-link {
    padding: 8px 14px;
  }

  .hero {
    gap: 50px;
    padding-top: 28px;
    padding-bottom: 72px;
  }

  .hero h1 {
    font-size: clamp(3.6rem, 16vw, 6.7rem);
    line-height: 0.84;
  }

  .hero-intro {
    margin-top: 30px;
  }

  .local-score {
    justify-content: space-between;
    width: 100%;
    margin-top: 42px;
  }

  .local-score div {
    min-width: 0;
    padding: 0 12px;
  }

  .local-score div:last-child {
    padding-right: 0;
  }

  .local-score dd {
    font-size: 0.98rem;
  }

  .daily-card {
    min-height: 420px;
    padding: 53px 26px 26px;
    border-radius: 31px 31px 58px 31px;
  }

  .daily-card h2 {
    font-size: 2.55rem;
  }

  .daily-card::before {
    width: 49px;
    height: 49px;
  }

  .section-heading {
    align-items: flex-start;
  }

  .section-heading > p {
    display: none;
  }

  .places {
    padding-top: 62px;
    padding-bottom: 78px;
  }

  .ocean-gate {
    grid-template-columns: 1fr;
    border-radius: 31px 31px 70px 31px;
  }

  .ocean-gate-art {
    grid-row: 1;
    min-height: 270px;
  }

  .ocean-gate-art svg {
    min-height: 270px;
    max-height: 370px;
  }

  .ocean-gate-copy {
    grid-row: 2;
    min-height: 320px;
    padding: 38px 30px 42px;
  }

  .ocean-gate-copy strong {
    font-size: clamp(3.1rem, 14vw, 5.3rem);
  }

  .ocean-gate-description {
    margin-top: 21px;
  }

  .ocean-gate-stamp {
    top: 17px;
    left: 17px;
    width: 61px;
    height: 61px;
    font-size: 0.51rem;
  }

  .arcade {
    padding-top: 65px;
    padding-bottom: 80px;
  }

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

  .game-card {
    min-height: 330px;
  }

  .card-copy {
    width: 60%;
  }

  .card-copy strong {
    font-size: clamp(2.4rem, 10vw, 3.6rem);
  }

  .card-word .card-copy {
    width: 63%;
  }

  .card-word .card-art {
    top: 28px;
    right: 12px;
    width: 31%;
    height: 34%;
  }

  .card-word .word-art i {
    min-height: 52px;
    font-size: 1.25rem;
    box-shadow: 2px 2px 0 var(--ink);
  }

  .manifesto {
    padding-top: 55px;
    border-radius: 32px;
  }

  footer {
    grid-template-columns: 1fr auto;
    gap: 11px 20px;
  }

  footer p {
    grid-column: 1 / -1;
    grid-row: 2;
    text-align: left;
  }

  .game-dialog {
    width: 100%;
    max-height: 100dvh;
    margin: 0;
    border-radius: 0;
  }

  .game-shell {
    min-height: 100dvh;
    padding: 20px 16px;
  }

  .game-stage {
    min-height: 480px;
    border-radius: 18px;
  }

  .game-hud {
    padding: 13px 8px;
  }

  .hud-item {
    padding: 2px 7px;
  }

  .hud-item b {
    font-size: 1.2rem;
  }

  .game-topline {
    align-items: flex-start;
    font-size: 0.61rem;
  }

  .game-topline p:first-child {
    max-width: 70%;
  }

  .pair-wrap {
    min-height: 480px;
    padding-top: 24px;
  }

  .word-form {
    flex-direction: column;
  }

  .word-submit {
    height: 49px;
  }
}

@media (max-width: 440px) {
  .wordmark {
    font-size: 1.25rem;
  }

  .topnav {
    gap: 7px;
  }

  .ocean-nav-link {
    width: 38px;
    height: 38px;
    min-height: 38px;
    padding: 0;
    justify-content: center;
  }

  .ocean-nav-link [data-i18n] {
    display: none;
  }

  .ocean-nav-dot {
    width: 10px;
    height: 10px;
  }

  .wordmark-mark {
    width: 33px;
    height: 33px;
  }

  .language-button {
    padding: 8px 11px;
  }

  .hero-actions {
    align-items: flex-start;
    flex-direction: column;
    gap: 18px;
  }

  .local-score div {
    padding: 0 8px;
  }

  .local-score dt {
    font-size: 0.56rem;
  }

  .daily-sticker {
    left: 19px;
    width: 82px;
    height: 82px;
  }

  .card-art {
    top: 38px;
    right: 16px;
    width: 39%;
    height: 43%;
  }

  .big-star {
    width: 100px;
    height: 100px;
  }

  .card-copy {
    width: 67%;
  }

  .card-copy > span:last-child {
    font-size: 0.82rem;
  }

  .game-card {
    padding: 22px 22px 74px;
    border-radius: 26px;
  }

  .ocean-gate-copy {
    min-height: 300px;
    padding: 32px 23px 36px;
  }

  .ocean-gate-description {
    font-size: 0.92rem;
  }

  .ocean-gate-cta {
    margin-top: 27px;
  }

  .card-best {
    bottom: 24px;
    left: 22px;
  }

  .card-arrow {
    right: 19px;
    bottom: 18px;
    width: 40px;
    height: 40px;
  }

  .echo-board {
    grid-template-columns: repeat(2, minmax(76px, 118px));
  }

  .pair-board {
    grid-template-columns: repeat(4, minmax(54px, 1fr));
  }

  .game-header h2 {
    font-size: 2.2rem;
  }

  .game-start,
  .game-result {
    padding: 20px;
  }
}

@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;
  }
}
