/* getany.org — HOME page v3 styles.
   Loaded after /style.css (which stays untouched: fonts, tokens, topnav, buttons,
   footer). Only the home page sections live here: hero + animated lines canvas,
   features grid with cursor glow, games grid with titled cards, and the reveal
   motion.
   Motion reference: hauntjob motion.ts — EASE.out = cubic-bezier(0.22,1,0.36,1),
   fadeUp = opacity 0 / y 24px, base duration 1.1s; the hero frame uses a shorter
   700ms of the same ease.
   Hero window (v4): the title bar IS the real any-co Electron window's — no
   separate white strip. The bar is a 36px transparent band over a pastel
   gradient that continues the app's own (pale blue left → lavender right), with
   traffic lights + toolbar icons on the left, a faint vertical divider at 18%
   continuing the sidebar edge, a Plus right of that divider, and Moon/Settings
   on the right. No title text.
   The hero section carries id=top (the "Studio app" nav link targets it).
   The games grid is capped at 1320px so the 2x pixel logo tile (512px + tile
   padding) fits both columns at an integer scale; below that it steps to 1x. */

#top, #features, #games { --landing-ink: #0a0a0a; --landing-muted: #6b7280; }

/* ============ 1 · HERO ============ */

#top {
  position: relative;
  overflow: hidden;
  min-height: 92vh;
  padding: 120px 24px 64px;
  scroll-margin-top: 64px;
}

/* Animated background lines: canvas sits behind the content, faded to .55. */
#top #lines {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.55;
  pointer-events: none;
  z-index: 0;
}

/* CSS fallback (no WebGL / reduced motion): a soft repeating-line wash in the
   same pastel blue / lavender / peach, drawn by JS adding .lines-css to the hero.
   Also applied directly under prefers-reduced-motion for the no-JS case. */
#top.lines-css #lines { display: none; }
#top.lines-css::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.55;
  background-image: repeating-linear-gradient(
    178deg,
    rgba(193, 219, 253, 0) 0px, rgba(193, 219, 253, 0) 34px,
    rgba(193, 219, 253, 0.55) 34px, rgba(193, 219, 253, 0.55) 38px,
    rgba(221, 214, 254, 0) 38px, rgba(221, 214, 254, 0) 78px,
    rgba(221, 214, 254, 0.5) 78px, rgba(221, 214, 254, 0.5) 82px,
    rgba(254, 215, 186, 0) 82px, rgba(254, 215, 186, 0) 128px,
    rgba(254, 215, 186, 0.5) 128px, rgba(254, 215, 186, 0.5) 132px,
    rgba(193, 219, 253, 0) 132px, rgba(193, 219, 253, 0) 168px
  );
}
@media (prefers-reduced-motion: reduce) {
  #top #lines { display: none; }
  #top::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    opacity: 0.55;
    background-image: repeating-linear-gradient(
      178deg,
      rgba(193, 219, 253, 0) 0px, rgba(193, 219, 253, 0) 34px,
      rgba(193, 219, 253, 0.55) 34px, rgba(193, 219, 253, 0.55) 38px,
      rgba(221, 214, 254, 0) 38px, rgba(221, 214, 254, 0) 78px,
      rgba(221, 214, 254, 0.5) 78px, rgba(221, 214, 254, 0.5) 82px,
      rgba(254, 215, 186, 0) 82px, rgba(254, 215, 186, 0) 128px,
      rgba(254, 215, 186, 0.5) 128px, rgba(254, 215, 186, 0.5) 132px,
      rgba(193, 219, 253, 0) 132px, rgba(193, 219, 253, 0) 168px
    );
  }
}

#top .column {
  position: relative;
  z-index: 1;
  max-width: 1200px;
  margin: 0 auto;
}

#top h1 {
  font-size: clamp(40px, 6vw, 56px);
  font-weight: 600;
  letter-spacing: -0.05em;
  line-height: 0.95;
  max-width: 900px;
  margin: 0;
  color: var(--landing-ink);
}

