/* =====================================================
   DUKANA — Shared Stylesheet
   ===================================================== */

/* ── Design Tokens ── */
:root {
  --primary:        #2563EB;
  --primary-dark:   #1D4ED8;
  --primary-light:  #3B82F6;
  --primary-surface:#EFF6FF;
  --navy:           #1E3A8A;
  --accent:         #7C3AED;
  --accent-light:   #A78BFA;
  --accent-surface: #F5F3FF;
  --success:        #16A34A;
  --warning:        #D97706;
  --danger:         #DC2626;
  --text-primary:   #111827;
  --text-secondary: #6B7280;
  --text-muted:     #9CA3AF;
  --surface:        #F9FAFB;
  --surface-2:      #F3F4F6;
  --border:         #E5E7EB;
  --white:          #FFFFFF;

  --radius-sm:  6px;
  --radius:     12px;
  --radius-lg:  20px;
  --radius-xl:  28px;
  --radius-full:9999px;

  --shadow-sm:  0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.06);
  --shadow:     0 4px 16px rgba(0,0,0,.10);
  --shadow-lg:  0 12px 40px rgba(0,0,0,.14);
  --shadow-xl:  0 24px 64px rgba(0,0,0,.16);

  --font: 'Inter', system-ui, -apple-system, sans-serif;
  --transition: 220ms cubic-bezier(.4,0,.2,1);
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  color: var(--text-primary);
  background: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }

/* ── Typography ── */
.text-xs  { font-size: .75rem; }
.text-sm  { font-size: .875rem; }
.text-base{ font-size: 1rem; }
.text-lg  { font-size: 1.125rem; }
.text-xl  { font-size: 1.25rem; }
.text-2xl { font-size: 1.5rem; }
.text-3xl { font-size: 1.875rem; }
.text-4xl { font-size: 2.25rem; }
.text-5xl { font-size: 3rem; }

/* ── Layout ── */
.container {
  width: 100%;
  max-width: 1120px;
  margin-inline: auto;
  padding-inline: 1.25rem;
}
.section { padding-block: 5rem; }
.section-sm { padding-block: 3rem; }

/* ── Flex / Grid helpers ── */
.flex       { display: flex; }
.flex-col   { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center  { justify-content: center; }
.gap-4  { gap: 1rem; }
.gap-6  { gap: 1.5rem; }
.gap-8  { gap: 2rem; }
.gap-12 { gap: 3rem; }

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: .75rem 1.75rem;
  border-radius: var(--radius-full);
  font-size: .9375rem;
  font-weight: 600;
  transition: all var(--transition);
  white-space: nowrap;
}
.btn-primary {
  background: var(--primary);
  color: var(--white);
  box-shadow: 0 2px 8px rgba(37,99,235,.35);
}
.btn-primary:hover { background: var(--primary-dark); box-shadow: 0 4px 14px rgba(37,99,235,.45); transform: translateY(-1px); }
.btn-secondary {
  background: rgba(255,255,255,.15);
  color: var(--white);
  border: 1.5px solid rgba(255,255,255,.4);
  backdrop-filter: blur(8px);
}
.btn-secondary:hover { background: rgba(255,255,255,.25); }
.btn-outline {
  background: transparent;
  color: var(--primary);
  border: 1.5px solid var(--primary);
}
.btn-outline:hover { background: var(--primary-surface); }
.btn-lg { padding: .875rem 2.25rem; font-size: 1rem; }
.btn-sm { padding: .5rem 1.25rem; font-size: .875rem; }

/* ── Badge ── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: .375rem;
  padding: .25rem .75rem;
  border-radius: var(--radius-full);
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .03em;
  text-transform: uppercase;
}
.badge-primary  { background: var(--primary-surface); color: var(--primary); }
.badge-accent   { background: var(--accent-surface);  color: var(--accent); }
.badge-success  { background: #DCFCE7; color: var(--success); }
.badge-pro      { background: var(--primary-surface); color: var(--primary); }
.badge-ultimate { background: var(--accent-surface);  color: var(--accent); }

/* ── Section Label ── */
.section-label {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .375rem 1rem;
  border-radius: var(--radius-full);
  background: var(--primary-surface);
  color: var(--primary);
  font-size: .8125rem;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}
.section-label.accent { background: var(--accent-surface); color: var(--accent); }

/* ── Section Header ── */
.section-header {
  text-align: center;
  margin-bottom: 3.5rem;
}
.section-header h2 {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 800;
  letter-spacing: -.02em;
  color: var(--text-primary);
  margin-bottom: .75rem;
  line-height: 1.2;
}
.section-header p {
  font-size: 1.0625rem;
  color: var(--text-secondary);
  max-width: 540px;
  margin-inline: auto;
}

/* ── Cards ── */
.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  transition: all var(--transition);
}
.card { box-shadow: var(--shadow-sm); }
.card-icon {
  width: 48px; height: 48px;
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 1rem;
}

