/* ============================================================
   ParkFolio — Marketing Site Styles
   Nature/outdoorsy theme: sky blue, forest green, parchment, tan
   ============================================================ */

:root {
  --sky-blue: #4A90C4;
  --forest-green: #3A7D44;
  --golden-tan: #C8A96E;
  --bark-brown: #2C1F14;
  --parchment: #F5EFE0;
  --off-white: #FAFAF7;
  --trail-gray: #7A7060;
  --white: #ffffff;

  --hero-gradient: linear-gradient(140deg, #2E6B9E 0%, #3A7D44 100%);
  --cta-gradient: linear-gradient(140deg, #3A7D44 0%, #2E6B9E 100%);

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-phone: 36px;

  --shadow-card: 0 2px 16px rgba(44, 31, 20, 0.10);
  --shadow-phone: 0 24px 60px rgba(44, 31, 20, 0.25);

  --font-heading: 'Playfair Display', Georgia, serif;
  --font-body: 'Source Sans 3', system-ui, sans-serif;

  --nav-height: 64px;
  --content-max: 1080px;
}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }

body {
  font-family: var(--font-body);
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--bark-brown);
  background: var(--off-white);
}

/* ---- Typography ---- */
h1, h2, h3, h4 { font-family: var(--font-heading); line-height: 1.2; }
h1 { font-size: clamp(2.4rem, 5.5vw, 4rem); font-weight: 700; }
h2 { font-size: clamp(1.7rem, 3.5vw, 2.4rem); font-weight: 700; }
h3 { font-size: 1.25rem; font-weight: 600; }
h4 { font-size: 1rem; font-weight: 600; }

/* ---- Layout ---- */
.container {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: 80px 0;
}

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-body);
  font-weight: 600;
  border-radius: 50px;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
  border: none;
  white-space: nowrap;
}

.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); opacity: 0.9; }

.btn-primary {
  background: var(--golden-tan);
  color: var(--bark-brown);
  padding: 14px 28px;
  font-size: 1rem;
  box-shadow: 0 4px 20px rgba(200, 169, 110, 0.45);
}

.btn-primary:hover {
  box-shadow: 0 8px 28px rgba(200, 169, 110, 0.55);
}

.btn-sm {
  background: rgba(255,255,255,0.18);
  color: var(--white);
  padding: 8px 20px;
  font-size: 0.9rem;
  border: 1px solid rgba(255,255,255,0.35);
  backdrop-filter: blur(8px);
}

.btn-lg {
  padding: 16px 36px;
  font-size: 1.1rem;
}

.apple-icon {
  width: 18px;
  height: 18px;
  fill: currentColor;
  flex-shrink: 0;
}

/* ---- Nav ---- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--nav-height);
  background: transparent;
  transition: background 0.3s ease, backdrop-filter 0.3s ease, box-shadow 0.3s ease;
}

.nav.scrolled {
  background: rgba(46, 107, 158, 0.92);
  backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 rgba(255,255,255,0.1);
}

.nav-inner {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--white);
}

.nav-icon-wrap {
  position: relative;
  width: 34px;
  height: 34px;
  flex-shrink: 0;
}

.nav-icon {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  object-fit: cover;
  position: absolute;
  inset: 0;
}

.nav-icon-fallback {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: rgba(255,255,255,0.18);
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}

.cta-logo-wrap {
  position: relative;
  width: 80px;
  height: 80px;
  margin: 0 auto 24px;
}

.cta-logo {
  width: 80px;
  height: 80px;
  border-radius: 18px;
  object-fit: cover;
  box-shadow: 0 8px 24px rgba(0,0,0,0.25);
}

.cta-logo-fallback {
  display: none;
  width: 80px;
  height: 80px;
  border-radius: 18px;
  background: rgba(255,255,255,0.18);
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  box-shadow: 0 8px 24px rgba(0,0,0,0.25);
}

/* ---- Hero ---- */
.hero {
  min-height: 100svh;
  background: var(--hero-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 60px;
  padding: calc(var(--nav-height) + 40px) 24px 60px;
  position: relative;
  overflow: hidden;
}

/* Subtle topographic texture */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 59px,
      rgba(255,255,255,0.03) 60px
    ),
    repeating-linear-gradient(
      90deg,
      transparent,
      transparent 59px,
      rgba(255,255,255,0.03) 60px
    );
  pointer-events: none;
}

.hero-content {
  max-width: 520px;
  color: var(--white);
  position: relative;
}

.hero-eyebrow {
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.75);
  margin-bottom: 16px;
}

.hero-title {
  color: var(--white);
  margin-bottom: 20px;
  text-shadow: 0 2px 12px rgba(0,0,0,0.2);
}

