/* ==========================================================================
   Design System v2 - Dark Premium Theme
   Shared foundation for homepage and Penny page redesign.
   Self-contained; no external CSS dependencies.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. CSS Custom Properties
   -------------------------------------------------------------------------- */

:root {
  --v2-bg-primary: #0a1628;
  --v2-bg-secondary: #080d16;
  --v2-bg-tertiary: #0d1520;

  --v2-text-primary: #ffffff;
  --v2-text-secondary: #e2e8f0;
  --v2-text-tertiary: #94a3b8;
  --v2-text-muted: #8293a6;
  --v2-text-faint: #7a8ea0;

  --v2-accent-gold: #FFA000;
  --v2-accent-gold-hover: #ffad24;
  --v2-accent-blue: #1547BC;

  --v2-border-subtle: rgba(255, 255, 255, 0.06);
  --v2-border-gold: rgba(255, 160, 0, 0.2);
  --v2-border-blue: rgba(21, 71, 188, 0.15);

  --v2-container-max: 1240px;
  --v2-section-padding-y: 5rem;
  --v2-section-padding-x: 2rem;

  --v2-font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --v2-headline-weight: 700;
  --v2-headline-tracking: -0.025em;
  --v2-headline-leading: 1.12;
  --v2-body-leading: 1.65;

  --v2-shadow-screenshot: 0 25px 60px rgba(0, 0, 0, 0.4), 0 0 40px rgba(21, 71, 188, 0.08);

  --v2-transition-fast: 200ms ease-out;
  --v2-transition-medium: 500ms ease-out;
}

/* Prevent horizontal scroll from fixed-position header/banner overflow */
html, body {
    overflow-x: hidden;
}

/* --------------------------------------------------------------------------
   2. Animated Grid Background
   -------------------------------------------------------------------------- */

.v2-grid-bg {
  position: relative;
  overflow: hidden;
}

.v2-grid-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    linear-gradient(to right, rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  animation: v2-grid-drift 120s linear infinite;
}

.v2-grid-bg > * {
  position: relative;
  z-index: 1;
}

/* --------------------------------------------------------------------------
   3. Shared Components
   -------------------------------------------------------------------------- */

/* Container */
.v2-container {
  max-width: var(--v2-container-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--v2-section-padding-x);
  padding-right: var(--v2-section-padding-x);
}

/* Section */
.v2-section {
  padding-top: var(--v2-section-padding-y);
  padding-bottom: var(--v2-section-padding-y);
  font-family: var(--v2-font-family);
}

/* Eyebrow */
.v2-eyebrow {
  font-size: 0.7rem;
  color: var(--v2-accent-gold);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  font-weight: 600;
  margin-bottom: 0.75rem;
}

/* Headlines */
.v2-headline {
  font-weight: var(--v2-headline-weight);
  color: var(--v2-text-primary);
  letter-spacing: var(--v2-headline-tracking);
  line-height: var(--v2-headline-leading);
  margin: 0 0 1rem;
}

.v2-headline--xl {
  font-size: 2rem;
}

.v2-headline--lg {
  font-size: 1.5rem;
}

.v2-headline--md {
  font-size: 1.3rem;
}

/* Body */
.v2-body {
  font-size: 0.9rem;
  color: var(--v2-text-tertiary);
  line-height: var(--v2-body-leading);
  max-width: 540px;
}

/* Proof */
.v2-proof {
  font-size: 0.75rem;
  color: var(--v2-text-faint);
}

/* Callout Gold */
.v2-callout-gold {
  border-left: 3px solid var(--v2-accent-gold);
  background: rgba(255, 160, 0, 0.04);
  border-radius: 0 8px 8px 0;
  padding: 1rem 1.25rem;
  color: var(--v2-accent-gold);
}

.v2-callout-gold p {
  color: var(--v2-accent-gold);
}

/* Quote */
.v2-quote {
  padding: 1rem 1.25rem;
  background: rgba(30, 41, 59, 0.4);
  border-radius: 8px;
  border-left: 2px solid rgba(255, 160, 0, 0.4);
  margin-top: 1.5rem;
}

.v2-quote__text {
  font-size: 0.85rem;
  color: var(--v2-text-secondary);
  font-style: italic;
  line-height: 1.6;
  margin: 0;
}

