/* =========================================
   style.css — Chicken Road App
   ========================================= */

:root {
  --color-bg:         #0E0C09;
  --color-surface:    #181410;
  --color-primary:    #D9841E;
  --color-accent:     #F2C200;
  --color-text:       #F0EAE0;
  --color-text-muted: #9A8E78;
  --color-btn-text:   #0E0C09;
  --font-display:     'Exo 2', sans-serif;
  --font-body:        'Nunito', sans-serif;
  --transition-btn:   background-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

/* ===================== RESET ===================== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body), sans-serif;
  font-size: 1rem;
  line-height: 1.7;
  padding-bottom: 60px;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--color-primary); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ===================== TYPOGRAPHY ===================== */
h1, h2, h3 { font-family: var(--font-display), sans-serif; font-weight: 700; line-height: 1.2; }
h1 { font-size: clamp(1.75rem, 5vw, 2.75rem); margin-bottom: 0.75rem; color: var(--color-text); }
h2 { font-size: clamp(1.25rem, 3.5vw, 2rem); margin-bottom: 0.75rem; color: var(--color-primary); }
h3 { font-size: clamp(1rem, 2.5vw, 1.35rem); margin-bottom: 0.5rem; color: var(--color-text); }
p { margin-bottom: 1rem; }
p:last-of-type { margin-bottom: 0; }
strong { color: var(--color-text); font-weight: 700; }
ul, ol { padding-left: 1.5rem; margin-bottom: 1rem; }
li { margin-bottom: 0.4rem; }

/* ===================== LAYOUT ===================== */
.container { width: 100%; max-width: 1000px; margin: 0 auto; padding: 0 16px; }

/* ===================== HEADER ===================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-primary);
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 16px;
  height: 60px;
  padding: 0 16px;
  max-width: 1000px;
  margin: 0 auto;
}
.header-logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  flex-shrink: 0;
  line-height: 0;
}
.header-logo img {
  height: 36px;
  width: auto;
  max-width: 140px;
  object-fit: contain;
  display: block;
}
.header-inner > nav {
  display: none;
  flex: 1;
  align-items: center;
  justify-content: center;
}
.header-nav {
  display: flex;
  align-items: center;
  gap: 20px;
  list-style: none;
  margin-bottom: 0;
}
.header-nav li {
  display: flex;
  align-items: center;
  margin-bottom: 0;
}
.header-nav a {
  color: var(--color-text);
  font-size: 0.88rem;
  font-weight: 600;
  transition: color 0.2s ease;
}
.header-nav a:hover { color: var(--color-primary); text-decoration: none; }
.header-lang {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}
.lang-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 10px;
  border: 1px solid var(--color-primary);
  border-radius: 4px;
  color: var(--color-text-muted);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  transition: color 0.2s ease, background-color 0.2s ease;
}
.lang-btn:hover, .lang-btn.is-active {
  color: var(--color-btn-text);
  background: var(--color-primary);
  text-decoration: none;
}
@media (min-width: 768px) {
  .header-inner > nav { display: flex; }
}

/* ===================== BUTTONS ===================== */
.btn {
  display: inline-block;
  background: var(--color-primary);
  color: var(--color-btn-text);
  font-family: var(--font-display), sans-serif;
  font-size: 1rem;
  font-weight: 700;
  padding: 14px 28px;
  min-height: 48px;
  min-width: 160px;
  border-radius: 8px;
  border: 2px solid var(--color-accent);
  text-align: center;
  cursor: pointer;
  text-decoration: none;
  transition: var(--transition-btn);
}
.btn:hover {
  background: var(--color-accent);
  color: var(--color-btn-text);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(217, 132, 30, 0.35);
  text-decoration: none;
}
.header-cta {
  padding: 8px 16px;
  font-size: 0.82rem;
  min-height: 36px;
  min-width: auto;
  flex-shrink: 0;
  margin-left: auto;
}

/* APK bounce animation */
@keyframes apkBounce {
  0%, 100% { transform: translateY(0); }
  20% { transform: translateY(-10px); }
  40% { transform: translateY(-5px); }
  60% { transform: translateY(-10px); }
  80% { transform: translateY(-3px); }
}
.btn.apk-bounce { animation: apkBounce 0.8s ease; }

/* ===================== HERO ===================== */
.hero {
  background: var(--color-surface);
  padding: 60px 0 48px;
  text-align: center;
}
.hero-title {
  opacity: 0;
  animation: fadeUp 0.5s ease-out 0s forwards;
}
.hero-subtitle {
  color: var(--color-text-muted);
  font-size: 1.05rem;
  margin-bottom: 8px;
  opacity: 0;
  animation: fadeUp 0.5s ease-out 0.15s forwards;
}
.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin-top: 24px;
  margin-bottom: 28px;
  opacity: 0;
  animation: fadeUp 0.5s ease-out 0.3s forwards;
}
.hero-img {
  margin: 0 auto 28px;
  max-width: 300px;
  border-radius: 16px;
  opacity: 0;
  animation: fadeUp 0.5s ease-out 0.45s forwards;
}
.hero-desc {
  color: var(--color-text-muted);
  max-width: 700px;
  margin: 0 auto;
  opacity: 0;
  animation: fadeUp 0.5s ease-out 0.5s forwards;
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ===================== HERO CARD (App Store) ===================== */
.hero-card {
  display: flex;
  align-items: center;
  gap: 40px;
  background: rgba(217, 132, 30, 0.05);
  border: 1px solid rgba(217, 132, 30, 0.18);
  border-radius: 20px;
  padding: 32px;
  text-align: left;
  margin-bottom: 24px;
  opacity: 0;
  animation: fadeUp 0.5s ease-out 0s forwards;
}
.hero-card-info { flex: 1; min-width: 0; }
.hero-card-img  { flex-shrink: 0; }
.hero-card .hero-img {
  max-width: 260px;
  width: 100%;
  border-radius: 20px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.5);
  margin: 0;
  opacity: 1;
  animation: none;
}
.hero-app-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 14px;
}
.hero-app-icon {
  width: 72px;
  height: 72px;
  border-radius: 16px;
  object-fit: contain;
  flex-shrink: 0;
  border: 2px solid rgba(217, 132, 30, 0.25);
  background: var(--color-bg);
}
.hero-app-meta { min-width: 0; }
.hero-card .hero-title {
  font-size: clamp(1.05rem, 2.6vw, 1.45rem);
  margin-bottom: 16px;
  color: var(--color-text);
  opacity: 1;
  animation: none;
}
.hero-app-name {
  font-family: var(--font-display), sans-serif;
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--color-primary);
  margin-bottom: 2px;
  line-height: 1.2;
}
.hero-app-genre {
  color: var(--color-text-muted);
  font-size: 0.88rem;
  margin-bottom: 4px;
}
.hero-rating {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.84rem;
}
.hero-stars        { color: var(--color-accent); letter-spacing: 2px; line-height: 1; }
.hero-rating-val   { font-weight: 700; color: var(--color-text); }
.hero-rating-count { color: var(--color-text-muted); }
.hero-card .hero-subtitle {
  color: var(--color-text-muted);
  font-size: 0.95rem;
  margin-top: 14px;
  margin-bottom: 20px;
  opacity: 1;
  animation: none;
}
.hero-store-btns {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 240px;
  margin-bottom: 20px;
}
.btn-store {
  display: flex;
  align-items: center;
  gap: 14px;
  background: rgba(255, 255, 255, 0.07);
  color: #ffffff;
  border: 1.5px solid rgba(255, 255, 255, 0.22);
  border-radius: 12px;
  padding: 12px 20px;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, background 0.2s ease;
  min-height: 58px;
}
.btn-store:hover {
  transform: translateY(-2px);
  background: rgba(217, 132, 30, 0.18);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(217, 132, 30, 0.35);
  border-color: var(--color-primary);
  text-decoration: none;
  color: #ffffff;
}
.store-icon  { width: 24px; height: 24px; flex-shrink: 0; }
.store-text  { display: flex; flex-direction: column; line-height: 1.2; }
.store-label { font-size: 0.65rem; opacity: 0.75; font-weight: 400; font-family: var(--font-body), sans-serif; }
.store-name  { font-size: 1rem; font-weight: 700; font-family: var(--font-display), sans-serif; }
.hero-badges { display: flex; flex-wrap: wrap; gap: 8px; }
.hero-badge {
  background: rgba(217, 132, 30, 0.08);
  border: 1px solid rgba(217, 132, 30, 0.25);
  border-radius: 20px;
  padding: 3px 12px;
  font-size: 0.78rem;
  color: var(--color-primary);
}
@media (max-width: 700px) {
  .hero-card {
    flex-direction: column;
    padding: 20px 16px;
    gap: 24px;
    text-align: center;
    align-items: center;
  }
  .hero-card-img { order: -1; }
  .hero-card .hero-img { max-width: 180px; }
  .hero-app-header { justify-content: center; }
  .hero-store-btns { flex-direction: row; max-width: 100%; justify-content: center; margin-bottom: 16px; }
  .hero-badges { justify-content: center; }
}
@media (max-width: 420px) {
  .hero-store-btns { flex-direction: column; align-items: center; }
  .btn-store { width: 100%; max-width: 240px; justify-content: center; }
}

