/* ================= TOKENS ================= */
:root {
  --brand: #cc5500;
  --brand-dark: #a94400;

  --text: #0f172a;
  --muted: #6b7280;

  --bg: #ffffff;
  --card: #ffffff;

  --radius: 16px;
  --shadow: 0 10px 30px rgba(0,0,0,0.12);
}

/* ================= BASE ================= */
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
}

/* ================= HERO SHELL ================= */
.hero-shell {
  position: relative;
  background: url("/assets/field.webp") center / cover no-repeat;
}

.hero-shell::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
      to bottom,
      rgba(0,0,0,0.35),
      rgba(0,0,0,0.65)
    );
}

.hero-shell > * {
  position: relative;
  z-index: 1;
}

/* ================= HEADER ================= */
/* ================= FLOATING HEADER ================= */
.app-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 64px;
  z-index: 1000;

  display: flex;
  align-items: center;

  /* White translucent glass */
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(10px);

  /* Soft separation */
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}



.header-inner {
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  padding: 0 16px;

  display: flex;
  justify-content: space-between;
  align-items: center;
}

.app-logo {
  height: 38px;
}

.header-btn {
  background: var(--brand);
  color: #fff;
  font-weight: 700;
  padding: 8px 14px;
  border-radius: 10px;
  text-decoration: none;
  transition: background 0.2s ease;
}

.header-btn:hover {
  background: var(--brand-dark);
}

.header-spacer {
  height: 64px; /* same as header height */
  width: 100%;
}

/* ================= HERO ================= */
.hero {
  min-height: 480px;
  padding: 96px 20px;

  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.hero-content {
  max-width: 820px;
  color: #fff1f0;
}

.hero-logo {
  height: 56px;
  margin-bottom: 24px;
}

.hero h1 {
  font-size: clamp(36px, 5vw, 56px);
  font-weight: 900;
}

.hero p {
  font-size: 18px;
  color: rgba(255,241,240,0.95);
}

/* ================= FEATURES ================= */
.features {
  padding: 80px 20px;
  background: #fafafa;
  text-align: center;
}

.features h2 {
  color: var(--brand);
}

.features-sub {
  color: var(--muted);
  max-width: 720px;
  margin: 12px auto 0;
}

.features-grid {
  max-width: 1200px;
  margin: 64px auto 0;

  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 32px;

  justify-content: center; 
}

.feature-card {
  background: var(--card);
  padding: 36px 28px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.feature-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 16px;

  background: rgba(204,85,0,0.12);
  border-radius: 16px;

  display: flex;
  align-items: center;
  justify-content: center;
}

.feature-icon svg {
  width: 30px;
  height: 30px;
  color: var(--brand);
}

/* ================= PRODUCT PREVIEW ================= */
.product-preview {
  padding: 80px 20px;
  text-align: center;
}

.product-preview h2 {
  color: var(--brand);
}

.preview-sub {
  color: var(--muted);
}

.preview-grid {
  max-width: 1100px;
  margin: 56px auto 0;

  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 36px;
}

.preview-item {
  background: var(--card);
  padding: 24px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);

  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;

  min-height: 520px;
}


.preview-item span {
  margin-top: 12px;
  font-weight: 600;
  color: var(--brand-dark);
}

.preview-item img {
  max-width: 100%;
  max-height: 420px;
  object-fit: contain;
  border-radius: 12px;
}


/* ================= CONTACT ================= */
.contact {
  padding: 80px 20px;
  text-align: center;
}

.contact h2 {
  color: var(--brand);
}

.contact-sub {
  color: var(--muted);
}

.contact-card {
  max-width: 480px;
  margin: 40px auto 0;
  padding: 28px;

  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

/* ================= FOOTER ================= */
.site-footer {
  padding: 32px;
  text-align: center;
  color: var(--muted);
}

/* ================= ANIMATIONS ================= */
.fade-in,
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity .6s ease, transform .6s ease;
}

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

/* ================= MOBILE ================= */
@media (max-width: 768px) {
  .preview-item {
    min-height: 420px;
  }

  .preview-item img {
    max-height: 300px;
  }
}


/* ================= ACCESSIBILITY ================= */
@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
  }
}


