/* =========================================================
   REMC shared design system. Edit tokens & shared components
   here once; every page links this file. Page-specific rules
   stay in each page's inline <style> and override these.
   ========================================================= */
* { margin: 0; padding: 0; box-sizing: border-box; }
    :root {
      --brand: #2147f9; --brand-dark: #1837D6; --brand-light: #4d6dfb;
      --brand-tint: #EEF2F8; --brand-soft: #F7F9FE;
      --ink: #0a0e27; --line: #111114;
      --body: #4B5563; --muted: #9CA3AF;
      --divider: #E5E7EB; --divider-soft: #F0F2F5;
      --bg: #FFFFFF; --globe: #C7D2E2; --accent-red: #C8102E;
    }
    html { scroll-behavior: smooth; }
    body {
      font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'SF Pro Display', 'Helvetica Neue', Helvetica, Arial, sans-serif;
      color: var(--body); background: var(--bg); line-height: 1.55; font-size: 17px;
      -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
    }
    body::before { content: ''; display: block; height: 3px; background: var(--accent-red); }

    h1, h2, h3, h4 {
      font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', sans-serif;
      color: var(--ink); font-weight: 700; line-height: 1.05; letter-spacing: -0.035em;
    }
    h1 { font-size: clamp(40px, 7vw, 88px); font-weight: 800; letter-spacing: -0.045em; }
    h2 { font-size: clamp(28px, 4vw, 48px); letter-spacing: -0.04em; }
    h3 { font-size: clamp(20px, 2.4vw, 26px); letter-spacing: -0.025em; }
    p { margin: 0; }
    a { color: var(--ink); text-decoration: none; }

    .container { max-width: 1240px; margin: 0 auto; padding: 0 24px; }
    @media (min-width: 768px) { .container { padding: 0 40px; } }
    section { padding: 64px 0; }
    @media (min-width: 768px) { section { padding: 96px 0; } }

    .eyebrow {
      display: inline-block; font-size: 12px; font-weight: 600;
      text-transform: uppercase; letter-spacing: 0.18em;
      color: var(--brand); padding: 6px 12px;
      background: var(--brand-tint); border-radius: 100px;
      margin-bottom: 20px;
    }
    .lead { font-size: clamp(18px, 1.7vw, 22px); color: var(--body); line-height: 1.55; max-width: 60ch; }

    .btn {
      display: inline-flex; align-items: center; gap: 8px;
      padding: 16px 26px; font-weight: 600; font-size: 15px;
      border-radius: 12px; border: none; cursor: pointer;
      transition: all 0.2s ease; font-family: inherit;
      text-decoration: none; line-height: 1;
    }
    .btn-primary { background: var(--ink); color: white; }
    .btn-primary:hover { background: #050813; transform: translateY(-1px); }
    .btn-brand { background: var(--brand); color: white; }
    .btn-brand:hover { background: var(--brand-dark); transform: translateY(-1px); }
    .btn-ghost { background: white; color: var(--ink); border: 1px solid var(--divider); }
    .btn-ghost:hover { border-color: var(--ink); }
    .btn-whatsapp { background: #25D366; color: white; gap: 10px; }
    .btn-whatsapp:hover { background: #1da851; }

    .logo { display: inline-flex; align-items: center; gap: 2px; }
    .logo-img { display: block; height: 30px; width: auto; }
    .logo-globe { width: 30px; height: 30px; margin-right: -9px; z-index: 1; position: relative; }
    .logo-wordmark {
      font-family: 'Space Grotesk', sans-serif; font-weight: 700;
      font-size: 26px; color: var(--brand);
      letter-spacing: -0.05em; line-height: 1; z-index: 2; position: relative;
    }
    .logo-globe svg { width: 100%; height: 100%; }
    .logo-globe svg circle, .logo-globe svg ellipse, .logo-globe svg line {
      fill: none; stroke: var(--globe); stroke-width: 0.7;
    }
    footer .logo-wordmark { color: white; }
    footer .logo-globe svg circle, footer .logo-globe svg ellipse, footer .logo-globe svg line { stroke: rgba(255,255,255,0.35); }

    header {
      position: sticky; top: 0;
      background: rgba(255,255,255,0.85);
      backdrop-filter: saturate(180%) blur(14px);
      -webkit-backdrop-filter: saturate(180%) blur(14px);
      border-bottom: 1px solid transparent;
      z-index: 100; transition: border-color 0.3s, background 0.3s;
    }
    header.scrolled { border-bottom-color: var(--divider-soft); background: rgba(255,255,255,0.95); }
    .nav { display: flex; align-items: center; justify-content: space-between; height: 72px; }
    .nav-links { display: none; gap: 6px; list-style: none; }
    @media (min-width: 1024px) { .nav-links { display: flex; } }
    .nav-links a {
      font-size: 14px; font-weight: 500; color: var(--ink);
      padding: 8px 14px; border-radius: 8px; transition: background 0.2s;
    }
    .nav-links a:hover { background: var(--brand-tint); color: var(--brand); }
    .nav-links a.active { background: var(--brand-tint); color: var(--brand); }
    .nav .btn { padding: 10px 18px; font-size: 14px; }

    /* ── Mobile hamburger ── */
    .nav-toggle {
      display: flex; flex-direction: column; justify-content: center; gap: 5px;
      width: 40px; height: 40px; background: none; border: none; cursor: pointer;
      padding: 8px; border-radius: 8px; flex-shrink: 0;
    }
    .nav-toggle span {
      display: block; width: 22px; height: 2px;
      background: var(--ink); border-radius: 2px;
      transition: transform 0.22s ease, opacity 0.22s ease;
    }
    .nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
    .nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
    .nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
    @media (min-width: 1024px) { .nav-toggle { display: none; } }

    /* Mobile nav drawer */
    .nav-drawer {
      display: none;
      position: absolute; top: 72px; left: 0; right: 0;
      background: rgba(255,255,255,0.97);
      backdrop-filter: saturate(180%) blur(14px);
      -webkit-backdrop-filter: saturate(180%) blur(14px);
      border-bottom: 1px solid var(--divider-soft);
      padding: 16px 24px 24px;
      z-index: 99;
    }
    .nav-drawer.is-open { display: block; }
    .nav-drawer ul { list-style: none; display: flex; flex-direction: column; gap: 4px; }
    .nav-drawer ul a {
      display: block; font-size: 16px; font-weight: 500; color: var(--ink);
      padding: 12px 16px; border-radius: 10px; transition: background 0.15s;
    }
    .nav-drawer ul a:hover, .nav-drawer ul a.active { background: var(--brand-tint); color: var(--brand); }
    .nav-drawer .drawer-cta { margin-top: 12px; display: block; width: 100%; text-align: center; }

    /* HERO */
    .hero {
      position: relative; overflow: hidden;
      padding: 96px 0 80px;
      text-align: center;
      min-height: 760px;
    }
    @media (min-width: 768px) { .hero { padding: 140px 0 120px; min-height: 800px; } }

    /* =========== HERO INTRO ANIMATION (switchroom video → text) =========== */
    .hero-intro {
      position: absolute; inset: 0;
      z-index: 0; pointer-events: none;
      overflow: hidden;
      /* Brand-gradient fallback shown if hero-switchroom.mp4 fails to load,
         so the hero never falls back to plain white. The video sits on top. */
      background: radial-gradient(120% 120% at 50% 0%, var(--brand-tint) 0%, var(--bg) 60%);
      animation: hero-video-fade 2.4s ease-out 6.8s forwards;
    }
    .hero-video {
      position: absolute; inset: 0;
      width: 100%; height: 100%;
      object-fit: cover; object-position: center;
      display: block;
      filter: brightness(1.08) contrast(1.2) saturate(1.05);
    }
    @keyframes hero-video-fade {
      from { opacity: 1; }
      to   { opacity: 0; visibility: hidden; }
    }

    /* Hero content — fades in as the video fades out */
    .hero-inner {
      position: relative; z-index: 1;
      max-width: 920px; margin: 0 auto;
    }
    .hero-inner > * {
      opacity: 0;
      animation: hero-reveal 1s ease-out forwards;
    }
    .hero-inner > *:nth-child(1) { animation-delay: 7.8s; }
    .hero-inner > *:nth-child(2) { animation-delay: 8.1s; }
    .hero-inner > *:nth-child(3) { animation-delay: 8.4s; }
    .hero-inner > *:nth-child(4) { animation-delay: 8.7s; }
    .hero-inner > *:nth-child(5) { animation-delay: 9.0s; }
    @keyframes hero-reveal {
      from { opacity: 0; transform: translateY(8px); }
      to   { opacity: 1; transform: translateY(0); }
    }

    .hero-badge {
      display: inline-flex; align-items: center; gap: 8px;
      padding: 6px 14px 6px 6px;
      background: white; border: 1px solid var(--divider);
      border-radius: 100px; font-size: 13px; color: var(--ink);
      margin-bottom: 28px;
    }
    .hero-badge .pill {
      background: var(--brand); color: white;
      font-size: 11px; font-weight: 700; letter-spacing: 0.06em;
      text-transform: uppercase; padding: 4px 10px; border-radius: 100px;
    }
    .hero h1 {
      margin: 0 0 24px;
      max-width: 14ch; margin-left: auto; margin-right: auto;
    }
    .cycle-wrap {
      display: inline-block; position: relative;
      height: 1.05em; vertical-align: top;
      overflow: hidden; color: var(--brand);
      line-height: 1.05; min-width: 6.5ch;
    }
    .cycle-list {
      display: block;
      animation: rotate-words 14s infinite;
      animation-delay: 8.1s;
      will-change: transform;
    }
    .cycle-list > span { display: block; height: 1.05em; line-height: 1.05; white-space: nowrap; }
    @keyframes rotate-words {
      0%, 20%  { transform: translateY(0); }
      25%, 45% { transform: translateY(-1.05em); }
      50%, 70% { transform: translateY(-2.10em); }
      75%, 95% { transform: translateY(-3.15em); }
      100%     { transform: translateY(-4.20em); }
    }
    .hero-subhead {
      font-size: clamp(18px, 1.6vw, 22px);
      color: var(--body); line-height: 1.55;
      max-width: 60ch; margin: 0 auto 32px;
    }
    .hero-subhead strong { color: var(--ink); font-weight: 600; }
    .hero-ctas { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-bottom: 28px; }
    .hero-usp {
      display: inline-flex; align-items: center; gap: 10px;
      padding: 10px 18px; background: white;
      border: 1px solid var(--divider); border-radius: 100px;
      font-size: 13px; color: var(--body);
    }
    .hero-usp .dot {
      width: 8px; height: 8px; background: var(--accent-red);
      border-radius: 50%; flex-shrink: 0;
    }
    .hero-usp strong { color: var(--ink); font-weight: 600; }

    @media (prefers-reduced-motion: reduce) {
      .hero-intro { animation: none; opacity: 0; visibility: hidden; }
      .hero-video { display: none; }
      .hero-inner > * { animation: none; opacity: 1; transform: none; }
      .cycle-list { animation-delay: 0s; }
    }

    /* PLANS */
    .plans-grid { display: grid; grid-template-columns: 1fr; gap: 16px; }
    @media (min-width: 768px) { .plans-grid { grid-template-columns: repeat(4, 1fr); } }
    .plan-card {
      background: white; border: 1px solid var(--divider);
      border-radius: 20px; padding: 32px 28px;
      display: flex; flex-direction: column;
      transition: all 0.25s; position: relative;
    }
    .plan-card:hover { border-color: var(--brand); transform: translateY(-3px); }
    .plan-card.featured { background: var(--ink); color: white; border-color: var(--ink); }
    .plan-card.featured::before {
      content: 'Most popular';
      position: absolute; top: -12px; left: 50%;
      transform: translateX(-50%);
      background: var(--brand); color: white;
      font-size: 11px; font-weight: 700; letter-spacing: 0.1em;
      text-transform: uppercase; padding: 5px 14px; border-radius: 100px;
    }
    .plan-card.featured .plan-name { color: var(--brand-light); }
    .plan-card.featured h3 { color: white; }
    .plan-card.featured .plan-tag { color: rgba(255,255,255,0.7); border-color: rgba(255,255,255,0.15); }
    .plan-card.featured .plan-feat { color: rgba(255,255,255,0.85); }
    .plan-card.featured .plan-feat::before { border-color: var(--brand-light); }
    .plan-name {
      font-size: 12px; font-weight: 700; letter-spacing: 0.12em;
      text-transform: uppercase; color: var(--brand);
      margin-bottom: 10px;
    }
    .plan-card h3 { font-size: 24px; margin-bottom: 8px; }
    .plan-tag {
      display: inline-block; font-size: 13px; color: var(--muted);
      padding: 6px 12px; border: 1px solid var(--divider);
      border-radius: 100px; margin-bottom: 24px;
    }
    .plan-feats { list-style: none; padding: 0; margin: 0 0 28px; flex: 1; }
    .plan-feat {
      font-size: 14px; padding: 8px 0 8px 24px;
      position: relative; color: var(--body); line-height: 1.5;
    }
    .plan-feat::before {
      content: ''; position: absolute; left: 0; top: 14px;
      width: 12px; height: 6px;
      border-left: 2px solid var(--brand);
      border-bottom: 2px solid var(--brand);
      transform: rotate(-45deg);
    }
    .plan-cta { display: block; text-align: center; width: 100%; padding: 14px; font-size: 14px; }
    .section-header { max-width: 800px; margin: 0 auto 64px; text-align: center; }
    .section-header h2 { margin-bottom: 14px; max-width: 18ch; margin-left: auto; margin-right: auto; }

    /* SERVICES */
    .services-grid { display: grid; grid-template-columns: 1fr; gap: 18px; }
    @media (min-width: 640px) { .services-grid { grid-template-columns: repeat(2, 1fr); } }
    @media (min-width: 980px) { .services-grid { grid-template-columns: repeat(3, 1fr); } }
    .service-card { background: white; border: 1px solid var(--divider); border-radius: 20px; padding: 32px 28px; transition: all 0.25s; }
    .service-card:hover { border-color: var(--brand); transform: translateY(-3px); }
    .service-card .icon { width: 44px; height: 44px; background: var(--brand-tint); border-radius: 12px; display: flex; align-items: center; justify-content: center; color: var(--brand); margin-bottom: 18px; }
    .service-card .icon svg { width: 22px; height: 22px; }
    .service-card h3 { font-size: 20px; margin-bottom: 10px; }
    .service-card p { font-size: 15px; color: var(--body); line-height: 1.55; }

    /* CASES */
    .cases-grid { display: grid; grid-template-columns: 1fr; gap: 20px; }
    @media (min-width: 768px) { .cases-grid { grid-template-columns: 1fr 1fr; } }
    .case-card { background: white; border: 1px solid var(--divider); border-radius: 24px; padding: 36px 32px; display: flex; flex-direction: column; }
    .case-card .case-brand { font-size: 14px; font-weight: 700; color: var(--ink); letter-spacing: -0.01em; margin-bottom: 4px; }
    .case-card .case-meta { font-size: 12px; color: var(--muted); letter-spacing: 0.06em; text-transform: uppercase; margin-bottom: 16px; }
    .case-card .case-pill { display: inline-block; background: var(--brand-tint); color: var(--brand); font-size: 11px; font-weight: 700; padding: 4px 10px; border-radius: 100px; letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 18px; align-self: flex-start; }
    .case-card blockquote { font-size: 19px; line-height: 1.45; color: var(--ink); font-weight: 500; letter-spacing: -0.015em; margin: 0 0 22px; }
    .case-card .case-attrib { display: flex; align-items: center; gap: 12px; padding-top: 22px; border-top: 1px solid var(--divider-soft); margin-top: auto; }
    .case-card .case-avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--brand-tint); color: var(--brand); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 14px; flex-shrink: 0; }
    .case-card .case-name { font-size: 14px; font-weight: 600; color: var(--ink); }
    .case-card .case-role { font-size: 12px; color: var(--muted); }

    .cta-banner {
      max-width: 1200px; margin: 0 auto;
      padding: 80px 40px;
      background: linear-gradient(135deg, var(--ink) 0%, #14213f 100%);
      color: white; border-radius: 28px; text-align: center;
      position: relative; overflow: hidden;
    }
    .cta-banner::before {
      content: ''; position: absolute; top: 0; right: 0;
      width: 50%; height: 100%;
      background: radial-gradient(circle at 100% 0%, rgba(33, 71, 249, 0.4), transparent 60%);
    }
    .cta-banner > * { position: relative; }
    .cta-banner h2 { color: white; margin-bottom: 16px; max-width: 16ch; margin-left: auto; margin-right: auto; }
    .cta-banner p { color: rgba(255,255,255,0.78); font-size: 17px; max-width: 60ch; margin: 0 auto 32px; }
    .cta-banner .ctas { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
    .cta-banner .btn-brand { background: var(--brand); }
    .cta-banner .btn-ghost { background: rgba(255,255,255,0.08); color: white; border-color: rgba(255,255,255,0.2); }

    footer { background: var(--ink); color: rgba(255,255,255,0.7); padding: 72px 0 32px; font-size: 14px; }
    .footer-grid { display: grid; grid-template-columns: 1fr; gap: 40px; margin-bottom: 48px; }
    @media (min-width: 768px) { .footer-grid { grid-template-columns: 1.4fr 1fr 1fr; gap: 56px; } }
    footer h4 { color: white; font-size: 13px; text-transform: uppercase; letter-spacing: 0.12em; margin-bottom: 18px; font-weight: 700; }
    footer ul { list-style: none; }
    footer li { margin-bottom: 10px; }
    footer a { color: rgba(255,255,255,0.65); transition: color 0.2s; font-size: 14px; }
    footer a:hover { color: var(--brand-light); }
    .footer-brand p { font-size: 14px; max-width: 36ch; line-height: 1.55; color: rgba(255,255,255,0.55); margin-top: 14px; }
    .footer-brand .contact { margin-top: 18px; font-size: 13px; line-height: 1.8; }
    .footer-brand .contact a { color: rgba(255,255,255,0.85); display: block; }
    .footer-base { border-top: 1px solid rgba(255,255,255,0.08); padding-top: 28px; display: flex; flex-direction: column; gap: 12px; font-size: 12px; color: rgba(255,255,255,0.45); }
    @media (min-width: 768px) { .footer-base { flex-direction: row; justify-content: space-between; align-items: center; } }
    .footer-base .links a { font-size: 12px; margin-right: 18px; color: rgba(255,255,255,0.55); }
