/* Landing page (hub) – page-specific layout on top of /brand/arworks.css.
   Brand rules: hairline borders, sharp corners (2–4 px), single orange accent,
   calm 120–350 ms motion with the brand ease, no lifting cards. */

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { overflow-x: hidden; }
[hidden] { display: none !important; }
section[id] { scroll-margin-top: 72px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Header ---------- */
.lp-header .arw-header__bar { gap: 16px; }
.lp-header .arw-header__actions { margin-left: 0; }
@media (max-width: 900px) { .lp-header .arw-header__actions { margin-left: auto; } }
.lp-header .arw-header__logo img { width: auto; }

/* ---------- Hero (dark band with live canvas) ---------- */
.lp-hero { position: relative; isolation: isolate; min-height: min(88vh, 820px); display: flex; align-items: center; padding-top: 96px; padding-bottom: 96px; }
.lp-hero__canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; display: block; }
.lp-hero::before { /* readability scrim on the copy side + faint brand grid */
  content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    linear-gradient(90deg, rgba(0,0,0,.72) 0%, rgba(0,0,0,.35) 46%, rgba(0,0,0,0) 70%),
    linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px) 0 0 / 48px 48px,
    linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px) 0 0 / 48px 48px;
}
.lp-hero .arw-wrap { width: 100%; }
.lp-hero__copy { max-width: 600px; position: relative; z-index: 1; }
/* soft dark halo right behind the copy: near snowflakes (drawn on the canvas) never cross the text at full contrast */
.lp-hero__copy::before { content: ''; position: absolute; inset: -28px -20px; z-index: -1; pointer-events: none;
  background: radial-gradient(closest-side, rgba(0,0,0,.5), rgba(0,0,0,.28) 60%, rgba(0,0,0,0)); }
.lp-hero h1 { margin-top: 18px; }
.lp-hero .arw-lede { max-width: 52ch; }
.lp-hero__meta { display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 34px 0 0; padding: 0; list-style: none; }
.lp-hero__meta li { font-family: var(--font-mono); font-size: 11px; letter-spacing: var(--label-tracking); text-transform: uppercase; color: rgba(255,255,255,.6); display: flex; align-items: center; gap: 8px; }
.lp-hero__meta li::before { content: ''; width: 6px; height: 6px; background: var(--orange-500); }
.lp-hero__hint { position: absolute; right: 32px; bottom: 22px; font-family: var(--font-mono); font-size: 11px; letter-spacing: var(--label-tracking); text-transform: uppercase; color: rgba(255,255,255,.45); }
@media (max-width: 900px) {
  .lp-hero { min-height: 0; align-items: flex-start; padding-top: 56px; padding-bottom: 300px; }
  .lp-hero::before { background:
    linear-gradient(180deg, rgba(0,0,0,.7) 0%, rgba(0,0,0,.45) 55%, rgba(0,0,0,0) 78%),
    linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px) 0 0 / 40px 40px,
    linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px) 0 0 / 40px 40px; }
  .lp-hero__hint { display: none; }
}
@media (max-width: 640px) {
  .lp-hero { padding-bottom: 270px; }
  .lp-hero .arw-hero-actions .arw-btn { flex: 1 1 100%; }
}

/* ---------- Section heads ---------- */
.lp-head { max-width: 760px; }
.lp-head h2 { margin-top: 12px; }

