/* ============================================================
   Chili Grips Games — Design System
   ============================================================ */

:root {
  /* Palette */
  --bg: #111315;
  --surface: #181A1D;
  --card: #1B1D20;
  --border: #2B2F34;
  --accent: #ff4564;
  --accent-hover: #ff6280;
  --text-primary: #F5F5F6;
  --text-secondary: #A5ABB2;

  /* Layout */
  --container: 1280px;
  --header-height: 72px;
  --radius-lg: 20px;
  --radius-btn: 12px;
  --radius-sm: 12px;

  /* Typography */
  --font: "Inter", system-ui, -apple-system, sans-serif;
  --font-display: "Press Start 2P", cursive;
  --hero-title: clamp(1.46rem, 3.25vw, 2.11rem);
  --section-title: clamp(1rem, 2vw, 1.375rem);
  --subtitle: 0.75rem;
  --body: 1.125rem;
  --btn: 1rem;

  /* Spacing */
  --section-pad: clamp(4rem, 10vw, 9.5rem);
  --container-pad: 64px;

  /* Motion */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --duration-fast: 200ms;
  --duration-med: 300ms;
  --duration-slow: 600ms;

  /* Shadows */
  --shadow-soft: 0 8px 32px rgba(0, 0, 0, 0.18);
  --shadow-card: 0 12px 40px rgba(0, 0, 0, 0.25);
}

/* ============================================================
   Reset & Base
   ============================================================ */

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font);
  font-size: var(--body);
  font-weight: 400;
  line-height: 1.65;
  color: var(--text-primary);
  background-color: var(--bg);
  overflow-x: hidden;
}

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

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

ul,
ol {
  list-style: none;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ============================================================
   Utilities
   ============================================================ */

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--container-pad);
}

.skip-link {
  position: absolute;
  top: -100%;
  left: 16px;
  z-index: 1000;
  padding: 12px 24px;
  background: var(--accent);
  color: var(--text-primary);
  font-size: var(--btn);
  font-weight: 500;
  border-radius: var(--radius-btn);
  transition: top var(--duration-fast) ease;
}

.skip-link:focus {
  top: 16px;
}

.section {
  padding-block: var(--section-pad);
}

/* ============================================================
   Display type — titles & subtitles
   ============================================================ */

.hero__title,
.section__title,
.hero__genre,
.hero__games-label,
.hero__game-title,
.stats__value,
.feature-card__title,
.current__label,
.current__title,
.current__subtitle,
.privacy__title {
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: 0;
}

.section__title {
  font-size: var(--section-title);
  letter-spacing: 0;
  line-height: 1.6;
  color: var(--text-primary);
}

.section__header {
  margin-bottom: 64px;
}

/* Scroll animations */
[data-animate] {
  opacity: 0;
  transform: translateY(24px);
  transition:
    opacity var(--duration-slow) var(--ease-out),
    transform var(--duration-slow) var(--ease-out);
  transition-delay: var(--delay, 0ms);
}

[data-animate].is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  [data-animate] {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ============================================================
   Buttons
   ============================================================ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  font-size: var(--btn);
  font-weight: 500;
  line-height: 1;
  border-radius: var(--radius-btn);
  transition:
    background-color var(--duration-fast) ease,
    color var(--duration-fast) ease,
    border-color var(--duration-fast) ease,
    transform var(--duration-fast) ease;
}

.btn:active {
  transform: scale(0.98);
}

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

.btn--primary:hover {
  background-color: var(--accent-hover);
}

.btn--outline {
  background-color: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border);
}

.btn--outline:hover {
  border-color: var(--text-secondary);
  background-color: rgba(255, 255, 255, 0.04);
}

.btn--sm {
  padding: 10px 20px;
  font-size: 0.875rem;
}

.btn-group {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.btn__icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

/* ============================================================
   Header
   ============================================================ */

.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--header-height);
  transition:
    background-color var(--duration-med) ease,
    backdrop-filter var(--duration-med) ease,
    border-color var(--duration-med) ease;
}

