/* P77 Game — website styles */
:root {
  --bg: #111827;
  --bg-2: #1F2937;
  --surface: rgba(31, 41, 55, 0.75);
  --surface-2: rgba(255, 255, 255, 0.05);
  --border: rgba(255, 255, 255, 0.1);
  --text: rgba(255, 255, 255, 0.95);
  --muted: rgba(255, 255, 255, 0.68);
  --slate: #6B7280;
  --slate-dark: #4B5563;
  --gold: #FFD700;
  --gold-soft: rgba(255, 215, 0, 0.14);
  --radius: 16px;
  --max: 1120px;
  --font: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  line-height: 1.6;
  color: var(--text);
  background:
    radial-gradient(circle at 85% 0%, #4B5563 0%, #374151 25%, transparent 60%),
    radial-gradient(circle at 10% 30%, rgba(79, 70, 229, 0.12) 0%, transparent 40%),
    radial-gradient(circle at 90% 70%, rgba(147, 51, 234, 0.10) 0%, transparent 40%),
    var(--bg);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
}

img, svg { max-width: 100%; display: block; }

a { color: var(--gold); text-decoration: none; }
a:hover { text-decoration: underline; }

.container { width: min(var(--max), 100% - 2.5rem); margin-inline: auto; }

.skip-link {
  position: absolute; left: -999px; top: 0;
  background: var(--gold); color: #111; padding: .5rem 1rem; z-index: 100;
}
.skip-link:focus { left: 1rem; top: 1rem; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(17, 24, 39, 0.82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.brand { display: flex; align-items: center; gap: .65rem; color: var(--text); font-weight: 800; font-size: 1.2rem; letter-spacing: -.01em; }
.brand:hover { text-decoration: none; }
.brand img { width: 38px; height: 38px; }
.nav-links { display: flex; align-items: center; gap: 1.75rem; list-style: none; margin: 0; padding: 0; }
.nav-links a { color: var(--muted); font-weight: 500; font-size: .95rem; }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--text); text-decoration: none; }
.nav-links a.btn-primary, .nav-links a.btn-primary:hover { color: #111827; }
.nav-toggle {
  display: none; background: none; border: 1px solid var(--border); color: var(--text);
  border-radius: 10px; width: 42px; height: 42px; cursor: pointer; font-size: 1.2rem;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .6rem;
  padding: .85rem 1.4rem; border-radius: 12px; font-weight: 600; font-size: 1rem;
  border: 1px solid transparent; cursor: pointer; transition: transform .2s ease, background .2s ease, box-shadow .2s ease;
  font-family: inherit;
}
.btn:hover { transform: translateY(-2px); text-decoration: none; }
.btn-primary { background: var(--gold); color: #111827; box-shadow: 0 6px 20px rgba(255, 215, 0, .22); }
.btn-primary:hover { background: #ffe14d; }
.btn-secondary { background: rgba(255,255,255,.08); color: var(--text); border-color: rgba(255,255,255,.2); }
.btn-secondary:hover { background: rgba(255,255,255,.14); }
.btn-sm { padding: .55rem 1rem; font-size: .9rem; border-radius: 10px; }

.play-badge {
  display: inline-flex; align-items: center; gap: .75rem;
  background: #000; color: #fff; border: 1px solid rgba(255,255,255,.35);
  border-radius: 12px; padding: .6rem 1.2rem .6rem 1rem; transition: transform .2s ease, border-color .2s;
}
.play-badge:hover { transform: translateY(-2px); text-decoration: none; border-color: #fff; }
.play-badge svg { width: 28px; height: 28px; }
.play-badge small { display: block; font-size: .68rem; letter-spacing: .04em; text-transform: uppercase; opacity: .85; line-height: 1.1; }
.play-badge strong { display: block; font-size: 1.15rem; line-height: 1.15; font-weight: 600; }

/* ---------- Hero ---------- */
.hero { padding: 5rem 0 4rem; }
.hero-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 3rem; align-items: center; }
.eyebrow {
  display: inline-flex; align-items: center; gap: .5rem;
  font-size: .82rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
  color: var(--gold); background: var(--gold-soft); border: 1px solid rgba(255,215,0,.25);
  padding: .35rem .8rem; border-radius: 999px;
}
.hero h1 { font-size: clamp(2.6rem, 6vw, 4.2rem); line-height: 1.05; letter-spacing: -.03em; margin: 1.1rem 0 1rem; }
.hero h1 span { color: var(--gold); }
.hero p.lead { font-size: 1.2rem; color: var(--muted); max-width: 34rem; margin: 0 0 2rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; }
.hero-meta { display: flex; flex-wrap: wrap; gap: 1.5rem; margin-top: 2rem; color: var(--muted); font-size: .92rem; }
.hero-meta span { display: inline-flex; align-items: center; gap: .45rem; }
.hero-meta b { color: var(--text); }

/* ---------- Phone + dice demo ---------- */
.phone {
  width: 300px; max-width: 100%; margin-inline: auto;
  background: #0b0f17; border-radius: 42px; padding: 12px;
  border: 1px solid rgba(255,255,255,.14);
  box-shadow: 0 30px 60px rgba(0,0,0,.45), inset 0 0 0 2px #1f2937;
}
.phone-screen {
  border-radius: 32px; overflow: hidden; min-height: 560px; padding: 2.6rem 1.1rem 1.4rem;
  background: radial-gradient(circle at top right, #4B5563 0%, #374151 30%, #1F2937 70%);
  text-align: center; position: relative; display: flex; flex-direction: column; justify-content: center;
}
.phone-screen::before {
  content: ''; position: absolute; top: 12px; left: 50%; transform: translateX(-50%);
  width: 90px; height: 22px; background: #0b0f17; border-radius: 999px;
}
.app-card {
  background: rgba(31, 41, 55, .8); border: 1px solid var(--border); border-radius: 18px;
  padding: 1.3rem 1rem; box-shadow: 0 8px 32px rgba(0,0,0,.2);
}
.app-card h3 { margin: 0 0 .8rem; font-size: 1.45rem; }
.app-stats { display: flex; justify-content: space-around; background: var(--surface-2); border-radius: 10px; padding: .55rem; font-size: .85rem; margin-bottom: 1rem; }
.dice-row { display: flex; justify-content: center; gap: 1.1rem; margin: .6rem 0; }
.die {
  width: 76px; height: 76px; background: #fff; border-radius: 14px; padding: 8px;
  display: grid; grid-template: repeat(3, 1fr) / repeat(3, 1fr);
  box-shadow: 0 8px 16px rgba(0,0,0,.25);
}
.die .dot { background: #333; border-radius: 50%; margin: 2px; }
.die.rolling { animation: roll .5s ease; }
@keyframes roll {
  0% { transform: rotate(0) scale(1); }
  40% { transform: rotate(200deg) scale(.85); }
  100% { transform: rotate(360deg) scale(1); }
}
.double-msg { color: var(--gold); font-weight: 700; height: 1.6em; margin: .4rem 0; text-shadow: 0 0 10px rgba(255,215,0,.5); opacity: 0; transition: opacity .3s; }
.double-msg.show { opacity: 1; }
.app-score { font-size: 1rem; margin: .2rem 0; }
.app-score b { font-size: 1.15rem; }
.app-btn {
  margin-top: .9rem; background: var(--slate); color: #fff; border: 0; border-radius: 10px;
  padding: .7rem 1.4rem; font-size: 1rem; font-family: inherit; cursor: pointer; transition: background .2s, transform .2s;
}
.app-btn:hover { background: var(--slate-dark); transform: translateY(-2px); }
.app-btn:disabled { opacity: .55; cursor: default; transform: none; }
.demo-caption { text-align: center; color: var(--muted); font-size: .85rem; margin-top: 1rem; }

/* ---------- Sections ---------- */
section { padding: 4.5rem 0; }
.section-head { text-align: center; max-width: 40rem; margin: 0 auto 3rem; }
.section-head h2 { font-size: clamp(1.9rem, 4vw, 2.6rem); letter-spacing: -.02em; margin: .8rem 0 .6rem; line-height: 1.15; }
.section-head p { color: var(--muted); margin: 0; font-size: 1.08rem; }

.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1.6rem; backdrop-filter: blur(10px); transition: transform .25s ease, border-color .25s ease;
}
.card:hover { transform: translateY(-4px); border-color: rgba(255,215,0,.3); }
.card .icon {
  width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center;
  background: var(--gold-soft); color: var(--gold); font-size: 1.4rem; margin-bottom: 1rem;
}
.card h3 { margin: 0 0 .4rem; font-size: 1.15rem; }
.card p { margin: 0; color: var(--muted); }

/* Steps */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.25rem; counter-reset: step; list-style: none; padding: 0; margin: 0; }
.steps li { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.6rem 1.4rem; position: relative; }
.steps li::before {
  counter-increment: step; content: counter(step);
  display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%;
  background: var(--gold); color: #111827; font-weight: 800; margin-bottom: 1rem;
}
.steps h3 { margin: 0 0 .35rem; font-size: 1.1rem; }
.steps p { margin: 0; color: var(--muted); font-size: .97rem; }

/* Screens */
.screens { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; }
.screens figure { margin: 0; }
.screens .phone { width: 260px; }
.screens .phone-screen { min-height: 470px; }
.screens figcaption { text-align: center; margin-top: 1rem; }
.screens figcaption strong { display: block; }
.screens figcaption span { color: var(--muted); font-size: .92rem; }
.app-card .desc { color: rgba(255,255,255,.8); font-size: .92rem; margin: 0 0 1rem; }
.app-card .stack { display: flex; flex-direction: column; gap: .5rem; align-items: center; }
.app-btn.secondary { background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.2); margin-top: 0; }
.new-high { color: var(--gold); font-weight: 700; font-size: 1.05rem; animation: pulse 1.2s infinite; }
@keyframes pulse { 50% { transform: scale(1.08); } }
.summary { background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; padding: .7rem; font-size: .9rem; margin: .8rem 0; }

/* App info */
.info-wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; align-items: start; }
.info-table { width: 100%; border-collapse: collapse; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.info-table th, .info-table td { text-align: left; padding: .95rem 1.2rem; border-bottom: 1px solid var(--border); vertical-align: top; }
.info-table tr:last-child th, .info-table tr:last-child td { border-bottom: 0; }
.info-table th { color: var(--muted); font-weight: 500; width: 40%; }
.info-table td { font-weight: 600; }
.dev-card { text-align: left; }
.dev-card .dev-head { display: flex; align-items: center; gap: 1rem; margin-bottom: 1rem; }
.dev-card .avatar { width: 60px; height: 60px; border-radius: 16px; }
.dev-card .dev-head h3 { margin: 0; font-size: 1.3rem; }
.dev-card .dev-head span { color: var(--muted); font-size: .92rem; }
.dev-card p { margin: 0 0 1rem; }
.dev-card .contact-line { display: flex; align-items: center; gap: .6rem; background: var(--surface-2); border: 1px solid var(--border); padding: .8rem 1rem; border-radius: 12px; word-break: break-all; }

/* FAQ */
.faq { max-width: 780px; margin: 0 auto; display: grid; gap: .8rem; }
.faq details { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 0 1.3rem; }
.faq summary { cursor: pointer; list-style: none; font-weight: 600; padding: 1.1rem 0; display: flex; justify-content: space-between; gap: 1rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; color: var(--gold); font-size: 1.4rem; line-height: 1; transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { margin: 0 0 1.2rem; color: var(--muted); }

/* CTA */
.cta {
  text-align: center; border-radius: 24px; padding: 3.5rem 2rem;
  background: linear-gradient(135deg, rgba(255,215,0,.14), rgba(107,114,128,.18)), var(--bg-2);
  border: 1px solid rgba(255,215,0,.22);
}
.cta h2 { font-size: clamp(1.8rem, 4vw, 2.5rem); margin: 0 0 .6rem; letter-spacing: -.02em; }
.cta p { color: var(--muted); margin: 0 auto 1.8rem; max-width: 34rem; }
.cta .hero-actions { justify-content: center; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--border); padding: 3rem 0 2rem; margin-top: 3rem; background: rgba(17,24,39,.6); }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 2rem; }
.site-footer h4 { margin: 0 0 .9rem; font-size: .95rem; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: .5rem; }
.site-footer ul a, .site-footer p { color: var(--muted); font-size: .93rem; }
.site-footer ul a:hover { color: var(--text); }
.footer-bottom { border-top: 1px solid var(--border); margin-top: 2.5rem; padding-top: 1.5rem; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 1rem; color: var(--muted); font-size: .88rem; }

/* ---------- Legal / inner pages ---------- */
.page-hero { padding: 4rem 0 2rem; text-align: center; }
.page-hero h1 { font-size: clamp(2.2rem, 5vw, 3.2rem); margin: .8rem 0 .5rem; letter-spacing: -.02em; }
.page-hero p { color: var(--muted); margin: 0; }
.legal { max-width: 820px; margin: 0 auto; padding: 1rem 0 3rem; }
.legal .doc { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 2.4rem; }
.legal h2 { font-size: 1.35rem; margin: 2rem 0 .6rem; }
.legal h2:first-child { margin-top: 0; }
.legal p, .legal li { color: rgba(255,255,255,.8); }
.legal ul { padding-left: 1.3rem; }
.legal li { margin-bottom: .4rem; }
.note { background: var(--gold-soft); border: 1px solid rgba(255,215,0,.25); border-radius: 12px; padding: 1rem 1.2rem; color: var(--text); }

.support-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; margin-bottom: 3rem; }
.support-grid .card { text-align: center; }
.support-grid .card .icon { margin-inline: auto; }

/* Reveal animation */
.js .reveal { opacity: 0; transform: translateY(20px); transition: opacity .6s ease, transform .6s ease; }
.js .reveal.visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .js .reveal { opacity: 1; transform: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .hero-grid, .info-wrap { grid-template-columns: 1fr; }
  .hero { padding-top: 3rem; text-align: center; }
  .hero p.lead { margin-inline: auto; }
  .hero-actions, .hero-meta { justify-content: center; }
  .grid-3, .screens, .support-grid { grid-template-columns: 1fr 1fr; }
  .steps { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid > :first-child { grid-column: 1 / -1; }
}
@media (max-width: 720px) {
  .nav-toggle { display: inline-grid; place-items: center; }
  .nav-links {
    position: absolute; top: 68px; left: 0; right: 0; flex-direction: column; gap: 0;
    background: rgba(17,24,39,.97); border-bottom: 1px solid var(--border);
    max-height: 0; overflow: hidden; transition: max-height .3s ease;
  }
  .nav-links.open { max-height: 420px; }
  .nav-links li { width: 100%; }
  .nav-links a { display: block; padding: 1rem 1.25rem; border-top: 1px solid var(--border); }
  .nav-links .btn { margin: 1rem 1.25rem; display: inline-flex; border-top: 0; }
  .grid-3, .screens, .steps, .support-grid, .footer-grid { grid-template-columns: 1fr; }
  section { padding: 3.5rem 0; }
  .legal .doc { padding: 1.5rem; }
  .info-table th, .info-table td { padding: .8rem; }
}
