/* ── CardPing.io — Mobile-First Global Styles ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

@import url('https://fonts.googleapis.com/css2?family=Clash+Display:wght@400;500;600;700&family=IBM+Plex+Mono:wght@300;400;500;600&family=Instrument+Sans:wght@400;500;600&display=swap');

:root {
  --white:     #ffffff;
  --cream:     #faf8f4;
  --paper:     #f4f1eb;
  --border:    #e8e3d9;
  --border2:   #d4cfc3;
  --ink:       #1a1714;
  --ink2:      #2d2926;
  --muted:     #7a746a;
  --muted2:    #a09990;
  --ping:      #ff5c1a;
  --ping2:     #ff8c4a;
  --ping3:     #fff0e8;
  --electric:  #0066ff;
  --green:     #1a9e5f;
  --green-bg:  #e8f7ef;
  --red:       #e53535;
  --red-bg:    #fde8e8;
  --gold:      #d4860a;
  --gold-bg:   #fef3e0;
  --shadow:    0 2px 8px rgba(26,23,20,0.08);
  --shadow-lg: 0 20px 60px rgba(26,23,20,0.12);
  --font-display: 'Clash Display', sans-serif;
  --font-mono:    'IBM Plex Mono', monospace;
  --font-body:    'Instrument Sans', sans-serif;
  --radius:    12px;
  --radius-sm: 7px;
  --nav-h:     62px;
  --px:        20px;
}

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-body);
  background: var(--cream);
  color: var(--ink);
  line-height: 1.6;
  overflow-x: hidden;
}
body::before {
  content: '';
  position: fixed; inset: 0;
  background-image: radial-gradient(circle, rgba(26,23,20,0.055) 1px, transparent 1px);
  background-size: 24px 24px;
  pointer-events: none; z-index: 0;
}

/* ════════════════════════════════════════
   NAVIGATION — MOBILE FIRST
════════════════════════════════════════ */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 200;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 var(--px); height: var(--nav-h);
  background: rgba(250,248,244,0.96);
  backdrop-filter: blur(20px);
  border-bottom: 1.5px solid var(--border);
}

/* Logo */
.nav-logo {
  display: flex; align-items: center; gap: 8px;
  font-family: var(--font-display); font-weight: 700; font-size: 1.1rem;
  letter-spacing: -0.03em; text-decoration: none; color: var(--ink); z-index: 201;
}
.logo-mark {
  width: 30px; height: 30px; background: var(--ping); border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  position: relative; overflow: hidden; flex-shrink: 0;
}
.logo-mark::before, .logo-mark::after {
  content: ''; position: absolute; border-radius: 50%;
  border: 1.5px solid rgba(255,255,255,0.6);
}
.logo-mark::before { width: 12px; height: 12px; }
.logo-mark::after  { width: 22px; height: 22px; }
.logo-dot { width: 5px; height: 5px; background: #fff; border-radius: 50%; position: relative; z-index: 1; }
.nav-logo span { color: var(--ping); }

/* Desktop links + CTA — hidden until 960px */
.nav-links { display: none; }
.nav-cta   { display: none; }

/* ── Hamburger ── */
.nav-hamburger {
  display: flex; flex-direction: column; justify-content: center; gap: 5px;
  width: 44px; height: 44px; border: none; background: transparent;
  cursor: pointer; padding: 8px; border-radius: 8px; z-index: 201;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.18s;
}
.nav-hamburger:hover { background: var(--paper); }
.nav-hamburger span {
  display: block; height: 2px; border-radius: 2px;
  background: var(--ink); transition: all 0.28s ease; transform-origin: center;
}
.nav-hamburger span:nth-child(1) { width: 22px; }
.nav-hamburger span:nth-child(2) { width: 16px; }
.nav-hamburger span:nth-child(3) { width: 22px; }
.nav-hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); width: 22px; }
.nav-hamburger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav-hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); width: 22px; }

/* ── Mobile Drawer ── */
.mobile-menu {
  position: fixed; top: 0; left: 0; right: 0; bottom: 0; z-index: 199;
  background: var(--cream);
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.4,0,0.2,1);
  display: flex; flex-direction: column;
  padding: calc(var(--nav-h) + 20px) var(--px) 40px;
  overflow-y: auto;
}
.mobile-menu.open { transform: translateX(0); }
.mobile-menu nav-list { list-style: none; }
.mobile-menu ul { list-style: none; margin-bottom: 28px; }
.mobile-menu ul li { border-bottom: 1px solid var(--border); }
.mobile-menu ul li a {
  display: block; padding: 15px 2px;
  font-family: var(--font-display); font-size: 1.25rem; font-weight: 600;
  color: var(--ink); text-decoration: none; letter-spacing: -0.02em;
  transition: color 0.18s;
}
.mobile-menu ul li a:hover,
.mobile-menu ul li a.active { color: var(--ping); }
.mobile-cta { display: flex; flex-direction: column; gap: 10px; margin-top: 8px; }
.mobile-cta a { text-align: center; padding: 14px; font-size: 0.975rem; border-radius: 10px; min-height: 50px; display: flex; align-items: center; justify-content: center; }

