/* ============================================
   PlayWithBits — Landing Page
   Warm editorial aesthetic, South African studio
   ============================================ */

/* --- Design Tokens --- */
:root {
  --pwb-charcoal:     #1C1917;
  --pwb-offwhite:     #FAF9F6;
  --pwb-warm-gray:    #57534E;
  --pwb-stone:        #A8A29E;
  --pwb-cream:        #F5F0EB;

  --lt-coral:         #E8998D;
  --lt-coral-deep:    #D4776A;
  --lt-cream:         #F8F3CE;

  --cv-orange:        #FF6B35;
  --cv-orange-light:  #FF8C42;

  --font-body: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --nav-height: 64px;
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* --- Reset & Base --- */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-height);
}

body {
  font-family: var(--font-body);
  background: var(--pwb-offwhite);
  color: var(--pwb-warm-gray);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }

/* --- Typography Scale --- */
.overline {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--pwb-stone);
}

.section-heading {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 800;
  color: var(--pwb-charcoal);
  line-height: 1.15;
  letter-spacing: -0.03em;
}

.section-tagline {
  font-size: 1.1rem;
  color: var(--pwb-warm-gray);
  max-width: 480px;
  line-height: 1.7;
}

/* --- Scroll Reveal --- */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s var(--ease-out-expo),
              transform 0.8s var(--ease-out-expo);
}

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

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* ============================================
   1. STICKY NAV
   ============================================ */
.pwb-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--nav-height);
  background: var(--pwb-charcoal);
  display: flex;
  align-items: center;
  transition: box-shadow 0.4s ease;
}

.pwb-nav.scrolled {
  box-shadow: 0 4px 30px rgba(28, 25, 23, 0.25);
}

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

.pwb-wordmark {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--pwb-offwhite);
  letter-spacing: -0.02em;
}

.pwb-wordmark span {
  color: var(--pwb-stone);
  font-weight: 400;
}

.nav-links {
  display: flex;
  gap: 32px;
  list-style: none;
}

.nav-links a {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--pwb-stone);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: color 0.3s ease;
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--pwb-offwhite);
  transition: width 0.3s var(--ease-out-expo);
}

.nav-links a:hover {
  color: var(--pwb-offwhite);
}

.nav-links a:hover::after {
  width: 100%;
}

/* Mobile nav toggle */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav-toggle span {
  width: 22px;
  height: 2px;
  background: var(--pwb-offwhite);
  border-radius: 2px;
  transition: all 0.3s ease;
}

/* ============================================
   2. HERO
   ============================================ */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: calc(var(--nav-height) + 60px) 24px 80px;
  background: var(--pwb-offwhite);
  position: relative;
  overflow: hidden;
}

/* Subtle warm grain texture */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 20% 50%, rgba(232, 153, 141, 0.06) 0%, transparent 60%),
              radial-gradient(ellipse at 80% 50%, rgba(255, 107, 53, 0.05) 0%, transparent 60%);
  pointer-events: none;
}

.hero-content {
  max-width: 720px;
  position: relative;
  z-index: 1;
}

.hero .overline {
  margin-bottom: 20px;
  display: inline-block;
}

.hero-heading {
  font-size: clamp(2.4rem, 6vw, 4rem);
  font-weight: 800;
  color: var(--pwb-charcoal);
  line-height: 1.08;
  letter-spacing: -0.04em;
  margin-bottom: 24px;
}

.hero-sub {
  font-size: 1.15rem;
  color: var(--pwb-warm-gray);
  margin-bottom: 48px;
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.7;
}

.hero-ctas {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

/* --- Buttons --- */
.btn-coral {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  background: var(--lt-coral);
  color: #fff;
  font-weight: 700;
  font-size: 0.95rem;
  border-radius: 50px;
  border: none;
  cursor: pointer;
  transition: transform 0.3s var(--ease-spring),
              box-shadow 0.3s ease,
              background 0.3s ease;
}

.btn-coral:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 32px rgba(232, 153, 141, 0.35);
  background: var(--lt-coral-deep);
  color: #fff;
}

.btn-orange {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  background: var(--cv-orange);
  color: #fff;
  font-weight: 700;
  font-size: 0.95rem;
  border-radius: 50px;
  border: none;
  cursor: pointer;
  transition: transform 0.3s var(--ease-spring),
              box-shadow 0.3s ease,
              background 0.3s ease;
}

.btn-orange:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 32px rgba(255, 107, 53, 0.35);
  background: #e55a2b;
  color: #fff;
}

.btn-outline-charcoal {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 30px;
  background: transparent;
  color: var(--pwb-charcoal);
  font-weight: 700;
  font-size: 0.95rem;
  border-radius: 50px;
  border: 2px solid var(--pwb-charcoal);
  cursor: pointer;
  transition: transform 0.3s var(--ease-spring),
              box-shadow 0.3s ease,
              background 0.3s ease,
              color 0.3s ease;
}

