/* ============================================
   WAKARA.ORG — Design System
   Clean, Editorial, High-Trust
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap');

/* ============================================
   1. TOKENS
   ============================================ */
:root {
  /* Colors */
  --bg:            #ffffff;
  --bg-soft:       #f8fafc;
  --bg-alt:        #f1f5f9;
  --card:          #ffffff;
  --border:        #e2e8f0;
  --border-hover:  #94a3b8;

  --text:          #0f172a;
  --text-2:        #334155;
  --muted:         #64748b;
  --muted-light:   #94a3b8;

  --primary:       #1a56db;
  --primary-dark:  #1447c1;
  --primary-light: #eff6ff;
  --primary-ring:  rgba(26, 86, 219, 0.18);

  --accent:        #0ea5e9;
  --success:       #059669;
  --warning:       #d97706;
  --danger:        #dc2626;

  /* Radii */
  --r-sm:   6px;
  --r:      10px;
  --r-lg:   16px;
  --r-xl:   24px;
  --r-full: 9999px;

  /* Shadows */
  --sh-xs: 0 1px 2px rgba(0,0,0,0.05);
  --sh-sm: 0 1px 3px rgba(0,0,0,0.07), 0 1px 2px rgba(0,0,0,0.04);
  --sh:    0 4px 6px -1px rgba(0,0,0,0.08), 0 2px 4px -2px rgba(0,0,0,0.04);
  --sh-md: 0 10px 15px -3px rgba(0,0,0,0.07), 0 4px 6px -4px rgba(0,0,0,0.04);
  --sh-lg: 0 20px 25px -5px rgba(0,0,0,0.08), 0 8px 10px -6px rgba(0,0,0,0.04);
  --sh-xl: 0 25px 50px -12px rgba(0,0,0,0.18);

  /* Typography scale */
  --text-xs:   0.75rem;
  --text-sm:   0.875rem;
  --text-base: 1rem;
  --text-lg:   1.125rem;
  --text-xl:   1.25rem;
  --text-2xl:  1.5rem;
  --text-3xl:  1.875rem;
  --text-4xl:  2.25rem;
  --text-5xl:  3rem;

  /* Spacing */
  --space-section: clamp(4rem, 8vw, 7rem);
}

/* ============================================
   2. RESET & BASE
   ============================================ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
  background: var(--bg);
  color: var(--text);
}

body {
  line-height: 1.65;
  background: var(--bg);
  min-height: 100vh;
}

img, svg { display: block; max-width: 100%; }

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease;
}

ul { list-style: none; }

/* ============================================
   3. LAYOUT
   ============================================ */
.page {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

main { flex: 1; }

.section {
  padding: var(--space-section) 5%;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
}

.section.alt {
  background: var(--bg-soft);
  max-width: 100%;
  padding-left: 5%;
  padding-right: 5%;
}

.section.alt > * {
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
}

/* ============================================
   4. TYPOGRAPHY
   ============================================ */
h1, h2, h3, h4, h5, h6 {
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.025em;
  color: var(--text);
}

h1 { font-size: clamp(2.2rem, 4.5vw + 0.5rem, 3.75rem); }
h2 { font-size: clamp(1.6rem, 2.5vw + 0.5rem, 2.4rem); margin-bottom: 2rem; }
h3 { font-size: var(--text-xl); margin-bottom: 0.5rem; }
h4 { font-size: var(--text-base); font-weight: 700; }

p {
  color: var(--muted);
  font-size: var(--text-lg);
  line-height: 1.75;
}

.lead {
  font-size: clamp(1.1rem, 1.5vw + 0.5rem, 1.3rem);
  color: var(--text-2);
  line-height: 1.7;
  max-width: 560px;
  margin: 0 auto 2.5rem;
}

/* ============================================
   5. NAVIGATION
   ============================================ */
.nav {
  position: sticky;
  top: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 5%;
  height: 68px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid var(--border);
}

.logo a, .logo {
  font-size: var(--text-lg);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 0.4rem;
  text-decoration: none;
}

.logo a::before, .logo::before {
  content: '◈';
  font-size: 1.1rem;
  color: var(--primary);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.nav-links a {
  padding: 0.45rem 0.9rem;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--muted);
  border-radius: var(--r-full);
  transition: all 0.15s ease;
}

.nav-links a:hover {
  color: var(--text);
  background: var(--bg-alt);
}

.nav-links a.button.ghost {
  background: var(--primary-light);
  color: var(--primary);
  border: 1.5px solid rgba(26, 86, 219, 0.2);
}

.nav-links a.button.ghost:hover {
  background: var(--primary);
  color: #fff;
}

/* ============================================
   6. BUTTONS
   ============================================ */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.8rem 1.75rem;
  border-radius: var(--r-full);
  font-size: var(--text-base);
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 2px solid transparent;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
}

