/* ============================================================
   REWADO — style.css
   Design language: "ledger & receipt" fintech
   ============================================================ */

/* ---------- Tokens ---------- */
:root {
  --color-ink: #0B3D2E;         /* deep forest green — primary */
  --color-ink-2: #12503C;
  --color-gold: #C9A227;        /* muted gold — accent */
  --color-gold-dark: #A6821C;
  --color-paper: #F6F5F1;       /* paper white background */
  --color-paper-2: #EFEEE7;
  --color-surface: #FFFFFF;
  --color-text: #1B231F;
  --color-text-muted: #5C6660;
  --color-border: #DEDBCF;
  --color-error: #B3452D;
  --color-success: #1F7A4D;

  --font-display: 'Fraunces', Georgia, serif;
  --font-body: 'Work Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'IBM Plex Mono', 'Courier New', monospace;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;

  --shadow-sm: 0 1px 3px rgba(11,61,46,0.08);
  --shadow-md: 0 8px 24px rgba(11,61,46,0.10);
  --shadow-lg: 0 20px 48px rgba(11,61,46,0.16);

  --container-w: 1160px;
  --header-h: 76px;
  --transition: 220ms cubic-bezier(.4,0,.2,1);
}

html.dark {
  --color-ink: #E7C766;
  --color-ink-2: #C9A227;
  --color-gold: #E7C766;
  --color-gold-dark: #C9A227;
  --color-paper: #0D1512;
  --color-paper-2: #121C17;
  --color-surface: #16211C;
  --color-text: #EDEFEA;
  --color-text-muted: #9AA8A0;
  --color-border: #24332B;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.35);
  --shadow-md: 0 8px 24px rgba(0,0,0,0.4);
  --shadow-lg: 0 24px 60px rgba(0,0,0,0.55);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--color-paper);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition: background var(--transition), color var(--transition);
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; margin: 0; padding: 0; }
button { font: inherit; cursor: pointer; }
input, textarea, select { font: inherit; }
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 600; line-height: 1.15; margin: 0 0 .5em; color: var(--color-text); }
p { margin: 0 0 1em; color: var(--color-text-muted); }
h1 { font-size: clamp(2.2rem, 4.5vw, 3.4rem); }
h2 { font-size: clamp(1.7rem, 3vw, 2.3rem); }
h3 { font-size: 1.15rem; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}

:focus-visible {
  outline: 2px solid var(--color-gold-dark);
  outline-offset: 3px;
}

