/* ══════════════════════════════════════════
   AMORTIX — Global Stylesheet
   Mortgage · Hipoteca
   ══════════════════════════════════════════ */

/* ── TOKENS ── */
:root {
  --green:       #10b981;
  --green-dark:  #059669;
  --green-light: #ecfdf5;
  --blue:        #0ea5e9;
  --blue-light:  #eff8ff;
  --teal:        #14b8a6;
  --yellow:      #f59e0b;
  --text:        #0f172a;
  --text-muted:  #64748b;
  --bg:          #f8fafc;
  --border:      #e2e8f0;
  --white:       #ffffff;
  --radius-lg:   20px;
  --radius-xl:   28px;
  --shadow-sm:   0 1px 3px rgba(0,0,0,.07), 0 1px 2px rgba(0,0,0,.05);
  --shadow-md:   0 4px 16px rgba(0,0,0,.08);
  --shadow-lg:   0 12px 40px rgba(0,0,0,.12);
}

/* ── RESET ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }

/* ── TYPOGRAPHY HELPERS ── */
.section-label {
  display: inline-block;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--green);
  margin-bottom: 12px;
}

/* ── NAV ── */
nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 32px;
  height: 64px;
}
.nav-logo {
  display: flex; align-items: center; gap: 10px;
  font-size: 17px; font-weight: 800; color: var(--text);
}
.nav-logo .icon {
  width: 36px; height: 36px;
  background: linear-gradient(135deg, var(--green), var(--teal));
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
  color: #fff;
  box-shadow: 0 2px 8px rgba(16,185,129,.35);
}
.nav-links { display: flex; align-items: center; gap: 28px; }
.nav-links a { font-size: 14px; font-weight: 600; color: var(--text-muted); transition: color .2s; }
.nav-links a:hover, .nav-links a.active { color: var(--text); }
.btn-nav {
  background: var(--green);
  color: #fff !important;
  padding: 9px 22px;
  border-radius: 50px;
  font-size: 14px !important;
  font-weight: 700 !important;
  transition: background .2s, transform .15s !important;
  box-shadow: 0 2px 10px rgba(16,185,129,.35);
}
.btn-nav:hover { background: var(--green-dark) !important; transform: translateY(-1px); }

/* ── PAGE HEADER (interior pages) ── */
.page-header {
  background: linear-gradient(160deg, #0f172a 0%, #064e3b 60%, #065f46 100%);
  color: #fff;
  padding: 72px 24px 64px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.page-header::before {
  content: "";
  position: absolute; inset: 0;
  background: radial-gradient(ellipse 80% 60% at 50% 0%, rgba(16,185,129,.25) 0%, transparent 70%);
}
.page-header > * { position: relative; z-index: 1; }
.page-header h1 {
  font-size: clamp(28px, 5vw, 48px);
  font-weight: 900;
  letter-spacing: -1px;
  margin-bottom: 14px;
}
.page-header p {
  font-size: 17px;
  color: #94a3b8;
  max-width: 500px;
  margin: 0 auto;
  line-height: 1.7;
}

/* ── CONTENT WRAPPER (interior pages) ── */
.content {
  max-width: 780px;
  margin: 0 auto;
  padding: 56px 24px 80px;
}

/* ── CARD ── */
.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 36px 40px;
  box-shadow: var(--shadow-sm);
}
.card + .card { margin-top: 20px; }

/* ── PROSE (legal pages) ── */
.prose h2 {
  font-size: 22px; font-weight: 900;
  margin-bottom: 6px; letter-spacing: -.3px;
}
.prose .updated {
  display: inline-block;
  font-size: 13px; color: var(--text-muted);
  margin-bottom: 24px;
  background: var(--bg);
  border: 1px solid var(--border);
  padding: 4px 12px; border-radius: 50px;
}
.prose h3 {
  font-size: 17px; font-weight: 800;
  margin: 28px 0 10px;
  color: var(--text);
}
.prose p { font-size: 15px; color: #334155; line-height: 1.75; margin-bottom: 14px; }
.prose ul { margin: 8px 0 14px 0; display: flex; flex-direction: column; gap: 6px; }
.prose ul li {
  font-size: 15px; color: #334155; line-height: 1.65;
  padding-left: 18px; position: relative;
}
.prose ul li::before {
  content: "·";
  position: absolute; left: 4px;
  color: var(--green); font-weight: 900;
}
.prose a { color: var(--green); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.prose a:hover { color: var(--green-dark); }
.prose strong { color: var(--text); font-weight: 700; }

/* ── FAQ ── */
.faq-item {
  border-bottom: 1px solid var(--border);
  overflow: hidden;
}
.faq-item:first-child { border-top: 1px solid var(--border); }
.faq-q {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 20px 4px;
  font-size: 15px; font-weight: 700;
  cursor: pointer;
  user-select: none;
  transition: color .2s;
}
.faq-q:hover { color: var(--green); }
.faq-q .arrow { font-size: 12px; color: var(--text-muted); transition: transform .25s; flex-shrink: 0; }
.faq-q.open { color: var(--green); }
.faq-q.open .arrow { transform: rotate(180deg); color: var(--green); }
.faq-a {
  font-size: 14px; color: var(--text-muted); line-height: 1.75;
  max-height: 0; overflow: hidden;
  transition: max-height .35s ease, padding .2s;
  padding: 0 4px;
}
.faq-a.open { max-height: 300px; padding-bottom: 20px; }

/* ── CONTACT BUTTON ── */
.btn-contact {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--green);
  color: #fff;
  padding: 14px 32px; border-radius: 50px;
  font-size: 15px; font-weight: 700;
  box-shadow: 0 4px 16px rgba(16,185,129,.35);
  transition: background .2s, transform .15s;
}
.btn-contact:hover { background: var(--green-dark); transform: translateY(-2px); }

/* ── FOOTER ── */
footer {
  background: #0f172a;
  color: #94a3b8;
  padding: 40px 0 28px;
}
.footer-inner { max-width: 960px; margin: 0 auto; padding: 0 24px; }
.footer-top { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 20px; margin-bottom: 28px; }
.footer-logo { display: flex; align-items: center; gap: 10px; font-size: 16px; font-weight: 800; color: #fff; }
.footer-logo .icon {
  width: 34px; height: 34px;
  background: linear-gradient(135deg, var(--green), var(--teal));
  border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
}
.footer-links { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
.footer-links a { font-size: 14px; color: #94a3b8; transition: color .2s; }
.footer-links a:hover { color: #fff; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.08); padding-top: 24px; }
.footer-bottom p { font-size: 13px; color: #475569; }

/* ── RESPONSIVE NAV ── */
@media (max-width: 640px) {
  nav { padding: 0 20px; }
  .nav-hide { display: none; }
  .card { padding: 28px 22px; }
}