.button.primary {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  box-shadow: 0 4px 14px var(--primary-ring);
}

.button.primary:hover {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px var(--primary-ring);
}

.button.secondary {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}

.button.secondary:hover {
  background: var(--bg-alt);
  border-color: var(--border-hover);
  transform: translateY(-2px);
}

.button.ghost {
  background: transparent;
  color: var(--primary);
  border-color: transparent;
}

/* ============================================
   7. HERO SECTION
   ============================================ */
.hero {
  padding: clamp(4rem, 8vw, 7rem) 5% clamp(3rem, 6vw, 5rem);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 3rem;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
}

.hero-content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
}

.hero-content h1 {
  margin-bottom: 1.25rem;
}

.hero-content .lead {
  margin: 0 0 2rem;
  text-align: left;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 1rem;
  background: var(--primary-light);
  color: var(--primary);
  border: 1.5px solid rgba(26, 86, 219, 0.15);
  border-radius: var(--r-full);
  font-size: var(--text-sm);
  font-weight: 700;
  letter-spacing: 0.01em;
  margin-bottom: 1.25rem;
}

.pill::before {
  content: '✦';
  font-size: 0.65rem;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 2rem;
}

/* Hero Card (right side) */
.hero-card {
  background: var(--card);
  border: 1.5px solid var(--border);
  border-radius: var(--r-xl);
  padding: 2rem;
  min-width: 260px;
  max-width: 300px;
  box-shadow: var(--sh-lg);
  display: flex;
  flex-direction: column;
  gap: 1rem;
  position: relative;
  overflow: hidden;
}

.hero-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  border-radius: var(--r-xl) var(--r-xl) 0 0;
}

.hero-card h3 {
  font-size: var(--text-base);
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.01em;
}

.hero-card ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.hero-card ul li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text-2);
}

.hero-card ul li::before {
  content: '✓';
  color: var(--success);
  font-weight: 800;
  font-size: 0.8rem;
  flex-shrink: 0;
}

.trust-bar {
  display: flex;
  gap: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.trust-bar > div {
  display: flex;
  flex-direction: column;
}

.trust-bar strong {
  font-size: var(--text-base);
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.02em;
}

.trust-bar span {
  font-size: var(--text-xs);
  color: var(--muted);
  font-weight: 500;
}

/* Hero disclaimer */
.hero-content .disclaimer,
.hero .disclaimer {
  font-size: var(--text-xs);
  color: var(--muted-light);
  font-style: italic;
  margin-top: 0.5rem;
  line-height: 1.5;
  max-width: 500px;
  background: none;
  border: none;
  padding: 0;
}

/* ============================================
   8. SECTION HEADERS
   ============================================ */
.section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 2.5rem;
  gap: 1rem;
}

.section-header h2 { margin-bottom: 0; }

.link {
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--primary);
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  white-space: nowrap;
}

.link::after { content: ' →'; }
.link:hover { color: var(--primary-dark); }

/* ============================================
   9. CARDS
   ============================================ */
.grid {
  display: grid;
  gap: 1.5rem;
}

.cards {
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}

.card {
  background: var(--card);
  border: 1.5px solid var(--border);
  border-radius: var(--r-lg);
  padding: 1.75rem 2rem;
  transition: all 0.25s ease;
  display: flex;
  flex-direction: column;
  box-shadow: var(--sh-xs);
  position: relative;
}

.card:hover {
  border-color: var(--primary);
  transform: translateY(-3px);
  box-shadow: var(--sh-md);
}

.card h3 {
  font-size: var(--text-base);
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--text);
  line-height: 1.35;
}

.card h3 a {
  color: inherit;
  transition: color 0.2s;
}

.card:hover h3, .card:hover h3 a {
  color: var(--primary);
}

.card p {
  font-size: var(--text-sm);
  color: var(--muted);
  line-height: 1.65;
  flex: 1;
}

/* Card tag */
.tag {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.75rem;
  background: var(--primary-light);
  color: var(--primary);
  border-radius: var(--r-full);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.02em;
  margin-top: 1rem;
  width: fit-content;
}

/* ============================================
   10. STEPS (How it works)
   ============================================ */
.steps {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
}

.step {
  background: var(--card);
  border: 1.5px solid var(--border);
  border-radius: var(--r-lg);
  padding: 2rem;
  transition: all 0.25s ease;
  display: flex;
  flex-direction: column;
  box-shadow: var(--sh-xs);
}