.btn-outline-charcoal:hover {
  transform: translateY(-3px);
  background: var(--pwb-charcoal);
  color: var(--pwb-offwhite);
  box-shadow: 0 8px 24px rgba(28, 25, 23, 0.2);
}

/* ============================================
   3. LEAVE TRACKER SHOWCASE
   ============================================ */
.section-leave {
  background: var(--pwb-cream);
  padding: 100px 24px;
  overflow: hidden;
}

.product-grid {
  max-width: 1120px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}

.product-info .overline {
  margin-bottom: 12px;
  display: inline-block;
  color: var(--lt-coral);
}

.product-name {
  font-size: clamp(1.6rem, 3.5vw, 2.4rem);
  font-weight: 800;
  color: var(--pwb-charcoal);
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin-bottom: 16px;
}

.product-tagline {
  font-size: 1.05rem;
  color: var(--pwb-warm-gray);
  margin-bottom: 32px;
  line-height: 1.7;
}

.feature-list {
  list-style: none;
  margin-bottom: 36px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.feature-list li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 0.95rem;
  color: var(--pwb-warm-gray);
  line-height: 1.5;
}

.feature-list .feature-icon {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
}

.feature-list .feature-icon.coral-icon {
  background: rgba(232, 153, 141, 0.15);
  color: var(--lt-coral-deep);
}

.feature-list .feature-icon.orange-icon {
  background: rgba(255, 107, 53, 0.12);
  color: var(--cv-orange);
}

.feature-list strong {
  color: var(--pwb-charcoal);
}

/* --- Leave Tracker Mockup --- */
.lt-mockup {
  perspective: 1000px;
}

.lt-dashboard {
  background: var(--pwb-offwhite);
  border-radius: 16px;
  padding: 28px;
  box-shadow: 0 20px 60px rgba(28, 25, 23, 0.08),
              0 1px 3px rgba(28, 25, 23, 0.06);
  transform: rotateY(-3deg) rotateX(2deg);
  transition: transform 0.6s var(--ease-out-expo),
              box-shadow 0.6s var(--ease-out-expo);
  border: 1px solid rgba(168, 162, 158, 0.15);
}

.lt-dashboard:hover {
  transform: rotateY(0deg) rotateX(0deg);
  box-shadow: 0 30px 80px rgba(28, 25, 23, 0.12),
              0 1px 3px rgba(28, 25, 23, 0.06);
}

.lt-dash-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(168, 162, 158, 0.2);
}

.lt-dash-title {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--pwb-charcoal);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.lt-dash-dots {
  display: flex;
  gap: 6px;
}

.lt-dash-dots span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--pwb-stone);
  opacity: 0.4;
}

.lt-dash-dots span:first-child {
  background: var(--lt-coral);
  opacity: 1;
}

/* Stat cards row */
.lt-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}

.lt-stat-card {
  background: #fff;
  border-radius: 10px;
  padding: 14px 12px;
  text-align: center;
  border: 1px solid rgba(168, 162, 158, 0.12);
}

.lt-stat-value {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--pwb-charcoal);
  line-height: 1.2;
}

.lt-stat-value.coral { color: var(--lt-coral); }

.lt-stat-label {
  font-size: 0.65rem;
  color: var(--pwb-stone);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
  margin-top: 2px;
}

/* Leave items */
.lt-leave-items {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.lt-leave-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: #fff;
  border-radius: 8px;
  border-left: 3px solid var(--lt-coral);
  font-size: 0.8rem;
}

.lt-leave-item.approved {
  border-left-color: #6b9b6f;
}

.lt-leave-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--lt-coral);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  font-weight: 700;
  flex-shrink: 0;
}

.lt-leave-item.approved .lt-leave-avatar {
  background: #6b9b6f;
}

.lt-leave-info {
  flex: 1;
  min-width: 0;
}

.lt-leave-name {
  font-weight: 700;
  color: var(--pwb-charcoal);
  font-size: 0.78rem;
}

.lt-leave-dates {
  color: var(--pwb-stone);
  font-size: 0.68rem;
}

.lt-leave-badge {
  font-size: 0.6rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  flex-shrink: 0;
}

.lt-leave-badge.pending {
  background: rgba(232, 153, 141, 0.15);
  color: var(--lt-coral-deep);
}

.lt-leave-badge.approved {
  background: rgba(107, 155, 111, 0.15);
  color: #4a7a4e;
}

/* ============================================
   4. CV60 SHOWCASE
   ============================================ */
.section-cv60 {
  background: var(--pwb-offwhite);
  padding: 100px 24px;
  overflow: hidden;
}

