/* ============================================================
   Maker of Games — home
   ============================================================ */

/* ── Home-only animations ───────────────────────────────────── */

@keyframes mogIn      { 0% { opacity: 0; transform: scale(.82) translateY(14px) } 60% { opacity: 1 } 100% { opacity: 1; transform: scale(1) translateY(0) } }
@keyframes spinSlow   { from { transform: rotate(45deg) } to { transform: rotate(405deg) } }
@keyframes spinSlower { from { transform: rotate(45deg) scale(1.35) } to { transform: rotate(-315deg) scale(1.35) } }
@keyframes typeIn     { from { width: 0 } to { width: 19ch } }
@keyframes caret      { 0%, 45% { border-color: var(--paper) } 50%, 100% { border-color: transparent } }
@keyframes rumble     { 0%, 100% { transform: translate(0, 0) rotate(0) } 20% { transform: translate(-6px, 3px) rotate(-2deg) } 40% { transform: translate(5px, -4px) rotate(2deg) } 60% { transform: translate(-4px, -3px) rotate(-1.5deg) } 80% { transform: translate(4px, 3px) rotate(1.5deg) } }
@keyframes confettiFly{ 0% { opacity: 1; transform: translate(0, 0) rotate(0) } 100% { opacity: 0; transform: translate(var(--dx), var(--dy)) rotate(var(--rot)) } }
@keyframes toastUp    { from { opacity: 0; transform: translate(-50%, 20px) } to { opacity: 1; transform: translate(-50%, 0) } }

/* ── Nav ────────────────────────────────────────────────────── */

.nav {
  position: absolute;
  inset: 0 0 auto 0;
  z-index: 9;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px var(--gutter);
}
.nav__brand { display: flex; align-items: center; gap: 12px; }
.nav__brand picture { width: 44px; }
.nav__brand span { font: 700 13px/1 var(--sans); letter-spacing: .22em; }
.nav__links { display: flex; gap: 22px; font: 400 12px/1 var(--mono); letter-spacing: .12em; }
.nav__links a { padding: 6px 2px; }

/* ── Hero ───────────────────────────────────────────────────── */

.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 96px 24px 64px;
}
.hero__ring { position: absolute; width: min(78vw, 560px); aspect-ratio: 1; pointer-events: none; }
.hero__ring--a { border: 1px solid rgba(245, 245, 242, .12); animation: spinSlow 70s linear infinite; }
.hero__ring--b { border: 1px solid rgba(245, 245, 242, .06); animation: spinSlower 110s linear infinite; }

.hero__logo-wrap { position: relative; animation: mogIn 1.1s cubic-bezier(.2, .8, .2, 1) both; }
.hero__logo {
  display: block; margin: 0; padding: 0; border: 0;
  background: none; cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  animation: floaty 6s ease-in-out 1.2s infinite;
}
.hero__logo picture { width: clamp(230px, 52vw, 460px); }
.hero__logo img { user-select: none; -webkit-user-select: none; pointer-events: none; }
.hero__logo.is-shaking { animation: rumble .45s ease; }

.confetti { position: absolute; inset: 0; pointer-events: none; }
.confetti i {
  position: absolute; left: 50%; top: 50%;
  width: 9px; height: 9px; z-index: 5;
  animation: confettiFly .8s ease-out both;
}

.hero__title { margin: 34px 0 0; font: 700 clamp(26px, 5.4vw, 52px)/1.05 var(--sans); letter-spacing: .14em; }
.hero__type { margin: 18px 0 0; height: 1.4em; }
.hero__type-text {
  display: inline-block;
  overflow: hidden;
  white-space: nowrap;
  font: 400 clamp(15px, 2.6vw, 21px)/1.4 var(--mono);
  color: var(--muted);
  border-right: 2px solid var(--paper);
  padding-right: 4px;
  width: 19ch;
  animation: typeIn 2.2s steps(19) .9s both, caret 1s step-end 3.1s infinite;
}
.hero__sub { margin: 14px 0 0; font: 400 14px/1.6 var(--sans); color: var(--dim); max-width: 34ch; }
.hero__cue {
  position: absolute; bottom: 26px; left: 50%;
  transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  font: 400 11px/1 var(--mono); letter-spacing: .18em; color: var(--dim);
}
.hero__arrow { animation: bob 1.6s ease-in-out infinite; }

/* ── One-liner ──────────────────────────────────────────────── */

