/* =====================================================
   Dappled Studios — Design System
   Brand purple: #42183a  |  Accent orange: #fa9f2b
   ===================================================== */
:root {
  /* Backgrounds — deepest to lightest */
  --bg-darkest: #150910;
  --bg-dark:    #271022;
  --bg-main:    #42183a;
  --bg-elevated:#4e2049;
  --bg-subtle:  #5e2a58;
  --bg-surface: rgba(255, 255, 255, 0.05);

  /* Accent */
  --accent:       #fa9f2b;
  --accent-hover: #e08d1f;
  --accent-muted: rgba(250, 159, 43, 0.18);
  --accent-glow:  rgba(250, 159, 43, 0.12);

  /* Text */
  --text:       #f5f0f7;
  --text-muted: rgba(245, 240, 247, 0.78);
  --text-dim:   rgba(245, 240, 247, 0.48);

  /* Borders */
  --border:        rgba(255, 255, 255, 0.09);
  --border-accent: rgba(250, 159, 43, 0.35);

  /* Typography */
  --font-heading: "Outfit", system-ui, sans-serif;
  --font-body:    "Outfit", system-ui, sans-serif;

  /* Radii */
  --radius-sm:   0.375rem;
  --radius-md:   0.75rem;
  --radius-lg:   1.25rem;
  --radius-pill: 9999px;

  /* Shadows */
  --shadow-sm: 0 1px 4px rgba(0, 0, 0, 0.25);
  --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 12px 48px rgba(0, 0, 0, 0.55);
  --shadow-glow: 0 0 48px rgba(250, 159, 43, 0.18);
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--text);
  background-color: var(--bg-main);
  -webkit-font-smoothing: antialiased;
}

/* ── Skip link ──────────────────────────────────────── */
.skip-link {
  position: absolute;
  top: -3rem;
  left: 0.75rem;
  padding: 0.5rem 0.75rem;
  background: var(--accent);
  color: var(--bg-darkest);
  font-weight: 600;
  text-decoration: none;
  z-index: 100;
  border-radius: var(--radius-sm);
  transition: top 0.2s ease;
}
.skip-link:focus { top: 0.75rem; }


/* ── Header / Nav ───────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(21, 9, 16, 0.44);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--border);
}

.nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem 2rem;
  max-width: 60rem;
  margin: 0 auto;
  padding: 1.25rem 2rem;
}

.nav-logo { display: block; margin-right: auto; }
.nav-logo img { display: block; height: 2.5rem; width: auto; }

.nav-link {
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.9rem;
  letter-spacing: 0.02em;
  position: relative;
  padding: 0.25rem 0;
  transition: color 0.2s ease;
}
.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1.5px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.25s ease;
}
.nav-link:hover,
.nav-link:focus-visible { color: var(--text); }
.nav-link:hover::after,
.nav-link:focus-visible::after { transform: scaleX(1); }


/* ── Hero ───────────────────────────────────────────── */
.hero {
  position: relative;
  min-height: 50vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin-top: -4.5rem;
  padding: 9rem 2rem 3rem;
  text-align: center;
  background: var(--bg-main);
  overflow: hidden;
}

.hero-video-wrap {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  -webkit-mask-image: linear-gradient(to bottom, #000 40%, transparent 100%);
  mask-image: linear-gradient(to bottom, #000 40%, transparent 100%);
}

.hero-video {
  display: block;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  opacity: 0.8;
}


.hero-content {
  position: relative;
  z-index: 1;
  max-width: 42rem;
}

.hero-eyebrow {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 1.5rem;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.7);
}

.hero-title {
  font-family: var(--font-heading);
  font-size: clamp(3rem, 9vw, 5.75rem);
  font-weight: 700;
  color: var(--text);
  margin: 0 0 1.25rem;
  line-height: 1.04;
  letter-spacing: -0.025em;
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.6);
}

.hero-description {
  font-size: clamp(1rem, 2vw, 1.2rem);
  font-weight: 300;
  color: var(--text-muted);
  margin: 0 0 2.75rem;
  line-height: 1.65;
  letter-spacing: 0.01em;
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.7);
}