.skip-link {
  position: absolute; left: -999px; top: 0;
  background: var(--color-ink); color: #fff;
  padding: 10px 16px; z-index: 999; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

.container { max-width: var(--container-w); margin: 0 auto; padding: 0 24px; }
.container.narrow { max-width: 760px; }
.section { padding: 88px 0; }
.section-alt { background: var(--color-paper-2); }
.center { text-align: center; }

/* ---------- Reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in-view { opacity: 1; transform: translateY(0); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px; padding: 14px 26px; border-radius: 999px;
  font-weight: 600; font-size: .95rem; border: 1.5px solid transparent;
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition), color var(--transition), border-color var(--transition);
  white-space: nowrap;
}
.btn-primary { background: var(--color-ink); color: var(--color-paper); }
html.dark .btn-primary { color: #0D1512; }
.btn-primary:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.btn-ghost { background: transparent; color: var(--color-text); border-color: var(--color-border); }
.btn-ghost:hover { border-color: var(--color-ink); transform: translateY(-2px); }
.btn-small { padding: 10px 18px; font-size: .85rem; }
.btn-block { width: 100%; }

/* ============ HEADER ============ */
.site-header {
  position: sticky; top: 0; z-index: 60;
  background: color-mix(in srgb, var(--color-paper) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.site-header.scrolled { border-bottom-color: var(--color-border); box-shadow: var(--shadow-sm); }
.header-inner { height: var(--header-h); display: flex; align-items: center; justify-content: space-between; gap: 24px; }

.logo { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 600; font-size: 1.25rem; }
.logo-mark {
  width: 34px; height: 34px; border-radius: 9px; background: var(--color-ink);
  color: var(--color-gold); display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-size: 1.1rem;
}
html.dark .logo-mark { color: #0D1512; }

.main-nav ul { display: flex; gap: 30px; }
.nav-link { font-weight: 500; font-size: .95rem; color: var(--color-text-muted); position: relative; padding: 6px 0; transition: color var(--transition); }
.nav-link:hover, .nav-link.active { color: var(--color-text); }
.nav-link.active::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: -2px; height: 2px; background: var(--color-gold-dark);
}

.header-actions { display: flex; align-items: center; gap: 12px; }
.theme-toggle {
  width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--color-border);
  background: var(--color-surface); color: var(--color-text); display: flex; align-items: center; justify-content: center;
  transition: border-color var(--transition), transform var(--transition);
}
.theme-toggle:hover { transform: rotate(15deg); }
.icon-moon { display: none; }
html.dark .icon-sun { display: none; }
html.dark .icon-moon { display: block; }

.menu-toggle {
  display: none; width: 40px; height: 40px; border: none; background: transparent;
  flex-direction: column; align-items: center; justify-content: center; gap: 5px;
}
.menu-toggle span { width: 22px; height: 2px; background: var(--color-text); transition: transform var(--transition), opacity var(--transition); }
.menu-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-toggle.open span:nth-child(2) { opacity: 0; }
.menu-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ============ MOBILE NAV ============ */
.mobile-nav {
  position: fixed; top: 0; right: 0; height: 100%; width: min(320px, 84vw);
  background: var(--color-surface); z-index: 90; padding: 100px 28px 28px;
  transform: translateX(100%); transition: transform .35s ease;
  box-shadow: var(--shadow-lg); display: flex; flex-direction: column; gap: 28px;
}
.mobile-nav.open { transform: translateX(0); }
.mobile-nav ul { display: flex; flex-direction: column; gap: 20px; }
.mobile-nav .nav-link { font-size: 1.05rem; }
.nav-link-muted { color: var(--color-text-muted); font-size: .9rem !important; }
.mobile-nav-backdrop {
  position: fixed; inset: 0; background: rgba(11,20,16,.4); z-index: 80;
  opacity: 0; pointer-events: none; transition: opacity .3s ease;
}
.mobile-nav-backdrop.open { opacity: 1; pointer-events: auto; }

/* ============ PAGES ============ */
.page { display: none; }
.page.active { display: block; animation: pageIn .4s ease; }
@keyframes pageIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

.eyebrow {
  font-family: var(--font-mono); text-transform: uppercase; letter-spacing: .12em;
  font-size: .78rem; color: var(--color-gold-dark); margin: 0 0 14px; font-weight: 500;
}
.hero-lead { font-size: 1.1rem; max-width: 560px; }

/* ---------- Hero (Home) ---------- */
.hero { padding: 72px 0 40px; }
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 60px; align-items: center; }
.hero-actions { display: flex; gap: 16px; margin: 30px 0 28px; flex-wrap: wrap; }
.trust-row { display: flex; gap: 24px; flex-wrap: wrap; font-size: .85rem; color: var(--color-text-muted); }
.trust-row li { display: flex; align-items: center; gap: 6px; }
.trust-row svg { color: var(--color-gold-dark); flex-shrink: 0; }

/* ---------- Receipt (signature element) ---------- */
.hero-visual { display: flex; justify-content: center; }
.receipt {
  position: relative; width: 100%; max-width: 340px; background: var(--color-surface);
  color: var(--color-text); padding: 34px 26px 30px; box-shadow: var(--shadow-lg);
  clip-path: polygon(
    0% 0%, 100% 0%, 100% 96%,
    94% 100%, 88% 96%, 82% 100%, 76% 96%, 70% 100%, 64% 96%, 58% 100%,
    52% 96%, 46% 100%, 40% 96%, 34% 100%, 28% 96%, 22% 100%, 16% 96%,
    10% 100%, 4% 96%, 0% 100%
  );
  transform: rotate(-1.5deg);
  animation: floatReceipt 6s ease-in-out infinite;
}
@keyframes floatReceipt { 0%, 100% { transform: rotate(-1.5deg) translateY(0); } 50% { transform: rotate(-1.5deg) translateY(-10px); } }
@media (prefers-reduced-motion: reduce) { .receipt { animation: none; } }

.receipt-holes {
  position: absolute; top: -7px; left: 0; right: 0; height: 14px;
  background-image: radial-gradient(circle, var(--color-paper) 5px, transparent 5.5px);
  background-size: 22px 14px; background-repeat: repeat-x; background-position: 10px 0;
}
.receipt-store { font-family: var(--font-mono); font-weight: 600; letter-spacing: .15em; text-align: center; margin: 6px 0 0; font-size: 1rem; }
.receipt-sub { font-family: var(--font-mono); text-align: center; font-size: .7rem; letter-spacing: .1em; color: var(--color-text-muted); margin-bottom: 18px; }
.receipt-divider { border-top: 1.5px dashed var(--color-border); margin: 14px 0; }
.receipt-line { display: flex; justify-content: space-between; font-family: var(--font-mono); font-size: .82rem; margin-bottom: 8px; }
.receipt-total-label { font-family: var(--font-mono); font-size: .68rem; letter-spacing: .1em; color: var(--color-text-muted); text-align: center; margin: 8px 0 4px; }
.receipt-total { font-family: var(--font-mono); font-size: 2.1rem; font-weight: 600; text-align: center; color: var(--color-ink); margin: 0 0 10px; }
html.dark .receipt-total { color: var(--color-gold); }
.receipt-foot { text-align: center; font-size: .75rem; font-style: italic; color: var(--color-text-muted); margin-bottom: 16px; }
.receipt-barcode {
  height: 34px; background: repeating-linear-gradient(90deg, var(--color-text) 0 2px, transparent 2px 5px);
  opacity: .75;
}

/* ---------- Logos strip ---------- */
.logos-strip { padding: 40px 0; }
.logos-label { font-family: var(--font-mono); font-size: .78rem; text-transform: uppercase; letter-spacing: .1em; color: var(--color-text-muted); text-align: center; margin-bottom: 18px; }
.logos-row { display: flex; justify-content: center; gap: 40px; flex-wrap: wrap; font-family: var(--font-display); font-size: 1.1rem; color: var(--color-text-muted); }
.logos-note { text-align: center; font-size: .75rem; margin: 16px auto 0; max-width: 560px; }

/* ---------- Section head ---------- */
.section-head { max-width: 640px; margin: 0 0 48px; }
.section-lead { font-size: 1.02rem; }

/* ---------- Grids / cards ---------- */
.grid { display: grid; gap: 24px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.card {
  background: var(--color-surface); border: 1px solid var(--color-border);
  border-radius: var(--radius-md); padding: 30px 26px;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: transparent; }
.feature-icon {
  width: 46px; height: 46px; border-radius: 12px; background: var(--color-paper-2);
  color: var(--color-ink-2); display: flex; align-items: center; justify-content: center; margin-bottom: 16px;
}
html.dark .feature-icon { color: var(--color-gold); }
.card h3 { margin-bottom: 8px; }
.card p { margin: 0; font-size: .93rem; }

/* ---------- Ledger (categories) ---------- */
.ledger { max-width: 720px; margin: 0 auto; background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-md); padding: 10px 30px; }
.ledger-row { display: flex; align-items: baseline; gap: 10px; padding: 16px 0; border-bottom: 1px dashed var(--color-border); font-family: var(--font-mono); font-size: .92rem; }
.ledger-row:last-child { border-bottom: none; }
.ledger-item { color: var(--color-text); white-space: nowrap; }
.ledger-dots { flex: 1; border-bottom: 1.5px dotted var(--color-text-muted); opacity: .5; transform: translateY(-4px); }
.ledger-rate { color: var(--color-gold-dark); font-weight: 600; white-space: nowrap; }
html.dark .ledger-rate { color: var(--color-gold); }
.fine-print { font-size: .78rem; max-width: 640px; margin: 22px auto 0; text-align: center; }
.fine-print a { color: var(--color-ink-2); text-decoration: underline; }
html.dark .fine-print a { color: var(--color-gold); }

/* ---------- Steps preview ---------- */
.step-card { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-md); padding: 30px 26px; }
.step-num { font-family: var(--font-mono); color: var(--color-gold-dark); font-size: .85rem; font-weight: 600; }
html.dark .step-num { color: var(--color-gold); }
.step-card h3 { margin: 10px 0 8px; }
.step-card p { margin: 0; font-size: .93rem; }