/* ── Nav ── */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding-block: 1rem;
}
.navbar .container { display: flex; align-items: center; justify-content: space-between; gap: 2rem; }
.nav-logo { display: flex; align-items: center; gap: .625rem; }
.nav-logo img { width: 36px; height: 36px; border-radius: var(--radius-sm); }
.nav-logo span { font-size: 1.25rem; font-weight: 800; color: var(--text-primary); letter-spacing: -.02em; }
.nav-links { display: flex; align-items: center; gap: 2rem; }
.nav-links a { font-size: .9375rem; font-weight: 500; color: var(--text-secondary); transition: color var(--transition); }
.nav-links a:hover { color: var(--primary); }
.nav-cta { display: flex; align-items: center; gap: 1rem; }
.nav-mobile-toggle { display: none; padding: .5rem; border-radius: var(--radius-sm); }
.nav-mobile-toggle svg { width: 22px; height: 22px; }

/* ── Footer ── */
.footer {
  background: var(--navy);
  color: rgba(255,255,255,.75);
  padding-block: 3.5rem 2rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 2.5rem;
}
.footer-brand .nav-logo span { color: var(--white); }
.footer-brand p { margin-top: .75rem; font-size: .9rem; line-height: 1.7; color: rgba(255,255,255,.6); max-width: 260px; }
.footer-col h4 { color: var(--white); font-size: .875rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; margin-bottom: 1rem; }
.footer-col ul { display: flex; flex-direction: column; gap: .625rem; }
.footer-col ul a { font-size: .9rem; color: rgba(255,255,255,.6); transition: color var(--transition); }
.footer-col ul a:hover { color: var(--white); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.12); padding-top: 1.5rem; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 1rem; }
.footer-bottom p { font-size: .85rem; color: rgba(255,255,255,.45); }
.footer-bottom-links { display: flex; gap: 1.5rem; }
.footer-bottom-links a { font-size: .85rem; color: rgba(255,255,255,.5); transition: color var(--transition); }
.footer-bottom-links a:hover { color: var(--white); }

/* ── Prose (Terms / Privacy) ── */
.prose-page { padding-top: 5rem; padding-bottom: 5rem; }
.prose-layout { display: grid; grid-template-columns: 220px 1fr; gap: 4rem; align-items: start; }
.prose-toc {
  position: sticky;
  top: 5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
}
.prose-toc h3 { font-size: .8125rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--text-muted); margin-bottom: 1rem; }
.prose-toc ol { counter-reset: toc; display: flex; flex-direction: column; gap: .25rem; }
.prose-toc ol li { counter-increment: toc; }
.prose-toc ol li a {
  font-size: .875rem;
  color: var(--text-secondary);
  display: flex;
  align-items: baseline;
  gap: .5rem;
  padding: .375rem .5rem;
  border-radius: var(--radius-sm);
  transition: all var(--transition);
}
.prose-toc ol li a::before { content: counter(toc)"."; font-size: .75rem; color: var(--text-muted); min-width: 1.25rem; }
.prose-toc ol li a:hover { color: var(--primary); background: var(--primary-surface); }

.prose-content h1 { font-size: clamp(1.75rem, 3.5vw, 2.25rem); font-weight: 800; letter-spacing: -.02em; margin-bottom: .5rem; }
.prose-meta { font-size: .875rem; color: var(--text-muted); margin-bottom: 2.5rem; }
.prose-content section { margin-bottom: 3rem; scroll-margin-top: 6rem; }
.prose-content h2 { font-size: 1.25rem; font-weight: 700; color: var(--text-primary); margin-bottom: .75rem; padding-bottom: .5rem; border-bottom: 2px solid var(--primary-surface); }
.prose-content p { font-size: .9375rem; color: var(--text-secondary); line-height: 1.75; margin-bottom: .875rem; }
.prose-content ul, .prose-content ol { padding-left: 1.5rem; margin-bottom: .875rem; }
.prose-content ul li, .prose-content ol li { font-size: .9375rem; color: var(--text-secondary); line-height: 1.75; margin-bottom: .375rem; }
.prose-content ul { list-style: disc; }
.prose-content ol { list-style: decimal; }
.prose-content strong { color: var(--text-primary); font-weight: 600; }
.prose-content a { color: var(--primary); text-decoration: underline; text-underline-offset: 3px; }

/* ── Fade-in animation ── */
.fade-in { opacity: 0; transform: translateY(24px); transition: opacity .6s ease, transform .6s ease; }
.fade-in.visible { opacity: 1; transform: translateY(0); }

/* ── Responsive ── */
@media (max-width: 1024px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  .nav-links, .nav-cta .btn { display: none; }
  .nav-mobile-toggle { display: flex; }
  .section { padding-block: 3.5rem; }
  .section-header { margin-bottom: 2.5rem; }
  .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
  .prose-layout { grid-template-columns: 1fr; }
  .prose-toc { position: static; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
}

/* ── Mobile Nav Drawer ── */
.mobile-nav {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.5);
  z-index: 200;
}
.mobile-nav.open { display: block; }
.mobile-nav-panel {
  position: absolute;
  top: 0; right: 0;
  width: min(300px, 85vw);
  height: 100%;
  background: var(--white);
  padding: 2rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  overflow-y: auto;
}
.mobile-nav-close { align-self: flex-end; padding: .5rem; }
.mobile-nav-links { display: flex; flex-direction: column; gap: 1rem; }
.mobile-nav-links a { font-size: 1.0625rem; font-weight: 500; color: var(--text-primary); padding: .5rem 0; border-bottom: 1px solid var(--border); }
