/* =========================================================
   EggVenge – Coming Soon Site
   Mobile-first, no external resources
   ========================================================= */

/* ----- Custom Properties ----- */
:root {
  --color-bg:      #1A1A2E;
  --color-surface: #14213D;
  --color-orange:  #F7900A;
  --color-gold:    #FFD700;
  --color-text:    #F0EAD6;
  --color-muted:   #9CA3AF;
  --color-accent:  #0D1117;

  --font-stack: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
    'Helvetica Neue', Arial, 'Noto Sans', sans-serif;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 24px;

  --transition: 0.3s ease;
}

/* ----- Reset ----- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

body {
  background-color: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-stack);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

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

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

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

/* ----- Language Selector Header ----- */
.lang-header {
  background: var(--color-accent);
  border-bottom: 2px solid rgba(247, 144, 10, 0.25);
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  position: sticky;
  top: 0;
  z-index: 100;
}

.lang-switcher {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.lang-btn {
  background: transparent;
  border: 1.5px solid rgba(247, 144, 10, 0.4);
  color: var(--color-muted);
  font-family: var(--font-stack);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 999px;
  cursor: pointer;
  transition: background var(--transition), color var(--transition),
    border-color var(--transition);
  white-space: nowrap;
}

.lang-btn:hover {
  border-color: var(--color-orange);
  color: var(--color-orange);
}

.lang-btn.active {
  background: var(--color-orange);
  border-color: var(--color-orange);
  color: #fff;
}

.nav-links {
  display: flex;
  gap: 16px;
  align-items: center;
}

.nav-links a {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--color-muted);
  transition: color var(--transition);
}

.nav-links a:hover {
  color: var(--color-gold);
  text-decoration: none;
}

/* ----- Hero Section ----- */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: flex-end;
  background-image: url('../img/hero_mobile.jpg');
  background-size: cover;
  background-position: center top;
  background-repeat: no-repeat;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(13, 17, 23, 0.97) 0%,
    rgba(13, 17, 23, 0.75) 45%,
    rgba(13, 17, 23, 0.15) 100%
  );
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  padding: 40px 20px 48px;
  width: 100%;
  max-width: 600px;
}

.hero-logo {
  width: 240px;
  max-width: 60vw;
  margin-bottom: 20px;
}

.hero-tagline {
  font-size: clamp(1.4rem, 5vw, 2.4rem);
  font-weight: 900;
  line-height: 1.2;
  color: var(--color-gold);
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.8);
  margin-bottom: 16px;
}

.hero-intro {
  font-size: clamp(0.95rem, 2.5vw, 1.1rem);
  color: var(--color-text);
  opacity: 0.9;
  margin-bottom: 28px;
  max-width: 480px;
}

.hero-coming-soon {
  display: inline-block;
  background: linear-gradient(135deg, var(--color-orange), #e07208);
  color: #fff;
  font-weight: 800;
  font-size: 0.9rem;
  padding: 8px 20px;
  border-radius: var(--radius-lg);
  letter-spacing: 0.03em;
  margin-bottom: 24px;
  box-shadow: 0 4px 18px rgba(247, 144, 10, 0.4);
}

.store-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.store-badge {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.07);
  border: 1.5px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-md);
  padding: 10px 18px;
  cursor: default;
  transition: background var(--transition), border-color var(--transition);
}

.store-badge:hover {
  background: rgba(247, 144, 10, 0.12);
  border-color: var(--color-orange);
}

.store-icon {
  font-size: 1.6rem;
  line-height: 1;
}

.store-badge small {
  display: block;
  font-size: 0.68rem;
  color: var(--color-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.store-badge strong {
  font-size: 1rem;
  color: var(--color-text);
}

/* ----- Characters Section ----- */
.characters {
  background: var(--color-surface);
  padding: 64px 20px;
}

.section-title {
  text-align: center;
  font-size: clamp(1.5rem, 5vw, 2.4rem);
  font-weight: 900;
  color: var(--color-gold);
  margin-bottom: 12px;
}

.section-title::after {
  content: '';
  display: block;
  width: 60px;
  height: 4px;
  background: var(--color-orange);
  border-radius: 2px;
  margin: 12px auto 0;
}

.characters-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 24px;
  max-width: 1000px;
  margin: 40px auto 0;
}

/* ----- Flip Cards ----- */
.char-card {
  perspective: 1000px;
  cursor: pointer;
  height: 380px;
}

.card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform 0.55s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: var(--radius-md);
}

