/* ============================================================
   PESOCLARO DE UCPAY — brand tokens + shared primitives
   Playful & Mexican · Coral/terracotta + warm cream
   ============================================================ */

:root {
  /* Brand */
  --coral: #E5533D;
  --coral-deep: #C43E2A;
  --coral-soft: #F5B5A6;
  --coral-wash: #FCE7E0;

  --mango: #F5B841;
  --mango-deep: #D89C2A;
  --mango-wash: #FCEBC8;

  --ink: #1F1612;
  --ink-2: #3A2F2A;
  --ink-3: #6B5D55;
  --ink-4: #9A8C83;

  --cream: #FBF5EC;
  --cream-2: #F5EDDF;
  --cream-3: #EDE2CE;

  --paper: #FFFFFF;
  --line: #E7DCC9;
  --line-soft: #F0E6D3;

  /* Semantic */
  --ok: #0F7A5F;
  --ok-wash: #D7EDE4;
  --warn: #D89C2A;
  --danger: #C0362A;
  --info: #2563EB;

  /* Radii */
  --r-sm: 8px;
  --r-md: 14px;
  --r-lg: 22px;
  --r-xl: 32px;
  --r-pill: 999px;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(31, 22, 18, 0.05), 0 1px 1px rgba(31, 22, 18, 0.03);
  --shadow-md: 0 4px 14px rgba(31, 22, 18, 0.06), 0 2px 4px rgba(31, 22, 18, 0.04);
  --shadow-lg: 0 18px 40px -12px rgba(31, 22, 18, 0.18), 0 6px 14px rgba(31, 22, 18, 0.06);
  --shadow-coral: 0 10px 28px -10px rgba(229, 83, 61, 0.55);

  /* Type */
  --font-sans: 'Inter', ui-sans-serif, system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', 'Menlo', ui-monospace, monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { overflow-x: hidden; }

body {
  font-family: var(--font-sans);
  background: var(--cream);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

::selection { background: var(--coral); color: white; }

a { color: inherit; text-decoration: none; }

.mono { font-family: var(--font-mono); font-feature-settings: "ss01"; }
.num { font-variant-numeric: tabular-nums; }

h1, h2, h3, h4 { margin: 0; font-weight: 600; letter-spacing: -0.02em; line-height: 1.1; text-wrap: balance; }
h1 { font-size: clamp(40px, 5vw, 64px); letter-spacing: -0.03em; font-weight: 700; }
h2 { font-size: clamp(28px, 3.2vw, 40px); }
h3 { font-size: 22px; }
p { margin: 0; text-wrap: pretty; }

/* ============================================================
   Shell / grid
   ============================================================ */
.wrap { max-width: 1280px; margin: 0 auto; padding: 0 24px; }
.wrap-narrow { max-width: 960px; margin: 0 auto; padding: 0 24px; }

/* ============================================================
   Top bar + nav
   ============================================================ */
.topbar {
  background: var(--ink);
  color: var(--cream-2);
  font-size: 13px;
  padding: 8px 0;
}
.topbar-inner { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.topbar .dot { display: inline-block; width: 6px; height: 6px; background: var(--mango); border-radius: 50%; margin-right: 8px; vertical-align: middle; }
.topbar a { opacity: 0.75; }
.topbar a:hover { opacity: 1; }

.nav {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--cream) 92%, transparent);
  backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid var(--line-soft);
}
.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 0;
  gap: 32px;
}
.nav-links { display: flex; gap: 28px; align-items: center; }
.nav-links a { font-size: 14.5px; font-weight: 500; color: var(--ink-2); transition: color .15s; }
.nav-links a:hover { color: var(--coral); }
.nav-cta { display: flex; gap: 10px; align-items: center; }

/* ============================================================
   Logo
   ============================================================ */
.logo { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 20px; letter-spacing: -0.02em; color: var(--ink); }
.logo-mark {
  width: 36px; height: 36px; border-radius: 50%;
  background: linear-gradient(135deg, var(--coral) 0%, var(--coral-deep) 100%);
  display: grid; place-items: center;
  color: var(--cream);
  font-weight: 700;
  font-family: var(--font-sans);
  font-size: 20px;
  box-shadow: var(--shadow-coral);
  position: relative;
  flex: none;
}
.logo-mark::after {
  content: ""; position: absolute; inset: 3px; border-radius: 50%;
  border: 1.5px dashed rgba(251, 245, 236, 0.35);
}
.logo-mark span { position: relative; z-index: 1; }
.logo-text { display: flex; flex-direction: column; line-height: 1; gap: 2px; }
.logo-wordmark { line-height: 1; }
.logo-text .claro { color: var(--coral); }
.logo-byline { font-size: 10px; font-weight: 500; letter-spacing: 0.06em; color: var(--ink-4); }
.footer .logo-byline { color: rgba(255,255,255,.45); }
.logo-sm { font-size: 17px; }
.logo-sm .logo-mark { width: 30px; height: 30px; font-size: 17px; }