.v2-quote cite,
.v2-quote .v2-quote__attribution {
  display: block;
  margin-top: 0.75rem;
  font-style: normal;
  font-size: 0.8rem;
  color: var(--v2-text-muted);
}

/* Screenshot */
.v2-screenshot {
  border-radius: 12px;
  box-shadow: var(--v2-shadow-screenshot);
  overflow: hidden;
}

.v2-screenshot img {
  display: block;
  width: 100%;
}

.v2-screenshot--placeholder {
  background: rgba(21, 71, 188, 0.08);
  border: 1px solid var(--v2-border-blue);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 240px;
  color: var(--v2-text-muted);
  font-size: 0.85rem;
}

/* Buttons */
.v2-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.7rem 1.5rem;
  border-radius: 6px;
  font-family: var(--v2-font-family);
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background var(--v2-transition-fast),
              border-color var(--v2-transition-fast),
              box-shadow var(--v2-transition-fast),
              transform var(--v2-transition-fast);
}

.v2-btn:focus-visible {
  outline: 2px solid var(--v2-accent-gold);
  outline-offset: 2px;
}

.v2-btn--primary {
  background: var(--v2-accent-gold);
  color: #0a1628;
  border-color: var(--v2-accent-gold);
  box-shadow: 0 2px 8px rgba(255, 160, 0, 0.2);
}

.v2-btn--primary:hover {
  background: #ffb833;
  border-color: #ffb833;
  color: #041835;
  box-shadow: 0 6px 24px rgba(255, 160, 0, 0.45), 0 0 12px rgba(255, 160, 0, 0.2);
  transform: translateY(-2px);
}

.v2-btn--primary:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(255, 160, 0, 0.3);
}

.v2-btn--secondary {
  background: transparent;
  color: var(--v2-text-secondary);
  border-color: #374151;
}

.v2-btn--secondary:hover {
  border-color: #4b5563;
  background: rgba(255, 255, 255, 0.04);
}

.v2-btn--gold-outline {
  background: transparent;
  color: var(--v2-accent-gold);
  border-color: var(--v2-accent-gold);
  box-shadow: 0 0 0 rgba(255, 160, 0, 0);
}

.v2-btn--gold-outline:hover {
  background: var(--v2-accent-gold);
  color: #041835;
  border-color: var(--v2-accent-gold);
  box-shadow: 0 6px 24px rgba(255, 160, 0, 0.4), 0 0 12px rgba(255, 160, 0, 0.15);
  transform: translateY(-2px);
}

.v2-btn--gold-outline:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(255, 160, 0, 0.25);
}

/* Button Row */
.v2-btn-row {
  display: flex;
  gap: 0.75rem;
  margin-top: 1.5rem;
  flex-wrap: wrap;
}

/* Checklist */
.v2-checklist {
  list-style: none;
  padding: 0;
  margin: 0;
}

.v2-checklist li {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
  color: var(--v2-text-secondary);
  font-size: 0.875rem;
  line-height: 1.5;
}

.v2-checklist li::before {
  content: '\2713';
  color: var(--v2-accent-gold);
  font-weight: 700;
  flex-shrink: 0;
}

/* Two-Column Layout */
.v2-two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  align-items: center;
}

/* --------------------------------------------------------------------------
   4. Scroll Reveal System
   -------------------------------------------------------------------------- */

.v2-reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 500ms ease-out, transform 500ms ease-out;
}

.v2-reveal.v2-revealed {
  opacity: 1;
  transform: translateY(0);
}

.v2-reveal--slow {
  transition-duration: 700ms;
}

/* Delay modifiers via data-delay attribute */
.v2-reveal[data-delay="100"] { transition-delay: 100ms; }
.v2-reveal[data-delay="200"] { transition-delay: 200ms; }
.v2-reveal[data-delay="300"] { transition-delay: 300ms; }
.v2-reveal[data-delay="400"] { transition-delay: 400ms; }
.v2-reveal[data-delay="500"] { transition-delay: 500ms; }
.v2-reveal[data-delay="600"] { transition-delay: 600ms; }
.v2-reveal[data-delay="700"] { transition-delay: 700ms; }
.v2-reveal[data-delay="800"] { transition-delay: 800ms; }
.v2-reveal[data-delay="900"] { transition-delay: 900ms; }

