/* ============================================================
   FAWN STUDIOS — Landing Page
   ============================================================ */

/* ---------- Tokens ---------- */
:root {
  --bg:        #F7F4EF;
  --bg-2:      #EDEAE4;
  --fg:        #0F1A10;
  --fg-2:      #4A5248;
  --fg-3:      #8A9088;
  --border:    rgba(0, 0, 0, 0.09);
  --accent:    #C86428;
  --accent-h:  #E07838;
  --hero-dark: #080E18;
  --radius:    6px;
  --max-w:     1200px;
  --header-h:  80px;
}

[data-theme="dark"] {
  --bg:        #0D1520;
  --bg-2:      #152030;
  --fg:        #EEE9E2;
  --fg-2:      #8A9098;
  --fg-3:      #4A5058;
  --border:    rgba(255, 255, 255, 0.08);
}

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

body {
  background: var(--bg);
  color: var(--fg);
  font-family: 'Readex Pro', 'Tajawal', system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  transition: background 0.3s ease, color 0.3s ease;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }

/* ---------- Layout helpers ---------- */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 clamp(20px, 4vw, 48px);
}

/* ---------- Header ---------- */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--header-h);
  z-index: 100;
  transition: background 0.35s ease, border-color 0.35s ease;
  border-bottom: 1px solid transparent;
}

/* Over the dark hero — always light text */
.site-header:not(.scrolled) .main-nav a,
.site-header:not(.scrolled) .theme-toggle {
  color: rgba(255, 255, 255, 0.75);
}
.site-header:not(.scrolled) .main-nav a:hover,
.site-header:not(.scrolled) .theme-toggle:hover {
  color: #fff;
}
.site-header:not(.scrolled) .theme-toggle {
  border-color: rgba(255, 255, 255, 0.25);
}

/* After scroll — picks up bg */
.site-header.scrolled {
  background: var(--bg);
  border-bottom-color: var(--border);
}
.site-header.scrolled .main-nav a {
  color: var(--fg-2);
}
.site-header.scrolled .main-nav a:hover {
  color: var(--fg);
}
.site-header.scrolled .theme-toggle {
  color: var(--fg-2);
  border-color: var(--border);
}

.header-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 clamp(20px, 4vw, 48px);
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.logo img {
  height: 60px;
  width: auto;
  display: block;
  transition: opacity 0.2s ease;
}
.logo:hover img { opacity: 0.8; }

.main-nav {
  display: flex;
  gap: 32px;
}
.main-nav a {
  font-size: 14.5px;
  font-weight: 500;
  transition: color 0.2s ease;
}

.theme-toggle {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid;
  flex-shrink: 0;
  transition: color 0.2s ease, border-color 0.2s ease;
}

[data-theme="dark"]  .icon-sun  { display: block; }
[data-theme="dark"]  .icon-moon { display: none;  }
[data-theme="light"] .icon-sun  { display: none;  }
[data-theme="light"] .icon-moon { display: block; }
.icon-sun, .icon-moon { display: none; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 28px;
  font-size: 14.5px;
  font-weight: 600;
  border-radius: var(--radius);
  transition: all 0.25s ease;
  cursor: pointer;
}
.btn-solid {
  background: #fff;
  color: var(--hero-dark);
}
.btn-solid:hover { background: #f0ece6; }

.btn-outline {
  border: 1.5px solid rgba(255, 255, 255, 0.45);
  color: #fff;
}
.btn-outline:hover {
  border-color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.btn-accent {
  background: var(--accent);
  color: #fff;
}
.btn-accent:hover {
  background: var(--accent-h);
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(200, 100, 40, 0.3);
}

.btn-outline-dark {
  border: 1.5px solid var(--border);
  color: var(--fg);
}
.btn-outline-dark:hover {
  border-color: var(--fg-3);
  background: var(--bg-2);
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  height: 100vh;
  min-height: 640px;
  overflow: hidden;
  display: flex;
  align-items: stretch;
  padding-top: var(--header-h);
}

.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-color: var(--hero-dark);
}

/* Darken the visual-left (sky) for text readability, keep visual-right (fawn) clear */
.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to right, rgba(6, 12, 22, 0.88) 0%, rgba(6, 12, 22, 0.5) 42%, transparent 68%),
    linear-gradient(to top,   rgba(6, 12, 22, 0.55) 0%, transparent 30%);
}

/* hero-body: use margin-right:auto on hero-text to push it to physical left */
.hero-body {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 clamp(20px, 4vw, 48px);
  display: flex;
  align-items: center;
  height: 100%;
}

.hero-text {
  max-width: 500px;
  margin-right: auto; /* physical: pushes text block to the left side */
  padding-block: 20px;
}

.hero-tag {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.5);
  margin-bottom: 24px;
}

.hero-text h1 {
  font-size: clamp(52px, 7.5vw, 112px);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.02em;
  color: #fff;
  margin-bottom: 28px;
}
.hero-text h1 span {
  color: var(--accent);
}

.hero-desc {
  font-size: clamp(15px, 1.6vw, 18px);
  font-weight: 300;
  color: rgba(255, 255, 255, 0.65);
  line-height: 1.75;
  margin-bottom: 40px;
  max-width: 420px;
}

