/* ============================================================
   PinBooster — shared styles
   Loaded by both index.html and partners.html.
   Contains: design tokens, reset, typography, layout,
   navigation, buttons, footer, and any component used on both
   pages. Page-specific styles live in customer.css / partners.css.
   ============================================================ */

:root {
  /* Surfaces */
  --bg-base: #FFFFFF;
  --bg-soft: #FAF8F5;
  --bg-elevated: #FFFFFF;
  --bg-dark: #0F172A;

  /* Brand */
  --brand-red: #E60023;
  --brand-red-hover: #C2001D;
  --brand-red-soft: #FFF0F2;

  /* Text */
  --text-primary: #0F172A;
  --text-body: #334155;
  --text-muted: #64748B;
  --text-subtle: #94A3B8;
  --text-on-dark: #FAFAFA;
  --text-on-dark-muted: rgba(250, 250, 250, 0.7);

  /* Functional */
  --border: #E2E8F0;
  --border-strong: #CBD5E1;
  --success: #15803D;
  --success-soft: #DCFCE7;

  /* Effects */
  --shadow-sm: 0 1px 2px 0 rgba(15, 23, 42, 0.04);
  --shadow: 0 1px 3px rgba(15, 23, 42, 0.06), 0 4px 8px -2px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 4px 12px -2px rgba(15, 23, 42, 0.06), 0 12px 24px -4px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 12px 24px -8px rgba(15, 23, 42, 0.12), 0 24px 48px -12px rgba(15, 23, 42, 0.10);
  --shadow-red: 0 0 0 4px rgba(230, 0, 35, 0.08), 0 8px 24px -4px rgba(230, 0, 35, 0.20);

  --max: 1200px;
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
}

/* ========== RESET ========== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }
body {
  background: var(--bg-base);
  color: var(--text-body);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-feature-settings: 'cv11', 'ss01', 'ss03';
  font-size: 16px;
  line-height: 1.6;
  font-weight: 400;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }

/* Skip link for keyboard accessibility */
.skip-link {
  position: absolute;
  top: -40px;
  left: 1rem;
  background: var(--text-primary);
  color: var(--bg-base);
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  z-index: 1000;
  font-size: 0.85rem;
}
.skip-link:focus { top: 1rem; }

/* ========== TYPOGRAPHY ========== */
h1, h2, h3, h4 {
  color: var(--text-primary);
  letter-spacing: -0.025em;
  line-height: 1.1;
}
h1 {
  font-size: clamp(2.4rem, 5.4vw, 4rem);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.05;
}
h2 {
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.15;
}
h3 {
  font-size: clamp(1.2rem, 1.6vw, 1.4rem);
  font-weight: 600;
  letter-spacing: -0.015em;
}
h4 {
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}
p { color: var(--text-body); }
.lead { font-size: 1.125rem; line-height: 1.6; max-width: 640px; }

.eyebrow {
  display: inline-block;
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  font-weight: 600;
  color: var(--brand-red);
  background: var(--brand-red-soft);
  padding: 0.4rem 0.85rem;
  border-radius: var(--radius-sm);
  margin-bottom: 1rem;
}

.italic-accent,
.accent-serif {
  font-family: 'Instrument Serif', Georgia, serif;
  font-style: italic;
  font-weight: 400;
  letter-spacing: -0.01em;
  color: var(--brand-red);
}

/* ========== LAYOUT ========== */
.container { max-width: var(--max); margin: 0 auto; padding: 0 1.5rem; }
section { padding: 5rem 0; position: relative; }
@media (max-width: 768px) {
  section { padding: 3.5rem 0; }
  .container { padding: 0 1.25rem; }
}
.section-head { max-width: 720px; margin-bottom: 1rem; }
.section-head .eyebrow { margin-bottom: 0.75rem; }
.section-head.center { text-align: center; margin-left: auto; margin-right: auto; }
.section-head .lead { margin-top: 1.25rem; }
.section-head.center .lead { margin-left: auto; margin-right: auto; }

