/* ==========================================================================
   Doodle Drift Games — single page site
   Snow-drift theme drawn from the studio logo: cream paper, goldendoodle
   gold, drift-blue, and tongue-coral. Tweak the :root vars to re-theme.
   ========================================================================== */

:root {
  --bg: #f6f0e2;
  --bg-2: #fbf6ea;
  --card: #fffdf6;
  --card-2: #fdf8ec;
  --line: rgba(45, 51, 64, 0.14);
  --text: #2d3340;
  --muted: #5d6472;
  --coral: #e25c50;
  --coral-deep: #c94a3f;
  --ice: #5ea7d8;
  --ice-deep: #2f6f9e;
  --ice-soft: #a9cde8;
  --gold: #dfa43c;
  --gold-deep: #9c701d;
  --plum: #8a68d4;
  --radius: 18px;
  --font-display: "Fredoka", "Trebuchet MS", system-ui, sans-serif;
  --font-body: "Nunito", "Segoe UI", system-ui, sans-serif;
  --font-hand: "Caveat", "Segoe Script", cursive;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 84px; /* keep anchored sections clear of the sticky nav */
}

body {
  font-family: var(--font-body);
  color: var(--text);
  background-color: var(--bg);
  /* icy-sky glow up top + a dusting of snow specks */
  background-image:
    radial-gradient(ellipse 90% 42% at 50% -6%, rgba(94, 167, 216, 0.22), transparent 70%),
    radial-gradient(rgba(45, 51, 64, 0.05) 1px, transparent 1px);
  background-size: 100% 100%, 26px 26px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--coral); color: #fff7ec; }

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

a { color: inherit; }

:focus-visible {
  outline: 2px dashed var(--coral-deep);
  outline-offset: 3px;
  border-radius: 4px;
}

.container {
  max-width: 1100px;
  margin-inline: auto;
  padding-inline: 24px;
}

.section { padding: 96px 0; }

/* --------------------------------- nav ---------------------------------- */

.site-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(246, 240, 226, 0.78);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.site-nav.scrolled {
  border-bottom-color: var(--line);
  box-shadow: 0 8px 24px rgba(45, 51, 64, 0.08);
}

.nav-inner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.12rem;
  text-decoration: none;
  letter-spacing: 0.01em;
}

.nav-links {
  display: flex;
  gap: 28px;
}

.nav-links a {
  text-decoration: none;
  color: var(--muted);
  font-weight: 700;
  font-size: 0.98rem;
  transition: color 0.2s ease;
}

.nav-links a:hover {
  color: var(--text);
  text-decoration: underline wavy var(--ice) 2px;
  text-underline-offset: 6px;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: 42px;
  height: 42px;
  background: transparent;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  cursor: pointer;
}

.nav-toggle span {
  width: 18px;
  height: 2px;
  border-radius: 2px;
  background: var(--text);
  transition: transform 0.25s ease, opacity 0.25s ease;
}

body.nav-open .nav-toggle span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
body.nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
body.nav-open .nav-toggle span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* --------------------------------- hero --------------------------------- */

.hero {
  position: relative;
  min-height: calc(92vh - 68px);
  display: grid;
  place-items: center;
  text-align: center;
  overflow: hidden;
  padding: 72px 0;
}

.hero-doodles { position: absolute; inset: 0; pointer-events: none; }

.doodle { position: absolute; opacity: 0.6; }

@keyframes drift-1 { to { transform: translate(10px, -16px) rotate(10deg); } }
@keyframes drift-2 { to { transform: translate(-12px, 12px) rotate(-6deg); } }
@keyframes drift-3 { to { transform: translate(8px, 10px) rotate(14deg); } }

.float-1 { animation: drift-1 7s ease-in-out infinite alternate; }
.float-2 { animation: drift-2 9s ease-in-out infinite alternate; }
.float-3 { animation: drift-3 8s ease-in-out infinite alternate; }
.float-4 { animation: drift-1 11s ease-in-out infinite alternate; }
.float-5 { animation: drift-2 10s ease-in-out infinite alternate; }

.hero-kicker {
  display: inline-block;
  font-family: var(--font-hand);
  font-size: 1.7rem;
  color: var(--gold-deep);
  transform: rotate(-3deg);
  margin-bottom: 6px;
}

.hero-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.9rem, 8vw, 5.2rem);
  line-height: 1.05;
  letter-spacing: 0.01em;
}