.hero-sub {
  font-size: 1.05rem;
  color: rgba(255,255,255,0.85);
  margin-bottom: 36px;
  max-width: 440px;
}

.hero-ctas {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* Phone frame */
.hero-phone {
  position: relative;
  flex-shrink: 0;
}

.phone-frame {
  position: relative;
  border: 11px solid #1a1a1a;
  border-radius: var(--radius-phone);
  overflow: hidden;
  box-shadow: var(--shadow-phone);
  background: #1a1a1a;
  width: 280px;
  aspect-ratio: 9/19.5;
}

.phone-frame.phone-sm {
  width: 200px;
}

.phone-screen {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: calc(var(--radius-phone) - 11px);
}

/* Hide real image and show placeholder until screenshot exists */
.phone-screen {
  position: absolute;
  inset: 0;
}

.phone-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #1a2a3a;
  color: rgba(255,255,255,0.5);
  font-size: 0.8rem;
  gap: 6px;
  border-radius: calc(var(--radius-phone) - 11px);
}

.phone-placeholder span { font-size: 2rem; }

/* When a real screenshot loads, hide the placeholder */
.phone-screen[src]:not([src=""])  + .phone-placeholder,
.phone-screen[src*="screenshot"]  + .phone-placeholder { display: none; }

/* ---- Stats Band ---- */
.stats-band {
  background: var(--bark-brown);
  color: var(--parchment);
  padding: 28px 24px;
}

.stats-inner {
  max-width: var(--content-max);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  flex-wrap: wrap;
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 8px 40px;
}

.stat-number {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 700;
  color: var(--golden-tan);
  line-height: 1;
}

.stat-label {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(245, 239, 224, 0.65);
  margin-top: 4px;
}

.stat-divider {
  width: 1px;
  height: 40px;
  background: rgba(245, 239, 224, 0.2);
}

/* ---- Features ---- */
.features {
  background: var(--parchment);
}

.section-title {
  text-align: center;
  color: var(--bark-brown);
  margin-bottom: 12px;
}

.section-sub {
  text-align: center;
  color: var(--trail-gray);
  max-width: 540px;
  margin: 0 auto 52px;
  font-size: 1.05rem;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
}

.feature-card {
  background: var(--off-white);
  border: 1px solid rgba(200, 169, 110, 0.35);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  box-shadow: var(--shadow-card);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 32px rgba(44, 31, 20, 0.14);
}

.feature-icon {
  font-size: 2.2rem;
  margin-bottom: 16px;
}

.feature-card h3 {
  color: var(--bark-brown);
  margin-bottom: 10px;
}

.feature-card p {
  color: var(--trail-gray);
  font-size: 0.97rem;
}

/* ---- Screenshots ---- */
.screenshots-section {
  background: var(--off-white);
  overflow: hidden;
  padding-bottom: 60px;
}

.screenshots-section .section-title {
  margin-bottom: 40px;
}

.screenshots-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  padding: 20px 0 40px;
}

.screenshots-scroll::-webkit-scrollbar { display: none; }

.screenshots-track {
  display: flex;
  gap: 28px;
  padding: 0 max(24px, calc((100vw - var(--content-max)) / 2 + 24px));
  width: max-content;
}

.screenshot-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  scroll-snap-align: start;
  flex-shrink: 0;
}

.screenshot-item figcaption {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--trail-gray);
  text-transform: uppercase;
  letter-spacing: 0.07em;
}

/* ---- How It Works ---- */
.how-it-works {
  background: var(--parchment);
}

.steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 40px;
  margin-top: 52px;
}

.step {
  padding-left: 24px;
  border-left: 3px solid var(--golden-tan);
}

.step-number {
  font-family: var(--font-heading);
  font-size: 3.5rem;
  font-weight: 700;
  color: var(--golden-tan);
  line-height: 1;
  display: block;
  margin-bottom: 12px;
}

.step h3 {
  color: var(--bark-brown);
  margin-bottom: 10px;
}

.step p {
  color: var(--trail-gray);
  font-size: 0.97rem;
}

/* ---- Stamps Carousel ---- */
.stamps-showcase {
  background: var(--parchment);
  overflow: hidden;
}

.stamps-carousel-wrap {
  margin-top: 48px;
  /* Fade edges */
  mask-image: linear-gradient(to right, transparent 0%, black 8%, black 92%, transparent 100%);
  -webkit-mask-image: linear-gradient(to right, transparent 0%, black 8%, black 92%, transparent 100%);
}

.stamps-carousel {
  display: flex;
  gap: 20px;
  width: max-content;
  animation: stampScroll 28s linear infinite;
}

.stamps-carousel:hover {
  animation-play-state: paused;
}