/* ===================== SECTIONS ===================== */
.section {
  padding: 52px 0;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.4s ease-out, transform 0.4s ease-out;
}
.section.is-visible { opacity: 1; transform: translateY(0); }
.section--alt { background: var(--color-surface); }

/* Section images — float */
.section-img {
  border-radius: 12px;
  max-width: 100%;
  margin-bottom: 16px;
}
.section-cta {
  text-align: center;
  margin-top: 28px;
  clear: both;
}
.section .container::after { content: ''; display: table; clear: both; }

@media (min-width: 600px) {
  .section-img { max-width: 260px; }
  .section-img--right { float: right; margin: 0 0 20px 28px; }
  .section-img--left  { float: left;  margin: 0 28px 20px 0; }
}

/* ===================== TABLE ===================== */
.table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  width: 100%;
  margin-bottom: 1rem;
  border-radius: 8px;
}
table { min-width: 600px; border-collapse: collapse; width: 100%; }
th, td { padding: 10px 14px; border: 1px solid rgba(217, 132, 30, 0.3); text-align: left; font-size: 0.92rem; }
th { background: rgba(217, 132, 30, 0.1); color: var(--color-primary); font-family: var(--font-display), sans-serif; font-size: 0.88rem; font-weight: 700; }
tr:nth-child(even) td { background: rgba(217, 132, 30, 0.04); }
td:first-child { color: var(--color-text-muted); font-weight: 600; }

