/* ===== RESET & BASE ===== */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --color-bg: #f8f6f3;
  --color-surface: #ffffff;
  --color-primary: #5b6abf;
  --color-primary-light: #7b88d4;
  --color-primary-dark: #434fa0;
  --color-accent: #e8734a;
  --color-accent-light: #f09070;
  --color-text: #2c2c3a;
  --color-text-light: #6b6b80;
  --color-border: #e8e6e1;
  --color-card: #ffffff;
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --shadow-sm: 0 2px 8px rgba(44, 44, 58, 0.06);
  --shadow-md: 0 4px 20px rgba(44, 44, 58, 0.08);
  --shadow-lg: 0 8px 40px rgba(44, 44, 58, 0.1);
  --font-main: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --max-width: 1100px;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-main);
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a:hover {
  color: var(--color-primary-dark);
}

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

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

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

/* ===== HEADER / NAV ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(248, 246, 243, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--color-border);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}

.nav-logo {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-text);
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-logo .dice-icon {
  width: 32px;
  height: 32px;
  background: var(--color-primary);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1rem;
}

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

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

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

.lang-toggle {
  display: flex;
  background: var(--color-border);
  border-radius: 50px;
  padding: 3px;
  gap: 2px;
}

.lang-btn {
  border: none;
  background: transparent;
  padding: 6px 14px;
  font-size: 0.8rem;
  font-weight: 600;
  border-radius: 50px;
  cursor: pointer;
  color: var(--color-text-light);
  transition: all var(--transition);
  font-family: var(--font-main);
}

.lang-btn.active {
  background: var(--color-surface);
  color: var(--color-text);
  box-shadow: var(--shadow-sm);
}

.mobile-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.mobile-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--color-text);
  margin: 5px 0;
  border-radius: 2px;
  transition: all var(--transition);
}

/* ===== HERO ===== */
.hero {
  padding: 80px 0 60px;
  text-align: center;
}

.hero-badge {
  display: inline-block;
  background: linear-gradient(135deg, var(--color-primary-light), var(--color-primary));
  color: #fff;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 6px 18px;
  border-radius: 50px;
  margin-bottom: 24px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.hero h1 {
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 20px;
  color: var(--color-text);
}

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

.hero-description {
  font-size: 1.15rem;
  color: var(--color-text-light);
  max-width: 560px;
  margin: 0 auto 36px;
  line-height: 1.8;
}

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

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

.btn-primary {
  background: var(--color-text);
  color: #fff;
}

.btn-primary:hover {
  background: #1a1a28;
  color: #fff;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-primary svg {
  width: 22px;
  height: 22px;
}

.btn-secondary {
  background: var(--color-surface);
  color: var(--color-text);
  border: 1.5px solid var(--color-border);
}

.btn-secondary:hover {
  border-color: var(--color-primary-light);
  color: var(--color-primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

/* ===== SCREENSHOTS ===== */
.screenshots {
  padding: 40px 0 80px;
}

.section-label {
  text-align: center;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--color-primary);
  margin-bottom: 12px;
}

.section-title {
  text-align: center;
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 700;
  margin-bottom: 48px;
}

.screenshots-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  max-width: 800px;
  margin: 0 auto;
}

.screenshot-card {
  aspect-ratio: 9 / 16;
  background: linear-gradient(145deg, #e9e7e3, #d8d5cf);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-light);
  font-size: 0.85rem;
  font-weight: 500;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition);
}

.screenshot-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.screenshot-card::before {
  content: '';
  position: absolute;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  width: 40%;
  height: 20px;
  background: rgba(0, 0, 0, 0.08);
  border-radius: 10px;
}

.screenshot-placeholder-icon {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  opacity: 0.5;
}

.screenshot-placeholder-icon svg {
  width: 32px;
  height: 32px;
}

/* ===== RULES ===== */
.rules {
  padding: 80px 0;
}

.rules-card {
  background: var(--color-surface);
  border-radius: var(--radius-xl);
  padding: 48px;
  box-shadow: var(--shadow-md);
  max-width: 760px;
  margin: 0 auto;
}

.rules-list {
  list-style: none;
  counter-reset: rules;
}

.rules-list li {
  counter-increment: rules;
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--color-border);
  font-size: 1rem;
  line-height: 1.6;
}