.oneliner { padding: clamp(64px, 9vw, 110px) var(--gutter) clamp(40px, 6vw, 70px); text-align: center; }
.oneliner__lead { margin: 0 auto; font: 500 clamp(20px, 3.2vw, 32px)/1.45 var(--sans); max-width: 34ch; text-wrap: pretty; }
.oneliner__more { margin: 16px 0 0; font: 400 12px/1 var(--mono); letter-spacing: .16em; }
.oneliner__more a { color: var(--dim); display: inline-block; padding: 6px 4px; }

/* ── Section rule ───────────────────────────────────────────── */

.rule {
  display: flex; align-items: center; gap: 16px;
  padding: 0 var(--gutter) 26px;
  max-width: 1130px; margin: 0 auto;
  font: 400 12px/1 var(--mono); letter-spacing: .22em; color: var(--dim);
}
.rule__line { flex: 1; height: 1px; background: rgba(245, 245, 242, .18); }

/* ── Game portals (shared shell) ────────────────────────────── */

.game { position: relative; padding: clamp(70px, 10vw, 120px) var(--gutter); }
.game__inner {
  position: relative;
  max-width: var(--wide); margin: 0 auto;
  display: flex; flex-wrap: wrap; align-items: center;
  gap: clamp(36px, 6vw, 72px);
}
.game__inner--reverse { flex-wrap: wrap-reverse; }

/* `min()` keeps the two-column intent without forcing a wider-than-viewport
   track on 320px phones. */
.game__copy { flex: 1 1 340px; min-width: min(290px, 100%); }
.game__art  { flex: 1 1 300px; min-width: min(270px, 100%); display: flex; justify-content: center; }
.game__actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 30px; align-items: center; }

.btn { display: inline-flex; align-items: center; min-height: 48px; padding: 0 28px; }
.chip { display: inline-block; margin: 20px 0 0; }

/* CutConflict */