/* ---------- Testimonials ---------- */
.testimonial { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-md); padding: 28px; margin: 0; }
.testimonial blockquote { margin: 0 0 20px; font-family: var(--font-display); font-size: 1.05rem; color: var(--color-text); }
.testimonial figcaption { display: flex; align-items: center; gap: 12px; font-size: .85rem; color: var(--color-text-muted); }
.avatar {
  width: 38px; height: 38px; border-radius: 50%; background: var(--color-ink); color: var(--color-gold);
  display: flex; align-items: center; justify-content: center; font-family: var(--font-display); font-weight: 600; flex-shrink: 0;
}
html.dark .avatar { color: #0D1512; }

/* ---------- CTA band ---------- */
.cta-band { background: var(--color-ink); color: var(--color-paper); border-radius: var(--radius-lg); margin: 0 24px; padding: 64px 0; }
html.dark .cta-band { background: var(--color-surface); border: 1px solid var(--color-border); }
.cta-inner { text-align: center; max-width: 560px; }
.cta-band h2 { color: #fff; }
html.dark .cta-band h2 { color: var(--color-text); }
.cta-band p { color: rgba(246,245,241,.75); margin-bottom: 26px; }
html.dark .cta-band p { color: var(--color-text-muted); }
.cta-band .btn-primary { background: var(--color-gold); color: var(--color-ink); }

/* ============ PAGE HERO (inner pages) ============ */
.page-hero { padding: 64px 0 40px; }
.page-hero-compact { padding: 48px 0 20px; }
.page-hero h1 { max-width: 760px; }

/* ---------- About stats ---------- */
.stats-grid { text-align: center; }
.stat { display: flex; flex-direction: column; gap: 6px; }
.stat-num { font-family: var(--font-display); font-size: 2rem; font-weight: 600; color: var(--color-ink-2); }
html.dark .stat-num { color: var(--color-gold); }
.stat-label { font-size: .85rem; color: var(--color-text-muted); }

/* ---------- Timeline (How it works) ---------- */
.timeline { display: flex; flex-direction: column; gap: 40px; counter-reset: step; }
.timeline li { display: grid; grid-template-columns: 60px 1fr; gap: 24px; align-items: start; }
.timeline-num { font-family: var(--font-mono); font-size: 1.4rem; font-weight: 600; color: var(--color-gold-dark); }
html.dark .timeline-num { color: var(--color-gold); }
.timeline h3 { margin-bottom: 8px; }
.timeline p { margin: 0; }

.checklist { display: flex; flex-direction: column; gap: 14px; padding-left: 0; }
.checklist li { position: relative; padding-left: 30px; font-size: .95rem; color: var(--color-text-muted); }
.checklist li::before {
  content: ''; position: absolute; left: 0; top: 4px; width: 18px; height: 18px; border-radius: 50%;
  background: var(--color-paper); border: 1.5px solid var(--color-gold-dark);
}
.checklist li::after {
  content: ''; position: absolute; left: 6px; top: 8px; width: 6px; height: 6px; border-radius: 50%; background: var(--color-gold-dark);
}

/* ============ FAQ ============ */
.faq-group-title { margin-top: 44px; font-size: 1.15rem; }
.faq-group-title:first-of-type { margin-top: 0; }
.accordion-item { border-bottom: 1px solid var(--color-border); }
.accordion-item h3 { margin: 0; font-family: var(--font-body); }
.accordion-trigger {
  width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 16px;
  background: none; border: none; text-align: left; padding: 18px 0; font-size: .98rem; font-weight: 600; color: var(--color-text);
}
.accordion-icon { position: relative; width: 18px; height: 18px; flex-shrink: 0; }
.accordion-icon::before, .accordion-icon::after {
  content: ''; position: absolute; background: var(--color-gold-dark); transition: transform var(--transition);
}
html.dark .accordion-icon::before, html.dark .accordion-icon::after { background: var(--color-gold); }
.accordion-icon::before { width: 100%; height: 2px; top: 8px; left: 0; }
.accordion-icon::after { width: 2px; height: 100%; top: 0; left: 8px; }
.accordion-trigger[aria-expanded="true"] .accordion-icon::after { transform: rotate(90deg); opacity: 0; }
.accordion-panel { max-height: 0; overflow: hidden; transition: max-height .35s ease; }
.accordion-panel p { padding-bottom: 18px; margin: 0; }

/* ============ CONTACT ============ */
.contact-grid { display: grid; grid-template-columns: .8fr 1.2fr; gap: 60px; }
.contact-info-item { margin-bottom: 30px; }
.contact-info-item h3 { margin-bottom: 6px; font-size: 1rem; }
.contact-info-item a { color: var(--color-ink-2); font-weight: 500; }
html.dark .contact-info-item a { color: var(--color-gold); }
.muted { color: var(--color-text-muted); }
.muted.small { font-size: .78rem; }

.contact-form { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-md); padding: 34px; }
.form-row { margin-bottom: 20px; display: flex; flex-direction: column; gap: 6px; }
.form-row label { font-size: .85rem; font-weight: 600; }
.form-row input, .form-row select, .form-row textarea {
  padding: 12px 14px; border-radius: var(--radius-sm); border: 1.5px solid var(--color-border);
  background: var(--color-paper); color: var(--color-text); transition: border-color var(--transition);
  resize: vertical;
}
.form-row input:focus, .form-row select:focus, .form-row textarea:focus { border-color: var(--color-gold-dark); outline: none; }
.form-row.invalid input, .form-row.invalid select, .form-row.invalid textarea { border-color: var(--color-error); }
.form-error { font-size: .78rem; color: var(--color-error); min-height: 1em; }
.form-success { margin-top: 16px; font-size: .9rem; color: var(--color-success); text-align: center; }

/* ============ LEGAL PAGES ============ */
.legal-copy h2 { margin-top: 2em; font-size: 1.25rem; }
.legal-copy p { font-size: .95rem; }
.legal-copy a { color: var(--color-ink-2); text-decoration: underline; }
html.dark .legal-copy a { color: var(--color-gold); }

/* ============ FOOTER ============ */
.site-footer { background: var(--color-paper-2); border-top: 1px solid var(--color-border); padding: 64px 0 0; margin-top: 60px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 40px; padding-bottom: 46px; }
.footer-brand p { max-width: 260px; font-size: .88rem; }
.footer-col h4 { font-size: .82rem; text-transform: uppercase; letter-spacing: .08em; color: var(--color-text-muted); margin-bottom: 16px; }
.footer-col ul { display: flex; flex-direction: column; gap: 10px; }
.footer-col a { font-size: .9rem; color: var(--color-text); transition: color var(--transition); }
.footer-col a:hover { color: var(--color-gold-dark); }
.footer-bottom { border-top: 1px solid var(--color-border); padding: 22px 0 28px; display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; font-size: .82rem; }
.footer-bottom p { margin: 0; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-visual { order: -1; max-width: 380px; margin: 0 auto; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; gap: 40px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 760px) {
  .main-nav { display: none; }
  .menu-toggle { display: flex; }
  .header-actions .btn-small { display: none; }
  .section { padding: 60px 0; }
  .grid-4 { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 30px; }
  .timeline li { grid-template-columns: 44px 1fr; gap: 16px; }
  .cta-band { margin: 0 16px; padding: 48px 20px; }
}

@media (max-width: 480px) {
  .grid-4 { grid-template-columns: 1fr 1fr; }
  .logos-row { gap: 22px; font-size: .95rem; }
  .contact-form { padding: 24px; }
}