/* ---------- Game cards ---------- */
.lp-games { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 24px; margin-top: 40px; }
.g-card { position: relative; display: flex; flex-direction: column; overflow: hidden; color: var(--text-primary); text-decoration: none; }
a.g-card:hover { text-decoration: none; color: var(--text-primary); }
.g-card__media { position: relative; aspect-ratio: 4 / 5; background: #0d0f14; overflow: hidden; border-bottom: 1px solid var(--border-default); }
.g-card__media canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.g-card__body { padding: 20px 20px 22px; display: flex; flex-direction: column; gap: 0; flex: 1; }
.g-card__body p { margin: 0 0 18px; font-size: 14px; color: var(--text-secondary); }
.g-card__foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.g-card.is-ready { border-top: 2px solid var(--border-accent); }
.g-card.is-ready .g-card__play { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; color: var(--orange-600); }
.g-card.is-ready .g-card__play svg { transition: transform var(--duration-base) var(--ease-out); }
.g-card.is-ready:hover .g-card__play svg { transform: translateX(4px); }
.g-card.is-soon { cursor: default; }
.g-card__ribbon {
  position: absolute; top: 22px; right: -46px; width: 180px; transform: rotate(45deg); text-align: center; z-index: 2;
  background: var(--orange-500); color: #fff; font-family: var(--font-mono); font-size: 11px; letter-spacing: .18em; text-transform: uppercase; padding: 6px 0;
  box-shadow: 0 2px 8px rgba(0,0,0,.35);
}
.g-card__num { position: absolute; left: 14px; top: 12px; z-index: 2; font-family: var(--font-mono); font-size: 11px; letter-spacing: var(--label-tracking); color: rgba(255,255,255,.7); }
.g-card__pwa { font-family: var(--font-mono); font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--text-muted); }
@media (max-width: 640px) {
  .lp-games { gap: 16px; }
  .g-card__media { aspect-ratio: 16 / 11; }
}