.hero-btns {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* Scroll hint — animated line */
.scroll-hint {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
}
.scroll-line {
  display: block;
  width: 1px;
  height: 56px;
  background: linear-gradient(to bottom, rgba(255,255,255,0), rgba(255,255,255,0.5));
  animation: scrollPulse 2s ease-in-out infinite;
}
@keyframes scrollPulse {
  0%, 100% { opacity: 0.4; transform: scaleY(1);   }
  50%       { opacity: 1;   transform: scaleY(1.15); }
}

/* ---------- Sections ---------- */
.section {
  padding: clamp(72px, 10vw, 140px) 0;
}

.section-tag {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 16px;
}

.section-title {
  font-size: clamp(32px, 4vw, 56px);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 48px;
}

/* ---------- Featured Game ---------- */
.featured-section {
  background: var(--bg-2);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.featured-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(32px, 5vw, 80px);
  align-items: center;
}

.featured-art {
  aspect-ratio: 3 / 4;
  border-radius: 12px;
  border: 1px solid var(--border);
}

/* Reuse tile gradient system */
.featured-art.t1 {
  background:
    radial-gradient(ellipse at 30% 30%, rgba(212,162,91,0.7), transparent 65%),
    linear-gradient(135deg, #3a2418 0%, #1a0f08 100%);
}

.featured-info .game-genre {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 14px;
}

.featured-info h2 {
  font-size: clamp(36px, 4.5vw, 64px);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin-bottom: 20px;
}

.game-desc {
  font-size: 16px;
  line-height: 1.75;
  color: var(--fg-2);
  margin-bottom: 28px;
}

.game-platforms {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 32px;
}
.game-platforms span {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--fg-3);
  padding: 6px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
}

/* ---------- Games Grid ---------- */
.games-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.game-card {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  aspect-ratio: 3 / 4;
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  transition: transform 0.4s ease;
}
.game-card:hover { transform: translateY(-6px); }

.game-card-art {
  position: absolute;
  inset: 0;
  transition: transform 0.6s ease;
}
.game-card:hover .game-card-art { transform: scale(1.04); }

.game-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(8,14,22,0.92) 0%, transparent 55%);
  z-index: 1;
}

.game-card-body {
  position: relative;
  z-index: 2;
  padding: 24px 20px;
}
.game-card-genre {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 8px;
}
.game-card h3 {
  font-size: clamp(20px, 2.2vw, 28px);
  font-weight: 700;
  color: #fff;
  margin-bottom: 6px;
  line-height: 1.1;
}
.game-card-sub {
  font-size: 13px;
  color: rgba(255,255,255,0.5);
}

/* Tile color variants */
.t1 .game-card-art, .featured-art.t1 {
  background: radial-gradient(ellipse at 30% 30%, rgba(212,162,91,0.7), transparent 65%), linear-gradient(135deg, #3a2418 0%, #1a0f08 100%);
}
.t2 .game-card-art {
  background: radial-gradient(ellipse at 70% 30%, rgba(110,130,170,0.65), transparent 65%), linear-gradient(135deg, #1a2838 0%, #0a1018 100%);
}
.t3 .game-card-art {
  background: radial-gradient(ellipse at 50% 70%, rgba(180,100,80,0.65), transparent 65%), linear-gradient(135deg, #381a14 0%, #1a0808 100%);
}
.t4 .game-card-art {
  background: radial-gradient(ellipse at 50% 30%, rgba(140,160,110,0.5), transparent 65%), linear-gradient(135deg, #1f2818 0%, #0e1408 100%);
}
.t5 .game-card-art {
  background: radial-gradient(ellipse at 30% 60%, rgba(200,150,90,0.6), transparent 65%), linear-gradient(135deg, #382414 0%, #1a0f08 100%);
}
.t6 .game-card-art {
  background: radial-gradient(ellipse at 70% 60%, rgba(130,110,170,0.6), transparent 65%), linear-gradient(135deg, #221c38 0%, #0e0a18 100%);
}

/* ---------- Manifesto ---------- */
.manifesto-section {
  border-top: 1px solid var(--border);
  text-align: center;
}

.manifesto-quote {
  font-size: clamp(28px, 3.8vw, 58px);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.02em;
  max-width: 860px;
  margin: 0 auto 80px;
}
.manifesto-quote em {
  font-style: normal;
  color: var(--accent);
}

.stats-row {
  display: flex;
  justify-content: center;
  gap: clamp(32px, 6vw, 80px);
  flex-wrap: wrap;
  border-top: 1px solid var(--border);
  padding-top: 48px;
}

.stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.stat-num {
  font-size: clamp(36px, 4vw, 56px);
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
}
.stat-label {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fg-3);
}

/* ---------- CTA ---------- */
.cta-section {
  background: var(--hero-dark);
  text-align: center;
}
.cta-inner {
  max-width: 680px;
}
.cta-section h2 {
  font-size: clamp(36px, 5vw, 72px);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: #fff;
  margin-bottom: 20px;
}
.cta-section h2 em {
  font-style: normal;
  color: var(--accent);
}
.cta-section p {
  font-size: 17px;
  color: rgba(255,255,255,0.55);
  line-height: 1.7;
  margin-bottom: 40px;
}
.cta-btns {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--bg-2);
  border-top: 1px solid var(--border);
  padding: 40px 0;
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.footer-logo img {
  height: 48px;
  width: auto;
}
.footer-copy {
  font-size: 13px;
  color: var(--fg-3);
}
.footer-links {
  display: flex;
  gap: 24px;
}
.footer-links a {
  font-size: 13px;
  color: var(--fg-3);
  transition: color 0.2s ease;
}
.footer-links a:hover { color: var(--fg); }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .featured-grid { grid-template-columns: 1fr; }
  .featured-art { aspect-ratio: 16/9; max-height: 320px; }
  .games-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
  .main-nav { display: none; }
  .header-inner { padding: 0 20px; }
  .hero-body { justify-content: center; padding-inline: 20px; }
  .hero-overlay {
    background: rgba(6, 12, 22, 0.55);
  }
  .hero-text { max-width: 100%; text-align: center; }
  .hero-btns { justify-content: center; }
  .games-grid { grid-template-columns: 1fr; }
  .footer-inner { flex-direction: column; text-align: center; }
  .footer-links { justify-content: center; }
}
