/* ═══════════════════════════════════════════════════════
   INSTANTWORDCOUNT.COM — Global Stylesheet
   Version: 2.0 | Author: InstantWordCount.com
═══════════════════════════════════════════════════════ */

/* ── GOOGLE FONTS ── */
@import url('https://fonts.googleapis.com/css2?family=Cabinet+Grotesk:wght@400;500;700;800;900&family=Instrument+Sans:ital,wght@0,400;0,500;0,600;1,400&family=JetBrains+Mono:wght@400;500&display=swap');

/* ── DESIGN TOKENS ── */
:root {
  /* Brand */
  --brand:       #1a1aff;
  --brand-dark:  #1212cc;
  --brand-mid:   #4040ff;
  --brand-soft:  #e8e8ff;
  --brand-glow:  rgba(26,26,255,0.15);

  /* Ink scale */
  --ink:    #111216;
  --ink-2:  #3c3f4a;
  --ink-3:  #6b7080;
  --ink-4:  #9da3b0;
  --ink-5:  #d0d3dc;

  /* Surfaces */
  --bg:     #f6f6fb;
  --white:  #ffffff;
  --s2:     #efeff8;
  --s3:     #e6e6f4;

  /* Semantic */
  --green:      #00b67a;
  --green-bg:   #e6faf3;
  --green-ink:  #065f46;
  --amber:      #f59e0b;
  --amber-bg:   #fef3c7;
  --amber-ink:  #92400e;
  --red:        #ef4444;
  --red-bg:     #fee2e2;
  --red-ink:    #991b1b;
  --purple:     #8b5cf6;
  --purple-bg:  #f3effe;
  --teal:       #06b6d4;
  --teal-bg:    #e0f9ff;

  /* Typography */
  --fd: 'Cabinet Grotesk', sans-serif;
  --fb: 'Instrument Sans', sans-serif;
  --fm: 'JetBrains Mono', monospace;

  /* Motion */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --t1: 0.15s;
  --t2: 0.3s;
  --t3: 0.5s;

  /* Layout */
  --max: 1280px;
  --r1: 8px;
  --r2: 12px;
  --r3: 18px;
  --r4: 24px;
  --pill: 999px;
}

/* ── RESET ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; color-scheme: light; }
body {
  font-family: var(--fb);
  background: var(--bg);
  color: var(--ink);
  min-height: 100vh;
  line-height: 1.6;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font-family: inherit; font-size: inherit; }
img { display: block; max-width: 100%; }

/* ── SCROLLBAR ── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--ink-5); border-radius: var(--pill); }
::-webkit-scrollbar-thumb:hover { background: var(--ink-4); }

/* ── LAYOUT ── */
.container { max-width: var(--max); margin: 0 auto; padding: 0 1.5rem; }
.section { padding: 5rem 0; }
.section-sm { padding: 3rem 0; }
.section-xs { padding: 2rem 0; }

/* ── TYPOGRAPHY ── */
.d1 { font-family: var(--fd); font-size: clamp(2.8rem, 5.5vw, 5.2rem); font-weight: 900; line-height: 0.95; letter-spacing: -0.04em; }
.d2 { font-family: var(--fd); font-size: clamp(2rem, 4vw, 3.4rem); font-weight: 800; line-height: 1.05; letter-spacing: -0.03em; }
.h2 { font-family: var(--fd); font-size: clamp(1.5rem, 3vw, 2.2rem); font-weight: 800; line-height: 1.1; letter-spacing: -0.025em; }
.h3 { font-family: var(--fd); font-size: 1.2rem; font-weight: 700; letter-spacing: -0.018em; }
.label-sm { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-3); }

/* ── BUTTONS ── */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 0.55rem 1.2rem; border-radius: var(--r1);
  font-size: 0.875rem; font-weight: 600; cursor: pointer;
  border: none; transition: all var(--t1) var(--ease);
  white-space: nowrap; text-decoration: none;
}
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-dark); transform: translateY(-1px); box-shadow: 0 6px 20px var(--brand-glow); }
.btn-ghost { background: transparent; border: 1.5px solid var(--ink-5); color: var(--ink-2); }
.btn-ghost:hover { border-color: var(--ink-3); background: var(--white); color: var(--ink); }
.btn-sm { padding: 0.35rem 0.8rem; font-size: 0.8rem; }
.btn-lg { padding: 0.75rem 1.6rem; font-size: 1rem; }