#top h1 .accent { color: #6d5dfc; }

/* Subhead left, CTAs right; wraps to a column on mobile. */
.hero-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-top: 24px;
}

#top .subhead {
  max-width: 500px;
  font-size: 18px;
  line-height: 1.6;
  color: var(--landing-muted);
  margin: 0;
}

.hero-ctas {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 18px;
}

/* Secondary CTA: plain text link with an arrow. */
.link-arrow {
  font-size: 15px;
  font-weight: 500;
  color: var(--landing-ink);
  text-underline-offset: 4px;
}
.link-arrow span { display: inline-block; transition: transform 200ms ease; }
.link-arrow:hover span { transform: translateX(3px); }

/* The hero visual: the any-co Electron window itself — no separate title strip.
   The bar sits on a pastel gradient that continues the app's own chrome, and
   the screenshot sits flush underneath it. */
.appframe {
  margin: 56px 0 0;
  max-width: 1200px;
  border-radius: 12px;
  background: transparent;
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.12), 0 0 80px rgba(0, 0, 0, 0.06);
  overflow: hidden;
  animation: appframe-in 700ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

/* The title bar: a transparent 36px band over the app's own pastel gradient —
   pale blue left → lavender right — with no bottom border and no title text. */
.appframe .titlebar {
  position: relative;
  display: flex;
  align-items: center;
  height: 36px;
  padding: 0;
  background: transparent;
  background-image: linear-gradient(90deg, #e7effb 0%, #ece9fa 55%, #f1e6f6 100%);
}

/* Faint vertical divider at 18% — the app's sidebar edge continuing up. */
.appframe .titlebar-rule {
  position: absolute;
  left: 18%;
  top: 0;
  bottom: 0;
  width: 1px;
  background: rgba(0, 0, 0, 0.06);
  pointer-events: none;
}

/* The left and right icon groups. */
.appframe .tb-group {
  display: flex;
  align-items: center;
  flex: none;
}
.appframe .tb-left {
  padding-left: 14px;
}
.appframe .tb-right {
  margin-left: auto;
  padding-right: 14px;
}

/* All Lucide-style icons in the bar: 16px, 1.75 stroke, no fill. */
.appframe .tb-icons {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex: none;
}
.appframe .tb-icon { display: inline-flex; flex: none; }

/* Traffic lights first (gap 8px), then the Menu / PanelLeft / Search icons
   (margin-left 16px, gap 12px), then the back/forward chevrons
   (margin-left 12px, gap 12px). */
.appframe .lights {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: 0;
  flex: none;
}

.appframe .light {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex: none;
}

.appframe .light.close { background: #ff5f57; }
.appframe .light.min { background: #febc2e; }
.appframe .light.zoom { background: #28c840; }

.appframe .tb-left .lights + .tb-icons { margin-left: 16px; }
.appframe .tb-chevrons { margin-left: 12px; }

/* The Plus, just right of the 18% divider (about 10px clear of it). */
.appframe .tb-plus {
  position: absolute;
  left: 18%;
  margin-left: 10px;
  top: 50%;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  flex: none;
  pointer-events: none;
}

/* Screenshot flush under the bar, full width, no padding or seam. */
.appframe img {
  display: block;
  width: 100%;
  height: auto;
  margin: 0;
}

@keyframes appframe-in {
  0% { opacity: 0; transform: translateY(24px); }
  100% { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  .appframe { animation: none; }
}

@media (max-width: 640px) {
  #top { padding-top: 88px; }
  .hero-row { flex-direction: column; align-items: flex-start; }
}

/* ============ 2 · FEATURES ============ */

#features {
  max-width: 1320px;
  margin: 0 auto;
  padding: 96px 24px;
}

/* Two-column header: big title left, muted intro right. */
.section-head {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: end;
  margin-bottom: 48px;
}

#features h2 {
  font-size: 36px;
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.05;
  color: var(--landing-ink);
  margin: 0;
}

.section-intro {
  font-size: 17px;
  line-height: 1.6;
  color: var(--landing-muted);
  margin: 0;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.feature-card {
  position: relative;
  padding: 20px;
  background: rgba(255, 255, 255, 0.7);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.06);
  transition: border-color 200ms ease, transform 200ms ease;
  overflow: hidden;
}

/* Cursor-following glow (FeaturesGrid.tsx): --mx/--my set by landing.js. */
.feature-card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity 200ms ease;
  background: radial-gradient(400px circle at var(--mx, 50%) var(--my, 50%), rgba(109, 93, 252, 0.12), transparent 40%);
}

.feature-card:hover {
  border-color: rgba(109, 93, 252, 0.35);
  transform: translateY(-4px);
}

.feature-card:hover::before { opacity: 1; }

.feature-card h3 {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--landing-ink);
  margin: 0 0 8px;
}

.feature-card p {
  font-size: 15px;
  line-height: 1.6;
  color: var(--landing-muted);
  margin: 0 0 16px;
}

/* Cropped screenshot: fixed 180px window onto the top-left of the shot. */
.feature-card .shot {
  height: 180px;
  overflow: hidden;
  border-radius: 10px;
  border: 1px solid rgba(0, 0, 0, 0.06);
  background: #fff;
}

.feature-card .shot img { display: block; }

/* Scroll reveal: only armed when JS is running, so no-JS cards stay visible. */
.js .feature-card {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 700ms cubic-bezier(0.22, 1, 0.36, 1), transform 700ms cubic-bezier(0.22, 1, 0.36, 1), border-color 200ms ease;
}
.js .feature-card.in { opacity: 1; transform: translateY(0); }
.js .feature-card.in:hover { transform: translateY(-4px); }

@media (prefers-reduced-motion: reduce) {
  .js .feature-card { opacity: 1; transform: none; transition: none; }
  .js .feature-card:hover { transform: none; }
}

@media (max-width: 900px) {
  .feature-grid { grid-template-columns: 1fr; }
  .section-head { grid-template-columns: 1fr; align-items: start; }
}

/* ============ 3 · GAMES ============ */

#games {
  max-width: 1320px;
  margin: 0 auto;
  padding: 96px 24px 120px;
}

