/* ============================================
   Undercooked Ideas Pty Ltd. — Stylesheet
   ============================================ */

/* --- Custom Properties --- */
:root {
  --color-bg: #1A1A1A;
  --color-surface: #2D2D2D;
  --color-surface-hover: #3A3A3A;
  --color-text: #FFFFFF;
  --color-text-muted: #999999;
  --color-primary: #E84C7A;
  --color-primary-light: #F472A8;
  --color-primary-dark: #C93A63;
  --color-gradient: linear-gradient(135deg, #E84C7A, #F472A8);
  --color-gradient-reverse: linear-gradient(135deg, #F472A8, #E84C7A);

  --font-sans: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'SF Mono', 'Fira Code', 'Cascadia Code', 'Consolas', monospace;

  --max-width: 1200px;
  --header-height: 72px;
  --radius: 12px;
  --radius-sm: 8px;
  --transition: 0.3s ease;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-height);
}

body {
  font-family: var(--font-sans);
  background-color: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

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

a:hover {
  color: var(--color-primary-light);
}

ul, ol {
  list-style: none;
}

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

/* --- Typography --- */
h1, h2, h3, h4 {
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

h1 {
  font-size: clamp(2.5rem, 5vw + 1rem, 5rem);
}

h2 {
  font-size: clamp(1.8rem, 3vw + 0.5rem, 3rem);
  margin-bottom: 1rem;
}

h3 {
  font-size: clamp(1.1rem, 1.5vw + 0.3rem, 1.4rem);
}

.gradient-text {
  background: var(--color-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.mono {
  font-family: var(--font-mono);
}

/* --- Layout --- */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: 1.5rem;
}

.section {
  padding: 5rem 0;
}

.section-header {
  text-align: center;
  margin-bottom: 3rem;
}

.section-header p {
  color: var(--color-text-muted);
  font-size: 1.1rem;
  margin-top: 0.75rem;
  max-width: 600px;
  margin-inline: auto;
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.875rem 2rem;
  border-radius: 50px;
  font-weight: 700;
  font-size: 1rem;
  transition: transform var(--transition), box-shadow var(--transition);
}

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

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(232, 76, 122, 0.4);
  color: var(--color-text);
}

.btn-outline {
  border: 2px solid var(--color-primary);
  color: var(--color-primary);
}

.btn-outline:hover {
  background: var(--color-primary);
  color: var(--color-text);
  transform: translateY(-2px);
}

/* --- Header / Nav --- */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-height);
  display: flex;
  align-items: center;
  background: rgba(26, 26, 26, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--transition), background var(--transition);
}

.header.scrolled {
  border-bottom-color: rgba(255, 255, 255, 0.08);
  background: rgba(26, 26, 26, 0.95);
}

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

.logo {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.logo a {
  color: var(--color-text);
}

.logo a:hover {
  color: var(--color-text);
}

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

.hero-tagline sub {
  font-size: 0.5em;
}

.logo-img-top {
  margin-top: 60px;
  height: 140px;
  width: auto;
  display: inline-block;
}

.logo-img-bottom {
  height: 40px;
  width: auto;
  display: inline-block;
}

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

.nav-links a {
  color: var(--color-primary-light);
  font-weight: 500;
  font-size: 0.95rem;
  transition: color var(--transition);
}

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

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 28px;
  padding: 4px 0;
}

.hamburger span {
  display: block;
  height: 2px;
  background: var(--color-text);
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
}

.hamburger[aria-expanded="true"] span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.hamburger[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.hamburger[aria-expanded="true"] span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* Mobile nav */
@media (max-width: 767px) {
  .hamburger {
    display: flex;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: var(--header-height);
    left: 0;
    right: 0;
    flex-direction: column;
    background: rgba(26, 26, 26, 0.97);
    backdrop-filter: blur(12px);
    padding: 1.5rem;
    gap: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links a {
    font-size: 1.1rem;
    padding: 0.5rem 0;
  }
}

/* --- Hero --- */
.hero {
  display: flex;
  align-items: center;
  padding: 4rem 0;
  overflow: hidden;
}

.hero .container {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  align-items: center;
}

.hero-content {
  max-width: 640px;
}

.hero-tagline {
  font-family: var(--font-mono);
  color: var(--color-primary);
  font-size: 0.95rem;
  margin-bottom: 1rem;
  letter-spacing: 0.02em;
}

.hero h1 {
  margin-bottom: 1.25rem;
}

.hero-description {
  color: var(--color-text-muted);
  font-size: 1.15rem;
  line-height: 1.7;
  margin-bottom: 2rem;
  max-width: 520px;
}

.hero-cta {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

/* Hero decorative illustration */
.hero-visual {
  display: none;
  justify-content: center;
  align-items: center;
}

.hero-illustration {
  width: 100%;
  max-width: 420px;
  animation: float 6s ease-in-out infinite;
}

@media (min-width: 768px) {
  .hero .container {
    grid-template-columns: 1fr 1fr;
  }

  .hero-visual {
    display: flex;
  }
}

/* --- Projects --- */
.projects {
  background: var(--color-surface);
}

/* --- Featured Game --- */
.featured-game {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  background: var(--color-bg);
  border-radius: var(--radius);
  overflow: hidden;
  padding: 2rem;
}

@media (min-width: 768px) {
  .featured-game {
    grid-template-columns: 1fr 1fr;
    padding: 2.5rem;
  }
}

.featured-game__visual {
  display: flex;
  align-items: center;
  justify-content: center;
}

.featured-game__visual svg {
  width: 100%;
  border-radius: var(--radius-sm);
}

.featured-game__content {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.featured-game__tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--color-primary);
  background: rgba(232, 76, 122, 0.12);
  padding: 0.25rem 0.75rem;
  border-radius: 50px;
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  align-self: flex-start;
}

.featured-game__title {
  font-size: clamp(1.6rem, 2.5vw + 0.5rem, 2.2rem);
  margin-bottom: 0.5rem;
}

.featured-game__tagline {
  color: var(--color-primary-light);
  font-size: 1.05rem;
  margin-bottom: 1rem;
}

.featured-game__description {
  color: var(--color-text-muted);
  font-size: 1rem;
  line-height: 1.7;
  margin-bottom: 1.5rem;
}

.featured-game__phases {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}

.phase {
  background: var(--color-surface);
  border-radius: var(--radius-sm);
  padding: 1.25rem;
  border-left: 3px solid var(--color-primary);
}

.phase h4 {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 0.4rem;
  color: var(--color-text);
}

.phase p {
  color: var(--color-text-muted);
  font-size: 0.88rem;
  line-height: 1.6;
}

.featured-game__badges {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.badge {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--color-text-muted);
  background: var(--color-surface);
  padding: 0.5rem 1rem;
  border-radius: 50px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.featured-game__links {
  margin-top: 1rem;
}

.featured-game__links a {
  font-size: 0.85rem;
  color: var(--color-text-muted);
}

.featured-game__links a:hover {
  color: var(--color-primary);
}

/* --- Contact CTA --- */
.cta-section {
  background: var(--color-gradient);
  text-align: center;
  padding: 5rem 0;
}

.cta-section h2 {
  color: var(--color-text);
  margin-bottom: 1rem;
}

.cta-section p {
  color: rgba(255, 255, 255, 0.85);
  font-size: 1.1rem;
  margin-bottom: 2rem;
  max-width: 550px;
  margin-inline: auto;
}

.cta-section .btn {
  background: var(--color-text);
  color: var(--color-primary-dark);
}

.cta-section .btn:hover {
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
}

/* --- Footer --- */
.footer {
  background: var(--color-surface);
  padding: 1rem 0 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.footer-content {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.footer-top {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
}

.footer-brand p {
  color: var(--color-text-muted);
  font-size: 0.9rem;
  margin-top: 0.5rem;
  max-width: 300px;
}

.footer-links {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.footer-links a {
  color: var(--color-text-muted);
  font-size: 0.9rem;
  transition: color var(--transition);
}

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

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 0.85rem;
  color: var(--color-text-muted);
}

/* --- Privacy Policy Page --- */
.privacy-page {
  max-width: 720px;
  margin-inline: auto;
  padding: 3rem 1.5rem 5rem;
}

.privacy-page h1 {
  font-size: clamp(2rem, 4vw, 3rem);
  margin-bottom: 0.5rem;
}

.privacy-page .last-updated {
  color: var(--color-text-muted);
  font-size: 0.9rem;
  margin-bottom: 3rem;
}

.privacy-page h2 {
  font-size: 1.4rem;
  margin-top: 2.5rem;
  margin-bottom: 0.75rem;
  color: var(--color-primary-light);
}

.privacy-page p,
.privacy-page li {
  color: var(--color-text-muted);
  font-size: 1rem;
  line-height: 1.8;
  margin-bottom: 1rem;
}

.privacy-page ul {
  list-style: disc;
  padding-left: 1.5rem;
  margin-bottom: 1rem;
}

.privacy-page li {
  margin-bottom: 0.4rem;
}

.privacy-page a {
  color: var(--color-primary);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* --- Animations --- */
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-16px); }
}

@keyframes fade-in-up {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

[data-animate] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

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

/* Stagger children */
[data-animate-delay="1"] { transition-delay: 0.1s; }
[data-animate-delay="2"] { transition-delay: 0.2s; }
[data-animate-delay="3"] { transition-delay: 0.3s; }
[data-animate-delay="4"] { transition-delay: 0.4s; }
[data-animate-delay="5"] { transition-delay: 0.5s; }

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

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

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

/* --- Responsive Fine-tuning --- */
@media (max-width: 480px) {
  .section {
    padding: 3.5rem 0;
  }
}
