/* ===== Kredofy — "Digital Ledger" design system ===== */

:root {
  --ink: #10151f;
  --ink-soft: #3a4152;
  --muted: #6b6459;
  --paper: #ffffff;
  --paper-card: #ffffff;
  --line: #e3e0d8;
  --accent: #c2720c;
  --accent-dark: #9c5a08;
  --accent-soft: #f6e8d3;
  --teal: #1f7a6c;
  --teal-soft: #e1f0eb;
  --folder-tab: #e4d9bb;
  --stamp: #7a2e2e;
  --stamp-soft: #f5e2df;
  --success: #2f6b45;
  --radius: 10px;
  --radius-sm: 6px;
  --shadow: 0 1px 2px rgba(16,21,31,0.04), 0 8px 24px rgba(16,21,31,0.06);
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

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

body {
  font-family: 'Inter', -apple-system, "Segoe UI", Arial, sans-serif;
  background: var(--paper);
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  padding-top: 96px;
}

h1, h2, h3, .logo {
  font-family: 'Space Grotesk', -apple-system, "Segoe UI", Arial, sans-serif;
  letter-spacing: -0.01em;
}

a { color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------- Floating pill nav ---------- */
.navbar {
  position: fixed; top: 16px; left: 50%; transform: translateX(-50%);
  width: calc(100% - 40px); max-width: 1040px;
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 24px;
  background: var(--ink);
  border-radius: 999px;
  box-shadow: 0 10px 30px rgba(16,21,31,0.18);
  z-index: 100;
  transition: transform 0.3s ease;
}
.navbar.nav-hidden { transform: translateX(-50%) translateY(-140%); }
.logo { color: #fff; font-weight: 700; font-size: 20px; text-decoration: none; }
.nav-links a {
  color: #b8bfcf; text-decoration: none; margin-left: 22px;
  font-size: 13px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase;
  transition: color 0.15s ease;
}
.nav-links a:hover { color: #fff; }
.btn-nav {
  background: var(--accent); color: #fff !important; padding: 9px 18px;
  border-radius: var(--radius-sm); text-transform: none; letter-spacing: normal;
}
.btn-nav:hover { background: var(--accent-dark); }

@media (max-width: 640px) {
  body { padding-top: 84px; }
  .navbar { width: calc(100% - 24px); padding: 11px 16px; }
  .nav-links a { margin-left: 14px; font-size: 12px; }
}

.container { max-width: 1040px; margin: 0 auto; padding: 24px 20px 80px; }

/* ---------- Flash messages ---------- */
.flash-messages { margin-bottom: 20px; }
.flash {
  background: var(--accent-soft); border: 1px solid var(--accent); color: #6b3d05;
  padding: 12px 16px; border-radius: var(--radius-sm); margin-bottom: 8px; font-size: 14px;
}

/* ---------- Hero (two column with illustration) ---------- */
.hero { padding: 40px 0 56px; }
.hero-grid { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 48px; align-items: center; }
.hero-copy h1 { font-size: 44px; font-weight: 700; margin-bottom: 18px; line-height: 1.15; }
.hero-copy .subtitle { font-size: 18px; color: var(--muted); max-width: 520px; margin-bottom: 30px; }
.hint { color: var(--muted); font-size: 13px; margin-top: 14px; font-family: 'IBM Plex Mono', monospace; }
.hero-art svg { width: 100%; height: auto; display: block; }

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; text-align: center; }
  .hero-copy .subtitle { margin-left: auto; margin-right: auto; }
  .hero-art { max-width: 320px; margin: 0 auto; order: -1; }
}

/* ---------- Section title (shared) ---------- */
.section-title {
  text-align: center; font-size: 28px; font-weight: 700;
  margin-top: 88px; margin-bottom: 36px;
}

/* ---------- Colorful icon chips (features / steps) ---------- */
.icon-chip {
  display: inline-flex; align-items: center; justify-content: center;
  width: 42px; height: 42px; border-radius: 50%; font-size: 19px; margin-bottom: 14px;
}
.icon-amber { background: var(--accent-soft); }
.icon-teal { background: var(--teal-soft); }
.icon-stamp { background: var(--stamp-soft); }

.chip-solid-amber { background: var(--accent); color: #fff; }
.chip-solid-teal { background: var(--teal); color: #fff; }
.chip-solid-stamp { background: var(--stamp); color: #fff; }

/* ---------- Old way vs Kredofy way comparison ---------- */
.compare-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.compare-col { border-radius: var(--radius); padding: 28px 26px; border: 1px solid var(--line); }
.compare-col h4 {
  font-family: 'IBM Plex Mono', monospace; font-size: 12px; text-transform: uppercase;
  letter-spacing: 0.06em; margin-bottom: 16px; font-weight: 600;
}
.compare-col ul { list-style: none; }
.compare-col li { font-size: 15px; padding: 9px 0 9px 26px; position: relative; }

.compare-col.old { background: var(--stamp-soft); border-style: dashed; }
.compare-col.old h4 { color: var(--stamp); }
.compare-col.old li { color: var(--ink-soft); }
.compare-col.old li::before {
  content: "✕"; position: absolute; left: 0; top: 9px; color: var(--stamp); font-size: 13px; font-weight: 700;
}

.compare-col.new { background: var(--teal-soft); border: 2px solid var(--teal); }
.compare-col.new h4 { color: var(--teal); }
.compare-col.new li { color: var(--ink); font-weight: 500; }
.compare-col.new li::before {
  content: "✓"; position: absolute; left: 0; top: 9px; color: var(--teal); font-size: 14px; font-weight: 700;
}

/* ---------- How it works steps ---------- */
.steps-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.step { position: relative; }
.step-num { font-family: 'IBM Plex Mono', monospace; font-weight: 700; font-size: 15px; }
.step h3 { font-size: 17px; margin-bottom: 8px; }
.step p { color: var(--muted); font-size: 14px; }

/* ---------- Feature cards (folder-tab signature) ---------- */
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; margin-top: 64px; }
.feature {
  background: var(--paper-card); padding: 28px 24px 24px; border-radius: 0 var(--radius) var(--radius) var(--radius);
  border: 1px solid var(--line); box-shadow: var(--shadow);
  position: relative; margin-top: 12px;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.feature::before {
  content: ""; position: absolute; top: -12px; left: 22px;
  width: 52px; height: 14px; background: var(--folder-tab);
  border-radius: 4px 4px 0 0;
}
.feature:hover { transform: translateY(-3px); box-shadow: 0 4px 8px rgba(16,21,31,0.06), 0 16px 32px rgba(16,21,31,0.08); }
.feature h3 { margin-bottom: 8px; font-size: 17px; }
.feature p { color: var(--muted); font-size: 14px; }

/* ---------- FAQ accordion ---------- */
.faq-list { max-width: 720px; margin: 0 auto; }
.faq-item { border-bottom: 1px solid var(--line); padding: 18px 0; }
.faq-item summary {
  cursor: pointer; font-weight: 600; font-size: 16px; list-style: none;
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+"; font-size: 22px; color: var(--accent); font-weight: 400; flex-shrink: 0;
}
.faq-item[open] summary::after { content: "\2212"; }
.faq-item p { color: var(--muted); font-size: 14px; margin-top: 12px; line-height: 1.6; }

/* ---------- Buttons ---------- */
.btn-primary {
  background: var(--accent); color: #fff; border: none; padding: 13px 26px;
  border-radius: var(--radius-sm); font-weight: 600; cursor: pointer; font-size: 15px;
  text-decoration: none; display: inline-block; transition: background 0.15s ease, transform 0.1s ease;
}
.btn-primary:hover { background: var(--accent-dark); transform: translateY(-1px); }
.btn-secondary {
  background: #ece9e1; color: var(--muted); border: 1px solid var(--line); padding: 12px 24px;
  border-radius: var(--radius-sm); font-weight: 600; width: 100%; cursor: not-allowed;
}
.btn-small {
  background: var(--ink); color: #fff; border: none; padding: 7px 15px;
  border-radius: var(--radius-sm); font-size: 13px; cursor: pointer; text-decoration: none;
}

/* ---------- Auth ---------- */
.auth-card {
  max-width: 400px; margin: 40px auto; background: var(--paper-card); padding: 34px;
  border-radius: var(--radius); border: 1px solid var(--line); box-shadow: var(--shadow);
}
.auth-card h2 { margin-bottom: 20px; }
.auth-card label { display: block; font-size: 12px; color: var(--muted); margin-top: 14px; text-transform: uppercase; letter-spacing: 0.04em; font-weight: 600; }
.auth-card input {
  width: 100%; padding: 11px; margin-top: 6px; border: 1px solid var(--line);
  border-radius: var(--radius-sm); font-size: 14px; background: #fdfcfa;
}
.auth-card input:focus { border-color: var(--accent); outline: none; }
.auth-card button { margin-top: 22px; width: 100%; }
.auth-switch { margin-top: 16px; font-size: 13px; color: var(--muted); text-align: center; }

/* ---------- Dashboard ---------- */
.dashboard-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; }
.plan-badge {
  padding: 4px 12px; border-radius: 20px; font-size: 11px; font-weight: 700;
  font-family: 'IBM Plex Mono', monospace; letter-spacing: 0.04em; text-transform: uppercase;
}
.plan-free { background: #ece9e1; color: var(--muted); }
.plan-pro { background: var(--accent-soft); color: #6b3d05; }

.card {
  background: var(--paper-card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px; margin-bottom: 20px; box-shadow: var(--shadow);
}
.card h3 { margin-bottom: 12px; font-size: 15px; }

.inline-form { display: flex; gap: 10px; flex-wrap: wrap; }
.inline-form input {
  flex: 1; min-width: 150px; padding: 10px; border: 1px solid var(--line);
  border-radius: var(--radius-sm); background: #fdfcfa;
}

.client-list { display: grid; gap: 12px; }
.client-card {
  display: block; background: var(--paper-card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px 20px; text-decoration: none; color: inherit; transition: border-color 0.15s ease, transform 0.15s ease;
}
.client-card:hover { border-color: var(--accent); transform: translateX(2px); }
.client-card-name { font-weight: 600; }
.client-card-progress { font-size: 13px; color: var(--muted); margin-top: 4px; font-family: 'IBM Plex Mono', monospace; }

.empty-state { color: var(--muted); font-size: 14px; }

.back-link { display: inline-block; margin-bottom: 16px; color: var(--muted); text-decoration: none; font-size: 14px; }
.back-link:hover { color: var(--ink); }

.portal-link-input {
  width: 100%; padding: 11px; border: 1px solid var(--line); border-radius: var(--radius-sm);
  font-family: 'IBM Plex Mono', monospace; font-size: 13px; margin-top: 8px; background: #fdfcfa;
}

.doc-row, .file-row {
  display: flex; justify-content: space-between; align-items: center; padding: 12px 0;
  border-bottom: 1px dashed var(--line);
}
.doc-row:last-child, .file-row:last-child { border-bottom: none; }
.doc-row.fulfilled span { color: var(--success); font-family: 'IBM Plex Mono', monospace; font-size: 13px; font-weight: 600; }
.doc-row.pending span { color: var(--ink-soft); font-family: 'IBM Plex Mono', monospace; font-size: 13px; }

.upload-form { display: flex; gap: 8px; align-items: center; }
.upload-form input[type=file] { font-size: 12px; }

.portal-page { max-width: 600px; margin: 0 auto; }

/* ---------- Pricing (folder-tab signature reused) ---------- */
.pricing-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; margin-top: 28px; }
.price-card {
  background: var(--paper-card); border: 1px solid var(--line); border-radius: 0 var(--radius) var(--radius) var(--radius);
  padding: 32px 28px; text-align: center; position: relative; margin-top: 12px; box-shadow: var(--shadow);
}
.price-card::before {
  content: ""; position: absolute; top: -12px; left: 24px;
  width: 52px; height: 14px; background: var(--folder-tab);
  border-radius: 4px 4px 0 0;
}
.price-card.featured { border: 2px solid var(--accent); }
.price-card.featured::before { background: var(--accent); }
.price-card h3 { font-size: 18px; margin-bottom: 12px; }
.price-card .price { font-size: 36px; font-weight: 700; margin-bottom: 22px; font-family: 'Space Grotesk', sans-serif; }
.price-card .price span { font-size: 14px; font-weight: 400; color: var(--muted); font-family: 'Inter', sans-serif; }
.price-card ul { list-style: none; text-align: left; margin-bottom: 26px; }
.price-card ul li { padding: 7px 0; color: var(--ink-soft); font-size: 14px; }
.price-card ul li::before { content: "✓ "; color: var(--success); font-weight: 700; }

/* ---------- Legal pages ---------- */
.legal-page { max-width: 720px; }
.legal-page h2 { margin-bottom: 6px; }
.legal-page h3 { margin-top: 26px; margin-bottom: 8px; font-size: 16px; }
.legal-page p, .legal-page li { color: var(--ink-soft); font-size: 14px; margin-bottom: 6px; }
.legal-page em { color: var(--muted); font-size: 13px; }

/* ---------- Closing CTA band ---------- */
.cta-band {
  background: var(--ink); color: #fff; text-align: center;
  padding: 64px 32px; border-radius: var(--radius); margin-top: 96px;
}
.cta-band h2 { font-size: 30px; margin-bottom: 10px; }
.cta-band p { color: #b8bfcf; font-size: 16px; margin-bottom: 28px; }

/* ---------- Footer ---------- */
.site-footer {
  text-align: center; padding: 28px 20px; font-size: 13px; color: var(--muted);
  border-top: 1px dashed var(--line); margin-top: 40px;
}
.site-footer a { color: var(--muted); text-decoration: none; margin: 0 6px; }
.site-footer a:hover { color: var(--accent); }

@media (max-width: 640px) {
  .features, .pricing-grid, .compare-grid, .steps-grid { grid-template-columns: 1fr; }
  .hero-copy h1 { font-size: 32px; }
  .section-title { margin-top: 64px; }
}