/* ---------- Custom logo ---------- */
.lp-logo-grid { display: grid; grid-template-columns: 1fr 1.05fr; gap: 56px; align-items: center; }
.lp-drop {
  position: relative; display: flex; align-items: center; gap: 16px; margin-top: 28px; padding: 22px 20px; cursor: pointer;
  border: 1px dashed var(--gray-400); border-radius: var(--radius-md); background: var(--surface-page);
  transition: border-color var(--duration-fast) var(--ease-out), background var(--duration-fast) var(--ease-out);
}
.lp-drop:hover, .lp-drop.is-over { border-color: var(--orange-500); background: var(--orange-050); }
.lp-drop:focus-within { box-shadow: var(--focus-ring); }
.lp-drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.lp-drop__icon { flex: none; width: 44px; height: 44px; border: 1px solid var(--border-default); display: grid; place-items: center; color: var(--orange-600); background: #fff; border-radius: var(--radius-sm); }
.lp-drop__text b { display: block; font-weight: 600; font-size: 15px; }
.lp-drop__text span { font-size: 13px; color: var(--text-secondary); }
.lp-name { margin-top: 16px; }
.lp-name .arw-input { font-size: 16px; } /* ≥ 16 px: iOS does not zoom the page on focus */
.lp-name__opt { font-weight: 400; color: var(--text-secondary); }
.lp-logo-status { margin-top: 16px; display: flex; flex-wrap: wrap; gap: 12px; align-items: center; min-height: 40px; }
.lp-logo-note { font-size: 13px; color: var(--text-secondary); margin: 12px 0 0; max-width: 52ch; }
.lp-stage { position: relative; background: #0b0d12; border: 1px solid var(--border-default); border-radius: var(--radius-md); aspect-ratio: 5 / 4; overflow: hidden; }
.lp-stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.lp-stage .arw-mono-label { position: absolute; left: 10px; top: 9px; padding: 4px 6px; background: #0b0d12; border-radius: 2px; color: rgba(255,255,255,.6); z-index: 1; }
@media (max-width: 900px) { .lp-logo-grid { grid-template-columns: 1fr; gap: 32px; } }

/* ---------- Where to play ---------- */
.lp-where { margin-top: 40px; }
.lp-tile { display: flex; flex-direction: column; gap: 14px; }
.lp-tile svg { width: 56px; height: 56px; color: var(--text-primary); }
.lp-tile svg .acc { color: var(--orange-500); stroke: var(--orange-500); }
.lp-tile h3 { margin: 0; }
.lp-tile p { margin: 0; font-size: 14px; color: var(--text-secondary); }
.lp-tile .lp-anim { transform-origin: center; }
@media (prefers-reduced-motion: no-preference) {
  .lp-tile .lp-blink { animation: lp-blink 2.4s ease-in-out infinite; }
  .lp-tile .lp-fall { animation: lp-fall 3s linear infinite; }
  .lp-tile .lp-fall.d2 { animation-delay: -1s; }
  .lp-tile .lp-fall.d3 { animation-delay: -2s; }
  .lp-tile .lp-sweep { animation: lp-sweep 4s ease-in-out infinite; transform-box: fill-box; transform-origin: 50% 0; }
}
@keyframes lp-blink { 0%, 100% { opacity: 1; } 50% { opacity: .25; } }
@keyframes lp-fall { from { transform: translateY(-6px); opacity: 0; } 20% { opacity: 1; } 80% { opacity: 1; } to { transform: translateY(14px); opacity: 0; } }
@keyframes lp-sweep { 0%, 100% { transform: rotate(-12deg); } 50% { transform: rotate(12deg); } }

/* ---------- Features ---------- */
.lp-features { margin-top: 40px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 36px 28px; }
.lp-feat { border-top: 1px solid var(--border-strong); padding-top: 16px; }
.lp-feat .num { font-family: var(--font-mono); font-size: 12px; letter-spacing: var(--label-tracking); color: var(--orange-600); }
.lp-feat h3 { font-family: var(--font-body); font-weight: 600; font-size: 17px; line-height: 1.3; margin: 10px 0 6px; letter-spacing: 0; text-transform: none; }
.lp-feat p { margin: 0; font-size: 14px; color: var(--text-secondary); }
.lp-feat code { font-family: var(--font-mono); font-size: 12px; background: var(--surface-subtle); border: 1px solid var(--border-default); padding: 1px 5px; border-radius: var(--radius-sm); }
.lp-feat__link { display: table; margin-top: 8px; color: var(--orange-600); font-weight: 500; text-decoration: none; border-bottom: 1px solid currentColor; }
.lp-feat__link:hover { color: var(--orange-700, var(--orange-600)); }
@media (hover: none) { .lp-drop__drag { display: none; } }
.lp-feat--ai { border-top: 2px solid var(--border-accent); }
@media (max-width: 1080px) { .lp-features { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .lp-features { grid-template-columns: 1fr; gap: 28px; } }

/* ---------- QR (desktop only) ---------- */
.lp-qr { display: grid; grid-template-columns: 1fr auto; gap: 48px; align-items: center; }
.lp-qr__code { width: 212px; padding: 16px; background: #fff; border: 1px solid var(--border-default); border-radius: var(--radius-md); }
.lp-qr__code canvas { display: block; width: 180px; height: 180px; image-rendering: pixelated; }
.lp-qr__url { margin-top: 10px; text-align: center; font-family: var(--font-mono); font-size: 10px; letter-spacing: .08em; color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lp-qr-sec { display: none; }
@media (min-width: 901px) and (hover: hover) { .lp-qr-sec.is-ready { display: block; } }

/* ---------- CTA band ---------- */
.lp-cta { text-align: left; }
.lp-cta .arw-wrap { display: grid; grid-template-columns: 1fr auto; gap: 32px; align-items: end; }
.lp-cta::after { /* orange glow, like the brand hero panel */
  content: ''; position: absolute; right: -10%; top: -40%; width: 60%; aspect-ratio: 1; border-radius: 50%; z-index: 0; pointer-events: none;
  background: radial-gradient(closest-side, rgba(239,84,34,.22), transparent 70%);
}
.lp-cta .arw-wrap > * { position: relative; z-index: 1; }
@media (max-width: 900px) { .lp-cta .arw-wrap { grid-template-columns: 1fr; align-items: start; } }

/* ---------- Footer ---------- */
.lp-footer .arw-footer__col a { overflow-wrap: anywhere; }

/* ---------- Reveal on scroll (JS adds .js to <html>) ---------- */
@media (prefers-reduced-motion: no-preference) {
  .js [data-reveal] { opacity: 0; transform: translateY(14px); transition: opacity var(--duration-slow) var(--ease-out), transform var(--duration-slow) var(--ease-out); }
  .js [data-reveal].is-in { opacity: 1; transform: none; }
}