/* ===================== FAQ ===================== */
.faq-list { list-style: none; padding: 0; margin: 0; }
.faq-item { border-bottom: 1px solid rgba(217, 132, 30, 0.3); margin-bottom: 0; }
.faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  background: none;
  border: none;
  color: var(--color-text);
  font-family: var(--font-body), sans-serif;
  font-size: 1rem;
  font-weight: 700;
  text-align: left;
  padding: 16px 0;
  cursor: pointer;
  gap: 12px;
}
.faq-question:hover { color: var(--color-primary); }
.faq-icon {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 2px solid var(--color-primary);
  color: var(--color-primary);
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s ease;
}
.faq-item.is-open .faq-icon { transform: rotate(45deg); }
.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
  padding-bottom: 0;
}
.faq-item.is-open .faq-answer { max-height: 500px; padding-bottom: 16px; }
.faq-answer p { color: var(--color-text-muted); margin-bottom: 0; }

/* ===================== REVIEWS ===================== */
.reviews { display: flex; flex-direction: column; gap: 16px; }
.review-card {
  background: var(--color-surface);
  border-radius: 14px;
  padding: 20px 20px 18px;
  border: 1px solid rgba(217, 132, 30, 0.18);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  position: relative;
  overflow: hidden;
}
.review-card::before {
  content: '\201C';
  position: absolute;
  top: -4px;
  left: 14px;
  font-size: 4rem;
  line-height: 1;
  color: var(--color-primary);
  opacity: 0.18;
  font-family: Georgia, serif;
  pointer-events: none;
}
.review-stars { color: var(--color-accent); font-size: 0.85rem; letter-spacing: 2px; margin-bottom: 8px; }
.review-body { color: var(--color-text-muted); font-size: 0.93rem; margin-bottom: 14px; line-height: 1.65; }
.review-footer { display: flex; align-items: center; gap: 10px; }
.review-avatar {
  width: 34px; height: 34px; border-radius: 50%;
  background: rgba(217, 132, 30, 0.18);
  border: 1.5px solid rgba(217, 132, 30, 0.35);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display), sans-serif;
  font-weight: 700; font-size: 0.85rem;
  color: var(--color-primary); flex-shrink: 0;
}
.review-author { font-weight: 700; color: var(--color-text); font-size: 0.88rem; margin: 0; }
.review-card p { color: var(--color-text-muted); margin: 0; font-size: 0.93rem; }
@media (min-width: 768px) {
  .reviews { flex-direction: row; flex-wrap: wrap; }
  .review-card { flex: 1; min-width: 260px; }
}

