/* ============================================
   Liapinsoft — Global Styles
   Color scheme inspired by Lettervolt "Soft Midnight"
   ============================================ */

:root {
  --bg-primary: #1A1B2E;
  --bg-secondary: #232440;
  --bg-card: #2A2B45;
  --bg-card-hover: #33345A;
  --accent: #6EC6C8;
  --accent-hover: #8DD8DA;
  --gold: #E8C55A;
  --purple: #A8A0D2;
  --pink: #C88AAE;
  --text-primary: #E8E6F0;
  --text-secondary: #B0ADCA;
  --text-muted: #918EA8;
  --success: #6AAF6A;
  --error: #D4827A;
  --blue: #5A8FCC;
  --border: rgba(110, 198, 200, 0.15);
  --shadow: rgba(0, 0, 0, 0.3);
  --radius: 12px;
  --radius-sm: 8px;
  --max-width: 1100px;
  --transition: 0.3s ease;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', Roboto, sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ============ SKIP LINK ============ */

.skip-link {
  position: absolute;
  top: -100%;
  left: 16px;
  background: var(--accent);
  color: var(--bg-primary);
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  z-index: 200;
  font-weight: 600;
  font-size: 0.9rem;
}

.skip-link:focus {
  top: 8px;
  color: var(--bg-primary);
}

/* ============ FOCUS STYLES ============ */

a:focus-visible,
button:focus-visible,
[tabindex]:focus-visible,
select:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  color: var(--accent-hover);
}

/* ============ HEADER / NAV ============ */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(26, 27, 46, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}

.nav-container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.nav-logo {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.nav-logo span {
  color: var(--accent);
}

.nav-links {
  display: flex;
  gap: 28px;
  list-style: none;
  align-items: center;
}

.nav-links a {
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  transition: color var(--transition);
  position: relative;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text-primary);
}

.nav-links a.active::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--accent);
  border-radius: 1px;
}

/* Mobile nav */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 4px;
}

@media (max-width: 768px) {
  .nav-toggle {
    display: block;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    flex-direction: column;
    background: var(--bg-secondary);
    padding: 16px 24px;
    gap: 16px;
    border-bottom: 1px solid var(--border);
  }

  .nav-links.open {
    display: flex;
  }
}

/* ============ MAIN CONTENT ============ */

main {
  flex: 1;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* ============ HERO SECTION ============ */

.hero {
  padding: 80px 0 60px;
  text-align: center;
}

.hero h1 {
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 20px;
  letter-spacing: -0.03em;
}

.hero h1 .highlight {
  background: linear-gradient(135deg, var(--accent), var(--purple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero p {
  font-size: 1.15rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto 32px;
}

.hero-buttons {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ============ BUTTONS ============ */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: var(--radius);
  font-size: 0.95rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
}

.btn-primary {
  background: var(--accent);
  color: var(--bg-primary);
}

.btn-primary:hover {
  background: var(--accent-hover);
  color: var(--bg-primary);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(110, 198, 200, 0.25);
}

.btn-outline {
  background: transparent;
  color: var(--text-primary);
  border: 1.5px solid var(--border);
}

.btn-outline:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
}

/* ============ SECTIONS ============ */

.section {
  padding: 60px 0;
}

.section-title {
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 12px;
  letter-spacing: -0.02em;
}

.section-subtitle {
  color: var(--text-secondary);
  margin-bottom: 40px;
  font-size: 1.05rem;
}

/* ============ CARDS ============ */

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  transition: all var(--transition);
}

.card:hover {
  background: var(--bg-card-hover);
  transform: translateY(-4px);
  box-shadow: 0 12px 32px var(--shadow);
}

.card-icon {
  font-size: 2rem;
  margin-bottom: 16px;
  display: block;
}

.card h3 {
  font-size: 1.15rem;
  margin-bottom: 8px;
  font-weight: 600;
}

.card p {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

/* ============ FEATURE LIST ============ */

.feature-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
  list-style: none;
}

.feature-item {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 20px;
  background: var(--bg-card);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

.feature-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(110, 198, 200, 0.1);
  border-radius: var(--radius-sm);
}

.feature-item h4 {
  font-size: 1rem;
  margin-bottom: 4px;
}

.feature-item p {
  color: var(--text-secondary);
  font-size: 0.88rem;
}

/* ============ GAME SHOWCASE ============ */

.game-showcase {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}

@media (max-width: 768px) {
  .game-showcase {
    grid-template-columns: 1fr;
    gap: 32px;
  }
}

.game-mockup {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 32px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.game-mockup::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(110, 198, 200, 0.05) 0%, transparent 60%);
  pointer-events: none;
}

.letter-wheel {
  width: 220px;
  height: 220px;
  margin: 0 auto 20px;
  position: relative;
}

.letter-wheel .letter {
  position: absolute;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-secondary);
  border: 2px solid var(--accent);
  border-radius: 50%;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--accent);
  transition: all 0.4s ease;
}