/* ========== NAV ========== */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0.85rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}
.logo {
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--text-primary);
  flex-shrink: 0;
}
.logo .brand-mark { color: var(--brand-red); }
.logo .sub-mark {
  color: var(--text-muted);
  font-weight: 500;
  margin-left: 0.4rem;
  font-size: 0.95rem;
}
.nav-links {
  display: flex;
  gap: 1.5rem;
  align-items: center;
  flex: 1;
  justify-content: center;
}
.nav-links a {
  font-size: 0.9rem;
  color: var(--text-muted);
  font-weight: 500;
  transition: color .15s ease;
}
.nav-links a:hover,
.nav-links a.active { color: var(--text-primary); }
.nav-links a.active::after {
  content: '';
  display: block;
  height: 2px;
  background: var(--brand-red);
  margin-top: 4px;
  border-radius: 1px;
}
.nav-right {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  flex-shrink: 0;
}
.lang-toggle {
  display: flex;
  background: var(--bg-soft);
  border-radius: var(--radius-sm);
  padding: 3px;
  gap: 2px;
  border: 1px solid var(--border);
}
.lang-toggle button {
  padding: 0.3rem 0.75rem;
  border: none;
  background: transparent;
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  border-radius: 5px;
  transition: all 0.15s ease;
}
.lang-toggle button.active {
  background: var(--bg-base);
  color: var(--text-primary);
  box-shadow: var(--shadow-sm);
}
@media (max-width: 900px) {
  .nav-links { display: none; }
}

/* ========== BUTTONS ========== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.4rem;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 500;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all .2s ease;
  white-space: nowrap;
  line-height: 1.2;
}
.btn-primary {
  background: var(--brand-red);
  color: #FFFFFF;
}
.btn-primary:hover {
  background: var(--brand-red-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}
.btn-secondary {
  background: var(--bg-base);
  color: var(--text-primary);
  border-color: var(--border-strong);
}
.btn-secondary:hover {
  background: var(--bg-soft);
  border-color: var(--text-muted);
}
.btn-ghost {
  background: transparent;
  color: var(--text-primary);
  padding: 0.5rem 0;
  border-radius: 0;
  border-bottom: 1px solid transparent;
  font-weight: 500;
}
.btn-ghost:hover {
  border-bottom-color: var(--brand-red);
  color: var(--brand-red);
}
.btn-large { padding: 0.95rem 1.7rem; font-size: 1rem; }
.btn-arrow,
.btn .arrow { display: inline-block; transition: transform .2s ease; }
.btn:hover .btn-arrow,
.btn:hover .arrow { transform: translateX(4px); }

/* ========== FOOTER ========== */
footer {
  background: var(--bg-soft);
  padding: 3rem 0 2rem;
  border-top: 1px solid var(--border);
  font-size: 0.88rem;
  color: var(--text-muted);
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 2rem;
}
.footer-grid h4 {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-primary);
  margin-bottom: 0.85rem;
}
.footer-grid ul { list-style: none; display: flex; flex-direction: column; gap: 0.45rem; }
.footer-grid a { color: var(--text-muted); transition: color .15s ease; }
.footer-grid a:hover { color: var(--brand-red); }
.footer-bottom {
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.83rem;
}
.footer-bottom .heart { color: var(--brand-red); }
@media (max-width: 768px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 2rem; }
}

/* ========== STICKY BOTTOM-RIGHT CTA ========== */
.sticky-cta {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 50;
  background: var(--brand-red);
  color: #FFFFFF;
  border-radius: 999px;
  padding: 0.75rem 1.25rem;
  box-shadow: var(--shadow-lg), 0 0 0 1px rgba(230, 0, 35, 0.25);
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all .25s ease;
  opacity: 0;
  transform: translateY(20px);
  pointer-events: none;
}
.sticky-cta.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.sticky-cta:hover {
  background: var(--brand-red-hover);
  transform: translateY(-2px);
}
.sticky-cta-pulse {
  width: 8px;
  height: 8px;
  background: #FFFFFF;
  border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.4);
  animation: pulse 1.8s infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}
@media (max-width: 600px) {
  .sticky-cta { bottom: 1rem; right: 1rem; padding: 0.65rem 1rem; font-size: 0.85rem; }
  .sticky-cta-text-long { display: none; }
}

/* ========== UTILITIES ========== */
.hidden { display: none !important; }
.text-center { text-align: center; }
