/* ================================
   1. CSS Variables / Design Tokens
   ================================ */
:root {
  /* Colors - update with brand colors */
  --color-primary: #000000;
  --color-secondary: #ffffff;
  --color-accent: #3b82f6;

  /* Section header bar — change this one value to retheme all headers
     Options: #FEF08A (yellow), #000 (black), #F5F5F0 (warm white), #E8E6E3 (warm grey), #1a1a1a (near-black) */
  --header-bar-bg: #FEF08A;
  --header-bar-text: #000000;

  /* Typography */
  --font-sans: 'Post', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  /* Spacing */
  --section-padding-y: 5rem;
  --section-padding-y-mobile: 3rem;

  /* Transitions */
  --transition-fast: 150ms ease-out;
  --transition-base: 300ms ease-out;
  --transition-slow: 500ms ease-out;

  /* Z-index scale */
  --z-header: 100;
  --z-loader: 200;
  --z-modal: 300;
  --z-tooltip: 400;
}

@font-face {
  font-family: 'Post';
  src: url('../post/Post.woff2') format('woff2'),
       url('../post/Post.otf') format('opentype');
  font-display: swap;
}

/* ================================
   2. Base / Reset additions
   ================================ */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  line-height: 1.5;
}

img,
video {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ================================
   3. Consumer Sections
   ================================ */

/* -- Consumer: Hero -- */

/* Loading spinner - one full meditative clockwise rotation */
@keyframes spin-slow {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.animate-spin-slow {
  animation: spin-slow 2s linear infinite;
  will-change: transform;
}

/* Frosted glass styling - true translucency with visible tint */
/* Glass pill as container */
.glass-pill {
  background: linear-gradient(
    135deg,
    rgba(180, 180, 185, 0.45) 0%,
    rgba(160, 160, 165, 0.4) 50%,
    rgba(140, 140, 145, 0.45) 100%
  );
  backdrop-filter: blur(24px) saturate(1.6);
  -webkit-backdrop-filter: blur(24px) saturate(1.6);
  border-radius: 9999px;
  padding: 16px 32px;
  box-shadow:
    0 4px 24px rgba(0, 0, 0, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.6),
    inset 0 -1px 0 rgba(0, 0, 0, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.5);
}

/* Glass pill as background element behind logo */
.glass-pill-bg {
  position: absolute;
  inset: -16px -32px;
  background: linear-gradient(
    135deg,
    rgba(180, 180, 185, 0.45) 0%,
    rgba(160, 160, 165, 0.4) 50%,
    rgba(140, 140, 145, 0.45) 100%
  );
  backdrop-filter: blur(24px) saturate(1.6);
  -webkit-backdrop-filter: blur(24px) saturate(1.6);
  border-radius: 9999px;
  box-shadow:
    0 4px 24px rgba(0, 0, 0, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.6),
    inset 0 -1px 0 rgba(0, 0, 0, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.5);
  opacity: 0;
  z-index: 0;
}

@media (min-width: 768px) {
  .glass-pill {
    padding: 20px 48px;
  }

  .glass-pill-bg {
    inset: -20px -48px;
  }
}

@media (min-width: 1024px) {
  .glass-pill {
    padding: 24px 56px;
  }

  .glass-pill-bg {
    inset: -24px -56px;
  }
}

/* Collage item base styles */
.collage-item {
  position: absolute;
  opacity: 0;
  will-change: transform, opacity;
  transform-origin: center center;
  /* Prevent images from being draggable */
  user-select: none;
  -webkit-user-drag: none;
}

/* Ensure collage items have crisp edges */
.collage-item img {
  image-rendering: -webkit-optimize-contrast;
}

/* Hero section when pinned */
#hero.is-pinned {
  /* ScrollTrigger handles this, but we can add extra styles if needed */
}

/* -- Consumer: How it Works -- */


/* -- Consumer: Features -- */


/* ================================
   Bento Grid - "How It Works" (Merchant)
   ================================ */

/* Full-width container with borders */
.how-it-works-container {
  position: relative;
  width: 100%;
  overflow: visible;
}

/* Section header bar (themed via --header-bar-bg) */
.how-it-works-header {
  background: var(--header-bar-bg);
  border-top: 2px solid #000;
  border-bottom: 2px solid #000;
  padding: 1.25rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
}

.how-it-works-header h2 {
  font-family: 'Clash Display', sans-serif;
  font-size: 60px;
  font-weight: 600;
  letter-spacing: -2.5px;
  word-spacing: 0.15em;
  margin: 0;
  line-height: 1;
  color: var(--header-bar-text);
}

/* Mobile responsive — How It Works header */
@media (max-width: 768px) {
  .how-it-works-header h2 {
    font-size: 32px;
    letter-spacing: -1.5px;
  }
}


/* ================================
   Grid Sections - Reusable Components
   ================================ */

/* Grid section base styles */
.grid-section {
  position: relative;
  width: 100%;
}

/* Section header bar - reusable across sections (themed via --header-bar-bg) */
.section-header-bar {
  background: var(--header-bar-bg);
  border-top: 2px solid #000;
  border-bottom: 2px solid #000;
  padding: 1.25rem 2rem;
  display: flex;
  align-items: center;
  position: relative;
}

.section-header-bar h2 {
  font-family: 'Clash Display', sans-serif;
  font-size: 60px;
  font-weight: 600;
  letter-spacing: -2.5px;
  word-spacing: 0.15em;
  margin: 0;
  line-height: 1;
  text-transform: uppercase;
  color: var(--header-bar-text);
}

/* Section content area */
.section-content-area {
  position: relative;
  background: #fff;
}

/* Mobile responsive */
@media (max-width: 768px) {
  .section-header-bar {
    padding: 0.75rem 1rem;
  }

  .section-header-bar h2 {
    font-size: 32px;
    letter-spacing: -1px;
  }
}


/* -- Consumer: Demo -- */


/* ================================
   4. Merchant Sections (Fashion-Forward B2B)
   ================================ */

/* -- Merchant: Monochrome Palette -- */
:root {
  --merchant-primary: #0a0a0a;
  --merchant-secondary: #525252;
  --merchant-tertiary: #a3a3a3;
  --merchant-surface: #fafafa;
  --merchant-border: rgba(0, 0, 0, 0.08);
}

/* -- Merchant: Step Pills (Hero) -- */
.step-pill {
  padding: 6px 14px;
  border: 1px solid rgba(0, 0, 0, 0.15);
  border-radius: 9999px;
  font-size: 13px;
  font-weight: 500;
  background: transparent;
  cursor: pointer;
  transition: all 0.2s ease-out;
  color: #6b7280;
}

.step-pill:hover {
  border-color: rgba(0, 0, 0, 0.3);
  color: #000;
}

.step-pill.active {
  background: #000;
  border-color: #000;
  color: #fff;
}

/* -- Merchant: Hero Mockups -- */
.hero-mockup {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.4s ease-out, transform 0.4s ease-out;
  pointer-events: none;
}

.hero-mockup.active {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

/* -- Merchant: Step Info Content -- */
.step-info-content {
  transition: opacity 0.3s ease-out;
}

.step-info-content.hidden {
  display: none;
}

/* -- Merchant: Circled Step Numbers -- */
.step-number {
  width: 56px;
  height: 56px;
  border: 2px solid #000;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  font-weight: 600;
}

/* -- Merchant: Demo Tabs -- */
.demo-tab {
  padding: 6px 14px;
  border: 1px solid rgba(0, 0, 0, 0.15);
  border-radius: 9999px;
  font-size: 13px;
  font-weight: 500;
  background: transparent;
  cursor: pointer;
  transition: all 0.2s ease-out;
  color: #6b7280;
}

.demo-tab:hover {
  border-color: rgba(0, 0, 0, 0.3);
  color: #000;
}

.demo-tab.active {
  background: #000;
  border-color: #000;
  color: #fff;
}

/* -- Merchant: Demo Panels -- */
.demo-panel {
  display: none;
}

.demo-panel.active {
  display: block;
}

/* -- Merchant: Demo Iframes -- */
/* Hidden by default — only .active shows. Never use Tailwind's .hidden class
   on these elements (it has !important that can't be overridden). */
.demo-iframe {
  position: absolute;
  top: 0;
  left: 0;
  display: none;
}

.demo-iframe.active {
  display: block !important;
}


/* -- Merchant: Marketing Mockups (Email/Ad Toggle) -- */
.marketing-mockup {
  transition: opacity 0.3s ease-out, transform 0.3s ease-out;
}

.marketing-mockup.hidden {
  display: none;
}

.marketing-mockup.active {
  display: block;
}

/* -- Merchant: Marketing Tabs -- */
.marketing-tab {
  transition: all 0.2s ease-out;
}

/* -- Merchant: Hero Visual Cards (initial state for GSAP animation) -- */
.hero-input-card,
.hero-output-card,
.hero-email-card {
  opacity: 0;
}



/* -- Merchant: Team Row with Dotted Line -- */
.team-row {
  display: flex;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.team-row:last-child {
  border-bottom: none;
}

.team-row .dotted-line {
  flex: 1;
  border-bottom: 1px dotted rgba(0, 0, 0, 0.15);
  margin: 0 20px;
}

/* -- Merchant: Scroll Animations -- */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.animate-on-scroll.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* -- Merchant: Range Slider Styling -- */
input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 4px;
  background: #e5e7eb;
  border-radius: 9999px;
  outline: none;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  background: #000;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  transition: transform 0.15s ease-out;
}

input[type="range"]::-webkit-slider-thumb:hover {
  transform: scale(1.1);
}

input[type="range"]::-moz-range-thumb {
  width: 20px;
  height: 20px;
  background: #000;
  border: none;
  border-radius: 50%;
  cursor: pointer;
}

/* -- Merchant: FAQ Accordion -- */
.faq-item {
  transition: background-color 0.2s ease-out;
}

.faq-trigger {
  cursor: pointer;
}

.faq-icon {
  transition: transform 0.3s ease-out;
}

.faq-item.is-open .faq-icon {
  transform: rotate(180deg);
}

.faq-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease-out, padding 0.3s ease-out;
}

.faq-item.is-open .faq-content {
  max-height: 500px;
}


/* ================================
   5. Shared Components (header only)
   ================================ */

/* Header base styles handled by Tailwind in HTML */

/* Download button hover state */
.download-btn {
  transition: background-color 200ms ease-out, transform 100ms ease-out;
}

.download-btn:active {
  transform: scale(0.98);
}

/* ================================
   6. Animations
   ================================ */

/* Fade in up - common reveal animation */
.animate-fade-in-up {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity var(--transition-base), transform var(--transition-base);
}

.animate-fade-in-up.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger children - add delay via inline style or nth-child */
.stagger-children > * {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity var(--transition-base), transform var(--transition-base);
}

.stagger-children.is-visible > * {
  opacity: 1;
  transform: translateY(0);
}

/* Scale in */
.animate-scale-in {
  opacity: 0;
  transform: scale(0.95);
  transition: opacity var(--transition-base), transform var(--transition-base);
}

.animate-scale-in.is-visible {
  opacity: 1;
  transform: scale(1);
}

/* Collage item fade + scale animation */
.collage-item-animate {
  opacity: 0;
  transform: scale(0.9);
  transition: opacity 400ms ease-out, transform 400ms ease-out;
}

.collage-item-animate.is-visible {
  opacity: 1;
  transform: scale(1);
}

/* ================================
   7. Responsive Overrides
   ================================ */
@media (max-width: 767px) {
  :root {
    --section-padding-y: var(--section-padding-y-mobile);
  }

  /* Reduce glass pill size on mobile */
  .glass-pill {
    padding: 8px 16px;
  }
}

/* ================================
   8. Utility Classes
   ================================ */

/* Hide scrollbar during pinned animation */
.no-scroll {
  overflow: hidden;
}

/* GPU acceleration hint for animated elements */
.gpu-accelerated {
  transform: translateZ(0);
  backface-visibility: hidden;
}