.product-grid.reversed {
  direction: rtl;
}

.product-grid.reversed > * {
  direction: ltr;
}

.section-cv60 .overline {
  color: var(--cv-orange);
}

/* CV60 Logo in product info */
.cv60-logo {
  font-size: 2.2rem;
  font-weight: 900;
  color: var(--pwb-charcoal);
  letter-spacing: -2px;
  margin-bottom: 4px;
}

.cv60-logo span {
  color: var(--cv-orange);
  font-size: 2.5rem;
}

/* --- CV60 Template Fan --- */
.cv-fan-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 380px;
  perspective: 800px;
}

.cv-fan {
  position: relative;
  width: 220px;
  height: 310px;
}

.cv-card {
  position: absolute;
  width: 220px;
  height: 310px;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 8px 30px rgba(28, 25, 23, 0.1),
              0 1px 3px rgba(28, 25, 23, 0.06);
  transition: transform 0.5s var(--ease-out-expo),
              box-shadow 0.5s var(--ease-out-expo);
  overflow: hidden;
  border: 1px solid rgba(168, 162, 158, 0.15);
}

.cv-card:nth-child(1) {
  z-index: 3;
  transform: rotate(-4deg) translateX(-20px);
}

.cv-card:nth-child(2) {
  z-index: 2;
  transform: rotate(0deg) translateY(-8px);
}

.cv-card:nth-child(3) {
  z-index: 1;
  transform: rotate(4deg) translateX(20px);
}

.cv-fan:hover .cv-card:nth-child(1) {
  transform: rotate(-10deg) translateX(-60px) translateY(-10px);
  box-shadow: 0 16px 50px rgba(28, 25, 23, 0.14);
}

.cv-fan:hover .cv-card:nth-child(2) {
  transform: rotate(0deg) translateY(-20px);
  box-shadow: 0 20px 60px rgba(28, 25, 23, 0.16);
}

.cv-fan:hover .cv-card:nth-child(3) {
  transform: rotate(10deg) translateX(60px) translateY(-10px);
  box-shadow: 0 16px 50px rgba(28, 25, 23, 0.14);
}

/* CSS-rendered CV templates */
.cv-card-inner {
  padding: 20px 16px;
  height: 100%;
  display: flex;
  flex-direction: column;
}

/* Template 1: Modern - orange header */
.cv-card.tpl-modern .cv-tpl-header {
  background: linear-gradient(135deg, var(--cv-orange), var(--cv-orange-light));
  margin: -20px -16px 14px;
  padding: 18px 16px;
  color: #fff;
}

.cv-card.tpl-modern .cv-tpl-name {
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.cv-card.tpl-modern .cv-tpl-role {
  font-size: 0.55rem;
  opacity: 0.85;
  margin-top: 2px;
}

/* Template 2: Classic - clean lines */
.cv-card.tpl-classic .cv-tpl-header {
  border-bottom: 2px solid var(--pwb-charcoal);
  padding-bottom: 10px;
  margin-bottom: 14px;
}

.cv-card.tpl-classic .cv-tpl-name {
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--pwb-charcoal);
  letter-spacing: -0.02em;
}

.cv-card.tpl-classic .cv-tpl-role {
  font-size: 0.55rem;
  color: var(--pwb-stone);
  margin-top: 2px;
}

/* Template 3: Creative - side accent */
.cv-card.tpl-creative {
  border-left: 4px solid var(--cv-orange);
}

.cv-card.tpl-creative .cv-tpl-header {
  margin-bottom: 14px;
}

.cv-card.tpl-creative .cv-tpl-name {
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--cv-orange);
  letter-spacing: -0.02em;
}

.cv-card.tpl-creative .cv-tpl-role {
  font-size: 0.55rem;
  color: var(--pwb-warm-gray);
  margin-top: 2px;
}

/* Shared CV placeholder content lines */
.cv-tpl-lines {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.cv-tpl-line {
  height: 4px;
  border-radius: 2px;
  background: rgba(168, 162, 158, 0.18);
}

.cv-tpl-line.w-full { width: 100%; }
.cv-tpl-line.w-80  { width: 80%; }
.cv-tpl-line.w-65  { width: 65%; }
.cv-tpl-line.w-90  { width: 90%; }
.cv-tpl-line.w-50  { width: 50%; }
.cv-tpl-line.w-70  { width: 70%; }

.cv-tpl-section-title {
  font-size: 0.5rem;
  font-weight: 800;
  color: var(--pwb-charcoal);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-top: 10px;
  margin-bottom: 4px;
}

.cv-card.tpl-creative .cv-tpl-section-title {
  color: var(--cv-orange);
}

/* ============================================
   5. TRUST STRIP
   ============================================ */
.section-trust {
  background: var(--pwb-charcoal);
  padding: 80px 24px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.section-trust::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 0%, rgba(168, 162, 158, 0.08) 0%, transparent 70%);
  pointer-events: none;
}

