/* ============================================
   Happy Heart Games — Design System
   ============================================ */

:root {
  --coral: #ff4d6d;
  --coral-deep: #e83658;
  --mint: #2ec4b6;
  --mint-soft: #b8e8e0;
  --amber: #ffb347;
  --ink: #1a1520;
  --ink-soft: #4a4150;
  --blush: #fff8f5;
  --peach: #ffe4d6;
  --rose: #ffd0dc;
  --surface: rgba(255, 248, 245, 0.72);
  --line: rgba(26, 21, 32, 0.1);
  --shadow: 0 24px 60px rgba(232, 54, 88, 0.12);
  --radius: 18px;
  --container: 1120px;
  --font-display: "Syne", sans-serif;
  --font-body: "Figtree", sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

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

body {
  font-family: var(--font-body);
  color: var(--ink);
  background:
    radial-gradient(ellipse 80% 50% at 10% -10%, var(--rose), transparent 55%),
    radial-gradient(ellipse 70% 45% at 90% 0%, var(--mint-soft), transparent 50%),
    linear-gradient(180deg, var(--peach) 0%, var(--blush) 40%, #fff 100%);
  background-attachment: fixed;
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

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

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

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

.container {
  width: min(100% - 2.5rem, var(--container));
  margin-inline: auto;
}

/* ── Nav ─────────────────────────────────── */

.nav {
  position: fixed;
  inset: 0 0 auto;
  z-index: 100;
  padding: 1rem 0;
  transition: background 0.35s var(--ease), backdrop-filter 0.35s var(--ease),
    box-shadow 0.35s var(--ease);
}

.nav.scrolled {
  background: rgba(255, 248, 245, 0.85);
  backdrop-filter: blur(16px);
  box-shadow: 0 1px 0 var(--line);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.nav-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: -0.02em;
}

.nav-logo img {
  width: 36px;
  height: 36px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.75rem;
}

.nav-links a {
  font-weight: 560;
  font-size: 0.95rem;
  color: var(--ink-soft);
  transition: color 0.2s ease;
}

.nav-links a:hover {
  color: var(--coral);
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
}

.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--ink);
  transition: 0.25s var(--ease);
}

/* ── Hero ────────────────────────────────── */

.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  align-items: end;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

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

.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(26, 21, 32, 0.08) 0%,
    rgba(26, 21, 32, 0.18) 45%,
    rgba(26, 21, 32, 0.55) 100%
  );
}

.hero-content {
  position: relative;
  z-index: 1;
  padding: 8rem 0 4.5rem;
  color: var(--blush);
  max-width: 720px;
}

.brand-mark {
  font-family: var(--font-display);
  font-size: clamp(2.8rem, 8vw, 5.5rem);
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 0.95;
  margin-bottom: 1.25rem;
  animation: brand-in 0.9s var(--ease) both;
}

.brand-mark .heart {
  display: inline-block;
  color: var(--coral);
  animation: heartbeat 1.8s ease-in-out infinite;
  transform-origin: center;
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 3.2vw, 2rem);
  font-weight: 650;
  letter-spacing: -0.03em;
  line-height: 1.2;
  margin-bottom: 1rem;
  max-width: 18ch;
  animation: rise 0.9s var(--ease) 0.12s both;
}

.hero p {
  font-size: 1.05rem;
  color: rgba(255, 248, 245, 0.88);
  max-width: 38ch;
  margin-bottom: 1.75rem;
  animation: rise 0.9s var(--ease) 0.22s both;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  animation: rise 0.9s var(--ease) 0.32s both;
}