/* ════════════════════════════════════════
   BUTTONS
════════════════════════════════════════ */
.btn-primary {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 11px 22px;
  background: var(--ping); color: #fff; border: none; border-radius: var(--radius-sm);
  font-family: var(--font-body); font-size: 0.9rem; font-weight: 600;
  cursor: pointer; text-decoration: none; transition: all 0.2s;
  letter-spacing: 0.01em; -webkit-tap-highlight-color: transparent;
  min-height: 44px;
}
.btn-primary:active { background: #d44a0f; transform: scale(0.98); }
.btn-outline {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 11px 22px;
  border: 1.5px solid var(--border2); background: transparent;
  color: var(--ink); border-radius: var(--radius-sm);
  font-family: var(--font-body); font-size: 0.9rem; font-weight: 500;
  cursor: pointer; text-decoration: none; transition: all 0.2s;
  -webkit-tap-highlight-color: transparent; min-height: 44px;
}
.btn-outline:active { border-color: var(--ink); background: var(--ink); color: #fff; }
.btn-lg { padding: 13px 28px !important; font-size: 0.975rem !important; border-radius: 10px !important; }
.btn-full { display: flex; align-items: center; justify-content: center; width: 100%; padding: 14px; border-radius: 10px; font-size: 0.9rem; font-weight: 600; text-decoration: none; min-height: 50px; }
.btn-white { background: #fff !important; color: var(--ink) !important; }

/* ════════════════════════════════════════
   LAYOUT
════════════════════════════════════════ */
.page-wrap { position: relative; z-index: 1; padding-top: var(--nav-h); }
.section { padding: 52px var(--px); }
.section-inner { max-width: 1180px; margin: 0 auto; }

.section-tag {
  display: inline-block; padding: 4px 12px;
  background: var(--ping3); color: var(--ping);
  border: 1px solid rgba(255,92,26,0.2); border-radius: 100px;
  font-family: var(--font-mono); font-size: 0.66rem;
  font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase;
  margin-bottom: 12px;
}
.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 5.5vw, 2.8rem);
  font-weight: 700; letter-spacing: -0.03em; line-height: 1.1;
  margin-bottom: 12px; color: var(--ink);
}
.section-sub {
  color: var(--muted); font-size: 0.95rem;
  margin-bottom: 36px; line-height: 1.75;
}
.grad { color: var(--ping); }
.grad-text {
  background: linear-gradient(135deg, var(--ping) 0%, var(--ping2) 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}

/* ── Card ── */
.card {
  background: var(--white); border: 1.5px solid var(--border);
  border-radius: var(--radius); padding: 22px; transition: all 0.25s;
}
.card:hover { border-color: var(--ping); box-shadow: 0 8px 32px rgba(255,92,26,0.08); transform: translateY(-2px); }

/* ── Page Hero ── */
.page-hero { padding: 60px var(--px) 48px; background: var(--ink); position: relative; overflow: hidden; }
.page-hero-inner { max-width: 1180px; margin: 0 auto; position: relative; z-index: 1; }
.page-hero h1 {
  font-family: var(--font-display); font-size: clamp(1.9rem, 6.5vw, 3.4rem);
  font-weight: 700; letter-spacing: -0.03em; line-height: 1.08;
  margin-bottom: 14px; color: #fff;
}
.page-hero p { color: rgba(255,255,255,0.55); font-size: 0.975rem; line-height: 1.75; }

/* Radar rings */
.radar-rings {
  position: absolute; right: -140px; top: 50%; transform: translateY(-50%);
  width: 340px; height: 340px; pointer-events: none; opacity: 0.4;
}
.ring { position: absolute; border-radius: 50%; border: 1px solid rgba(255,92,26,0.15); top: 50%; left: 50%; transform: translate(-50%,-50%); }
.ring-1 { width: 80px;  height: 80px;  border-color: rgba(255,92,26,0.4); }
.ring-2 { width: 150px; height: 150px; }
.ring-3 { width: 230px; height: 230px; }
.ring-4 { width: 310px; height: 310px; }
.ring-5 { width: 390px; height: 390px; }
.ring-dot { position: absolute; width: 7px; height: 7px; background: var(--ping); border-radius: 50%; top: 50%; left: 50%; transform: translate(-50%,-50%); box-shadow: 0 0 12px var(--ping); animation: pingPulse 2s ease-out infinite; }
@keyframes pingPulse { 0%,100%{box-shadow:0 0 12px var(--ping);}50%{box-shadow:0 0 26px var(--ping),0 0 52px rgba(255,92,26,0.25);} }
.sweep { position: absolute; width: 50%; height: 50%; top: 0; left: 50%; transform-origin: bottom left; animation: sweep 4s linear infinite; }
.sweep::before { content: ''; position: absolute; inset: 0; background: conic-gradient(from 0deg, transparent 80%, rgba(255,92,26,0.15) 100%); border-radius: 0 100% 0 0; }
@keyframes sweep { from{transform:rotate(0deg);}to{transform:rotate(360deg);} }

/* ── Code Block ── */
.code-win { background: var(--ink); color: #e8e3d9; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-lg); }
.code-win-bar { background: var(--ink2); padding: 10px 16px; display: flex; align-items: center; gap: 6px; border-bottom: 1px solid rgba(255,255,255,0.08); }
.dot { width: 10px; height: 10px; border-radius: 50%; }
.dot-r{background:#ff5f56;} .dot-y{background:#ffbd2e;} .dot-g{background:#27c93f;}
.code-label { font-family: var(--font-mono); font-size: 0.68rem; color: rgba(255,255,255,0.35); margin-left: 6px; }
.code-win pre { padding: 18px 20px; font-family: var(--font-mono); font-size: 0.73rem; line-height: 1.85; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.ln{color:rgba(255,255,255,0.2);user-select:none;margin-right:14px;display:inline-block;width:16px;text-align:right;}
.ck{color:#79b8ff;} .cs{color:#f1c45a;} .cn{color:#79f2c0;} .cb{color:#ff7b72;} .cc{color:#6a737d;} .ct{color:#c792ea;}

/* ── Status Badge ── */
.status-badge { display: inline-flex; align-items: center; gap: 7px; padding: 5px 12px; background: var(--green-bg); color: var(--green); border: 1px solid rgba(26,158,95,0.2); border-radius: 100px; font-family: var(--font-mono); font-size: 0.66rem; font-weight: 500; letter-spacing: 0.06em; }
.status-dot { width: 6px; height: 6px; background: var(--green); border-radius: 50%; animation: blink 2s ease-in-out infinite; flex-shrink: 0; }
@keyframes blink { 0%,100%{opacity:1;}50%{opacity:0.3;} }

/* ── Table ── */
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: var(--radius); }
.data-table { width: 100%; border-collapse: collapse; min-width: 500px; }
.data-table th { font-family: var(--font-mono); font-size: 0.64rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); padding: 9px 12px; text-align: left; border-bottom: 1.5px solid var(--border); background: var(--cream); white-space: nowrap; }
.data-table td { padding: 11px 12px; font-size: 0.84rem; border-bottom: 1px solid var(--border); vertical-align: middle; }
.data-table tr:last-child td { border: none; }
.data-table tr:hover td { background: var(--cream); }
.tag { display: inline-block; padding: 3px 8px; border-radius: 100px; font-family: var(--font-mono); font-size: 0.63rem; font-weight: 500; letter-spacing: 0.04em; white-space: nowrap; }
.tag-green{background:var(--green-bg);color:var(--green);}
.tag-orange{background:var(--ping3);color:var(--ping);}
.tag-blue{background:#e8f0ff;color:var(--electric);}
.tag-red{background:var(--red-bg);color:var(--red);}
.tag-gold{background:var(--gold-bg);color:var(--gold);}
.tag-gray{background:var(--paper);color:var(--muted);}

/* ── Form ── */
.form-group { margin-bottom: 16px; }
.form-label { display: block; font-size: 0.8rem; font-weight: 600; color: var(--ink2); margin-bottom: 6px; }
.form-input {
  width: 100%; padding: 12px 14px;
  background: var(--white); border: 1.5px solid var(--border);
  border-radius: var(--radius-sm); color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px; /* Prevents iOS auto-zoom */
  outline: none; transition: border-color 0.18s;
  -webkit-appearance: none;
}
.form-input:focus { border-color: var(--ping); }
.form-input::placeholder { color: var(--muted2); }
.form-select { appearance: none; -webkit-appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%237a746a' stroke-width='1.5' fill='none'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; }

/* ── Reveal animations ── */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.55s ease, transform 0.55s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }
.reveal-delay-1{transition-delay:0.07s;} .reveal-delay-2{transition-delay:0.14s;}
.reveal-delay-3{transition-delay:0.21s;} .reveal-delay-4{transition-delay:0.28s;}

/* ── CTA Stripe ── */
.cta-stripe { background: var(--ping); padding: 52px var(--px); text-align: center; position: relative; overflow: hidden; z-index: 1; }
.cta-stripe::before { content: ''; position: absolute; inset: 0; background-image: radial-gradient(circle, rgba(255,255,255,0.08) 1px, transparent 1px); background-size: 20px 20px; }
.cta-stripe h2 { font-family: var(--font-display); font-size: clamp(1.5rem, 5vw, 2.8rem); font-weight: 700; color: #fff; letter-spacing: -0.03em; margin-bottom: 10px; }
.cta-stripe p { color: rgba(255,255,255,0.75); font-size: 0.95rem; margin-bottom: 26px; }

/* ════════════════════════════════════════
   FOOTER
════════════════════════════════════════ */
footer { background: var(--ink); color: rgba(255,255,255,0.7); padding: 48px var(--px) 32px; position: relative; z-index: 1; }
.footer-top { display: grid; grid-template-columns: 1fr; gap: 32px; margin-bottom: 36px; max-width: 1180px; }
.footer-brand p { color: rgba(255,255,255,0.4); font-size: 0.875rem; line-height: 1.75; margin-top: 12px; }
.footer-col h5 { font-family: var(--font-display); font-size: 0.78rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: rgba(255,255,255,0.9); margin-bottom: 12px; }
.footer-col ul { list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: 4px; }
.footer-col ul li a { display: block; padding: 5px 0; color: rgba(255,255,255,0.45); text-decoration: none; font-size: 0.875rem; transition: color 0.18s; }
.footer-col ul li a:hover { color: rgba(255,255,255,0.9); }
.footer-bottom { display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; align-items: center; border-top: 1px solid rgba(255,255,255,0.1); padding-top: 22px; max-width: 1180px; }
.footer-bottom p { color: rgba(255,255,255,0.3); font-size: 0.78rem; }
.footer-badges { display: flex; gap: 6px; flex-wrap: wrap; }
.f-badge { padding: 3px 9px; border: 1px solid rgba(255,255,255,0.12); border-radius: 100px; font-family: var(--font-mono); font-size: 0.58rem; color: rgba(255,255,255,0.35); letter-spacing: 0.04em; }
.footer-logo-nav { display: flex; align-items: center; gap: 8px; font-family: var(--font-display); font-weight: 700; font-size: 1.05rem; letter-spacing: -0.02em; color: #fff; text-decoration: none; }
.footer-logo-mark { width: 26px; height: 26px; background: var(--ping); border-radius: 7px; display: flex; align-items: center; justify-content: center; }

/* ════════════════════════════════════════
   TABLET 600px+
════════════════════════════════════════ */
@media (min-width: 600px) {
  :root { --nav-h: 66px; --px: 32px; }
  .section { padding: 68px var(--px); }
  .page-hero { padding: 76px var(--px) 60px; }
  .footer-top { grid-template-columns: 1fr 1fr; gap: 40px; }
  .footer-col ul { display: block; }
  .cta-stripe { padding: 68px var(--px); }
  .radar-rings { opacity: 0.55; right: -80px; width: 400px; height: 400px; }
  .ring-1{width:100px;height:100px;}
  .ring-2{width:190px;height:190px;}
  .ring-3{width:280px;height:280px;}
  .ring-4{width:370px;height:370px;}
}

/* ════════════════════════════════════════
   DESKTOP 960px+
════════════════════════════════════════ */
@media (min-width: 960px) {
  :root { --nav-h: 68px; --px: 5vw; }

  /* Show desktop nav */
  .nav-links { display: flex; align-items: center; gap: 1.75rem; list-style: none; }
  .nav-links a { color: var(--muted); text-decoration: none; font-size: 0.875rem; font-weight: 500; transition: color 0.18s; }
  .nav-links a:hover { color: var(--ink); }
  .nav-links a.active { color: var(--ping); font-weight: 600; }
  .nav-cta { display: flex; gap: 10px; align-items: center; }
  .nav-hamburger { display: none !important; }
  .mobile-menu { display: none !important; }

  .section { padding: 88px var(--px); }
  .section-sub { max-width: 520px; margin-bottom: 52px; }
  .page-hero { padding: 88px var(--px) 72px; }
  .page-hero p { font-size: 1.05rem; }
  .card { padding: 28px; }

  .footer-top { grid-template-columns: 2fr 1fr 1fr 1fr; gap: 56px; }
  .footer-col ul { display: block; }

  .radar-rings { opacity: 1; right: -60px; width: 480px; height: 480px; }
  .ring-1{width:120px;height:120px;}
  .ring-2{width:220px;height:220px;}
  .ring-3{width:320px;height:320px;}
  .ring-4{width:420px;height:420px;}
  .ring-5{width:520px;height:520px;}
}

/* ── Safe area (notched phones) ── */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
  footer { padding-bottom: calc(32px + env(safe-area-inset-bottom)); }
  .mobile-menu { padding-bottom: calc(40px + env(safe-area-inset-bottom)); }
}

/* ════════════════════════════════════════
   UNIVERSAL INLINE-GRID MOBILE OVERRIDES
   Handles all style="grid-template-columns:..."
   set inline in page files
════════════════════════════════════════ */
@media (max-width: 959px) {

  /* Two-col → single col */
  [style*="grid-template-columns:1fr 1fr"],
  [style*="grid-template-columns: 1fr 1fr"],
  [style*="grid-template-columns:2fr 1fr"],
  [style*="grid-template-columns:1fr 2fr"],
  [style*="grid-template-columns:1fr 320px"],
  [style*="grid-template-columns:1fr 300px"],
  [style*="grid-template-columns:72px 1fr 1fr"] {
    grid-template-columns: 1fr !important;
  }

  /* Four-col → two col */
  [style*="grid-template-columns:repeat(4,1fr)"],
  [style*="grid-template-columns: repeat(4,1fr)"] {
    grid-template-columns: repeat(2, 1fr) !important;
  }

  /* Three-col → two col */
  [style*="grid-template-columns:repeat(3,1fr)"],
  [style*="grid-template-columns: repeat(3,1fr)"] {
    grid-template-columns: repeat(2, 1fr) !important;
  }

  /* Hide auth left panel on mobile */
  .auth-left { display: none !important; }

  /* Blog post sidebar goes below */
  [style*="grid-template-columns:1fr 300px"] aside,
  [style*="grid-template-columns:1fr 320px"] aside {
    position: static !important;
  }

  /* Inline padding resets */
  [style*="padding:80px 5vw"] { padding: 44px 20px !important; }
  [style*="padding:60px 5vw"] { padding: 36px 20px !important; }
  [style*="padding:52px 5vw"] { padding: 32px 20px !important; }

  /* Docs layout */
  .docs-layout { grid-template-columns: 1fr !important; }
  .docs-sidebar { display: none !important; }

  /* Step blocks */
  .step-block { grid-template-columns: 1fr !important; }
  .step-num   { margin: 0 auto !important; }

  /* Feature grids */
  .feat-hero-grid { grid-template-columns: 1fr !important; }
  .features-strip { grid-template-columns: 1fr !important; }

  /* Pricing */
  .pricing-grid { grid-template-columns: 1fr !important; max-width: 100% !important; }
  .pc.featured  { transform: none !important; }

  /* WL grid */
  .wl-grid { grid-template-columns: 1fr !important; }

  /* Hero */
  .hero-inner { grid-template-columns: 1fr !important; }
  .demo-card  { display: none !important; }

  /* Form row */
  .form-row { grid-template-columns: 1fr !important; }

  /* Auth */
  .auth-wrap { grid-template-columns: 1fr !important; }
  .auth-form-box { max-width: 100% !important; }
}

@media (max-width: 600px) {
  /* Force single col on small phones */
  [style*="grid-template-columns:repeat(4,1fr)"],
  [style*="grid-template-columns:repeat(3,1fr)"],
  [style*="grid-template-columns:repeat(2,1fr)"],
  [style*="grid-template-columns:1fr 1fr"],
  [style*="grid-template-columns:2fr 1fr"] {
    grid-template-columns: 1fr !important;
  }

  /* Spec rows still 2 col on small phones */
  .spec-row,
  .overage-grid { grid-template-columns: 1fr 1fr !important; }

  /* Hero stats wrap nicely */
  .hero-stats { gap: 16px !important; }

  /* Ticker font size */
  .ticker-item { font-size: 0.7rem !important; }

  /* CTA actions stack */
  .hero-actions,
  .cta-actions { flex-direction: column !important; width: 100%; }
  .hero-actions .btn-primary,
  .hero-actions .btn-outline,
  .cta-actions a { width: 100% !important; text-align: center !important; }
}