.game--cc {
  background: radial-gradient(120% 90% at 15% 0%, #f2f7fd 0%, #e3edf9 45%, #d8e5f4 100%);
  color: #16355e;
}
.game--cc .game__eyebrow { margin: 0; font: 800 12px/1 var(--round); letter-spacing: .3em; color: #5a7ba6; }
.game--cc .game__title   { margin: 18px 0 0; font: 800 clamp(42px, 7.5vw, 76px)/.95 var(--display); letter-spacing: .01em; color: #1d3f6e; }
.game--cc .game__lead    { margin: 22px 0 0; font: 600 clamp(16px, 2.2vw, 20px)/1.55 var(--round); color: #2c4a75; max-width: 44ch; text-wrap: pretty; }
.game--cc .game__body    { margin: 14px 0 0; font: 400 15px/1.65 var(--round); color: #4a648c; max-width: 46ch; }
.game--cc .game__art     { padding: 16px 0; }

.chip--cc {
  font: 800 11px/1 var(--round); letter-spacing: .16em; color: #8a6a1c;
  border: 1.5px solid #d99b2b; border-radius: 999px;
  padding: 9px 16px; background: rgba(255, 255, 255, .55);
}
.btn--cc {
  background: #1d3f6e; color: #f7fafd; border-radius: 999px;
  font: 800 15px/1 var(--round); letter-spacing: .04em;
  box-shadow: 0 10px 24px rgba(29, 63, 110, .28);
}
.link--cc { color: #1d3f6e; font: 800 14px/1 var(--round); border-bottom: 2px solid #d99b2b; padding: 8px 0 3px; }

.cc-fan { position: relative; width: min(320px, 100%, 74vw); }
.cc-fan img { border-radius: 12px; }
.cc-fan__back    { position: absolute; top: -16px; left: -34px; width: 58%; transform: rotate(-11deg); filter: drop-shadow(0 16px 20px rgba(29, 63, 110, .24)); }
.cc-fan__breathe { position: relative; width: 74%; transform: rotate(-2deg); filter: drop-shadow(0 20px 26px rgba(29, 63, 110, .30)); z-index: 2; }
.cc-fan__restart { position: absolute; top: 26px; right: -16px; width: 66%; transform: rotate(9deg); filter: drop-shadow(0 18px 24px rgba(29, 63, 110, .26)); z-index: 3; }

/* Tatorship — cream/red/gold, potato-icon texture, hard stamp edges */

/* The portal wears the game's own identity: a tiled sheet of the potato-icon
   pattern in Tatorship yellow, exactly as the game's site does. */
.game--tat {
  background: #ffdb5c url('assets/pat_yellow-600.webp') repeat;
  background-size: 1500px;
  color: #1c1712;
}
@supports (background-image: image-set(url('x.avif') type('image/avif') 1x)) {
  .game--tat { background-image: url('assets/pat_yellow-600.avif'); }
}
.game--tat .game__eyebrow { margin: 0; font: 700 12px/1 var(--slab); letter-spacing: .3em; color: #a01f19; }
.game--tat .game__title   { margin: 16px 0 0; font: 700 clamp(40px, 7.5vw, 76px)/.95 var(--slab); letter-spacing: .005em; text-transform: uppercase; color: #1c1712; }
.game--tat .game__lead    { margin: 22px 0 0; font: 400 clamp(15px, 2vw, 18px)/1.7 var(--slab); color: #3a322a; max-width: 48ch; text-wrap: pretty; }
.game--tat .game__art     { flex-direction: column; align-items: center; gap: 14px; padding: 10px 0; }

/* the tagline as a rubber stamp, matching the Tatorship page */
.tat-stamp {
  display: inline-block;
  margin: 18px 0 0;
  font: 700 clamp(18px, 2.6vw, 26px)/1.15 var(--slab);
  text-transform: uppercase; letter-spacing: .05em;
  color: #a01f19;
  border: 3px solid #a01f19;
  padding: 9px 15px;
  max-width: 100%;
  transform: rotate(-3deg);
  animation: stampIn .5s ease .3s both;
}

.chip--tat {
  font: 700 11px/1 var(--slab); letter-spacing: .16em; color: #1c1712;
  border: 2px solid #1c1712; padding: 9px 16px;
  background: rgba(255, 255, 255, .45);
}
.btn--tat {
  background: #a01f19; color: #f7f2e6;
  font: 900 15px/1 var(--slab); letter-spacing: .05em; text-transform: uppercase;
  box-shadow: 5px 5px 0 rgba(28, 23, 18, .4);
}
.link--tat { color: #1c1712; font: 900 14px/1 var(--slab); border-bottom: 3px solid #a01f19; padding: 8px 0 3px; }
.game--tat .hand__hint { color: #6a5c3a; }

/* Triniton */

.game--tri {
  background:
    linear-gradient(rgba(11, 15, 38, .55), rgba(11, 15, 38, .82)),
    image-set(url('assets/triniton_space-1280.webp') type('image/webp') 1x,
              url('assets/triniton_space-1920.webp') type('image/webp') 1.5x)
      center / cover no-repeat,
    #0f1330;
  color: #f4ead2;
}
@supports (background-image: image-set(url('x.avif') type('image/avif') 1x)) {
  .game--tri {
    background:
      linear-gradient(rgba(11, 15, 38, .55), rgba(11, 15, 38, .82)),
      image-set(url('assets/triniton_space-1280.avif') type('image/avif') 1x,
                url('assets/triniton_space-1920.avif') type('image/avif') 1.5x)
        center / cover no-repeat,
      #0f1330;
  }
}
.game--tri .game__eyebrow { margin: 0; font: 400 12px/1 var(--mono); letter-spacing: .3em; color: #c8a86a; }
.game--tri .game__title   { margin: 18px 0 0; font: 400 clamp(44px, 8vw, 84px)/1 var(--captain); color: #f0b95c; }
.game--tri .game__lead    { margin: 22px 0 0; font: 400 clamp(17px, 2.4vw, 21px)/1.6 var(--serif); color: #efe2c4; max-width: 46ch; text-wrap: pretty; }
.game--tri .game__body    { margin: 14px 0 0; font: 300 15px/1.7 var(--serif); color: #c9bfa4; max-width: 48ch; }
.game--tri .game__art     { flex: 1 1 280px; min-width: min(250px, 100%); padding: 10px 0; }

.chip--tri { font: 400 11px/1 var(--mono); letter-spacing: .16em; color: #0f1330; background: #f0b95c; border-radius: 3px; padding: 9px 14px; }
.btn--tri  { background: #f0b95c; color: #241a06; border-radius: 3px; font: 400 16px/1 var(--captain); letter-spacing: .05em; }

.tri-box { width: min(340px, 100%, 74vw); filter: drop-shadow(0 24px 44px rgba(0, 0, 0, .55)); animation: floaty 7s ease-in-out infinite; }
.tri-buy { font: 400 14px/1.7 var(--serif); color: #c9bfa4; }
.tri-buy a { color: #f0b95c; text-decoration: underline; }
.tri-quote { margin: 26px 0 0; font: italic 400 14px/1.6 var(--serif); color: #c9bfa4; }

/* ── The Maker ──────────────────────────────────────────────── */

.maker { padding: clamp(80px, 12vw, 150px) var(--gutter); }
.maker__inner {
  max-width: var(--wide); margin: 0 auto;
  display: flex; flex-wrap: wrap; align-items: center;
  gap: clamp(36px, 6vw, 72px);
}
/* 300px basis (not 340) so this section reaches two columns at the same
   width the game portals do. */
.maker__portrait-col { flex: 0 1 300px; min-width: min(260px, 100%); }

.portrait {
  position: relative; display: block;
  /* 100% keeps it inside its flex column, which can shrink below 320px */
  width: min(320px, 100%, 80vw);
  aspect-ratio: 4 / 5;
  margin: 0 auto; padding: 0; border: 0;
  background: none; cursor: pointer;
  perspective: 1200px;
  -webkit-tap-highlight-color: transparent;
}
.portrait .flip__inner { position: absolute; inset: 0; transition-duration: .75s; }
.portrait .flip__front,
.portrait .flip__back { position: absolute; inset: 0; width: 100%; height: 100%; border-radius: 6px; overflow: hidden; }
.portrait .flip__front img,
.portrait .flip__back img { width: 100%; height: 100%; object-fit: cover; }
.portrait[aria-pressed="true"] .flip__inner { transform: rotateY(180deg); }
.portrait__hint { margin: 14px 0 0; text-align: center; font: 400 11px/1 var(--mono); letter-spacing: .14em; color: var(--dim); }

.maker__copy { flex: 1 1 340px; min-width: min(290px, 100%); }
.maker__eyebrow { margin: 0; font: 400 12px/1 var(--mono); letter-spacing: .22em; color: var(--dim); }
.maker__title   { margin: 20px 0 0; font: 700 clamp(28px, 4.4vw, 44px)/1.15 var(--sans); }
.maker__body    { margin: 20px 0 0; font: 400 15px/1.7 var(--sans); color: var(--muted); max-width: 52ch; text-wrap: pretty; }
.maker__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; align-items: center; }
.btn--ghost { padding: 0 24px; border: 1.5px solid var(--paper); border-radius: 999px; font: 700 14px/1 var(--sans); letter-spacing: .04em; }
.maker__social { display: flex; flex-wrap: wrap; gap: 20px; margin-top: 20px; font: 400 13px/1 var(--mono); letter-spacing: .08em; }
.maker__social a { border-bottom: 1px solid rgba(245, 245, 242, .4); padding: 8px 0 4px; }

/* ── Manifesto ──────────────────────────────────────────────── */

.why { padding: clamp(80px, 12vw, 150px) var(--gutter); max-width: 980px; margin: 0 auto; }
.why__eyebrow { margin: 0; font: 400 12px/1 var(--mono); letter-spacing: .22em; color: var(--dim); }
.why__title { margin: 26px 0 0; font: 500 clamp(26px, 4.6vw, 46px)/1.25 var(--sans); letter-spacing: -.01em; text-wrap: pretty; }
.why__title em { font-style: normal; border-bottom: 3px solid var(--paper); }
.why__body  { margin: 26px 0 0; font: 400 clamp(15px, 2vw, 18px)/1.7 var(--sans); color: var(--muted); max-width: 62ch; text-wrap: pretty; }
.why__claim { margin: 54px 0 0; font: 400 clamp(17px, 2.4vw, 22px)/1.6 var(--sans); color: var(--paper); max-width: 56ch; text-wrap: pretty; }

.values { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px; margin-top: 56px; }
.value { border: 1px solid var(--hair); padding: 24px 22px 26px; }
.value__num   { margin: 0; font: 400 12px/1 var(--mono); color: var(--dim); }
.value__title { margin: 14px 0 8px; font: 700 19px/1.2 var(--sans); letter-spacing: .04em; }
.value__body  { margin: 0; font: 400 14px/1.65 var(--sans); color: var(--muted); }

/* ── Toast ──────────────────────────────────────────────────── */

.toast {
  position: fixed; left: 50%; bottom: 28px;
  transform: translateX(-50%);
  z-index: 99;
  display: flex; align-items: center; gap: 10px;
  max-width: calc(100vw - 24px);
  background: var(--paper); color: var(--ink);
  font: 700 13px/1.35 var(--sans); letter-spacing: .08em;
  padding: 14px 22px; border-radius: 999px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, .5);
  animation: toastUp .35s ease both;
}
.toast[hidden] { display: none; }
.toast picture { width: 22px; flex: none; }

/* ── Short landscape viewports ──────────────────────────────── */

@media (orientation: landscape) and (max-height: 480px) {
  .hero { padding: 56px 24px 44px; }
  .hero__logo picture { width: clamp(150px, 26vw, 260px); }
  .hero__title { margin-top: 20px; }
  .hero__type { margin-top: 10px; }
  .hero__sub { margin-top: 8px; }
  .hero__cue { bottom: 12px; }
  .hero__ring { width: min(52vh, 300px); }
}

@media (prefers-reduced-motion: reduce) {
  .hero__type-text { animation: none; width: auto; border-right-color: transparent; }
}
