/* Everlasting Summer — Game Review Site
   White theme, Indian audience, English */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:ital,wght@0,400;0,500;0,600;0,700;1,400&display=swap');

:root {
  --color-bg: #ffffff;
  --color-surface: #f8f9fa;
  --color-text: #1a1a1a;
  --color-text-muted: #5c5c5c;
  --color-accent: #c45c26;
  --color-accent-soft: #e8a882;
  --color-border: #e5e5e5;
  --font-main: 'Plus Jakarta Sans', sans-serif;
  --container: min(1200px, 100vw - 2rem);
  --header-h: 72px;
  --radius: 12px;
  --radius-lg: 20px;
  --shadow: 0 4px 20px rgba(0,0,0,0.06);
  --shadow-hover: 0 8px 32px rgba(0,0,0,0.1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-main);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--color-text);
  background: var(--color-bg);
  overflow-x: hidden;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--color-accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* ----- Header ----- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-h);
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--color-border);
  z-index: 1000;
  transition: box-shadow 0.2s;
}

.site-header.scrolled {
  box-shadow: var(--shadow);
}

.header-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 1rem;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.logo-link img {
  height: 40px;
  width: auto;
}

.logo-text {
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--color-text);
}

.nav-desktop {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.nav-desktop a {
  color: var(--color-text);
  font-weight: 500;
  text-decoration: none;
}

.nav-desktop a:hover {
  color: var(--color-accent);
  text-decoration: none;
}

/* Burger */
.burger-btn {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  z-index: 1002;
}

.burger-btn span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-text);
  transition: transform 0.3s, opacity 0.3s;
}

.burger-btn.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.burger-btn.open span:nth-child(2) {
  opacity: 0;
}

.burger-btn.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Burger menu overlay */
.burger-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 1001;
  opacity: 0;
  transition: opacity 0.3s;
}

.burger-overlay.visible {
  opacity: 1;
}

.burger-menu {
  position: fixed;
  top: 0;
  right: 0;
  width: min(300px, 85vw);
  height: 100vh;
  background: var(--color-bg);
  box-shadow: -4px 0 24px rgba(0,0,0,0.1);
  z-index: 1002;
  padding: calc(var(--header-h) + 2rem) 1.5rem 2rem;
  transform: translateX(100%);
  transition: transform 0.3s ease;
  overflow-y: auto;
}

.burger-menu.open {
  transform: translateX(0);
}

.burger-menu a {
  display: block;
  padding: 0.75rem 0;
  font-weight: 500;
  color: var(--color-text);
  border-bottom: 1px solid var(--color-border);
}

.burger-menu a:hover {
  color: var(--color-accent);
}

@media (max-width: 768px) {
  .nav-desktop {
    display: none;
  }
  .burger-btn {
    display: flex;
  }
}

/* ----- Hero (parallax) ----- */
.hero-section {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.parallax-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

/* Слои на весь экран, scale(1.25) даёт запас по краям при движении параллакса */
.parallax-layer {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transform-origin: center center;
  transform: scale(1.25);
  will-change: transform;
  backface-visibility: hidden;
}

.parallax-layer--back   { z-index: 1; }
.parallax-layer--mid1   { z-index: 2; }
.parallax-layer--mid2   { z-index: 3; }
.parallax-layer--front  { z-index: 4; }

.hero-content-wrap {
  position: relative;
  z-index: 10;
  text-align: center;
  padding: calc(var(--header-h) + 2rem) 1.5rem 4rem;
}

.hero-game-logo {
  max-width: 320px;
  margin: 0 auto 1rem;
  filter: drop-shadow(0 4px 12px rgba(0,0,0,0.15));
}

.hero-title {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 700;
  margin: 0 0 0.5rem;
  color: var(--color-text);
}

.hero-subtitle {
  font-size: 1.1rem;
  color: var(--color-text-muted);
  margin: 0 0 2rem;
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
}

.hero-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  align-items: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 1.5rem;
  font-family: var(--font-main);
  font-weight: 600;
  font-size: 1rem;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}

.btn-primary {
  background: var(--color-accent);
  color: #fff;
}

.btn-primary:hover {
  text-decoration: none;
  color: #fff;
}

.btn-secondary {
  background: var(--color-surface);
  color: var(--color-text);
  border: 1px solid var(--color-border);
}

.btn-secondary:hover {
  text-decoration: none;
  color: var(--color-text);
}

.btn img {
  height: 24px;
  width: auto;
}