/* ── BADGES ── */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 0.28rem 0.72rem; border-radius: var(--pill);
  font-size: 0.76rem; font-weight: 600;
  background: var(--white); border: 1px solid var(--ink-5); color: var(--ink-2);
}
.badge-green  { background: var(--green-bg); border-color: transparent; color: var(--green-ink); }
.badge-blue   { background: var(--brand-soft); border-color: transparent; color: var(--brand); }
.badge-purple { background: var(--purple-bg); border-color: transparent; color: #5b21b6; }
.badge-amber  { background: var(--amber-bg); border-color: transparent; color: var(--amber-ink); }

/* ── EYEBROW ── */
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--brand-soft); color: var(--brand);
  padding: 0.35rem 0.9rem; border-radius: var(--pill);
  font-size: 0.78rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
}
.eyebrow::before {
  content: ''; width: 7px; height: 7px; border-radius: 50%;
  background: var(--brand); animation: pdot 2s infinite;
}
@keyframes pdot { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.5; transform: scale(0.7); } }

/* ── CARDS ── */
.card {
  background: var(--white); border: 1px solid var(--ink-5);
  border-radius: var(--r3); overflow: hidden;
}
.card-hover {
  transition: all var(--t2) var(--ease);
}
.card-hover:hover {
  border-color: var(--brand);
  transform: translateY(-4px);
  box-shadow: 0 16px 48px var(--brand-glow);
}

/* ── PANEL ── */
.panel { background: var(--white); border: 1.5px solid var(--ink-5); border-radius: var(--r3); overflow: hidden; }
.panel-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.72rem 1rem; border-bottom: 1px solid var(--ink-5); background: var(--s2);
}
.panel-title {
  font-family: var(--fd); font-size: 0.73rem; font-weight: 800;
  text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink);
  display: flex; align-items: center; gap: 6px;
}
.panel-title .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--brand); flex-shrink: 0; }
.panel-body { padding: 1rem; }

/* ── SECTION HEADER ── */
.sec-header { text-align: center; max-width: 620px; margin: 0 auto 3.5rem; }
.sec-header .eyebrow { margin-bottom: 1rem; }
.sec-header h1, .sec-header h2 { margin-bottom: 0.75rem; }
.sec-header p { font-size: 1.05rem; color: var(--ink-2); line-height: 1.65; }

/* ── NAV ── */
#main-nav {
  position: sticky; top: 0; z-index: 200;
  background: rgba(246,246,251,0.92);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(26,26,255,0.08);
}
.nav-inner {
  display: flex; align-items: center; justify-content: space-between; height: 64px;
}
.nav-logo {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--fd); font-weight: 900; font-size: 1.05rem;
  letter-spacing: -0.03em; color: var(--ink); text-decoration: none;
}
.nav-logo-icon {
  width: 36px; height: 36px; border-radius: 10px; background: var(--brand);
  display: flex; align-items: center; justify-content: center;
  position: relative; overflow: hidden; flex-shrink: 0;
}
.nav-logo-icon::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.28) 0%, transparent 55%);
}
.nav-logo-icon svg { position: relative; z-index: 1; }
.nav-logo-dot { color: var(--brand); }
.nav-links { display: flex; align-items: center; gap: 0.2rem; }
.nav-link {
  padding: 0.45rem 0.85rem; border-radius: var(--r1);
  font-size: 0.875rem; font-weight: 500; color: var(--ink-2);
  transition: all var(--t1) var(--ease); cursor: pointer;
  border: none; background: transparent; text-decoration: none;
  display: inline-block;
}
.nav-link:hover { background: var(--s2); color: var(--ink); }
.nav-link.active { background: var(--brand-soft); color: var(--brand); font-weight: 600; }
.nav-right { display: flex; align-items: center; gap: 0.5rem; }

/* ── HAMBURGER ── */
.hamburger { display: none; flex-direction: column; gap: 5px; cursor: pointer; padding: 6px; border: none; background: none; }
.hamburger span { width: 22px; height: 2px; background: var(--ink); border-radius: 2px; transition: all var(--t1); display: block; }

/* ── MOBILE NAV ── */
.mob-overlay { display: none; position: fixed; inset: 0; z-index: 300; background: rgba(0,0,0,0.45); backdrop-filter: blur(4px); }
.mob-overlay.open { display: block; }
.mob-panel {
  position: absolute; right: 0; top: 0; bottom: 0; width: 280px;
  background: var(--white); padding: 2rem 1.5rem;
  display: flex; flex-direction: column; gap: 0.25rem;
  box-shadow: -8px 0 32px rgba(0,0,0,0.1);
}
.mob-close { margin-left: auto; margin-bottom: 1.5rem; background: none; border: none; cursor: pointer; color: var(--ink-2); }
.mob-link {
  padding: 0.75rem 0.85rem; border-radius: var(--r1);
  font-size: 0.95rem; font-weight: 600; color: var(--ink-2);
  cursor: pointer; border: none; background: none; text-align: left;
  width: 100%; transition: all var(--t1) var(--ease); text-decoration: none;
  display: block;
}
.mob-link:hover { background: var(--s2); color: var(--ink); }
.mob-divider { border: none; border-top: 1px solid var(--ink-5); margin: 0.5rem 0; }