/* ── Section eyebrow ────────────────────────────────── */
.section-eyebrow {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 0.625rem;
}


/* ── Generic section container ──────────────────────── */
.section {
  max-width: 60rem;
  margin: 0 auto;
  padding: 5.5rem 2rem;
}

.section-heading {
  font-family: var(--font-heading);
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 700;
  color: var(--text);
  margin: 0 0 2rem;
  letter-spacing: -0.025em;
  line-height: 1.1;
}


/* ── About ──────────────────────────────────────────── */
.section-about {
  background: var(--bg-main);
  border-top: 1px solid var(--border);
}

.about-layout {
  display: grid;
  grid-template-columns: minmax(160px, 240px) 1fr;
  gap: 3.5rem;
  align-items: start;
}

.about-photo-wrap {
  max-width: 240px;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  align-self: stretch;
}

.about-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
}

.about-text { min-width: 0; padding-top: 0.25rem; }

@media (max-width: 600px) {
  .about-layout {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
    gap: 2rem;
  }
  .about-photo-wrap { max-width: 180px; }
}


/* ── Prose ──────────────────────────────────────────── */
.prose {
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1.8;
}
.prose p { margin: 0 0 1.125rem; }
.prose p:last-child { margin-bottom: 0; }
.prose .highlight {
  color: var(--accent);
  font-weight: 500;
}


/* ── Game section ───────────────────────────────────── */
.section-game {
  background: var(--bg-darkest);
  border-top:    1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.game-inner {
  max-width: 60rem;
  margin: 0 auto;
  padding: 5.5rem 2rem;
}

.game-header {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 2.5rem;
  align-items: center;
  margin-bottom: 3rem;
}

.game-header-icon { flex-shrink: 0; }

.game-app-icon {
  width: 140px;
  height: 140px;
  border-radius: 28px;
  box-shadow: var(--shadow-lg), var(--shadow-glow);
  display: block;
  object-fit: cover;
}

.game-header-text { min-width: 0; }

.game-desc { margin-bottom: 0.75rem !important; }

.game-ctas { margin-top: 1.5rem; }

@media (max-width: 600px) {
  .game-header {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
    gap: 1.5rem;
  }
  .game-app-icon { width: 100px; height: 100px; border-radius: 20px; }
  .game-ctas { justify-content: center; }
}

/* Store + site buttons */
.game-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

.btn-store {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.625rem 1.25rem;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  text-decoration: none;
  border-radius: var(--radius-pill);
  border: 1.5px solid rgba(255, 255, 255, 0.22);
  transition: background 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  white-space: nowrap;
}
.btn-store:hover,
.btn-store:focus-visible {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.35);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
}

.btn-store-disabled {
  opacity: 0.45;
  cursor: default;
  pointer-events: none;
}

.btn-store-icon {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}

.btn-store-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}
.btn-store-sub {
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  opacity: 0.8;
}
.btn-store-main {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.btn-site {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.375rem;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9375rem;
  font-weight: 500;
  border-radius: var(--radius-pill);
  border: 1.5px solid var(--border);
  transition: color 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
}
.btn-site svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  opacity: 0.7;
}
.btn-site:hover,
.btn-site:focus-visible {
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.3);
  transform: translateY(-2px);
}


/* ── Screenshots carousel ───────────────────────────── */
.screenshots-section {
  border-top: 1px solid var(--border);
  padding-top: 3rem;
}