#games .games-title {
  font-size: 36px;
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.05;
  color: var(--landing-ink);
  margin: 0 0 40px;
}

.game-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.game-card-v3 {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 24px;
  background: rgba(255, 255, 255, 0.7);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.06);
}

/* Visible game title under the logo tile. */
.game-card-v3 h3 {
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.1;
  color: var(--landing-ink);
  margin: 0;
}

/* Pixel title logo on a black rounded tile; the whole tile links to the game. */
a.logo-tile-backing {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: flex-start;
  background: var(--ink, #0a0a0a);
  border-radius: 12px;
  padding: 16px;
  text-decoration: none;
  max-width: 100%;
}
a.logo-tile-backing:hover { text-decoration: none; }

.logo.pixel {
  display: block;
  image-rendering: pixelated;
  /* Integer scale: 2x of the 256x64 source. */
  width: 512px;
  height: 128px;
}

/* Narrower viewports: the 2x tile (512px logo + 32px tile padding) no longer
   fits a card column, so step down to the integer 1x size (256x64) — still a
   whole pixel multiple, never a blurry in-between scale. */
@media (max-width: 1251px) {
  .logo.pixel { width: 256px; height: 64px; }
}

/* Small screens: keep the tile inside the card; the logo follows the width. */
@media (max-width: 640px) {
  .logo.pixel { max-width: 100%; height: auto; }
}

.game-card-v3 .tag {
  font-size: 15px;
  line-height: 1.6;
  color: var(--landing-muted);
  margin: 0;
}

.game-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: auto;
}

@media (max-width: 900px) {
  .game-grid { grid-template-columns: 1fr; }
}

/* ============ Footer ============ */

footer.site .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  text-align: center;
}