.hero-scroll {
  position: absolute;
  right: max(1.25rem, calc((100% - var(--container)) / 2));
  bottom: 2rem;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  color: rgba(255, 248, 245, 0.7);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero-scroll .line {
  width: 1px;
  height: 42px;
  background: linear-gradient(to bottom, rgba(255, 248, 245, 0.7), transparent);
  animation: scroll-pulse 1.8s ease-in-out infinite;
}

/* ── Buttons ─────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.9rem 1.4rem;
  border-radius: 12px;
  font-weight: 650;
  font-size: 0.95rem;
  transition: transform 0.25s var(--ease), background 0.25s ease,
    color 0.25s ease, box-shadow 0.25s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  background: var(--coral);
  color: #fff;
  box-shadow: 0 10px 28px rgba(255, 77, 109, 0.35);
}

.btn-primary:hover {
  background: var(--coral-deep);
}

.btn-ghost {
  background: rgba(255, 248, 245, 0.14);
  color: var(--blush);
  border: 1px solid rgba(255, 248, 245, 0.28);
  backdrop-filter: blur(8px);
}

.btn-ghost:hover {
  background: rgba(255, 248, 245, 0.22);
}

.btn-ink {
  background: var(--ink);
  color: var(--blush);
}

.btn-ink:hover {
  background: #2c2434;
}

/* ── Sections ────────────────────────────── */

.section {
  padding: 6.5rem 0;
}

.section-header {
  max-width: 560px;
  margin-bottom: 3rem;
}

.section-label {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--coral);
  margin-bottom: 0.75rem;
}

.section-header h2,
.about-text h2,
.contact-panel h2 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4.5vw, 3.1rem);
  font-weight: 750;
  letter-spacing: -0.035em;
  line-height: 1.05;
  margin-bottom: 0.85rem;
}

.section-header p,
.about-text p,
.contact-panel p {
  color: var(--ink-soft);
  font-size: 1.05rem;
}

/* ── Platforms ───────────────────────────── */

.platforms {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
}

.platform {
  padding: 1.75rem;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
  backdrop-filter: blur(10px);
  transition: transform 0.3s var(--ease), border-color 0.3s ease;
}

.platform:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 77, 109, 0.35);
}

.platform-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  margin-bottom: 1.1rem;
  color: #fff;
}