/* ── COOKIE BANNER ── */
#cookie-bar {
  position: fixed; bottom: 1.5rem; left: 50%; transform: translateX(-50%);
  background: var(--ink); color: #fff;
  border-radius: var(--r4); padding: 1rem 1.5rem;
  display: flex; align-items: center; gap: 1.5rem; z-index: 9999;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
  max-width: 720px; width: calc(100% - 3rem);
  transition: all var(--t2) var(--ease);
}
#cookie-bar.hide { opacity: 0; pointer-events: none; transform: translateX(-50%) translateY(16px); }
#cookie-bar p { font-size: 0.84rem; color: rgba(255,255,255,0.75); line-height: 1.5; flex: 1; }
#cookie-bar a { color: #fff; text-decoration: underline; }
.ck-acts { display: flex; gap: 0.5rem; flex-shrink: 0; }
.ck-accept {
  background: var(--brand); color: #fff; border: none;
  padding: 0.5rem 1rem; border-radius: var(--r1);
  font-size: 0.82rem; font-weight: 600; cursor: pointer; transition: background var(--t1);
}
.ck-accept:hover { background: var(--brand-dark); }
.ck-decline {
  background: rgba(255,255,255,0.1); color: rgba(255,255,255,0.7); border: none;
  padding: 0.5rem 1rem; border-radius: var(--r1);
  font-size: 0.82rem; font-weight: 600; cursor: pointer; transition: background var(--t1);
}
.ck-decline:hover { background: rgba(255,255,255,0.18); }

/* ── TOAST ── */
#toast {
  position: fixed; bottom: 1.5rem; right: 1.5rem; z-index: 9998;
  background: var(--ink); color: #fff;
  padding: 0.75rem 1.2rem; border-radius: var(--r2);
  font-size: 0.84rem; font-weight: 500;
  display: flex; align-items: center; gap: 8px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.2);
  transform: translateY(calc(100% + 1.5rem)); opacity: 0;
  transition: all 0.3s var(--ease); pointer-events: none;
}
#toast.show { transform: translateY(0); opacity: 1; pointer-events: auto; }