/* ================= PREVIEW TOGGLE ================= */
.preview-toggle {
  margin: 32px auto 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
}

.toggle-label {
  font-weight: 600;
  color: var(--muted);
  transition: color 0.2s ease;
}

.toggle-label.active {
  color: var(--brand);
}

/* iOS Switch */
.ios-switch {
  position: relative;
  width: 52px;
  height: 30px;
  background: #e5e7eb;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  padding: 0;
}

.switch-thumb {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 24px;
  height: 24px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 2px 6px rgba(0,0,0,0.25);
  transition: transform 0.25s ease;
}

.ios-switch.active {
  background: var(--brand);
}

.ios-switch.active .switch-thumb {
  transform: translateX(22px);
}

/* ================= PREVIEW STAGE ================= */
.preview-stage {
  width: 100%;
  position: relative;
  max-width: 900px;
  margin: 0 auto;

  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);

  display: flex;
  align-items: center;
  justify-content: center;

  padding: 16px;
}

.preview-image.mobile-stack {
  position: absolute;
  inset: 0;

  display: flex;
  align-items: center;
  justify-content: center;

  opacity: 0;
  transition: opacity 0.35s ease;
}

.preview-image.mobile-stack.active {
  opacity: 1;
}



.preview-image.active {
  opacity: 1;
}

/* Desktop image sizing */
.preview-stage > img.preview-image {
  position: relative;

  width: 100%;
  height: auto;
  max-height: 480px;

  object-fit: contain;
  border-radius: 12px;

  opacity: 0;
  transition: opacity 0.35s ease;
}

.preview-stage > img.preview-image.active {
  opacity: 1;
}




/* Mobile */
@media (max-width: 768px) {
  .preview-stage {
    padding: 12px;
  }

  .preview-stage > img.preview-image {
    max-height: 300px;
    border-radius: 16px;
  }

  .mobile-stack img {
    max-height: 300px;
  }
}



.mobile-stack {
  position: relative;
  width: 100%;
  height: 100%;
}

/* Base mobile images */
.mobile-stack img {
  position: absolute;
  max-height: 420px;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 22px 48px rgba(0,0,0,0.28);

  opacity: 0;
  transition:
    transform 0.55s cubic-bezier(.22,.61,.36,1),
    opacity 0.45s ease;
}




/* FRONT image — first child */
/* LEFT image */
.mobile-stack img:nth-child(1) {
  z-index: 1;
  transform: translateX(-64px) scale(0.85);
}

/* CENTER (FRONT) image */
.mobile-stack img:nth-child(2) {
  z-index: 3;
  transform: scale(0.92);
}

/* RIGHT image */
.mobile-stack img:nth-child(3) {
  z-index: 2;
  transform: translateX(64px) scale(0.85);
}


/* Active state */
.mobile-stack.preview-image.active img:nth-child(1) {
  transform: translateX(-15vw) scale(0.9);
  opacity: 1;
}

.mobile-stack.preview-image.active img:nth-child(2) {
  transform: translateX(0) scale(1);
  opacity: 1;
}

.mobile-stack.preview-image.active img:nth-child(3) {
  transform: translateX(15vw) scale(0.9);
  opacity: 1;
}



@media (max-width: 768px) {
  .preview-stage {
    padding: 2px;
    min-height: auto;
  }

  .preview-stage > img.preview-image {
    position: relative;     /* ❌ NOT absolute */
    inset: unset;

    width: 100%;
    height: auto;
    max-height: 300px;      /* or whatever feels right */

    object-fit: contain;    /* ✅ KEY FIX */
    border-radius: 16px;
  }
}



@media (max-width: 768px) {
  .mobile-stack img {
    max-height: 300px;
  }

  .mobile-stack.preview-image.active img:nth-child(1) {
    transform: translateX(-22vw) scale(0.88);
    opacity: 1;
  }

  .mobile-stack.preview-image.active img:nth-child(2) {
    transform: translateX(0) scale(1);
    opacity: 1;
  }

  .mobile-stack.preview-image.active img:nth-child(3) {
    transform: translateX(22vw) scale(0.88);
    opacity: 1;
  }
}

@media (max-width: 768px) {
  .preview-toggle {
    margin-bottom: 80px;
  }
}
