/* RL Karting — news stylesheet (index + article pages).
   Base tokens, nav, drawer and footer are copied verbatim from services.html
   so news can never drift from the rest of the site's design system.
   Regenerate with .tmp/build_news_css.py after editing services.html. */

  :root {
    --paper: #f6f4f0; --paper-deep: #eae5db; --ink: #15181c; --ink-soft: #565c63;
    --race: #d62828; --race-bright: #ef4444; --race-deep: #9c1c1c; --gold: #d99a2b; --sand: #646b72;
    --line: rgba(21,24,28,0.12); --r: cubic-bezier(0.16, 1, 0.3, 1);
  }
  * { margin: 0; padding: 0; box-sizing: border-box; }
  html { scroll-behavior: smooth; }
  body { background: var(--paper); color: var(--ink); font-family: 'Inter', sans-serif; line-height: 1.6; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
  :focus-visible { outline: 2px solid var(--race); outline-offset: 3px; border-radius: 4px; }

  .atmosphere { position: fixed; inset: 0; z-index: -2; overflow: hidden; pointer-events: none; }
  .orb { position: absolute; border-radius: 50%; filter: blur(70px); will-change: transform; }
  .orb.a { width: 46vw; height: 46vw; background: radial-gradient(circle, var(--race-bright), transparent 65%); top: -12vw; right: -8vw; opacity: 0.18; }
  .orb.b { width: 38vw; height: 38vw; background: radial-gradient(circle, var(--gold), transparent 65%); bottom: -6vw; left: -6vw; opacity: 0.16; }
  .grain { position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: 0.4; mix-blend-mode: multiply; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.4'/%3E%3C/svg%3E"); }

  nav { position: fixed; top: 0; left: 0; right: 0; z-index: 50; display: flex; align-items: center; justify-content: space-between; padding: 22px clamp(24px, 5vw, 64px); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); background: linear-gradient(to bottom, rgba(246,244,240,0.85), rgba(246,244,240,0)); transition: background 0.4s var(--r), box-shadow 0.4s var(--r); }
  nav.scrolled { background: rgba(246,244,240,0.94); box-shadow: 0 1px 0 var(--line); }
  .brand { display: flex; align-items: center; text-decoration: none; color: var(--ink); }
  .brand-logo { height: 38px; width: auto; display: block; }
  .brand-fallback { display: none; align-items: center; gap: 9px; font-family: 'Space Grotesk', sans-serif; font-weight: 700; font-size: 22px; letter-spacing: -0.01em; color: var(--race); }
  .brand-fallback em { font-style: normal; font-weight: 400; color: var(--ink-soft); }
  .brand-fallback .seed { width: 11px; height: 11px; border-radius: 50%; background: var(--race); box-shadow: 0 0 0 4px rgba(214,40,40,0.16); }
  .navlinks { display: flex; gap: 34px; }
  .navlinks a { color: var(--ink-soft); text-decoration: none; font-size: 14px; font-weight: 500; position: relative; transition: color 0.25s; padding: 11px 0; }
  .navlinks a.active { color: var(--race); }
  .navlinks a::after { content: ''; position: absolute; left: 0; bottom: 6px; width: 0; height: 1px; background: var(--race); transition: width 0.3s var(--r); }
  .navlinks a:hover { color: var(--ink); }
  .navlinks a:hover::after, .navlinks a.active::after { width: 100%; }
  .nav-cta { font-size: 14px; font-weight: 600; color: var(--paper); background: var(--ink); padding: 10px 20px; border-radius: 100px; text-decoration: none; transition: transform 0.3s var(--r), background 0.3s; }
  .nav-cta:hover { transform: translateY(-2px); background: var(--race); }
  .nav-toggle { display: none; flex-direction: column; justify-content: center; gap: 5px; width: 44px; height: 44px; border: none; background: transparent; cursor: pointer; padding: 0; }
  .nav-toggle span { display: block; width: 22px; height: 2px; background: var(--ink); margin: 0 auto; transition: transform 0.3s var(--r), opacity 0.3s var(--r); }
  .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); }
  .mobile-drawer { position: fixed; top: 0; right: 0; width: min(320px, 80vw); height: 100vh; height: 100dvh; background: var(--paper); box-shadow: -20px 0 60px -20px rgba(21,24,28,0.35); z-index: 90; padding: 100px 32px 40px; display: flex; flex-direction: column; gap: 4px; transform: translateX(100%); transition: transform 0.4s var(--r); overflow-y: auto; }
  .mobile-drawer.open { transform: translateX(0); }
  .mobile-drawer a { color: var(--ink); text-decoration: none; font-family: 'Space Grotesk', sans-serif; font-size: 21px; font-weight: 500; padding: 15px 2px; border-bottom: 1px solid var(--line); }
  .mobile-drawer a.active { color: var(--race); }
  .mobile-drawer .nav-cta { margin-top: 26px; text-align: center; border-bottom: none; padding: 15px 20px; }
  .drawer-overlay { position: fixed; inset: 0; background: rgba(21,24,28,0.4); z-index: 80; opacity: 0; pointer-events: none; transition: opacity 0.4s var(--r); }
  .drawer-overlay.open { opacity: 1; pointer-events: auto; }
  @media (max-width: 820px){ .navlinks { display: none; } nav > .nav-cta { display: none; } .nav-toggle { display: flex; } }
  @media (min-width: 821px) { .mobile-drawer, .drawer-overlay { display: none; } }

  .wrap { max-width: 1180px; margin: 0 auto; padding: 0 clamp(24px, 5vw, 64px); }
  .reveal { opacity: 0; transform: translateY(40px); transition: opacity 1s var(--r), transform 1s var(--r); }
  .reveal.in { opacity: 1; transform: none; }
  .section-tag { font-size: 12px; letter-spacing: 0.26em; text-transform: uppercase; color: var(--sand); font-weight: 600; display: inline-block; }
  @media (max-width: 860px){ .pillar-grid { grid-template-columns: 1fr; } .pillar-visual { max-width: 420px; margin: 0 auto; } }

  .cta-band { padding: 0 clamp(16px,4vw,48px) clamp(40px,6vw,80px); }
  .cta-inner { padding: clamp(60px,9vh,110px) 24px; border-radius: 32px; text-align: center; background: radial-gradient(120% 140% at 50% 0%, rgba(239,68,68,0.16), transparent 60%), var(--ink); color: var(--paper); position: relative; overflow: hidden; }
  .cta-inner::before { content: ''; position: absolute; inset: 0; background-image: linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px); background-size: 48px 48px; pointer-events: none; }
  .cta-inner h2 { font-family: 'Space Grotesk', sans-serif; font-weight: 300; font-size: clamp(30px,5vw,60px); letter-spacing: -0.02em; max-width: 18ch; margin: 0 auto; text-wrap: balance; position: relative; }
  .cta-inner h2 em { font-style: italic; color: var(--race-bright); }
  .cta-inner p { margin: 22px auto 36px; max-width: 46ch; color: rgba(246,244,240,0.7); font-size: 17px; position: relative; text-wrap: pretty; }
  .cta-btn { display: inline-flex; align-items: center; gap: 12px; background: var(--paper); color: var(--ink); font-weight: 600; font-size: 16px; padding: 16px 32px; border-radius: 100px; text-decoration: none; transition: transform 0.35s var(--r), gap 0.35s var(--r); position: relative; }
  .cta-btn .arr { transition: transform 0.35s var(--r); }
  .cta-btn:hover { transform: translateY(-3px); gap: 18px; }
  .cta-btn:hover .arr { transform: translateX(4px); }

  footer { text-align: center; padding: 40px 24px 60px; color: var(--ink-soft); font-size: 13px; }
  footer a { color: var(--race); text-decoration: none; }
  footer .note { display: block; margin-top: 8px; font-family: 'Space Grotesk', sans-serif; font-style: italic; color: var(--ink); }

  @media (prefers-reduced-motion: reduce) { .reveal { transition: none; } }

  /* ---------- News index ---------- */
  .mkt-hero { padding: 150px clamp(24px,5vw,64px) 40px; text-align: center; }
  .mkt-hero .section-tag { margin-bottom: 24px; color: var(--race); }
  .mkt-hero h1 { font-family: 'Space Grotesk', sans-serif; font-weight: 300; font-size: clamp(40px, 7vw, 88px); line-height: 1.0; letter-spacing: -0.025em; max-width: 15ch; margin: 0 auto; text-wrap: balance; }
  .mkt-hero h1 em { font-style: italic; color: var(--race); }
  .mkt-hero p { margin: 26px auto 0; max-width: 54ch; font-size: clamp(17px,1.7vw,20px); color: var(--ink-soft); text-wrap: pretty; }

  .news-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: clamp(22px, 2.8vw, 34px); padding: clamp(30px,4vh,50px) 0 clamp(60px,9vh,110px); }
  .news-card { display: flex; flex-direction: column; border-radius: 26px; border: 1px solid var(--line); background: rgba(255,255,255,0.55); overflow: hidden; text-decoration: none; color: inherit; transition: transform 0.5s var(--r), box-shadow 0.5s var(--r), border-color 0.4s; }
  .news-card:hover { transform: translateY(-6px); box-shadow: 0 34px 64px -38px rgba(21,24,28,0.40); border-color: rgba(214,40,40,0.22); }
  .news-thumb { aspect-ratio: 16/9; overflow: hidden; background: var(--paper-deep); }
  .news-thumb img { width: 100%; height: auto; aspect-ratio: 16/9; object-fit: cover; display: block; transition: transform 0.7s var(--r); }
  .news-card:hover .news-thumb img { transform: scale(1.04); }
  .news-body { padding: 24px 26px 28px; display: flex; flex-direction: column; flex: 1; }
  .news-meta { font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--sand); font-weight: 600; margin-bottom: 12px; }
  .news-body h2 { font-family: 'Space Grotesk', sans-serif; font-weight: 500; font-size: 22px; line-height: 1.18; letter-spacing: -0.01em; margin-bottom: 10px; text-wrap: balance; }
  .news-body p { color: var(--ink-soft); font-size: 15px; flex: 1; text-wrap: pretty; }
  .news-read { display: inline-flex; align-items: center; gap: 6px; margin-top: 18px; font-size: 14px; font-weight: 600; color: var(--race); transition: gap 0.3s var(--r); }
  .news-read .arr { transition: transform 0.3s var(--r); }
  .news-card:hover .news-read { gap: 10px; }
  .news-card:hover .news-read .arr { transform: translateX(2px); }

  .mkt-empty { text-align: center; padding: 60px 20px 100px; color: var(--ink-soft); }
  .mkt-empty h3 { font-family: 'Space Grotesk', sans-serif; font-weight: 400; font-size: 24px; color: var(--ink); margin-bottom: 10px; }

  /* ---------- Article page ---------- */
  .article-hero { padding: clamp(140px,20vh,200px) clamp(24px,5vw,64px) 0; max-width: 900px; margin: 0 auto; }
  .article-hero .kicker { font-size: 12px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--sand); font-weight: 600; margin-bottom: 20px; }
  .article-hero h1 { font-family: 'Space Grotesk', sans-serif; font-weight: 300; font-size: clamp(34px,5.4vw,64px); line-height: 1.03; letter-spacing: -0.025em; text-wrap: balance; }
  .article-hero .sub { margin-top: 20px; font-size: clamp(17px,1.8vw,21px); color: var(--ink-soft); text-wrap: pretty; max-width: 62ch; }
  .hero-img { max-width: 1120px; margin: clamp(36px,6vh,60px) auto 0; padding: 0 clamp(24px,5vw,64px); }
  .hero-img img { width: 100%; height: auto; aspect-ratio: 16/9; object-fit: cover; border-radius: 24px; border: 1px solid var(--line); display: block; }

  .article-body { max-width: 720px; margin: 0 auto; padding: clamp(40px,7vh,80px) clamp(24px,5vw,64px) clamp(30px,5vh,60px); }
  .article-body p { color: var(--ink); font-size: 18px; line-height: 1.7; margin-bottom: 22px; }
  .article-body h2 { font-family: 'Space Grotesk', sans-serif; font-weight: 500; font-size: clamp(24px,3vw,34px); letter-spacing: -0.02em; margin: 40px 0 14px; }
  .article-body h3 { font-family: 'Space Grotesk', sans-serif; font-weight: 500; font-size: clamp(20px,2.4vw,26px); margin: 30px 0 12px; }
  .article-body a { color: var(--race); text-decoration: underline; text-underline-offset: 2px; }
  .article-body ul, .article-body ol { color: var(--ink); font-size: 18px; line-height: 1.7; margin: 0 0 22px 22px; }
  .article-body li { margin-bottom: 8px; }
  .article-body blockquote { border-left: 3px solid var(--race); margin: 26px 0; padding: 4px 0 4px 22px; font-family: 'Space Grotesk', sans-serif; font-style: italic; font-size: 20px; color: var(--ink); }
  .article-body code { background: var(--paper-deep); padding: 2px 6px; border-radius: 5px; font-size: 0.92em; }
  .article-body pre { background: var(--paper-deep); padding: 18px 20px; border-radius: 14px; overflow-x: auto; margin-bottom: 22px; }
  .article-body hr { border: none; border-top: 1px solid var(--line); margin: 34px 0; }
  .backlink { display: inline-flex; align-items: center; gap: 8px; margin-top: 8px; font-weight: 600; color: var(--ink); text-decoration: none; transition: gap 0.3s var(--r), color 0.3s; }
  .backlink:hover { color: var(--race); gap: 12px; }

  @media (prefers-reduced-motion: reduce){
    .news-card, .news-card:hover, .news-thumb img, .news-read { transition: none !important; transform: none !important; }
  }
