/* === shared.css ===
   Styles shared across all pages.
   Loaded via <link rel="stylesheet" href="/css/shared.css">
   Font imports are handled here; keep preconnect hints in each HTML <head>.
*/

@import url('https://api.fontshare.com/v2/css?f[]=satoshi@400,500,700,800,900&display=swap');
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:opsz,wght@9..40,400;9..40,500;9..40,600;9..40,700&family=Geist+Mono:wght@400;500&display=swap');

* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  /* === CaliberData paper-primary (default) === */
  --paper:        #FAF7F2;
  --paper-2:      #F3EEE5;
  --ink:          #1F5A33;
  --ink-soft:     rgba(31,90,51,0.55);
  --ink-faint:    rgba(31,90,51,0.22);
  --ink-vfaint:   rgba(31,90,51,0.08);
  --accent:       #EE7733;
  --accent-soft:  rgba(238,119,51,0.55);
  --accent-faint: rgba(238,119,51,0.22);

  /* surface tokens (consumed by shared.css and index.html) */
  --bg-primary:    var(--paper);
  --bg-secondary:  var(--paper-2);
  --bg-tertiary:   #EBE5DA;
  --bg-card:       rgba(31,90,51,0.03);
  --bg-card-hover: rgba(31,90,51,0.06);
  --glass:         rgba(31,90,51,0.04);

  --border:       var(--ink-faint);
  --border-hover: var(--ink-soft);

  --text-primary:   var(--ink);
  --text-secondary: rgba(31,90,51,0.7);
  --text-muted:     rgba(31,90,51,0.45);

  --nav-bg:           rgba(250,247,242,0.85);
  --nav-link-hover:   var(--accent);
  --card-border:      var(--ink-faint);
  --card-hover-shadow: 0 12px 32px -16px rgba(31,90,51,0.25);
  --logo-text-fill:   var(--ink);
  --hero-mid-bg:      var(--paper-2);
  --grid-line-opacity: var(--ink-vfaint);

  /* gradient orb tokens still consumed by index.html hero — soften for paper bg */
  --orb1-bg: rgba(31,90,51,0.06);
  --orb2-bg: rgba(238,119,51,0.06);
  --orb3-bg: rgba(31,90,51,0.04);
}

body {
  font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  overflow-x: hidden;
}

/* === Scroll reveal === */
.reveal {
  opacity: 1; transform: none;
}
.js .reveal {
  opacity: 0; transform: translateY(32px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}
.js .reveal.visible { opacity: 1; transform: translateY(0); }
.reveal-d1 { transition-delay: 0.1s; }
.reveal-d2 { transition-delay: 0.2s; }
.reveal-d3 { transition-delay: 0.3s; }
.reveal-d4 { transition-delay: 0.4s; }

/* ===== NAV ===== */
nav {
  position: fixed; top: 0; width: 100%; z-index: 100;
  background: var(--nav-bg);
  backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
  border-bottom: 1px solid var(--border);
  padding: 0 48px; height: 60px;
  display: flex; align-items: center; justify-content: space-between;
}
.nav-logo { display: flex; align-items: center; gap: 4px; text-decoration: none; }
.nav-logo img { height: 32px; width: auto; display: block; }
.nav-logo .wordmark {
  font-family: 'Geist', system-ui, -apple-system, sans-serif;
  font-size: 18px; font-weight: 600; letter-spacing: -0.01em;
  color: var(--text-primary);
}
.nav-right { display: flex; gap: 28px; align-items: center; }
.nav-right a {
  color: var(--text-secondary); text-decoration: none;
  font-size: 13px; font-weight: 500; transition: color 0.3s;
}
.nav-right a:hover { color: var(--nav-link-hover); }
.lang-toggle {
  background: var(--glass); border: 1px solid var(--border);
  border-radius: 6px; padding: 5px 12px;
  color: var(--text-secondary); font-size: 12px; font-weight: 500;
  cursor: pointer; transition: all 0.3s; font-family: inherit;
}
.lang-toggle:hover { background: rgba(31,90,51,0.06); }
.lang-toggle a { text-decoration: none; color: inherit; }
.lang-opt { color: var(--text-muted); transition: all 0.2s; padding: 2px 6px; border-radius: 4px; }
.lang-opt.lang-active { color: var(--text-primary); font-weight: 700; background: rgba(31,90,51,0.18); }
.nav-cta {
  background: linear-gradient(135deg, var(--ink), var(--accent));
  color: #fff; border: none; border-radius: 6px;
  padding: 7px 18px; font-size: 13px; font-weight: 600;
  cursor: pointer; transition: opacity 0.3s; font-family: inherit;
}
.nav-cta:hover { opacity: 0.85; }
.nav-login {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--text-secondary); text-decoration: none;
  font-size: 13px; font-weight: 500; transition: color 0.3s;
  padding: 5px 12px; border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--glass);
}
.nav-login:hover { color: var(--ink); background: rgba(31,90,51,0.06); border-color: var(--ink-soft); }
.nav-login svg { opacity: 0.7; }

