/* ═══════════════════════════════════════════════════════════
   DIGITAL LYFESTYLE — SHARED DESIGN SYSTEM
   Source of truth for all templates. Class names here map 1:1
   to the classes to create in Webflow Designer.
   Fonts (load via Google Fonts / Webflow):
   Fraunces · Space Grotesk · JetBrains Mono · Caveat
   ═══════════════════════════════════════════════════════════ */

:root {
    --cream-50: #FFFEF9;
    --cream-100: #FDF9EF;
    --cream-200: #F7F0DC;
    --cream-300: #EFE4C4;
    --teal: #0D8C8C;
    --teal-deep: #0A6868;
    --teal-bright: #14B5B5;
    --teal-pale: #B8E6E6;
    --teal-mist: #E5F5F5;
    --cobalt: #2F4CDB;
    --cobalt-bright: #4A6BFF;
    --violet-glow: #8B7EE8;
    --sunshine: #F5C347;
    --sunshine-deep: #E8A820;
    --coral: #FF7A59;
    --coral-deep: #E85D3E;
    --midnight-900: #0B0D1C;
    --midnight-800: #121530;
    --ink-900: #1A1A2E;
    --ink-500: #6B6B7D;
    --ink-300: #A8A8B5;
  }

  html, body {
    background: var(--cream-100);
    color: var(--ink-900);
  }
  body {
    font-family: 'Space Grotesk', ui-sans-serif, system-ui;
    -webkit-font-smoothing: antialiased;
  }

  /* Editorial display */
  .display {
    font-family: 'Fraunces', Georgia, serif;
    font-variation-settings: "opsz" 144, "SOFT" 50;
    letter-spacing: -0.025em;
    font-weight: 600;
  }
  .display-italic {
    font-family: 'Fraunces', Georgia, serif;
    font-style: italic;
    font-variation-settings: "opsz" 144, "SOFT" 100;
    font-weight: 500;
  }
  .hand { font-family: 'Caveat', cursive; font-weight: 500; }

  /* Grain overlay — subtle warm paper texture */
  .grain::before {
    content: "";
    position: fixed; inset: 0; pointer-events: none; z-index: 100;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='240' height='240'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.5 0 0 0 0 0.4 0 0 0 0 0.2 0 0 0 0.12 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
    opacity: 0.6; mix-blend-mode: multiply;
  }

  /* Hero — beach photo background with readability scrim */
  .hero-beach {
    position: relative;
    background-image: url('hero-beach.webp');
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
  }
  .hero-beach::before {
    /* Cream-to-transparent wash across the whole hero, stronger on the left where text sits */
    content: "";
    position: absolute;
    inset: 0;
    background:
      linear-gradient(90deg,
        rgba(253, 249, 239, 0.94) 0%,
        rgba(253, 249, 239, 0.85) 30%,
        rgba(253, 249, 239, 0.55) 55%,
        rgba(253, 249, 239, 0.25) 80%,
        rgba(253, 249, 239, 0.15) 100%),
      linear-gradient(180deg,
        rgba(253, 249, 239, 0.2) 0%,
        transparent 30%,
        transparent 70%,
        rgba(253, 249, 239, 0.3) 100%);
    z-index: 1;
    pointer-events: none;
  }
  /* Stack hero content above the scrim */
  .hero-beach > * { position: relative; z-index: 2; }

  /* Mobile: image is less prominent, scrim gets stronger */
  @media (max-width: 1024px) {
    .hero-beach::before {
      background: linear-gradient(180deg,
        rgba(253, 249, 239, 0.92) 0%,
        rgba(253, 249, 239, 0.75) 50%,
        rgba(253, 249, 239, 0.55) 100%);
    }
  }

  /* Text shadow utility for text sitting over lighter scrim areas */
  .hero-text-lift {
    text-shadow: 0 1px 2px rgba(253, 249, 239, 0.6);
  }

  /* Color-block section backgrounds — the "dopamine" move */
  .bg-teal-block { background: var(--teal); color: var(--cream-50); }
  .bg-cobalt-block { background: var(--cobalt); color: var(--cream-50); }
  .bg-coral-block { background: var(--coral); color: var(--ink-900); }
  .bg-sunshine-block { background: var(--sunshine); color: var(--ink-900); }
  .bg-midnight-block { background: var(--midnight-900); color: var(--cream-50); }

  /* Subtle "water ripple" pattern for teal sections */
  .wave-pattern {
    background-image:
      radial-gradient(circle at 20% 50%, rgba(255,255,255,0.06) 0%, transparent 40%),
      radial-gradient(circle at 80% 80%, rgba(255,255,255,0.05) 0%, transparent 40%);
  }

  /* Hairline rules */
  .rule { border: 1px solid rgba(26,26,46,0.1); }
  .rule-t { border-top: 1px solid rgba(26,26,46,0.1); }
  .rule-b { border-bottom: 1px solid rgba(26,26,46,0.1); }
  .rule-cream { border-top: 1px solid rgba(253,249,239,0.2); }

  /* Ticker */
  @keyframes slide-left { from { transform: translateX(0); } to { transform: translateX(-50%); } }
  .ticker { animation: slide-left 60s linear infinite; }

  /* Locked blur */
  .locked-blur { filter: blur(5px) saturate(0.5); user-select: none; pointer-events: none; }
  .lock-scrim { background: linear-gradient(180deg, rgba(11,13,28,0) 0%, rgba(11,13,28,0.9) 70%, rgba(11,13,28,0.98) 100%); }

  /* Buttons */
  .btn-primary {
    background: var(--cobalt);
    color: var(--cream-50);
    padding: 14px 26px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    border: 2px solid var(--cobalt);
    transition: all 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
    box-shadow: 4px 4px 0 0 var(--ink-900);
    position: relative;
  }
  .btn-primary:hover {
    background: var(--cobalt-bright);
    transform: translate(-2px, -2px);
    box-shadow: 6px 6px 0 0 var(--ink-900);
  }
  .btn-primary:active { transform: translate(2px, 2px); box-shadow: 2px 2px 0 0 var(--ink-900); }

  .btn-coral {
    background: var(--coral);
    color: var(--ink-900);
    padding: 14px 26px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    border: 2px solid var(--ink-900);
    transition: all 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
    box-shadow: 4px 4px 0 0 var(--ink-900);
  }
  .btn-coral:hover {
    background: var(--coral-deep);
    transform: translate(-2px, -2px);
    box-shadow: 6px 6px 0 0 var(--ink-900);
  }

  .btn-sunshine {
    background: var(--sunshine);
    color: var(--ink-900);
    padding: 14px 26px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    border: 2px solid var(--ink-900);
    transition: all 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
    box-shadow: 4px 4px 0 0 var(--ink-900);
  }
  .btn-sunshine:hover {
    background: var(--sunshine-deep);
    transform: translate(-2px, -2px);
    box-shadow: 6px 6px 0 0 var(--ink-900);
  }

  .btn-ghost {
    background: transparent;
    color: var(--ink-900);
    padding: 13px 25px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    border: 2px solid var(--ink-900);
    transition: all 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
  }
  .btn-ghost:hover {
    background: var(--ink-900);
    color: var(--cream-50);
  }

  .btn-ghost-light {
    background: transparent;
    color: var(--cream-50);
    padding: 13px 25px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    border: 2px solid var(--cream-50);
    transition: all 0.25s ease;
  }
  .btn-ghost-light:hover {
    background: var(--cream-50);
    color: var(--ink-900);
  }

  /* Eyebrow */
  .eyebrow {
    font-family: 'JetBrains Mono', monospace;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    font-size: 11px;
    font-weight: 500;
  }

  /* Rise animation */
  @keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: translateY(0); } }
  .rise { opacity: 0; animation: rise 0.9s cubic-bezier(0.2, 0.8, 0.2, 1) forwards; }
  .rise-1 { animation-delay: 0.05s; }
  .rise-2 { animation-delay: 0.16s; }
  .rise-3 { animation-delay: 0.28s; }
  .rise-4 { animation-delay: 0.42s; }
  .rise-5 { animation-delay: 0.58s; }

  /* Pulse on the TV "NOW CASTING" badge */
  @keyframes pulse-coral {
    0%, 100% { box-shadow: 0 0 0 0 rgba(255, 122, 89, 0.6); }
    50% { box-shadow: 0 0 0 12px rgba(255, 122, 89, 0); }
  }
  .pulse-coral { animation: pulse-coral 2s ease-in-out infinite; }

  /* Wiggle on emojis/icons */
  @keyframes wiggle {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(-6deg); }
    75% { transform: rotate(6deg); }
  }
  .wiggle-hover:hover { animation: wiggle 0.4s ease-in-out; }

  /* Rotating "LIVE" badge */
  @keyframes spin-slow { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
  .spin-slow { animation: spin-slow 18s linear infinite; }

  /* Guide card — playful tilt on hover */
  .guide-card {
    transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
    position: relative;
  }
  .guide-card:hover { transform: translate(-3px, -3px) rotate(-0.5deg); }

  /* Sticker-style cards with hard shadow */
  .card-sticker {
    border: 2px solid var(--ink-900);
    box-shadow: 6px 6px 0 0 var(--ink-900);
    transition: all 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
  }
  .card-sticker:hover { transform: translate(-2px, -2px); box-shadow: 8px 8px 0 0 var(--ink-900); }

  /* Price tag */
  .price-tag {
    display: inline-block;
    background: var(--sunshine);
    color: var(--ink-900);
    font-family: 'JetBrains Mono', monospace;
    font-weight: 700;
    padding: 4px 12px;
    border: 2px solid var(--ink-900);
    transform: rotate(-3deg);
    box-shadow: 2px 2px 0 0 var(--ink-900);
  }

  /* Doodle arrow */
  .doodle-arrow {
    font-family: 'Caveat', cursive;
    color: var(--coral-deep);
    font-size: 22px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
  }

  /* Hero gradient text — ocean blues only, no rainbow */
  .gradient-text {
    background: linear-gradient(135deg, var(--cobalt) 0%, var(--teal-deep) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
  }

  /* Horizon line — ocean to golden hour, not rainbow */
  .horizon-line {
    height: 2px;
    background: linear-gradient(90deg,
      transparent 0%,
      var(--cobalt) 25%,
      var(--teal) 55%,
      var(--sunshine) 85%,
      transparent 100%);
  }

  /* Badge */
  .badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    border: 1.5px solid currentColor;
    border-radius: 999px;
  }

  /* Chat bubble for DNA section */
  .chat-bubble-light {
    background: var(--cream-50);
    border: 2px solid var(--ink-900);
    box-shadow: 3px 3px 0 0 var(--ink-900);
  }

  /* Flag card — full-bleed flag background with legibility scrim */
  .flag-card {
    position: relative;
    overflow: hidden;
    min-height: 200px;
    background-size: cover;
    background-position: center;
    color: var(--cream-50);
  }
  .flag-card::before {
    /* Readability scrim — dark gradient bottom-up, ensures text always legible regardless of flag palette */
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg,
      rgba(26, 26, 46, 0.25) 0%,
      rgba(26, 26, 46, 0.55) 50%,
      rgba(26, 26, 46, 0.9) 100%);
    z-index: 1;
  }
  .flag-card > * {
    position: relative;
    z-index: 2;
  }
  .flag-card .flag-text-shadow {
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
  }

  /* Casting "film strip" decorative element */
  .film-strip {
    background-image:
      linear-gradient(to right, var(--ink-900) 0, var(--ink-900) 4px, transparent 4px, transparent 20px);
    background-size: 20px 100%;
    background-repeat: repeat-x;
  }

  /* Highlighted text marker style */
  .highlight-coral {
    background: linear-gradient(180deg, transparent 60%, var(--coral-pale, #FFD4C7) 60%);
    padding: 0 4px;
  }
  .highlight-sunshine {
    background: linear-gradient(180deg, transparent 60%, var(--sunshine) 60%);
    padding: 0 4px;
  }
  .highlight-teal {
    background: linear-gradient(180deg, transparent 60%, var(--teal-pale) 60%);
    padding: 0 4px;
  }

  /* Logo mark — uses uploaded logo on dark, text alternative on light */
  .logo-text {
    display: inline-flex;
    align-items: baseline;
    gap: 6px;
  }
  .logo-text .digital {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    font-size: 18px;
    color: var(--cobalt);
  }
  .logo-text .lyfestyle {
    font-family: 'Fraunces', serif;
    font-style: italic;
    font-weight: 600;
    font-size: 22px;
    color: var(--ink-900);
    letter-spacing: -0.01em;
  }
  .dark-section .logo-text .digital { color: var(--cobalt-bright); }
  .dark-section .logo-text .lyfestyle { color: var(--cream-50); }