.char-card:hover .card-inner,
.char-card.flipped .card-inner {
  transform: rotateY(180deg);
}

.card-front,
.card-back {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
}

.card-front {
  background: linear-gradient(
    to top,
    var(--color-accent) 0%,
    rgba(20, 33, 61, 0.6) 60%,
    transparent 100%
  );
  border: 2px solid rgba(255, 215, 0, 0.15);
}

.card-back {
  transform: rotateY(180deg);
  background: linear-gradient(
    160deg,
    #1e0a00 0%,
    #3d1500 50%,
    #1A1A2E 100%
  );
  border: 2px solid var(--color-orange);
  justify-content: center;
  padding: 24px 20px;
  text-align: center;
}

.card-front img,
.card-back img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: bottom center;
  z-index: 0;
  padding: 10px 10px 0;
}

.card-front h3 {
  position: relative;
  z-index: 1;
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--color-gold);
  text-align: center;
  padding: 12px 12px 16px;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.9);
  width: 100%;
  background: linear-gradient(to top, rgba(13, 17, 23, 0.95) 0%, transparent 100%);
}

.card-back img {
  opacity: 0.35;
}

.card-back p {
  position: relative;
  z-index: 1;
  font-size: 0.9rem;
  color: var(--color-text);
  line-height: 1.55;
}

/* ----- Page Content (support, privacy, 404) ----- */
.page-content {
  max-width: 700px;
  margin: 0 auto;
  padding: 64px 24px;
}

.page-content h1 {
  font-size: clamp(1.8rem, 5vw, 2.8rem);
  font-weight: 900;
  color: var(--color-gold);
  margin-bottom: 24px;
}

.page-content p {
  font-size: 1.05rem;
  color: var(--color-text);
  margin-bottom: 16px;
  opacity: 0.9;
}

.page-content a {
  font-weight: 700;
  font-size: 1.1rem;
}

/* ----- 404 Page ----- */
.page-404 {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 70vh;
  text-align: center;
  padding: 40px 24px;
}

.page-404 .splat-emoji {
  font-size: 5rem;
  line-height: 1;
  margin-bottom: 16px;
  animation: wobble 1.4s infinite alternate ease-in-out;
}

@keyframes wobble {
  from { transform: rotate(-8deg) scale(0.95); }
  to   { transform: rotate(8deg) scale(1.05); }
}

.page-404 h1 {
  font-size: clamp(1.8rem, 5vw, 3rem);
  font-weight: 900;
  color: var(--color-gold);
  margin-bottom: 12px;
}

.page-404 p {
  font-size: 1.1rem;
  color: var(--color-muted);
  margin-bottom: 32px;
}

.btn-primary {
  display: inline-block;
  background: var(--color-orange);
  color: #fff;
  font-weight: 800;
  font-size: 1rem;
  padding: 14px 32px;
  border-radius: var(--radius-lg);
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 18px rgba(247, 144, 10, 0.35);
  transition: background var(--transition), transform var(--transition);
  text-decoration: none;
}

.btn-primary:hover {
  background: var(--color-gold);
  color: var(--color-accent);
  transform: translateY(-2px);
  text-decoration: none;
}

/* ----- Footer ----- */
.site-footer {
  background: var(--color-accent);
  border-top: 2px solid rgba(247, 144, 10, 0.2);
  padding: 32px 24px;
  text-align: center;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 24px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.footer-links a {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-muted);
  transition: color var(--transition);
}

.footer-links a:hover {
  color: var(--color-gold);
  text-decoration: none;
}

.footer-copyright {
  font-size: 0.8rem;
  color: var(--color-muted);
  margin-bottom: 8px;
}