.platform-icon.web {
  background: linear-gradient(135deg, var(--coral), #ff8fa3);
}

.platform-icon.mobile {
  background: linear-gradient(135deg, var(--mint), #7eddd3);
}

.platform h3 {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 0.45rem;
}

.platform p {
  color: var(--ink-soft);
  font-size: 0.98rem;
}

/* ── About ───────────────────────────────── */

.about-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 3.5rem;
  align-items: center;
}

.about-visual {
  position: relative;
  aspect-ratio: 1;
  border-radius: 28px;
  overflow: hidden;
  background:
    radial-gradient(circle at 30% 30%, var(--rose), transparent 50%),
    radial-gradient(circle at 80% 70%, var(--mint-soft), transparent 45%),
    linear-gradient(145deg, #ffd9c8, #ffe8ef);
  border: 1px solid var(--line);
}

.about-visual-inner {
  position: absolute;
  inset: 12%;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 1.5rem;
}

.about-visual .big-heart {
  font-size: clamp(4rem, 10vw, 7rem);
  line-height: 1;
  animation: heartbeat 1.8s ease-in-out infinite;
  filter: drop-shadow(0 12px 24px rgba(255, 77, 109, 0.25));
}

.about-visual p {
  margin-top: 1rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
}

.about-points {
  margin-top: 1.75rem;
  display: grid;
  gap: 0.9rem;
}

.about-points li {
  list-style: none;
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  color: var(--ink-soft);
}

.about-points li::before {
  content: "";
  width: 10px;
  height: 10px;
  margin-top: 0.45rem;
  border-radius: 50%;
  background: var(--coral);
  flex-shrink: 0;
}

/* ── Contact ─────────────────────────────── */

.contact-panel {
  padding: clamp(2rem, 5vw, 3.5rem);
  border-radius: 28px;
  background:
    linear-gradient(135deg, rgba(255, 77, 109, 0.08), rgba(46, 196, 182, 0.12)),
    var(--blush);
  border: 1px solid var(--line);
  display: grid;
  grid-template-columns: 1.2fr auto;
  gap: 2rem;
  align-items: center;
  box-shadow: var(--shadow);
}

.contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.contact-mail {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--coral-deep);
}

/* ── Legal ───────────────────────────────── */

.legal-page {
  padding-top: 8rem;
}

.legal-header {
  margin-bottom: 2.5rem;
}

.legal-header h1 {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.05;
  margin-bottom: 0.6rem;
}

.legal-meta {
  color: var(--ink-soft);
}

.legal-body {
  max-width: 720px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: clamp(1.5rem, 4vw, 2.5rem);
  backdrop-filter: blur(10px);
}

.legal-body h2 {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 720;
  letter-spacing: -0.02em;
  margin: 2rem 0 0.75rem;
}

.legal-body p,
.legal-body li {
  color: var(--ink-soft);
  margin-bottom: 0.85rem;
}

.legal-body ul {
  padding-left: 1.2rem;
  margin-bottom: 1rem;
}

.legal-body a {
  color: var(--coral-deep);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* ── Footer ──────────────────────────────── */

.footer {
  padding: 3.5rem 0 2rem;
  border-top: 1px solid var(--line);
  background: rgba(255, 248, 245, 0.55);
}

.footer-inner {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 2.5rem;
  margin-bottom: 2.5rem;
}

.footer-brand p {
  margin-top: 0.85rem;
  color: var(--ink-soft);
  max-width: 36ch;
}

.footer-links {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

.footer-col h4 {
  font-family: var(--font-display);
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 0.85rem;
}

.footer-col a {
  display: block;
  color: var(--ink-soft);
  margin-bottom: 0.45rem;
  transition: color 0.2s ease;
}

.footer-col a:hover {
  color: var(--coral);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
  color: var(--ink-soft);
  font-size: 0.9rem;
}

/* ── Motion ──────────────────────────────── */

.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

.reveal.visible {
  opacity: 1;
  transform: none;
}

@keyframes brand-in {
  from {
    opacity: 0;
    transform: translateY(24px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes heartbeat {
  0%,
  100% {
    transform: scale(1);
  }
  14% {
    transform: scale(1.12);
  }
  28% {
    transform: scale(1);
  }
  42% {
    transform: scale(1.08);
  }
}

@keyframes scroll-pulse {
  0%,
  100% {
    opacity: 0.35;
    transform: scaleY(0.85);
  }
  50% {
    opacity: 1;
    transform: scaleY(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .reveal,
  .brand-mark,
  .hero h1,
  .hero p,
  .hero-actions,
  .about-visual .big-heart,
  .brand-mark .heart,
  .hero-scroll .line {
    animation: none !important;
    transition: none !important;
    opacity: 1;
    transform: none;
  }
}

/* ── Responsive ──────────────────────────── */

@media (max-width: 900px) {
  .about-grid,
  .contact-panel,
  .footer-inner {
    grid-template-columns: 1fr;
  }

  .platforms {
    grid-template-columns: 1fr;
  }

  .hero-content {
    padding-bottom: 5.5rem;
  }
}

@media (max-width: 720px) {
  .nav-toggle {
    display: flex;
  }

  .nav-links {
    position: absolute;
    top: calc(100% + 0.25rem);
    left: 1.25rem;
    right: 1.25rem;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0.5rem;
    border-radius: 16px;
    background: rgba(255, 248, 245, 0.96);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
    opacity: 0;
    pointer-events: none;
    transform: translateY(-8px);
    transition: 0.25s var(--ease);
  }

  .nav-links.open {
    opacity: 1;
    pointer-events: auto;
    transform: none;
  }

  .nav-links a {
    padding: 0.9rem 1rem;
    border-radius: 12px;
  }

  .nav-links a:hover {
    background: rgba(255, 77, 109, 0.08);
  }

  .hero-scroll {
    display: none;
  }
}