.step:hover {
  border-color: var(--primary);
  transform: translateY(-3px);
  box-shadow: var(--sh-md);
}

.step > span {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  background: var(--primary);
  color: #fff;
  border-radius: var(--r);
  font-weight: 800;
  font-size: var(--text-base);
  margin-bottom: 1.25rem;
  flex-shrink: 0;
}

.step h3 {
  font-size: var(--text-base);
  color: var(--text);
  margin-bottom: 0.5rem;
}

.step p {
  font-size: var(--text-sm);
  color: var(--muted);
  line-height: 1.65;
}

.step ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-top: 1rem;
}

.step ul li { margin: 0; }

.step ul a {
  color: var(--muted);
  font-size: var(--text-sm);
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: color 0.15s;
}

.step ul a::before {
  content: '→';
  color: var(--primary);
  font-weight: 700;
}

.step ul a:hover { color: var(--primary); }

/* ============================================
   11. ARTICLE (PROSE) LAYOUT
   ============================================ */
.article-content {
  max-width: 720px;
  margin: 0 auto;
  padding: 3rem 5% 5rem;
}

.prose { font-size: var(--text-lg); color: var(--text-2); }

.prose h1 {
  font-size: clamp(1.9rem, 4vw, 3.25rem);
  margin-bottom: 0.75rem;
  text-align: left;
  color: var(--text);
}

.prose h2 {
  font-size: var(--text-2xl);
  margin-top: 2.75rem;
  margin-bottom: 1rem;
  color: var(--text);
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}

.prose h3 {
  font-size: var(--text-xl);
  margin-top: 2rem;
  margin-bottom: 0.75rem;
  color: var(--text);
}

.prose p {
  margin-bottom: 1.5rem;
  color: var(--text-2);
  font-size: var(--text-lg);
  line-height: 1.8;
}

.prose ul, .prose ol {
  margin-bottom: 1.75rem;
  padding-left: 1.5rem;
  color: var(--text-2);
  line-height: 1.8;
}

.prose li {
  margin-bottom: 0.6rem;
  font-size: var(--text-base);
}

.prose strong { color: var(--text); font-weight: 700; }

.prose a {
  color: var(--primary);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.meta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--muted);
  font-size: var(--text-sm);
  font-weight: 500;
  margin-bottom: 2.5rem;
  padding-bottom: 1.75rem;
  border-bottom: 1px solid var(--border);
}

.meta::before {
  content: '📄';
  font-size: 0.85rem;
}

/* ============================================
   12. DISCLAIMER BOX
   ============================================ */
.disclaimer {
  margin-top: 3.5rem;
  padding: 1.25rem 1.5rem;
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-left: 4px solid var(--warning);
  border-radius: var(--r);
}

.disclaimer p {
  margin: 0;
  font-size: var(--text-sm);
  color: #92400e;
  line-height: 1.6;
}

/* ============================================
   13. SIGNUP / CTA BANNER
   ============================================ */
.signup {
  background: linear-gradient(135deg, var(--primary) 0%, #1447c1 50%, #0ea5e9 100%);
  border-radius: var(--r-xl);
  padding: clamp(2.5rem, 5vw, 4rem) clamp(1.5rem, 4vw, 3rem);
  text-align: center;
  position: relative;
  overflow: hidden;
  box-shadow: var(--sh-xl);
}

.signup::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  pointer-events: none;
}

.signup h2 {
  color: #fff;
  margin-bottom: 0.75rem;
  font-size: clamp(1.5rem, 2.5vw + 0.5rem, 2.25rem);
}

.signup p {
  color: rgba(255,255,255,0.85);
  max-width: 480px;
  margin: 0 auto 1.75rem;
  font-size: var(--text-base);
}

.signup .small {
  font-size: var(--text-xs);
  color: rgba(255,255,255,0.6);
  margin-top: 1rem;
}

.signup-form {
  display: flex;
  gap: 0.75rem;
  max-width: 460px;
  margin: 0 auto;
}

.signup-form input {
  flex: 1;
  padding: 0.85rem 1.25rem;
  border-radius: var(--r-full);
  border: 2px solid transparent;
  background: rgba(255,255,255,0.95);
  color: var(--text);
  font-size: var(--text-base);
  font-family: inherit;
  transition: all 0.2s;
}

.signup-form input::placeholder { color: var(--muted); }

.signup-form input:focus {
  outline: none;
  border-color: rgba(255,255,255,0.6);
  box-shadow: 0 0 0 4px rgba(255,255,255,0.2);
}

.signup-form .button.primary {
  background: #0f172a;
  color: #fff;
  border-color: #0f172a;
  box-shadow: none;
  flex-shrink: 0;
}