/* ===== SHARED LAYOUT ===== */
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 48px; }
.sect { padding: 120px 0; }
.divider {
  max-width: 1200px; margin: 0 auto; height: 1px;
  background: linear-gradient(90deg, transparent, var(--border), transparent);
}
.tag {
  font-family: 'Geist Mono', monospace;
  font-size: 11px; font-weight: 600; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--accent); margin-bottom: 16px;
}
.sect-title {
  font-family: 'Satoshi', sans-serif;
  font-size: 44px; font-weight: 800; letter-spacing: -0.03em;
  line-height: 1.1; margin-bottom: 18px; color: var(--text-primary);
}
.sect-desc {
  font-size: 16px; color: var(--text-secondary); max-width: 500px;
  margin-bottom: 56px; line-height: 1.7;
}

/* === Glass card style === */
.glass-card {
  background: var(--glass);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  transition: all 0.4s;
}
.glass-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-hover);
  transform: translateY(-2px);
  box-shadow: var(--card-hover-shadow);
}

/* === Button styles === */
.btn-p {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--ink);
  color: var(--paper); border: none; border-radius: 10px;
  padding: 14px 30px; font-size: 15px; font-weight: 600;
  cursor: pointer; transition: all 0.3s; font-family: inherit;
  text-decoration: none; position: relative; overflow: hidden;
}
.btn-p:hover { background: var(--accent); }
.btn-s {
  display: inline-flex; align-items: center;
  background: var(--paper); border: 1px solid var(--ink-faint);
  color: var(--ink); border-radius: 10px;
  padding: 14px 30px; font-size: 15px; font-weight: 500;
  cursor: pointer; transition: all 0.3s; font-family: inherit;
  text-decoration: none;
}
.btn-s:hover { background: var(--paper-2); }
.btn-ghost {
  display: inline-flex; align-items: center;
  background: transparent; color: var(--ink); border: none;
  border-radius: 10px; padding: 14px 30px; font-size: 15px; font-weight: 500;
  cursor: pointer; transition: all 0.3s; font-family: inherit;
  text-decoration: none;
}
.btn-ghost:hover { background: rgba(31,90,51,0.06); }

/* === Card link === */
.card-link {
  display: inline-flex; align-items: center; gap: 6px;
  margin-top: 28px; font-size: 14px; font-weight: 600;
  color: var(--accent); text-decoration: none; transition: gap 0.3s;
}
.card-link:hover { gap: 10px; }

/* ===== FINAL CTA ===== */
.cta-section {
  text-align: center; padding: 120px 0;
  max-width: 700px; margin: 0 auto;
}
.shimmer-line {
  width: 48px; height: 2px; margin: 0 auto 24px;
  background: linear-gradient(90deg, var(--ink), var(--accent));
  border-radius: 2px; position: relative; overflow: hidden;
}
.shimmer-line::after {
  content: ''; position: absolute;
  width: 16px; height: 100%;
  background: rgba(255,255,255,0.5);
  animation: shimmer 2.5s ease-in-out infinite;
}
@keyframes shimmer {
  0% { transform: translateX(-16px); }
  100% { transform: translateX(64px); }
}
.cta-section h2 {
  font-family: 'Satoshi', sans-serif;
  font-size: 44px; font-weight: 800; letter-spacing: -0.03em;
  color: var(--text-primary); margin-bottom: 18px; line-height: 1.1;
}
.cta-section p {
  font-size: 16px; color: var(--text-secondary); margin-bottom: 36px; line-height: 1.7;
}

/* ===== FOOTER ===== */
footer {
  border-top: 1px solid var(--border);
  padding: 40px 48px;
  max-width: 1200px; margin: 0 auto;
  display: flex; justify-content: space-between; align-items: center;
}
.ft-left { font-size: 12px; color: var(--text-muted); }
.ft-right { display: flex; gap: 20px; }
.ft-right a { font-size: 12px; color: var(--text-muted); text-decoration: none; transition: color 0.3s; }
.ft-right a:hover { color: var(--text-primary); }

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  nav { padding: 0 20px; }
  .wrap { padding: 0 20px; }
  .sect { padding: 80px 0; }
  .sect-title { font-size: 32px; }
  .nav-right a:not(.lang-toggle):not(.nav-cta) { display: none; }
  footer { flex-direction: column; gap: 16px; text-align: center; }
  .nav-login { display: none; }
}

/* === Reduced motion: disable all animations for accessibility === */
@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .glass-card { transition: none; }
  .shimmer-line::after { animation: none; }
}