.rules-list li:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.rules-list li::before {
  content: counter(rules);
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, var(--color-primary-light), var(--color-primary));
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 700;
  margin-top: 2px;
}

/* ===== CTA ===== */
.cta {
  padding: 80px 0;
}

.cta-card {
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
  border-radius: var(--radius-xl);
  padding: 56px 48px;
  text-align: center;
  color: #fff;
  position: relative;
  overflow: hidden;
}

.cta-card::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 300px;
  height: 300px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 50%;
}

.cta-card::after {
  content: '';
  position: absolute;
  bottom: -30%;
  left: -10%;
  width: 200px;
  height: 200px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 50%;
}

.cta-card h2 {
  font-size: clamp(1.6rem, 3vw, 2rem);
  font-weight: 700;
  margin-bottom: 12px;
  position: relative;
}

.cta-card p {
  opacity: 0.9;
  margin-bottom: 32px;
  font-size: 1.05rem;
  position: relative;
}

.cta-card .btn-primary {
  background: #fff;
  color: var(--color-primary-dark);
  position: relative;
}

.cta-card .btn-primary:hover {
  background: #f0f0f0;
  color: var(--color-primary-dark);
}

/* ===== FOOTER ===== */
.site-footer {
  border-top: 1px solid var(--color-border);
  padding: 40px 0;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
}

.footer-links {
  display: flex;
  gap: 24px;
  list-style: none;
}

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

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

.footer-copy {
  font-size: 0.85rem;
  color: var(--color-text-light);
}

/* ===== LEGAL / PRIVACY PAGES ===== */
.page-content {
  padding: 60px 0 80px;
}

.page-content h1 {
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  font-weight: 700;
  margin-bottom: 8px;
}

.page-subtitle {
  color: var(--color-text-light);
  margin-bottom: 40px;
  font-size: 0.95rem;
}

.page-card {
  background: var(--color-surface);
  border-radius: var(--radius-xl);
  padding: 48px;
  box-shadow: var(--shadow-md);
  max-width: 760px;
}

.page-card h2 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-top: 32px;
  margin-bottom: 12px;
  color: var(--color-text);
}

.page-card h2:first-child {
  margin-top: 0;
}

.page-card p,
.page-card ul {
  color: var(--color-text-light);
  margin-bottom: 16px;
  font-size: 0.95rem;
  line-height: 1.8;
}

.page-card ul {
  padding-left: 20px;
}

.page-card ul li {
  margin-bottom: 8px;
}

.page-card a {
  color: var(--color-primary);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.page-card .divider {
  height: 1px;
  background: var(--color-border);
  margin: 28px 0;
  border: none;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .nav-links {
    display: none;
    position: absolute;
    top: 68px;
    left: 0;
    right: 0;
    background: var(--color-bg);
    flex-direction: column;
    padding: 24px;
    gap: 16px;
    border-bottom: 1px solid var(--color-border);
    box-shadow: var(--shadow-md);
  }

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

  .mobile-toggle {
    display: block;
  }

  .hero {
    padding: 52px 0 40px;
  }

  .hero h1 {
    font-size: 2rem;
  }

  .hero-description {
    font-size: 1rem;
  }

  .screenshots-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
  }

  .rules-card {
    padding: 28px 24px;
  }

  .rules-list li {
    font-size: 0.92rem;
  }

  .cta-card {
    padding: 40px 24px;
  }

  .footer-content {
    flex-direction: column;
    text-align: center;
  }

  .page-card {
    padding: 28px 24px;
  }
}

@media (max-width: 480px) {
  .hero-actions {
    flex-direction: column;
    align-items: center;
  }

  .btn {
    width: 100%;
    max-width: 280px;
    justify-content: center;
  }

  .screenshots-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .screenshot-card:nth-child(3) {
    grid-column: 1 / -1;
    max-width: 50%;
    margin: 0 auto;
  }
}

/* ===== ANIMATIONS ===== */
@media (prefers-reduced-motion: no-preference) {
  .fade-up {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
  }

  .fade-up.visible {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .fade-up {
    opacity: 1;
    transform: none;
  }
}