@keyframes stampScroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.stamp-item {
  flex-shrink: 0;
  width: 200px;
  height: 200px;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  background: var(--off-white);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.stamp-item:hover {
  transform: scale(1.06);
  box-shadow: 0 8px 32px rgba(44, 31, 20, 0.18);
}

.stamp-item img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 12px;
}

@media (max-width: 600px) {
  .stamp-item { width: 140px; height: 140px; }
  .stamps-carousel { gap: 14px; }
}

/* ---- Achievements ---- */
.achievements-section {
  background: var(--off-white);
}

.badges-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 20px;
  margin-top: 48px;
}

.badge-card {
  background: var(--parchment);
  border: 1px solid rgba(200, 169, 110, 0.3);
  border-radius: var(--radius-md);
  padding: 24px 16px;
  text-align: center;
  box-shadow: var(--shadow-card);
  transition: transform 0.2s ease;
}

.badge-card:hover { transform: translateY(-3px); }

.badge-icon {
  font-size: 2.4rem;
  margin-bottom: 10px;
}

.badge-icon.locked {
  filter: grayscale(1);
  opacity: 0.45;
}

.badge-icon.unlocked {
  filter: drop-shadow(0 2px 8px rgba(92, 158, 74, 0.4));
}

.badge-card h4 {
  color: var(--bark-brown);
  margin-bottom: 4px;
}

.badge-req {
  font-size: 0.8rem;
  color: var(--trail-gray);
}

/* ---- CTA Section ---- */
.cta-section {
  background: var(--cta-gradient);
  text-align: center;
  padding: 100px 24px;
}

.cta-inner {
  max-width: 560px;
  margin: 0 auto;
  color: var(--white);
}


.cta-inner h2 {
  color: var(--white);
  margin-bottom: 12px;
}

.cta-inner p {
  color: rgba(255,255,255,0.8);
  margin-bottom: 36px;
  font-size: 1.05rem;
}

/* ---- Footer ---- */
.footer {
  background: var(--bark-brown);
  color: rgba(245, 239, 224, 0.7);
  padding: 48px 24px;
}

.footer-inner {
  max-width: var(--content-max);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  text-align: center;
}

.footer-icon {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--parchment);
}

.footer-links {
  display: flex;
  gap: 24px;
  font-size: 0.9rem;
}

.footer-links a {
  color: rgba(245, 239, 224, 0.7);
  transition: color 0.15s;
}

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

.footer-disclaimer {
  font-size: 0.78rem;
  max-width: 480px;
  color: rgba(245, 239, 224, 0.45);
}

.footer-copy {
  font-size: 0.82rem;
  color: rgba(245, 239, 224, 0.4);
}

/* ---- Scroll Reveal Animations ---- */
.fade-in {
  opacity: 0;
  transform: translateY(24px);
  animation: fadeInUp 0.7s ease forwards;
}

.fade-in-delay {
  animation-delay: 0.2s;
}

@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger children of a grid */
.features-grid .reveal:nth-child(2) { transition-delay: 0.08s; }
.features-grid .reveal:nth-child(3) { transition-delay: 0.16s; }
.features-grid .reveal:nth-child(4) { transition-delay: 0.24s; }

.steps-grid .reveal:nth-child(2) { transition-delay: 0.1s; }
.steps-grid .reveal:nth-child(3) { transition-delay: 0.2s; }

.badges-grid .reveal:nth-child(2) { transition-delay: 0.06s; }
.badges-grid .reveal:nth-child(3) { transition-delay: 0.12s; }
.badges-grid .reveal:nth-child(4) { transition-delay: 0.18s; }
.badges-grid .reveal:nth-child(5) { transition-delay: 0.24s; }
.badges-grid .reveal:nth-child(6) { transition-delay: 0.30s; }

/* ---- Responsive ---- */
@media (max-width: 820px) {
  .hero {
    flex-direction: column;
    text-align: center;
    padding-top: calc(var(--nav-height) + 48px);
    gap: 40px;
  }

  .hero-content { max-width: 100%; }
  .hero-sub { margin-left: auto; margin-right: auto; }
  .hero-ctas { justify-content: center; }

  .hero-phone { order: -1; }
  .phone-frame { width: 220px; }

  .stat-item { padding: 8px 20px; }
  .stat-divider { display: none; }

  .stats-inner { gap: 8px; }
}

@media (max-width: 540px) {
  .section { padding: 60px 0; }
  .hero { min-height: 100svh; }

  .stat-item { padding: 6px 16px; }
  .stat-number { font-size: 1.6rem; }

  .features-grid { grid-template-columns: 1fr; }
  .steps-grid { grid-template-columns: 1fr; }
  .badges-grid { grid-template-columns: repeat(2, 1fr); }
}