.hero-title .grad {
  background: linear-gradient(92deg, var(--gold) 8%, var(--ice) 92%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-tagline {
  max-width: 560px;
  margin: 18px auto 0;
  color: var(--muted);
  font-size: 1.15rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  margin-top: 30px;
}

.hero-status {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-top: 40px;
  padding: 8px 18px;
  border: 1.5px dashed rgba(94, 167, 216, 0.6);
  border-radius: 999px;
  background: rgba(255, 253, 246, 0.6);
  color: var(--muted);
  font-size: 0.92rem;
}

.hero-status strong { color: var(--ice-deep); font-weight: 800; }

.pulse-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--ice);
  animation: pulse 1.8s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(94, 167, 216, 0.5); }
  50% { box-shadow: 0 0 0 7px rgba(94, 167, 216, 0); }
}

/* -------------------------------- buttons ------------------------------- */

.btn {
  display: inline-block;
  padding: 13px 28px;
  border-radius: 999px;
  font-family: var(--font-body);
  font-weight: 800;
  font-size: 1rem;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease, background 0.18s ease, color 0.18s ease;
}

.btn-primary {
  background: var(--coral-deep);
  color: #fff7ec;
  border: none;
  box-shadow: 0 5px 0 rgba(45, 51, 64, 0.28);
}

.btn-primary:hover { background: var(--coral); transform: translateY(-2px); box-shadow: 0 7px 0 rgba(45, 51, 64, 0.28); }
.btn-primary:active { transform: translateY(2px); box-shadow: 0 2px 0 rgba(45, 51, 64, 0.28); }
.btn-primary:disabled { opacity: 0.6; cursor: wait; transform: none; }

.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 2px dashed var(--line);
}

.btn-ghost:hover { border-color: var(--ice); color: var(--ice-deep); transform: translateY(-2px); }

/* ----------------------------- section heads ---------------------------- */

.section-head { text-align: center; margin-bottom: 52px; }

.kicker {
  display: inline-block;
  font-family: var(--font-hand);
  font-size: 1.45rem;
  color: var(--gold-deep);
  transform: rotate(-1.5deg);
}

.section-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(2rem, 4.5vw, 2.7rem);
  margin-top: 2px;
}

.squiggle { margin: 8px auto 16px; }

.section-sub {
  max-width: 620px;
  margin-inline: auto;
  color: var(--muted);
  font-size: 1.06rem;
}

/* --------------------------------- games -------------------------------- */

.games-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
}

.game-card {
  background: linear-gradient(165deg, var(--card), var(--card-2));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transform: rotate(-0.6deg);
  box-shadow: 0 8px 24px rgba(45, 51, 64, 0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.game-card:nth-child(2) { transform: rotate(0.6deg); }

.game-card:hover {
  transform: rotate(0deg) translateY(-5px);
  border-color: rgba(45, 51, 64, 0.24);
  box-shadow: 0 18px 44px rgba(45, 51, 64, 0.16);
}

.game-art {
  aspect-ratio: 16 / 9;
  background:
    radial-gradient(ellipse 80% 90% at 30% 10%, rgba(94, 167, 216, 0.20), transparent 60%),
    linear-gradient(180deg, #e7f1f9, #f3f9fd);
  border-bottom: 1px solid var(--line);
}

.game-art svg { width: 100%; height: 100%; }

.game-art-secret {
  background:
    radial-gradient(ellipse 80% 90% at 70% 15%, rgba(223, 164, 60, 0.16), transparent 60%),
    linear-gradient(180deg, #f4ecd8, #f8f2e2);
}

.game-body { padding: 26px 28px 30px; }

.game-meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

.status-chip {
  font-size: 0.74rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  padding: 5px 13px;
  border-radius: 999px;
}

.status-dev {
  color: var(--ice-deep);
  background: rgba(94, 167, 216, 0.14);
  border: 1px solid rgba(94, 167, 216, 0.45);
}

.status-secret {
  color: var(--gold-deep);
  background: rgba(223, 164, 60, 0.14);
  border: 1px solid rgba(223, 164, 60, 0.5);
}

.game-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.65rem;
  margin: 12px 0 8px;
}

.game-desc { color: var(--muted); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }

.chip {
  font-size: 0.83rem;
  font-weight: 700;
  color: var(--muted);
  background: rgba(45, 51, 64, 0.05);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 13px;
}

.scribble-note {
  display: inline-block;
  font-family: var(--font-hand);
  font-size: 1.3rem;
  color: var(--gold-deep);
  transform: rotate(-1.5deg);
  margin-top: 16px;
}

/* --------------------------------- about -------------------------------- */

.about-logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin: -6px 0 46px;
}

.about-logo img {
  width: min(250px, 62vw);
  height: auto;
  border-radius: 24px;
  transform: rotate(-2deg);
  border: 1px solid var(--line);
  box-shadow: 0 18px 44px rgba(45, 51, 64, 0.18);
  transition: transform 0.3s ease;
}

.about-logo img:hover { transform: rotate(0deg) scale(1.02); }

.about-logo figcaption {
  font-family: var(--font-hand);
  font-size: 1.35rem;
  color: var(--gold-deep);
  transform: rotate(1deg);
}

.devs-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
  max-width: 860px;
  margin-inline: auto;
}

.dev-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 34px 30px;
  text-align: center;
  transform: rotate(-0.5deg);
  box-shadow: 0 8px 24px rgba(45, 51, 64, 0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.dev-card:nth-child(2) { transform: rotate(0.5deg); }

.dev-card:hover {
  transform: rotate(0deg) translateY(-4px);
  box-shadow: 0 14px 36px rgba(45, 51, 64, 0.15);
}

.dev-avatar {
  width: 124px;
  height: 124px;
  margin: 0 auto 18px;
  display: grid;
  place-items: center;
  border: 2px dashed rgba(45, 51, 64, 0.22);
  border-radius: 50%;
  background: var(--bg-2);
}

.dev-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.35rem;
}

.dev-role {
  display: inline-block;
  margin: 8px 0 12px;
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--ice-deep);
  background: rgba(94, 167, 216, 0.14);
  border: 1px solid rgba(94, 167, 216, 0.45);
  border-radius: 999px;
  padding: 5px 13px;
}