.header.is-scrolled {
  background-color: rgba(17, 19, 21, 0.72);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.header__logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.header__logo-img {
  display: block;
  height: 56px;
  width: auto;
}

.header__nav {
  display: flex;
  align-items: center;
  gap: 40px;
}

.header__link {
  position: relative;
  font-size: var(--btn);
  font-weight: 500;
  color: var(--text-secondary);
  transition: color var(--duration-fast) ease;
}

.header__link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 100%;
  height: 2px;
  background-color: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--duration-med) var(--ease-out);
}

.header__link:hover,
.header__link:focus-visible {
  color: var(--text-primary);
}

.header__link:hover::after,
.header__link:focus-visible::after {
  transform: scaleX(1);
}

.header__actions {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

/* ============================================================
   Hero
   ============================================================ */

.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: var(--header-height);
  padding-bottom: 80px;
  background-color: var(--bg);
  overflow: hidden;
}

.section-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.section-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.2;
  filter: blur(64px);
  transform: scale(1.2);
}

.section-bg img.is-fading {
  opacity: 0;
  transition: opacity 400ms ease;
}

.hero .section-bg img {
  transition: opacity 400ms ease;
}

.hero .container {
  position: relative;
  z-index: 1;
}

.hero__grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr 240px;
  gap: 48px;
  align-items: center;
}

.hero__artwork {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 4 / 5;
  background-color: var(--surface);
  border: 1px solid var(--border);
}

.hero__artwork-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transition: transform 600ms var(--ease-out);
}

.hero__artwork:hover .hero__artwork-inner {
  transform: scale(1.02);
}

.hero__artwork img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero__artwork-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    transparent 50%,
    rgba(17, 19, 21, 0.4) 100%
  );
  pointer-events: none;
}

.hero__content {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.hero__genre {
  font-size: var(--subtitle);
  letter-spacing: 0;
  text-transform: uppercase;
  color: var(--accent);
  line-height: 1.6;
}

.hero__title {
  font-size: var(--hero-title);
  line-height: 1.65;
  color: var(--text-primary);
  transition:
    opacity 400ms ease,
    transform 400ms ease;
}

.hero__description {
  font-size: var(--body);
  line-height: 1.65;
  color: var(--text-secondary);
  max-width: 36ch;
  transition:
    opacity 400ms ease,
    transform 400ms ease;
}

.hero__content.is-fading .hero__title,
.hero__content.is-fading .hero__description,
.hero__content.is-fading .hero__genre {
  opacity: 0;
  transform: translateY(8px);
}

.hero__artwork img.is-fading {
  opacity: 0;
}

.hero__artwork img {
  transition: opacity 400ms ease;
}

.hero__store-links {
  margin-top: 8px;
}

.hero__games {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.hero__games-label {
  font-size: var(--subtitle);
  letter-spacing: 0;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-bottom: 8px;
  padding-left: 16px;
  line-height: 1.6;
}

.hero__game-btn {
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  text-align: left;
  border: 1px solid transparent;
  transition:
    background-color var(--duration-fast) ease,
    border-color var(--duration-fast) ease;
}

.hero__game-btn:hover {
  background-color: rgba(255, 255, 255, 0.04);
}

.hero__game-btn.is-active {
  background-color: var(--surface);
  border-color: transparent;
}

.hero__game-btn.is-active::before {
  content: "";
  position: absolute;
  left: 0;
  width: 3px;
  height: 32px;
  background-color: var(--accent);
  border-radius: 0 2px 2px 0;
}

.hero__game-btn {
  position: relative;
}

.hero__game-thumb {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid var(--border);
}

.hero__game-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.hero__game-title {
  font-size: 0.625rem;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.6;
}

.hero__game-genre {
  font-size: 0.8125rem;
  color: var(--text-secondary);
}

.hero__game-btn.is-active .hero__game-title {
  color: var(--text-primary);
}

/* ============================================================
   Stats Strip
   ============================================================ */

.stats {
  padding-block: 0 0;
  margin-top: -32px;
  position: relative;
  z-index: 2;
}

.stats__bar {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  background-color: var(--surface);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.stats__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 40px 24px;
  text-align: center;
}

.stats__item:not(:last-child) {
  border-right: 1px solid var(--border);
}

.stats__value {
  font-size: 1.25rem;
  letter-spacing: 0;
  color: var(--text-primary);
  line-height: 1.6;
}

.stats__label {
  font-size: 0.875rem;
  font-weight: 400;
  color: var(--text-secondary);
}

/* ============================================================
   About
   ============================================================ */

.about__grid {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 80px;
  align-items: start;
}

.about__avatar {
  width: 280px;
  height: 280px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-soft);
}

.about__content {
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding-top: 16px;
}

.about__text {
  color: var(--text-secondary);
  max-width: 56ch;
}

.about__text + .about__text {
  margin-top: -8px;
}

.about__cta {
  margin-top: 16px;
}

/* ============================================================
   Features
   ============================================================ */

.features {
  position: relative;
  overflow: hidden;
}

.features .container {
  position: relative;
  z-index: 1;
}

.features__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.feature-card {
  background-color: var(--card);
  border: none;
  border-radius: var(--radius-lg);
  padding: 40px;
  transition:
    transform 250ms ease-out,
    box-shadow 250ms ease-out;
}

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

.feature-card__icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
  color: var(--text-secondary);
  transition: color var(--duration-fast) ease;
}