.trust-content {
  max-width: 600px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.trust-flag {
  font-size: 2.4rem;
  margin-bottom: 20px;
  display: block;
}

.trust-heading {
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 800;
  color: var(--pwb-offwhite);
  letter-spacing: -0.03em;
  margin-bottom: 16px;
  line-height: 1.2;
}

.trust-text {
  font-size: 1rem;
  color: var(--pwb-stone);
  line-height: 1.8;
}

/* ============================================
   6. FOOTER
   ============================================ */
.pwb-footer {
  background: var(--pwb-charcoal);
  border-top: 1px solid rgba(168, 162, 158, 0.12);
  padding: 48px 24px 32px;
}

.footer-inner {
  max-width: 1120px;
  margin: 0 auto;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 32px;
}

.footer-brand .pwb-wordmark {
  font-size: 1.1rem;
  margin-bottom: 8px;
  display: block;
}

.footer-brand p {
  font-size: 0.8rem;
  color: var(--pwb-stone);
  max-width: 280px;
  line-height: 1.6;
}

.footer-links {
  display: flex;
  gap: 48px;
}

.footer-col h4 {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--pwb-stone);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 14px;
}

.footer-col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-col a {
  font-size: 0.85rem;
  color: rgba(250, 249, 246, 0.6);
  transition: color 0.3s ease;
}

.footer-col a:hover {
  color: var(--pwb-offwhite);
}

.footer-bottom {
  max-width: 1120px;
  margin: 32px auto 0;
  padding-top: 24px;
  border-top: 1px solid rgba(168, 162, 158, 0.1);
  text-align: center;
  font-size: 0.75rem;
  color: rgba(168, 162, 158, 0.5);
}

/* ============================================
   RESPONSIVE — Mobile First
   ============================================ */

/* Small screens (< 768px) */
@media (max-width: 767px) {
  .nav-links {
    display: none;
    position: absolute;
    top: var(--nav-height);
    left: 0;
    right: 0;
    background: var(--pwb-charcoal);
    flex-direction: column;
    padding: 16px 24px 24px;
    gap: 16px;
    border-top: 1px solid rgba(168, 162, 158, 0.1);
    box-shadow: 0 8px 30px rgba(28, 25, 23, 0.3);
  }

  .nav-links.open {
    display: flex;
  }

  .nav-toggle {
    display: flex;
  }

  .hero {
    min-height: auto;
    padding: calc(var(--nav-height) + 48px) 20px 64px;
  }

  .hero-heading {
    font-size: clamp(2rem, 8vw, 2.8rem);
  }

  .hero-ctas {
    flex-direction: column;
    align-items: center;
    gap: 12px;
  }

  .hero-ctas a {
    width: 100%;
    max-width: 280px;
    justify-content: center;
  }

  .product-grid,
  .product-grid.reversed {
    grid-template-columns: 1fr;
    gap: 48px;
    direction: ltr;
  }

  .section-leave,
  .section-cv60 {
    padding: 64px 20px;
  }

  .cv-fan-wrapper {
    min-height: 320px;
  }

  .cv-fan {
    width: 180px;
    height: 255px;
  }

  .cv-card {
    width: 180px;
    height: 255px;
  }

  .lt-stats {
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
  }

  .lt-stat-value {
    font-size: 1.2rem;
  }

  .lt-dashboard {
    padding: 20px;
    transform: none;
  }

  .footer-inner {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .footer-brand p {
    max-width: none;
  }

  .footer-links {
    gap: 32px;
  }

  .section-trust {
    padding: 60px 20px;
  }
}

/* Medium screens (768px – 1023px) */
@media (min-width: 768px) and (max-width: 1023px) {
  .product-grid {
    gap: 40px;
  }

  .cv-fan {
    width: 190px;
    height: 270px;
  }

  .cv-card {
    width: 190px;
    height: 270px;
  }
}

/* Large screens (>= 1024px) */
@media (min-width: 1024px) {
  .hero {
    min-height: 100vh;
  }

  .product-grid {
    gap: 80px;
  }
}

/* ============================================
   MISC / UTILITIES
   ============================================ */

/* Smooth gradient dividers between sections */
.section-leave::before {
  content: '';
  display: block;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--pwb-stone), transparent);
  opacity: 0.2;
  margin-bottom: 100px;
  display: none;
}

/* Accessibility: reduced motion */
@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .lt-dashboard,
  .cv-card,
  .btn-coral,
  .btn-orange,
  .btn-outline-charcoal {
    transition: none;
  }

  html {
    scroll-behavior: auto;
  }
}