.footer-fiction {
  font-size: 0.72rem;
  color: rgba(156, 163, 175, 0.65);
  max-width: 600px;
  margin: 0 auto;
  font-style: italic;
}

/* ----- Responsive: Tablet+ ----- */
@media (min-width: 640px) {
  .hero {
    background-image: url('../img/hero_desktop.jpg');
    background-position: center center;
    align-items: center;
  }

  .hero::before {
    background: linear-gradient(
      to right,
      rgba(13, 17, 23, 0.95) 0%,
      rgba(13, 17, 23, 0.75) 50%,
      rgba(13, 17, 23, 0.1) 100%
    );
  }

  .hero-content {
    padding: 60px 48px;
  }
}

@media (min-width: 1024px) {
  .hero-content {
    padding: 80px 80px;
    max-width: 640px;
  }

  .hero-logo {
    width: 320px;
  }
}

/* ----- RTL Support ----- */
[dir="rtl"] .hero::before {
  background: linear-gradient(
    to left,
    rgba(13, 17, 23, 0.95) 0%,
    rgba(13, 17, 23, 0.75) 50%,
    rgba(13, 17, 23, 0.1) 100%
  );
}

[dir="rtl"] .section-title::after {
  margin-left: auto;
  margin-right: auto;
}

[dir="rtl"] .lang-header {
  flex-direction: row-reverse;
}

[dir="rtl"] .footer-links {
  flex-direction: row-reverse;
}

/* ----- Accessibility: Reduced Motion ----- */
@media (prefers-reduced-motion: reduce) {
  .card-inner {
    transition: none;
  }
  .splat-emoji {
    animation: none;
  }
  html {
    scroll-behavior: auto;
  }
}

/* ----- Focus Styles ----- */
:focus-visible {
  outline: 3px solid var(--color-orange);
  outline-offset: 3px;
}

/* ----- Privacy Page ----- */
body.page-privacy .page-content {
  max-width: 860px;
}

.policy-content {
  display: none;
}
.policy-content.active {
  display: block;
}

.policy-content h1 {
  font-size: clamp(1.8rem, 5vw, 2.8rem);
  font-weight: 900;
  color: var(--color-gold);
  margin-bottom: 8px;
}

.policy-meta {
  font-size: 0.8rem;
  color: var(--color-muted);
  margin-bottom: 32px;
  line-height: 1.8;
}

.policy-content h2 {
  font-size: clamp(1.1rem, 3vw, 1.4rem);
  font-weight: 800;
  color: var(--color-orange);
  margin-top: 40px;
  margin-bottom: 12px;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(247, 144, 10, 0.25);
}

.policy-content p {
  font-size: 0.98rem;
  color: var(--color-text);
  opacity: 0.9;
  margin-bottom: 14px;
  line-height: 1.7;
}

.policy-content ul {
  padding-left: 1.4em;
  margin-bottom: 14px;
}

[dir="rtl"] .policy-content ul {
  padding-left: 0;
  padding-right: 1.4em;
}

.policy-content li {
  font-size: 0.98rem;
  color: var(--color-text);
  opacity: 0.9;
  line-height: 1.7;
  margin-bottom: 6px;
}

.table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 16px 0 24px;
  border-radius: 8px;
  border: 1px solid rgba(247, 144, 10, 0.2);
}

.policy-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  min-width: 520px;
}

.policy-table th {
  background: rgba(247, 144, 10, 0.15);
  color: var(--color-gold);
  font-weight: 700;
  text-align: left;
  padding: 10px 14px;
  white-space: nowrap;
}

[dir="rtl"] .policy-table th {
  text-align: right;
}

.policy-table td {
  padding: 10px 14px;
  color: var(--color-text);
  opacity: 0.9;
  vertical-align: top;
  line-height: 1.55;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.policy-table tr:nth-child(even) td {
  background: rgba(255, 255, 255, 0.03);
}

.policy-table a {
  word-break: break-all;
  font-size: 0.85rem;
}