.screenshots-carousel {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.screenshots-track {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding: 0.75rem 0;
  flex: 1;
}
.screenshots-track::-webkit-scrollbar { display: none; }

.screenshot-item {
  flex: 0 0 auto;
  width: 190px;
  scroll-snap-align: center;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.screenshot-item:hover {
  transform: scale(1.04) translateY(-3px);
  box-shadow: var(--shadow-lg);
}
.screenshot-item img {
  width: 100%;
  height: auto;
  aspect-ratio: 9 / 16;
  object-fit: cover;
  display: block;
}

.carousel-btn {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--bg-surface);
  color: var(--text-muted);
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}
.carousel-btn:hover,
.carousel-btn:focus-visible {
  background: var(--accent);
  color: var(--bg-darkest);
  border-color: var(--accent);
  transform: scale(1.1);
}
.carousel-btn svg { width: 20px; height: 20px; }

.carousel-dots {
  display: none;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 1.25rem;
}
.carousel-dots .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--bg-subtle);
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease, width 0.2s ease;
}
.carousel-dots .dot.active {
  background: var(--accent);
  width: 22px;
  border-radius: 3px;
}
@media (max-width: 768px) {
  .carousel-dots { display: flex; }
}


/* ── Lightbox ───────────────────────────────────────── */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(10, 4, 9, 0.97);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}
.lightbox.active { opacity: 1; visibility: visible; }

.lightbox-image {
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
  border-radius: var(--radius-md);
  transform: scale(0.92);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: var(--shadow-lg);
}
.lightbox.active .lightbox-image { transform: scale(1); }

.lightbox-close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  width: 44px;
  height: 44px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid var(--border);
  border-radius: 50%;
  color: var(--text-muted);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}
.lightbox-close:hover,
.lightbox-close:focus-visible {
  background: rgba(255, 255, 255, 0.15);
  color: var(--text);
  transform: scale(1.08);
}

.lightbox-prev,
.lightbox-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
  border-radius: 50%;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}
.lightbox-prev { left: 1.5rem; }
.lightbox-next { right: 1.5rem; }
.lightbox-prev:hover,
.lightbox-prev:focus-visible,
.lightbox-next:hover,
.lightbox-next:focus-visible {
  background: rgba(255, 255, 255, 0.14);
  color: var(--text);
  transform: translateY(-50%) scale(1.08);
}
.lightbox-prev svg,
.lightbox-next svg { width: 22px; height: 22px; }


/* ── Contact video background ───────────────────────── */
.contact-video-wrap {
  position: relative;
  overflow: hidden;
  background: linear-gradient(to bottom, var(--bg-darkest) 0%, var(--bg-darkest) 8%, transparent 30%);
}

.contact-video-container {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, #000 30%);
  mask-image: linear-gradient(to bottom, transparent 0%, #000 30%);
}

.contact-video {
  display: block;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  opacity: 0.8;
}

/* ── Contact ────────────────────────────────────────── */
.section-contact {
  position: relative;
  z-index: 1;
  background: transparent;
}

.contact-intro {
  color: var(--text-muted);
  font-size: 1.0625rem;
  margin: 0 0 0.625rem;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.5);
}

.contact-email {
  display: inline-block;
  color: var(--accent);
  font-weight: 500;
  font-size: 1.0625rem;
  text-decoration: none;
  margin-bottom: 2.5rem;
  transition: color 0.2s ease;
}
.contact-email:hover,
.contact-email:focus-visible {
  color: var(--accent-hover);
  text-decoration: underline;
}

.form-success {
  padding: 1rem 1.25rem;
  background: var(--accent-muted);
  color: var(--accent);
  font-weight: 500;
  border-radius: var(--radius-md);
  margin-bottom: 1.25rem;
  border: 1px solid var(--border-accent);
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  max-width: 30rem;
}

.form-row label {
  display: block;
  font-size: 0.775rem;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 0.4rem;
}

.form-row input,
.form-row textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--text);
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.form-row input::placeholder,
.form-row textarea::placeholder { color: var(--text-dim); }
.form-row input:hover,
.form-row textarea:hover {
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(0, 0, 0, 0.3);
}
.form-row input:focus,
.form-row textarea:focus {
  outline: none;
  border-color: var(--accent);
  background: rgba(0, 0, 0, 0.3);
  box-shadow: 0 0 0 3px var(--accent-muted);
}
.form-row textarea {
  resize: vertical;
  min-height: 7rem;
}