/* ── FOOTER ── */
#main-footer { background: var(--ink); color: rgba(255,255,255,0.7); padding: 4rem 0 0; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 2.5rem; margin-bottom: 3rem; }
.footer-brand-desc { font-size: 0.84rem; color: rgba(255,255,255,0.5); line-height: 1.65; max-width: 280px; margin: 0.85rem 0 1rem; }
.footer-logo {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--fd); font-weight: 900; font-size: 1.05rem;
  color: #fff; letter-spacing: -0.03em; text-decoration: none;
}
.footer-col h4 {
  font-family: var(--fd); font-size: 0.77rem; font-weight: 800;
  text-transform: uppercase; letter-spacing: 0.08em;
  color: rgba(255,255,255,0.35); margin-bottom: 0.85rem;
}
.footer-links { display: flex; flex-direction: column; gap: 0.4rem; }
.footer-link { font-size: 0.84rem; color: rgba(255,255,255,0.6); transition: color var(--t1); text-decoration: none; cursor: pointer; }
.footer-link:hover { color: #fff; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.08); padding: 1.25rem 0;
  display: flex; align-items: center; justify-content: space-between;
  font-size: 0.79rem; color: rgba(255,255,255,0.3); flex-wrap: wrap; gap: 0.75rem;
}
.footer-bottom a { color: rgba(255,255,255,0.45); transition: color var(--t1); text-decoration: none; }
.footer-bottom a:hover { color: #fff; }
.sec-badges { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.sec-badge {
  display: flex; align-items: center; gap: 4px;
  padding: 0.24rem 0.58rem;
  border: 1px solid rgba(255,255,255,0.12); border-radius: var(--pill);
  font-size: 0.67rem; font-weight: 600; color: rgba(255,255,255,0.38);
}

/* ── ANIMATIONS ── */
@keyframes fadeUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeDown { from { opacity: 0; transform: translateY(-16px); } to { opacity: 1; transform: translateY(0); } }
.au { animation: fadeUp var(--t3) var(--ease) both; }
.au-d1 { animation-delay: 0.1s; }
.au-d2 { animation-delay: 0.2s; }
.au-d3 { animation-delay: 0.3s; }
.au-d4 { animation-delay: 0.4s; }

/* ── LEGAL PAGES ── */
.legal-layout { display: grid; grid-template-columns: 220px 1fr; gap: 3.5rem; align-items: start; }
.legal-sticky-nav { position: sticky; top: 84px; }
.legal-nav-title { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 0.75rem; }
.legal-nav-list { display: flex; flex-direction: column; gap: 2px; }
.legal-nav-item {
  padding: 0.44rem 0.85rem; border-radius: var(--r1);
  font-size: 0.82rem; font-weight: 500; color: var(--ink-2);
  cursor: pointer; transition: all var(--t1) var(--ease); text-decoration: none; display: block;
}
.legal-nav-item:hover { background: var(--s2); color: var(--ink); }
.legal-nav-item.active { background: var(--brand-soft); color: var(--brand); font-weight: 600; }
.legal-content h1 { color: var(--ink); margin-bottom: 0.35rem; }
.legal-meta { font-size: 0.82rem; color: var(--ink-3); margin-bottom: 2rem; }
.legal-highlight {
  background: var(--brand-soft); border-left: 3px solid var(--brand);
  border-radius: 0 var(--r1) var(--r1) 0; padding: 0.85rem 1.1rem;
  margin-bottom: 1.5rem; font-size: 0.88rem; color: var(--ink);
}
.legal-section { margin-bottom: 2.5rem; scroll-margin-top: 84px; }
.legal-section h2 {
  font-family: var(--fd); font-size: 1.2rem; font-weight: 800; color: var(--ink);
  margin-bottom: 0.75rem; padding-bottom: 0.5rem; border-bottom: 1px solid var(--ink-5);
}
.legal-section p { font-size: 0.9rem; color: var(--ink-2); line-height: 1.75; margin-bottom: 0.75rem; }
.legal-section ul { padding-left: 1.25rem; margin-bottom: 0.75rem; }
.legal-section li { font-size: 0.9rem; color: var(--ink-2); line-height: 1.75; margin-bottom: 0.25rem; }
.legal-section a { color: var(--brand); text-decoration: underline; }
.legal-table { width: 100%; border-collapse: collapse; font-size: 0.88rem; margin-bottom: 1rem; }
.legal-table th { background: var(--s2); padding: 0.6rem 0.85rem; text-align: left; font-weight: 600; color: var(--ink); border-bottom: 2px solid var(--ink-5); }
.legal-table td { padding: 0.6rem 0.85rem; border-bottom: 1px solid var(--ink-5); color: var(--ink-2); }
.legal-table tr:last-child td { border-bottom: none; }

/* ── PRIVACY BADGE ── */
.privacy-note {
  background: var(--green-bg); border: 1px solid rgba(0,182,122,0.22);
  border-radius: var(--r2); padding: 0.85rem 1rem;
  display: flex; gap: 0.75rem; align-items: flex-start;
}
.privacy-note-title { font-size: 0.74rem; font-weight: 700; color: var(--green-ink); margin-bottom: 2px; }
.privacy-note-body { font-size: 0.72rem; color: var(--green-ink); line-height: 1.45; }

/* ── FAQ ── */
.faq-item { background: var(--white); border: 1px solid var(--ink-5); border-radius: var(--r2); overflow: hidden; margin-bottom: 0.5rem; }
.faq-question {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1rem 1.25rem; cursor: pointer; font-weight: 600; font-size: 0.92rem;
  transition: background var(--t1); gap: 1rem; color: var(--ink);
  border: none; background: none; width: 100%; text-align: left;
}
.faq-question:hover { background: var(--s2); }
.faq-arrow { transition: transform var(--t1) var(--ease); flex-shrink: 0; color: var(--ink-3); }
.faq-item.open .faq-arrow { transform: rotate(180deg); }
.faq-answer {
  display: none; padding: 0.85rem 1.25rem 1rem;
  font-size: 0.88rem; color: var(--ink-2); line-height: 1.7;
  border-top: 1px solid var(--ink-5);
}
.faq-item.open .faq-answer { display: block; }

/* ── RESPONSIVE ── */
@media (max-width: 1100px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 900px) {
  .legal-layout { grid-template-columns: 1fr; }
  .legal-sticky-nav { position: static; }
}
@media (max-width: 768px) {
  .nav-links { display: none; }
  .hamburger { display: flex; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; text-align: center; }
  #cookie-bar { flex-direction: column; text-align: center; }
}
@media (max-width: 480px) {
  .container { padding: 0 1rem; }
}

@media print {
  #main-nav, #cookie-bar, #toast, #mob-nav { display: none !important; }
}