/* ============================================================
   Buttons
   ============================================================ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  border: 1px solid transparent;
  border-radius: var(--r-pill);
  padding: 12px 22px;
  cursor: pointer;
  transition: transform .15s ease-out, box-shadow .15s, background .15s, color .15s, border-color .15s;
  text-decoration: none;
  white-space: nowrap;
  letter-spacing: -0.01em;
}
.btn:active { transform: translateY(1px); }

.btn-primary {
  background: var(--coral);
  color: white;
  box-shadow: var(--shadow-coral);
}
.btn-primary:hover { background: var(--coral-deep); box-shadow: 0 16px 32px -10px rgba(229, 83, 61, 0.65); }

.btn-mango {
  background: var(--mango);
  color: var(--ink);
  box-shadow: 0 10px 24px -10px rgba(245, 184, 65, 0.6);
}
.btn-mango:hover { background: var(--mango-deep); color: var(--ink); }

.btn-dark { background: var(--ink); color: var(--cream); }
.btn-dark:hover { background: var(--ink-2); }

.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { background: var(--cream-2); border-color: var(--ink-4); }

.btn-link { background: transparent; color: var(--coral); padding: 0; border-radius: 0; }
.btn-link:hover { color: var(--coral-deep); text-decoration: underline; text-underline-offset: 3px; }

.btn-lg { font-size: 17px; padding: 16px 28px; }
.btn-sm { font-size: 13px; padding: 8px 14px; }
.btn-full { width: 100%; }

/* ============================================================
   Chips / badges
   ============================================================ */
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-2);
}
.chip .check { color: var(--ok); font-weight: 700; }

.badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px;
  border-radius: var(--r-pill);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.badge-ok { background: var(--ok-wash); color: var(--ok); }
.badge-mango { background: var(--mango-wash); color: var(--mango-deep); }
.badge-coral { background: var(--coral-wash); color: var(--coral-deep); }
.badge-neutral { background: var(--cream-3); color: var(--ink-2); }
.badge-warn { background: #FDECD2; color: var(--warn); }
.badge-danger { background: #FBDCD7; color: var(--danger); }

/* ============================================================
   Cards
   ============================================================ */
.card {
  background: var(--paper);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-lg);
  padding: 28px;
}
.card-lg { border-radius: var(--r-xl); padding: 32px; box-shadow: var(--shadow-md); }
.card-flat { background: var(--cream-2); border-color: var(--cream-3); }
.card-dark { background: var(--ink); color: var(--cream); border: none; }
.card-dark h2, .card-dark h3 { color: white; }

/* ============================================================
   Forms
   ============================================================ */
.field { display: flex; flex-direction: column; gap: 6px; }
.field-row { display: grid; gap: 14px; }
.field-row-2 { grid-template-columns: 1fr 1fr; }
@media (max-width: 640px) { .field-row-2 { grid-template-columns: 1fr; } }

.label {
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-2);
  letter-spacing: -0.005em;
}
.input, .select, .textarea {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 12px 14px;
  font-size: 15px;
  font-family: inherit;
  color: var(--ink);
  transition: border-color .15s, box-shadow .15s;
  width: 100%;
}
.input:focus, .select:focus, .textarea:focus {
  outline: none;
  border-color: var(--coral);
  box-shadow: 0 0 0 4px rgba(229, 83, 61, 0.12);
}
.input::placeholder { color: var(--ink-4); }
.input-error { border-color: var(--danger); }
.helper { font-size: 12.5px; color: var(--ink-3); }
.error-msg { font-size: 12.5px; color: var(--danger); }

.input-group { position: relative; }
.input-group .input { padding-left: 42px; }
.input-group .icon {
  position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
  color: var(--ink-4); pointer-events: none;
}
.input-group .icon-right {
  position: absolute; right: 14px; top: 50%; transform: translateY(-50%);
  color: var(--ink-3); cursor: pointer; background: none; border: none;
}

.checkbox { display: inline-flex; gap: 10px; align-items: flex-start; cursor: pointer; font-size: 14px; color: var(--ink-2); }
.checkbox input { width: 18px; height: 18px; accent-color: var(--coral); margin-top: 1px; flex: none; }
.checkbox a { color: var(--coral); text-decoration: underline; text-underline-offset: 2px; }

/* Pin inputs */
.pins { display: flex; gap: 10px; }
.pin {
  width: 56px; height: 64px;
  border: 1.5px solid var(--line);
  border-radius: var(--r-md);
  font-size: 28px;
  font-weight: 600;
  text-align: center;
  font-family: var(--font-mono);
  color: var(--ink);
  background: var(--paper);
}
.pin:focus { outline: none; border-color: var(--coral); box-shadow: 0 0 0 4px rgba(229, 83, 61, 0.15); }
.pin-filled { border-color: var(--coral); }

/* ============================================================
   Footer
   ============================================================ */