.letter-wheel .letter:nth-child(1) { top: 0;    left: 50%;  transform: translateX(-50%); }
.letter-wheel .letter:nth-child(2) { top: 15%;  right: 5%;  }
.letter-wheel .letter:nth-child(3) { top: 50%;  right: -5%; transform: translateY(-50%); }
.letter-wheel .letter:nth-child(4) { bottom: 15%; right: 5%; }
.letter-wheel .letter:nth-child(5) { bottom: 0; left: 50%;  transform: translateX(-50%); }
.letter-wheel .letter:nth-child(6) { bottom: 15%; left: 5%;  }
.letter-wheel .letter:nth-child(7) { top: 50%;  left: -5%;  transform: translateY(-50%); }
.letter-wheel .letter:nth-child(8) { top: 15%;  left: 5%;   }

.letter-wheel:hover .letter {
  background: rgba(110, 198, 200, 0.15);
}

.game-info h2 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 16px;
  letter-spacing: -0.02em;
}

.game-info p {
  color: var(--text-secondary);
  margin-bottom: 16px;
  font-size: 1rem;
}

.game-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin: 28px 0;
}

.stat {
  text-align: center;
}

.stat-value {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--gold);
}

.stat-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ============ LEGAL / TEXT CONTENT ============ */

.text-content {
  max-width: 780px;
  margin: 0 auto;
  padding: 48px 0 60px;
}

.text-content h1 {
  font-size: 2.2rem;
  font-weight: 700;
  margin-bottom: 8px;
  letter-spacing: -0.02em;
}

.text-content .last-updated {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 36px;
}

.text-content h2 {
  font-size: 1.3rem;
  font-weight: 600;
  margin-top: 36px;
  margin-bottom: 12px;
  color: var(--accent);
}

.text-content h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-top: 24px;
  margin-bottom: 8px;
}

.text-content p {
  color: var(--text-secondary);
  margin-bottom: 16px;
  font-size: 0.95rem;
}

.text-content ul, .text-content ol {
  color: var(--text-secondary);
  margin-bottom: 16px;
  padding-left: 24px;
  font-size: 0.95rem;
}

.text-content li {
  margin-bottom: 8px;
}

.text-content a {
  color: var(--accent);
}

/* ============ FAQ ============ */

.faq-list {
  max-width: 780px;
  margin: 0 auto;
}

.faq-item {
  border-bottom: 1px solid var(--border);
}

.faq-question {
  width: 100%;
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 1.05rem;
  font-weight: 600;
  text-align: left;
  padding: 20px 0;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: color var(--transition);
  font-family: inherit;
}

.faq-question:hover {
  color: var(--accent);
}

.faq-question::after {
  content: '+';
  font-size: 1.4rem;
  color: var(--text-muted);
  transition: transform var(--transition);
  flex-shrink: 0;
  margin-left: 16px;
}

.faq-item.open .faq-question::after {
  content: '−';
  color: var(--accent);
}

.faq-answer {
  padding-bottom: 0;
}

.faq-answer[hidden] {
  display: none;
}

.faq-item.open .faq-answer {
  padding-bottom: 20px;
}

.faq-answer p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.7;
}

/* ============ CONTACT FORM ============ */

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  max-width: 900px;
  margin: 0 auto;
}

@media (max-width: 768px) {
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }
}

.contact-info h3 {
  font-size: 1.15rem;
  margin-bottom: 8px;
}

.contact-info p {
  color: var(--text-secondary);
  margin-bottom: 24px;
  font-size: 0.95rem;
}

.contact-method {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}