.signup-form .button.primary:hover {
  background: #1e293b;
  border-color: #1e293b;
}

/* ============================================
   14. FOOTER
   ============================================ */
.footer {
  background: var(--bg-soft);
  border-top: 1px solid var(--border);
  padding: 4rem 5% 2.5rem;
  margin-top: auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer-grid > div:first-child p {
  font-size: var(--text-sm);
  color: var(--muted);
  max-width: 240px;
  margin-top: 0.5rem;
  line-height: 1.65;
}

.footer-grid h3 {
  font-size: var(--text-base);
  font-weight: 800;
  color: var(--primary);
  letter-spacing: -0.02em;
  margin-bottom: 0;
}

.footer-grid h3::before {
  content: '◈ ';
}

.footer-grid h4 {
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-bottom: 1rem;
}

.footer-grid ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.footer-grid ul li a {
  font-size: var(--text-sm);
  color: var(--text-2);
  font-weight: 500;
  transition: color 0.15s;
}

.footer-grid ul li a:hover { color: var(--primary); }

.footer-links {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-bottom: 1.5rem;
}

.footer-links a {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--muted);
  transition: color 0.15s;
}

.footer-links a:hover { color: var(--primary); }

.footer > p,
.footer .disclaimer {
  text-align: center;
  font-size: var(--text-xs);
  color: var(--muted-light);
  max-width: 680px;
  margin: 0 auto;
  line-height: 1.7;
  background: none;
  border: none;
  padding: 0;
}

.footer hr {
  border: none;
  border-top: 1px solid var(--border);
  margin-bottom: 1.5rem;
}

/* ============================================
   15. ARTICLE PAGE (non-prose)
   ============================================ */
.section > h1 {
  font-size: clamp(1.9rem, 4vw, 3rem);
  margin-bottom: 1rem;
}

.section > p.lead {
  text-align: left;
  margin: 0 0 2.5rem;
}

.section > br + h3,
.section h3 {
  font-size: var(--text-xl);
  margin-top: 2rem;
  margin-bottom: 0.5rem;
}

.section > p {
  font-size: var(--text-lg);
  color: var(--text-2);
  line-height: 1.8;
  margin-bottom: 1.25rem;
}

/* ============================================
   16. TOOLS & FORMS
   ============================================ */
input[type="text"],
input[type="email"],
input[type="number"],
textarea {
  font-family: inherit;
  font-size: var(--text-base);
  padding: 0.75rem 1rem;
  border: 1.5px solid var(--border);
  border-radius: var(--r);
  background: var(--bg);
  color: var(--text);
  width: 100%;
  transition: border-color 0.2s, box-shadow 0.2s;
}

input:focus, textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-ring);
}

input::placeholder, textarea::placeholder {
  color: var(--muted-light);
}

label strong {
  color: var(--text);
  font-size: var(--text-sm);
  font-weight: 700;
}

/* Tool card wrapper */
.tool-card {
  background: var(--card);
  border: 1.5px solid var(--border);
  border-radius: var(--r-xl);
  padding: 2rem 2.25rem;
  box-shadow: var(--sh-sm);
}

/* ============================================
   17. READ MORE LINK
   ============================================ */
.read-more {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  margin-top: auto;
  padding-top: 1.25rem;
  color: var(--primary);
  font-weight: 700;
  font-size: var(--text-sm);
  transition: gap 0.15s;
}

.read-more:hover { gap: 0.55rem; }

/* ============================================
   18. MISC UTILITIES
   ============================================ */
.text-sm { font-size: var(--text-sm); }
.text-xs { font-size: var(--text-xs); }
.mt-4    { margin-top: 1rem; }
.small   { font-size: var(--text-xs); color: var(--muted); }
.text-gray-500 { color: var(--muted); }
.text-center   { text-align: center; }

/* ============================================
   19. RESPONSIVE
   ============================================ */
@media (max-width: 1024px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
  }
}

@media (max-width: 768px) {
  .hero {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero-content {
    align-items: center;
  }

  .hero-content .lead { text-align: center; }

  .hero-card {
    max-width: 100%;
    min-width: unset;
  }

  .nav {
    padding: 0 1.25rem;
  }

  .nav-links {
    gap: 0;
  }

  .nav-links a {
    padding: 0.4rem 0.65rem;
    font-size: 0.8rem;
  }

  .section-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .signup-form {
    flex-direction: column;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 1.75rem;
  }

  .cta-row {
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .nav-links a:not(.button) {
    display: none;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }

  .cards {
    grid-template-columns: 1fr;
  }

  .steps {
    grid-template-columns: 1fr;
  }

  .hero {
    padding: 2.5rem 5%;
  }
}