.footer {
  background: var(--ink);
  color: var(--cream-2);
  padding: 72px 0 32px;
  margin-top: 120px;
}
.footer h4 { color: white; font-size: 13px; text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 18px; font-weight: 600; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr 1fr; gap: 48px; }
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; } }
.footer-links { display: flex; flex-direction: column; gap: 10px; font-size: 14px; }
.footer-links a { color: var(--cream-2); opacity: 0.7; }
.footer-links a:hover { opacity: 1; color: var(--mango); }
.footer-bottom {
  border-top: 1px solid rgba(251, 245, 236, 0.1);
  margin-top: 56px;
  padding-top: 24px;
  display: flex; justify-content: space-between; align-items: center;
  font-size: 13px;
  opacity: 0.6;
  flex-wrap: wrap; gap: 12px;
}
.footer .logo-text { color: white; }
.footer .logo { color: white; }

/* ============================================================
   Common section primitives
   ============================================================ */
.section { padding: 96px 0; }
.section-sm { padding: 56px 0; }
.eyebrow {
  display: inline-block;
  font-size: 13px;
  font-weight: 600;
  color: var(--coral);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  margin-bottom: 16px;
}

/* Striped placeholder (for imagery) */
.placeholder {
  background: repeating-linear-gradient(
    45deg,
    var(--cream-2),
    var(--cream-2) 8px,
    var(--cream-3) 8px,
    var(--cream-3) 16px
  );
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-3);
  text-align: center;
  padding: 20px;
}

/* Money display */
.money { font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.money-lg { font-size: 48px; font-weight: 700; }
.money-xl { font-size: 72px; font-weight: 700; line-height: 1; }

/* Scroll */
html { scroll-behavior: smooth; }

/* Utility */
.row { display: flex; gap: 16px; align-items: center; }
.row-b { display: flex; gap: 16px; align-items: center; justify-content: space-between; }
.stack { display: flex; flex-direction: column; }
.mt-0{margin-top:0}.mt-1{margin-top:8px}.mt-2{margin-top:16px}.mt-3{margin-top:24px}.mt-4{margin-top:32px}.mt-6{margin-top:48px}.mt-8{margin-top:64px}
.mb-1{margin-bottom:8px}.mb-2{margin-bottom:16px}.mb-3{margin-bottom:24px}.mb-4{margin-bottom:32px}

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

/* ============================================================
   Nav drawer + hamburger
   ============================================================ */
.nav-drawer { display: flex; align-items: center; gap: 32px; }

.nav-burger {
  display: none;
  background: none;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  cursor: pointer;
  font-size: 20px;
  line-height: 1;
  color: var(--ink);
  padding: 6px 10px;
  transition: background .15s;
}
.nav-burger:hover { background: var(--cream-2); }

/* ============================================================
   Mobile breakpoints
   ============================================================ */
@media (max-width: 768px) {
  /* Topbar: too dense on mobile */
  .topbar { display: none; }

  /* Nav: collapse into hamburger */
  .nav-burger { display: block; }
  .nav-inner { flex-wrap: nowrap; }

  .nav-drawer {
    display: none;
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    flex-direction: column;
    gap: 0;
    background: var(--paper);
    border-top: 1px solid var(--line-soft);
    border-bottom: 2px solid var(--line);
    box-shadow: 0 12px 32px -8px rgba(31,22,18,.18);
    z-index: 200;
  }
  .nav-drawer.nav-open { display: flex; }

  .nav-links { flex-direction: column; gap: 0; }
  .nav-links a {
    display: block;
    padding: 14px 24px;
    border-bottom: 1px solid var(--line-soft);
    font-size: 16px;
    color: var(--ink-2) !important;
  }
  .nav-links a:last-child { border-bottom: none; }

  .nav-cta {
    flex-direction: column;
    gap: 10px;
    padding: 16px 24px 20px;
    border-top: 2px solid var(--line-soft);
    background: var(--cream);
  }
  .nav-cta .btn { width: 100%; justify-content: center; font-size: 15px; }

  /* Section spacing */
  .section { padding: 56px 0; }
  .section-sm { padding: 32px 0; }
  .hero { padding: 36px 0 52px; }

  /* Footer */
  .footer { padding: 48px 0 24px; margin-top: 64px; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 28px; }
}

@media (max-width: 480px) {
  .wrap { padding: 0 16px; }
  .wrap-narrow { padding: 0 16px; }

  /* Footer single col */
  .footer-grid { grid-template-columns: 1fr; gap: 24px; }
  .footer-bottom { flex-direction: column; text-align: center; gap: 8px; }

  /* Hero */
  .hero-cta { flex-direction: column; align-items: flex-start; gap: 12px; }
  .hero-sub { font-size: 15px; }
  .hero-trustline { flex-wrap: wrap; gap: 8px; }

  /* Typography */
  h2 { font-size: clamp(22px, 6vw, 36px); }
  h3 { font-size: 19px; }
}