.btn .btn-badge {
  height: 40px;
  width: auto;
}

/* ----- Sections common ----- */
main {
  padding-top: 0;
}

.section {
  padding: 4rem 1rem;
}

.section--alt {
  background: var(--color-surface);
}

.container {
  max-width: var(--container);
  margin: 0 auto;
}

.section-title {
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  font-weight: 700;
  text-align: center;
  margin: 0 0 2rem;
  color: var(--color-text);
}

/* ----- About / Story ----- */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

.about-text h3 {
  font-size: 1.35rem;
  margin: 0 0 1rem;
}

.about-text p {
  margin: 0 0 1rem;
  color: var(--color-text-muted);
}

.about-visual img {
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

@media (max-width: 768px) {
  .about-grid {
    grid-template-columns: 1fr;
  }
  .about-visual {
    order: -1;
  }
}

/* ----- Features (Why players love it) ----- */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  max-width: 960px;
  margin: 0 auto;
}

.feature-card {
  background: var(--color-bg);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow);
  border: 1px solid var(--color-border);
  border-top: 3px solid var(--color-accent);
  transition: transform 0.2s, box-shadow 0.2s;
  text-align: center;
}

.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
  border-top-color: var(--color-accent-soft);
}

.feature-card img {
  width: 112px;
  height: 112px;
  object-fit: contain;
  margin: 0 auto 1.25rem;
  display: block;
  opacity: 0.9;
}

.feature-card h3 {
  font-size: 1.2rem;
  margin: 0 0 0.5rem;
  color: var(--color-text);
}

.feature-card p {
  margin: 0;
  font-size: 0.95rem;
  color: var(--color-text-muted);
  line-height: 1.6;
}

@media (max-width: 900px) {
  .features-grid {
    grid-template-columns: 1fr;
    max-width: 420px;
    margin-left: auto;
    margin-right: auto;
  }
}

/* ----- Characters ----- */
.characters-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 2rem;
}

.character-card {
  background: var(--color-bg);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid var(--color-border);
  transition: transform 0.2s, box-shadow 0.2s;
}

.character-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}

.character-card img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
}

.character-card .card-body {
  padding: 1.25rem;
}

.character-card h4 {
  font-size: 1.1rem;
  margin: 0 0 0.5rem;
}

.character-card p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--color-text-muted);
}

.character-group {
  grid-column: 1 / -1;
  text-align: center;
  padding: 2rem;
  background: var(--color-surface);
  border-radius: var(--radius-lg);
}

.character-group img {
  max-width: 800px;
  margin: 0 auto 1rem;
  border-radius: var(--radius);
}

/* ----- Gallery + Trailer (Screenshots & trailer) ----- */
.gallery-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin-bottom: 3rem;
  justify-content: center;
}

.gallery-item {
  width: 100%;
  max-width: 280px;
}

.gallery-item a {
  display: block;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.gallery-item img {
  width: 100%;
  aspect-ratio: 4/5;
  object-fit: cover;
  transition: transform 0.3s;
}

.gallery-item a:hover img {
  transform: scale(1.03);
}

.video-section {
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
}

.video-section h3 {
  text-align: center;
  margin-bottom: 1rem;
  font-size: 1.25rem;
}

.video-wrap {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  width: 100%;
  margin: 0 auto;
}

.video-wrap iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

/* ----- Launch ----- */
.launch-section {
  text-align: center;
}

.launch-section p {
  margin-bottom: 1.5rem;
  color: var(--color-text-muted);
}

.platform-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
}

.platform-list a {
  display: block;
}

.platform-list img {
  height: 50px;
  width: auto;
}

/* ----- Follow ----- */
.follow-section p {
  text-align: center;
  margin-bottom: 1.5rem;
  color: var(--color-text-muted);
}

.social-links {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.social-links a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  transition: transform 0.2s, background 0.2s;
}

.social-links a:hover {
  background: var(--color-accent-soft);
  transform: scale(1.1);
  text-decoration: none;
}

.social-links img {
  width: 24px;
  height: 24px;
}

/* ----- Footer ----- */
.site-footer {
  background: var(--color-surface);
  border-top: 1px solid var(--color-border);
  padding: 2rem 1rem;
  margin-top: 2rem;
}

.footer-inner {
  max-width: var(--container);
  margin: 0 auto;
  text-align: center;
  font-size: 0.9rem;
  color: var(--color-text-muted);
}