/* ===================== TROUBLESHOOT ===================== */
.trouble-item { margin-bottom: 24px; }
.trouble-item h3 { margin-bottom: 4px; }
.trouble-item p { color: var(--color-text-muted); margin: 0; }

/* ===================== STICKY BAR ===================== */
.sticky-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 98;
  height: 60px;
  background: var(--color-surface);
  border-top: 1px solid var(--color-primary);
  display: flex;
  align-items: center;
  padding: 0 16px;
  gap: 12px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(100%);
  transition: opacity 0.3s ease, transform 0.3s ease;
}
.sticky-bar.is-visible {
  opacity: 1;
  pointer-events: all;
  transform: translateY(0);
}
.sticky-bar-logo {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  object-fit: contain;
  flex-shrink: 0;
}
.sticky-bar-slogan {
  flex: 1;
  font-family: var(--font-display), sans-serif;
  font-weight: 700;
  font-size: 1rem;
  color: var(--color-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sticky-bar .btn {
  padding: 8px 20px;
  min-height: auto;
  min-width: auto;
  font-size: 0.85rem;
  flex-shrink: 0;
}

/* ===================== POPUP ===================== */
.popup-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}
.popup-overlay.is-open { opacity: 1; pointer-events: all; }
.popup-inner {
  position: relative;
  max-width: 480px;
  width: calc(100% - 32px);
  border-radius: 12px;
  overflow: hidden;
}
.popup-inner img { display: block; width: 100%; height: auto; }
.popup-cta {
  display: block;
  width: 100%;
  text-align: center;
  padding: 14px 24px;
  border-radius: 0;
  min-height: 48px;
}
.popup-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  font-size: 18px;
  background: rgba(0, 0, 0, 0.55);
  color: var(--color-text);
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s ease;
}
.popup-close:hover { background: rgba(0, 0, 0, 0.8); }

/* ===================== FOOTER ===================== */
.site-footer {
  background: var(--color-surface);
  border-top: 1px solid rgba(217, 132, 30, 0.3);
  padding: 32px 0;
  text-align: center;
}
.footer-lang { display: flex; justify-content: center; gap: 8px; margin-bottom: 20px; }
.footer-disclaimer {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  max-width: 680px;
  margin: 0 auto 12px;
  line-height: 1.6;
}
.footer-copy { font-size: 0.75rem; color: var(--color-text-muted); }

/* ===================== 404 ===================== */
.not-found {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 32px;
}
.not-found-code {
  font-family: var(--font-display), sans-serif;
  font-weight: 700;
  font-size: clamp(5rem, 20vw, 10rem);
  color: var(--color-primary);
  line-height: 1;
  margin-bottom: 8px;
}
.not-found-msg {
  font-size: 1.4rem;
  color: var(--color-text-muted);
  margin-bottom: 32px;
}

/* ===================== RESPONSIVE ===================== */
@media (max-width: 480px) {
  .header-logo { display: none; }
  .sticky-bar { height: 56px; }
  .sticky-bar-slogan { font-size: 0.78rem; }
  .sticky-bar-logo { width: 32px; height: 32px; }
  .hero { padding: 40px 0 36px; }
  .section { padding: 40px 0; }
  .popup-inner { max-width: 100%; width: calc(100% - 24px); }
}

/* ===================== REDUCED MOTION ===================== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .hero-title, .hero-subtitle, .hero-cta, .hero-img, .hero-desc { opacity: 1; }
  .hero-card { opacity: 1; animation: none; }
  .section { opacity: 1; transform: none; }
}