.feature-card:hover .feature-card__icon {
  color: var(--accent);
}

.feature-card__icon svg {
  width: 28px;
  height: 28px;
}

.feature-card__title {
  font-size: 0.875rem;
  line-height: 1.7;
  margin-bottom: 16px;
  color: var(--text-primary);
}

.feature-card__text {
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text-secondary);
}

/* ============================================================
   Current Project
   ============================================================ */

.current {
  padding-bottom: calc(var(--section-pad) + 32px);
}

.current__card {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  background-color: var(--card);
}

.current__artwork {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.current__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    transparent 30%,
    rgba(17, 19, 21, 0.85) 100%
  );
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 48px 56px;
}

.current__label {
  font-size: var(--subtitle);
  letter-spacing: 0;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 16px;
  line-height: 1.6;
}

.current__title {
  font-size: clamp(0.875rem, 1.8vw, 1.125rem);
  line-height: 1.65;
  margin-bottom: 12px;
}

.current__subtitle {
  font-size: var(--subtitle);
  color: var(--text-secondary);
  margin-bottom: 12px;
  line-height: 1.7;
}

.current__note {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  opacity: 0.7;
  font-style: italic;
}

/* ============================================================
   Privacy (minimal)
   ============================================================ */

.privacy {
  padding-block: 64px;
  border-top: 1px solid var(--border);
}

.privacy__title {
  font-size: 0.875rem;
  line-height: 1.6;
  margin-bottom: 16px;
}

.privacy__text {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  max-width: 72ch;
  line-height: 1.65;
}

/* ============================================================
   Footer
   ============================================================ */

.footer {
  background-color: var(--surface);
  padding-block: 64px 40px;
}

.footer__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 48px;
}

.footer__logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.footer__logo-img {
  display: block;
  height: 48px;
  width: auto;
}

.footer__nav {
  display: flex;
  gap: 32px;
}

.footer__link {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  transition: color var(--duration-fast) ease;
}

.footer__link:hover {
  color: var(--text-primary);
}

.footer__middle {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 24px;
  padding-bottom: 48px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 32px;
}

.footer__email {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  transition: color var(--duration-fast) ease;
}

.footer__email:hover {
  color: var(--accent);
}

.footer__bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer__copyright {
  font-size: 0.8125rem;
  color: var(--text-secondary);
}