.footer-inner a {
  color: var(--color-accent);
}

/* ----- Popups (hidden by default — no flash on load; JS shows only when needed) ----- */
.popup-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
}

.popup-overlay.visible {
  display: flex;
  opacity: 1;
  visibility: visible;
}

.popup-box {
  background: var(--color-bg);
  border-radius: var(--radius-lg);
  padding: 2rem;
  max-width: 420px;
  width: 100%;
  box-shadow: 0 20px 60px rgba(0,0,0,0.2);
  transform: scale(0.95);
  transition: transform 0.3s;
}

.popup-overlay.visible .popup-box {
  transform: scale(1);
}

.popup-box h3 {
  margin: 0 0 1rem;
  font-size: 1.25rem;
}

.popup-box p {
  margin: 0 0 1rem;
  color: var(--color-text-muted);
  font-size: 0.95rem;
}

.popup-actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 1.25rem;
}

.popup-actions .btn {
  flex: 1;
}

.popup-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 36px;
  height: 36px;
  border: none;
  background: var(--color-surface);
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.25rem;
  line-height: 1;
  color: var(--color-text-muted);
}

.popup-close:hover {
  background: var(--color-border);
  color: var(--color-text);
}

.popup-box {
  position: relative;
}

/* ----- Back to top ----- */
.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--color-accent);
  color: #fff;
  border: none;
  cursor: pointer;
  box-shadow: var(--shadow);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s, transform 0.2s;
  z-index: 999;
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  transform: translateY(-4px);
}

.back-to-top svg {
  width: 24px;
  height: 24px;
  margin: 0 auto;
  display: block;
}

/* ----- Page hero (inner pages) ----- */
.page-hero {
  padding: calc(var(--header-h) + 3rem) 1rem 2rem;
  background: var(--color-surface);
  text-align: center;
}

.page-hero h1 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  margin: 0;
}

/* ----- Utility ----- */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  border: 0;
}

/* Fade-in animation for sections */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ========== ADAPTIVE (all pages) ========== */

/* Tablet and below */
@media (max-width: 900px) {
  .section {
    padding: 3rem 1rem;
  }
  .about-grid,
  .features-grid {
    gap: 2rem;
  }
  .character-group img {
    max-width: 100%;
  }
}

@media (max-width: 768px) {
  :root {
    --header-h: 64px;
  }
  .header-inner {
    padding: 0 0.75rem;
  }
  .logo-text {
    font-size: 1rem;
  }
  .logo-link img {
    height: 36px;
  }
  .section {
    padding: 2.5rem 1rem;
  }
  .section-title {
    margin-bottom: 1.5rem;
    font-size: clamp(1.5rem, 5vw, 2rem);
  }
  .hero-content-wrap {
    padding: calc(var(--header-h) + 1.5rem) 1rem 3rem;
  }
  .hero-game-logo {
    max-width: 260px;
  }
  .hero-subtitle {
    font-size: 1rem;
    margin-bottom: 1.5rem;
  }
  .hero-buttons {
    flex-direction: column;
    gap: 0.75rem;
    width: 100%;
    max-width: 320px;
    margin-left: auto;
    margin-right: auto;
  }
  .hero-buttons .btn {
    width: 100%;
    justify-content: center;
  }
  .about-grid {
    gap: 1.5rem;
  }
  .about-text h3 {
    font-size: 1.2rem;
  }
  .feature-card {
    padding: 1.5rem;
  }
  .feature-card img {
    width: 88px;
    height: 88px;
  }
  .feature-card h3 {
    font-size: 1.1rem;
  }
  .characters-grid {
    gap: 1.5rem;
    grid-template-columns: 1fr;
  }
  .character-group {
    padding: 1.5rem 1rem;
  }
  .character-group h4 {
    font-size: 1.1rem;
  }
  .gallery-grid {
    gap: 1rem;
    margin-bottom: 2rem;
  }
  .gallery-item {
    max-width: 100%;
  }
  .video-section h3 {
    font-size: 1.1rem;
  }
  .video-wrap {
    margin: 0 auto;
  }
  .page-hero {
    padding: calc(var(--header-h) + 2rem) 1rem 1.5rem;
  }
  .page-hero h1 {
    font-size: clamp(1.35rem, 5vw, 1.75rem);
  }
  .page-hero p {
    font-size: 0.95rem;
    margin-top: 0.5rem;
  }
  .platform-list img {
    height: 44px;
  }
  .popup-box {
    margin: 1rem;
    padding: 1.5rem;
    max-width: calc(100vw - 2rem);
  }
  .popup-actions {
    flex-direction: column;
  }
  .popup-actions .btn {
    width: 100%;
  }
  .back-to-top {
    bottom: 1.25rem;
    right: 1.25rem;
    width: 44px;
    height: 44px;
  }
  .back-to-top svg {
    width: 20px;
    height: 20px;
  }
  .site-footer {
    padding: 1.5rem 1rem;
    margin-top: 1.5rem;
  }
  .footer-inner {
    font-size: 0.85rem;
  }
  .footer-inner p {
    margin: 0.5rem 0;
  }
}