.contact-method-icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(110, 198, 200, 0.1);
  border-radius: var(--radius-sm);
  font-size: 1.1rem;
  flex-shrink: 0;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 6px;
  color: var(--text-secondary);
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 0.95rem;
  font-family: inherit;
  transition: border-color var(--transition);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--accent);
}

.form-group textarea {
  min-height: 120px;
  resize: vertical;
}

.form-group select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%239B98B0' stroke-width='1.5' fill='none'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 40px;
}

/* ============ FOOTER ============ */

.site-footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  padding: 40px 0 24px;
  margin-top: auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 32px;
}

@media (max-width: 768px) {
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }
}

.footer-brand p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-top: 8px;
  max-width: 320px;
}

.footer-links h4 {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 14px;
}

.footer-links ul {
  list-style: none;
}

.footer-links li {
  margin-bottom: 10px;
}

.footer-links a {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.footer-links a:hover {
  color: var(--text-primary);
}

.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 20px;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.82rem;
}

/* ============ MISC ============ */

.badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.badge-accent {
  background: rgba(110, 198, 200, 0.15);
  color: var(--accent);
}

.badge-gold {
  background: rgba(232, 197, 90, 0.15);
  color: var(--gold);
}

.badge-purple {
  background: rgba(168, 160, 210, 0.15);
  color: var(--purple);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.text-center {
  text-align: center;
}

.mt-2 { margin-top: 16px; }
.mt-4 { margin-top: 32px; }
.mb-2 { margin-bottom: 16px; }
.mb-4 { margin-bottom: 32px; }

/* ============ APP STORE BADGE ============ */

.app-store-link {
  display: inline-block;
  transition: transform var(--transition), opacity var(--transition);
}

.app-store-link:hover {
  transform: scale(1.05);
}

.app-store-badge {
  height: 48px;
  border-radius: 8px;
}

/* ============ PAGE HEADER (for subpages) ============ */

.page-header {
  padding: 48px 0 32px;
  text-align: center;
  border-bottom: 1px solid var(--border);
  margin-bottom: 0;
}

.page-header h1 {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.page-header p {
  color: var(--text-secondary);
  margin-top: 8px;
}

/* Divider */
.divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 48px 0;
}

/* Back to top */
.back-to-top {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 44px;
  height: 44px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  font-size: 1.2rem;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: all var(--transition);
  z-index: 50;
}

.back-to-top.visible {
  opacity: 1;
  pointer-events: all;
}

.back-to-top:hover {
  background: var(--accent);
  color: var(--bg-primary);
}

/* ============ PHONE GALLERY ============ */

.phone-gallery {
  display: flex;
  gap: 24px;
  justify-content: center;
  align-items: flex-end;
  padding: 20px 0;
}

.phone-frame {
  position: relative;
  width: 140px;
  flex-shrink: 0;
  background: #000;
  border-radius: 24px;
  padding: 8px 6px 6px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4), inset 0 0 0 1px rgba(255, 255, 255, 0.08);
  transition: all 0.4s ease;
  opacity: 0.75;
  transform: scale(0.95);
  cursor: default;
}

.phone-frame:hover {
  opacity: 1;
  transform: scale(1.08);
  box-shadow: 0 12px 40px rgba(110, 198, 200, 0.2), inset 0 0 0 1px rgba(255, 255, 255, 0.12);
  z-index: 2;
}

.phone-notch {
  width: 48px;
  height: 6px;
  background: #1a1a1a;
  border-radius: 3px;
  margin: 0 auto 6px;
}

.phone-frame img {
  width: 100%;
  display: block;
  border-radius: 16px;
}

.phone-label {
  color: var(--text-muted);
  font-size: 0.72rem;
  text-align: center;
  margin-top: 10px;
  letter-spacing: 0.03em;
  transition: color 0.4s ease;
}

.phone-frame:hover .phone-label {
  color: var(--text-primary);
}

.phone-frame {
  cursor: pointer;
  font-family: inherit;
  font-size: inherit;
  text-align: center;
  line-height: inherit;
}

@media (max-width: 640px) {
  .phone-gallery {
    gap: 10px;
  }

  .phone-frame {
    width: 80px;
    border-radius: 16px;
    padding: 5px 4px 4px;
  }

  .phone-notch {
    width: 28px;
    height: 4px;
    margin-bottom: 4px;
  }

  .phone-frame img {
    border-radius: 10px;
  }

  .phone-label {
    font-size: 0.62rem;
  }
}