/* Directional reveals */
.v2-reveal-right {
  opacity: 0;
  transform: translateX(30px);
  transition: opacity 500ms ease-out, transform 500ms ease-out;
}

.v2-reveal-left {
  opacity: 0;
  transform: translateX(-30px);
  transition: opacity 500ms ease-out, transform 500ms ease-out;
}

.v2-reveal-right.v2-revealed {
  opacity: 1 !important;
  transform: translateX(0) !important;
}

.v2-reveal-left.v2-revealed {
  opacity: 1 !important;
  transform: translateX(0) !important;
}

/* --------------------------------------------------------------------------
   5. Animation Keyframes
   -------------------------------------------------------------------------- */

@keyframes v2-grid-drift {
  from { background-position: 0 0; }
  to   { background-position: 60px 60px; }
}

@keyframes v2-pulse {
  0%   { transform: scale(1); }
  50%  { transform: scale(1.05); }
  100% { transform: scale(1); }
}

.v2-badge-pulse.v2-badge-pulsed {
  animation: v2-pulse 600ms ease-out;
}

@keyframes v2-shimmer {
  from { background-position: -200% center; }
  to   { background-position: 200% center; }
}

.v2-shimmer {
  background-size: 200% auto;
  animation: v2-shimmer 8s linear infinite;
}

@keyframes v2-draw-down {
  from { height: 0; }
  to   { height: 100%; }
}

.v2-connector-draw {
  animation: v2-draw-down 600ms ease-out forwards;
}

@keyframes v2-gradient-shift {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.v2-gradient-animate {
  background-size: 200% 200%;
  animation: v2-gradient-shift 15s ease infinite;
}

/* --------------------------------------------------------------------------
   Mobile Sticky CTA (shared component, used on both pages)
   -------------------------------------------------------------------------- */

.v2-sticky-cta {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 50;
    padding: 1rem;
    background: rgba(10, 22, 40, 0.95);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-top: 1px solid var(--v2-border-subtle);
    transform: translateY(100%);
    opacity: 0;
    transition: transform 300ms ease, opacity 300ms ease;
}

.v2-sticky-cta--visible {
    transform: translateY(0);
    opacity: 1;
}

.v2-sticky-cta__btn {
    width: 100%;
}

@media (min-width: 769px) {
    .v2-sticky-cta {
        display: none;
    }
}

/* --------------------------------------------------------------------------
   6. Accessibility
   -------------------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  .v2-reveal,
  .v2-reveal-right,
  .v2-reveal-left {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .v2-grid-bg::before {
    animation: none;
  }

  .v2-shimmer {
    animation: none;
  }

  .v2-connector-draw {
    animation: none;
    height: 100%;
  }

  .v2-gradient-animate {
    animation: none;
  }

  .v2-badge-pulse.v2-badge-pulsed {
    animation: none;
  }
}

/* --------------------------------------------------------------------------
   7. Responsive Breakpoints
   -------------------------------------------------------------------------- */

@media (max-width: 768px) {
  :root {
    --v2-section-padding-y: 3rem;
    --v2-section-padding-x: 1.25rem;
  }

  .v2-headline--xl { font-size: 1.7rem; }
  .v2-headline--lg { font-size: 1.3rem; }
  .v2-headline--md { font-size: 1.1rem; }

  .v2-two-col {
    grid-template-columns: 1fr;
  }

  .v2-two-col--reverse-mobile {
    grid-template-columns: 1fr;
  }

  .v2-two-col--reverse-mobile > :first-child {
    order: 2;
  }

  .v2-two-col--reverse-mobile > :last-child {
    order: 1;
  }

  .v2-reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

@media (max-width: 480px) {
  :root {
    --v2-section-padding-y: 2rem;
    --v2-section-padding-x: 1rem;
  }

  .v2-headline--xl,
  .v2-headline--lg {
    font-size: 1.4rem;
  }

  .v2-btn-row {
    flex-direction: column;
  }

  .v2-btn {
    width: 100%;
  }
}