/* Small phones */
@media (max-width: 480px) {
  :root {
    --header-h: 60px;
    --container: min(1200px, 100vw - 1rem);
  }
  .header-inner {
    padding: 0 0.5rem;
  }
  .logo-text {
    font-size: 0.9rem;
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .logo-link img {
    height: 32px;
  }
  .burger-btn {
    width: 40px;
    height: 40px;
  }
  .burger-menu {
    width: min(280px, 90vw);
    padding: calc(var(--header-h) + 1.5rem) 1rem 1.5rem;
  }
  .section {
    padding: 2rem 0.75rem;
  }
  .container {
    padding: 0 0.5rem;
  }
  .section-title {
    font-size: 1.35rem;
    margin-bottom: 1.25rem;
  }
  .hero-title {
    font-size: 1.5rem;
  }
  .hero-subtitle {
    font-size: 0.95rem;
  }
  .hero-buttons {
    max-width: 100%;
    padding: 0 0.25rem;
  }
  .btn {
    padding: 0.75rem 1.25rem;
    font-size: 0.95rem;
  }
  .btn img, .btn .btn-badge {
    height: 22px;
  }
  .btn .btn-badge {
    height: 36px;
  }
  .about-text h3 {
    font-size: 1.1rem;
  }
  .about-text p {
    font-size: 0.95rem;
  }
  .feature-card {
    padding: 1.25rem;
  }
  .feature-card img {
    width: 72px;
    height: 72px;
  }
  .feature-card h3 {
    font-size: 1rem;
  }
  .feature-card p {
    font-size: 0.9rem;
  }
  .character-card .card-body {
    padding: 1rem;
  }
  .character-card h4 {
    font-size: 1rem;
  }
  .character-card p {
    font-size: 0.85rem;
  }
  .character-group {
    padding: 1.25rem 0.75rem;
  }
  .gallery-item img {
    aspect-ratio: 4/5;
  }
  .page-hero {
    padding: calc(var(--header-h) + 1.5rem) 0.75rem 1.25rem;
  }
  .page-hero h1 {
    font-size: 1.35rem;
  }
  .launch-section p,
  .follow-section p {
    font-size: 0.95rem;
  }
  .platform-list {
    gap: 0.75rem;
  }
  .platform-list img {
    height: 40px;
  }
  .social-links a {
    width: 44px;
    height: 44px;
  }
  .social-links img {
    width: 22px;
    height: 22px;
  }
  .popup-box h3 {
    font-size: 1.1rem;
  }
  .popup-box p {
    font-size: 0.9rem;
  }
  .popup-close {
    top: 0.75rem;
    right: 0.75rem;
    width: 32px;
    height: 32px;
    font-size: 1.1rem;
  }
  .back-to-top {
    bottom: 1rem;
    right: 1rem;
    width: 40px;
    height: 40px;
  }
  .footer-inner {
    font-size: 0.8rem;
  }
  .footer-inner p a {
    display: inline-block;
    margin: 0.15em 0;
  }
}

/* Very small (320px) */
@media (max-width: 360px) {
  .logo-text {
    max-width: 90px;
  }
  .section {
    padding: 1.5rem 0.5rem;
  }
  .hero-buttons .btn {
    padding: 0.7rem 1rem;
    font-size: 0.9rem;
  }
  .footer-inner p {
    line-height: 1.8;
  }
}

/* Landscape phones: reduce hero min-height so content fits */
@media (max-height: 500px) and (orientation: landscape) {
  .hero-section {
    min-height: auto;
    padding: calc(var(--header-h) + 1rem) 0 2rem;
  }
  .hero-content-wrap {
    padding: calc(var(--header-h) + 1rem) 1rem 2rem;
  }
  .hero-subtitle {
    margin-bottom: 1rem;
  }
}