/* ── Buttons ────────────────────────────────────────── */
.btn {
  display: inline-block;
  padding: 0.875rem 2.125rem;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.9375rem;
  letter-spacing: 0.03em;
  text-decoration: none;
  border: none;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: background 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
}

.btn-primary {
  background: var(--accent);
  color: var(--bg-darkest);
}
.btn-primary:hover,
.btn-primary:focus-visible {
  background: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(250, 159, 43, 0.38);
}

.btn-submit {
  align-self: flex-start;
  background: var(--accent);
  color: var(--bg-darkest);
  margin-top: 0.25rem;
}
.btn-submit:hover,
.btn-submit:focus-visible {
  background: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(250, 159, 43, 0.38);
}


/* ── Footer ─────────────────────────────────────────── */
.site-footer {
  position: relative;
  z-index: 1;
  background: rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-top: 1px solid var(--border);
  margin-top: -1px;
  padding: 3rem 2rem;
}

.footer-inner {
  max-width: 60rem;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 2rem;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.5rem;
}
.footer-brand img {
  display: block;
  height: 1.75rem;
  width: auto;
}
.footer-tagline {
  font-size: 0.8125rem;
  color: var(--text-dim);
  margin: 0;
}

.footer-nav {
  display: flex;
  gap: 2rem;
  align-items: center;
}
.footer-link {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  transition: color 0.2s ease;
}
.footer-link:hover,
.footer-link:focus-visible { color: var(--accent); }

.footer-copy {
  font-size: 0.8125rem;
  color: var(--text-dim);
  margin: 0;
  text-align: right;
}

@media (max-width: 640px) {
  .footer-inner {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 1.5rem;
  }
  .footer-brand { align-items: center; }
  .footer-nav   { justify-content: center; gap: 1.5rem; }
  .footer-copy  { text-align: center; }
}


/* ── Privacy page ───────────────────────────────────── */
.section-privacy { padding-top: 6rem; padding-bottom: 6rem; }

.privacy-prose h2 {
  font-family: var(--font-heading);
  font-size: 1.375rem;
  font-weight: 600;
  color: var(--text);
  margin: 2.5rem 0 0.75rem;
  letter-spacing: -0.01em;
}

.privacy-prose h3 {
  font-family: var(--font-heading);
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--text);
  margin: 1.75rem 0 0.5rem;
}

.privacy-prose ul {
  margin: 0.5rem 0 1.125rem;
  padding-left: 1.5rem;
}

.privacy-prose li {
  margin-bottom: 0.375rem;
}

.privacy-prose a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.2s ease;
}
.privacy-prose a:hover,
.privacy-prose a:focus-visible {
  color: var(--accent-hover);
  text-decoration: underline;
}

.privacy-meta {
  padding: 1.25rem 1.5rem;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  line-height: 1.8;
  margin-bottom: 2rem !important;
}

.privacy-back {
  margin-top: 3rem !important;
}

/* ── Focus visible ──────────────────────────────────── */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}


/* ── Reduced motion ─────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .screenshot-item,
  .carousel-btn,
  .lightbox-close,
  .lightbox-prev,
  .lightbox-next,
  .lightbox-image,
  .btn,
  .btn-store,
  .btn-site,
  .nav-link::after,
  .contact-video { transition: none; }
  .lightbox { transition: opacity 0.01s, visibility 0.01s; }
}


/* ── Responsive ─────────────────────────────────────── */
@media (max-width: 640px) {
  .hero {
    min-height: 40vh;
    padding: 1.5rem 1.25rem 3rem;
  }
  .section        { padding: 4rem 1.25rem; }
  .game-inner     { padding: 4rem 1.25rem; }
  .screenshot-item { width: 150px; }
  .nav            { padding: 0.875rem 1.25rem; gap: 0.25rem 1.5rem; }
}

@media (max-width: 480px) {
  .carousel-btn { width: 38px; height: 38px; }
  .carousel-btn svg { width: 18px; height: 18px; }
}