.dev-bio { color: var(--muted); font-size: 0.99rem; }

/* -------------------------------- contact ------------------------------- */

.contact-form {
  max-width: 580px;
  margin-inline: auto;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 34px 32px;
  box-shadow: 0 8px 24px rgba(45, 51, 64, 0.08);
  display: grid;
  gap: 20px;
}

.field { display: grid; gap: 8px; }

.field label { font-weight: 800; font-size: 0.93rem; }

.field input,
.field textarea {
  width: 100%;
  background: var(--bg-2);
  border: 1.5px solid var(--line);
  border-radius: 12px;
  padding: 13px 16px;
  color: var(--text);
  font-family: inherit;
  font-size: 1rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.field input::placeholder,
.field textarea::placeholder { color: rgba(93, 100, 114, 0.55); }

.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--ice);
  box-shadow: 0 0 0 4px rgba(94, 167, 216, 0.2);
}

.field textarea { min-height: 150px; resize: vertical; }

.btn-submit { width: 100%; border-radius: 14px; }

.form-status { min-height: 1.4em; font-size: 0.97rem; font-weight: 700; text-align: center; }
.form-status.ok { color: #2e7d52; }
.form-status.err { color: var(--coral-deep); }

/* honeypot — parked far off-screen, never display:none (bots check for that) */
.hp {
  position: absolute;
  left: -6000px;
  top: 0;
  width: 1px;
  height: 1px;
  opacity: 0;
}

/* -------------------------------- footer -------------------------------- */

.site-footer {
  border-top: 1px solid var(--line);
  padding: 34px 0 44px;
  color: var(--muted);
  font-size: 0.93rem;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
}

.footer-note { font-family: var(--font-hand); font-size: 1.25rem; color: var(--gold-deep); }

.footer-links { display: flex; gap: 20px; }

.footer-links a {
  color: var(--muted);
  text-decoration: none;
  font-weight: 700;
}

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

/* ----------------------------- reveal on scroll -------------------------- */

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.in-view { opacity: 1; transform: none; }

/* ------------------------------- responsive ------------------------------ */

@media (max-width: 900px) {
  .section { padding: 72px 0; }

  .games-grid, .devs-grid { grid-template-columns: 1fr; }

  .game-card, .game-card:nth-child(2),
  .dev-card, .dev-card:nth-child(2) { transform: rotate(0deg); }

  .nav-toggle { display: inline-flex; }

  .nav-links {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    flex-direction: column;
    gap: 16px;
    min-width: 200px;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 20px 24px;
    box-shadow: 0 18px 44px rgba(45, 51, 64, 0.22);
    opacity: 0;
    transform: translateY(-8px);
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
  }

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

@media (max-width: 560px) {
  .container { padding-inline: 18px; }
  .hero-actions .btn { width: 100%; text-align: center; }
  .contact-form { padding: 26px 20px; }

  /* narrow screens: hero content spans the full width, so park the side
     doodles that would collide with the title and buttons */
  .float-2, .float-3, .float-4 { display: none; }
  .doodle { opacity: 0.45; }
}

/* --------------------------- 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;
  }
  .reveal { opacity: 1; transform: none; }
}
