:root {
  --primary: #0057a8;
  --primary-dark: #003b78;
  --primary-soft: #eef5fb;
  --line: #c9dbee;
  --text: #102b52;
  --muted: #5c7396;
  --white: #ffffff;
  --success: #1fb574;
  --shadow: 0 16px 36px rgba(7, 44, 94, 0.08);
  --radius: 28px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #f3f7fb;
  color: var(--text);
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
}

.container {
  width: min(1160px, calc(100% - 2rem));
  margin: 0 auto;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 3px solid rgba(0, 86, 164, 0.28);
  outline-offset: 2px;
}


/* ===== TOPBAR ===== */

.topbar {
  background: linear-gradient(180deg, #005daa 0%, #00539a 100%);
  color: var(--white);
  position: sticky;
  top: 0;
  z-index: 50;
}

.topbar-inner {
  min-height: 86px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  position: relative;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.95rem;
  color: var(--white);
  text-decoration: none;
  min-width: 0;
}

.brand-mark {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.22);
  font-weight: 800;
  font-size: 1.35rem;
  flex: 0 0 auto;
}

.brand-copy {
  display: flex;
  flex-direction: column;
}

.brand-copy strong {
  font-size: 1.05rem;
  font-weight: 800;
  line-height: 1.05;
  color: var(--white);
}

.topnav {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.topnav a {
  color: #dfeeff;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.98rem;
  padding: 0.7rem 0.95rem;
  border-radius: 999px;
  transition: background 0.2s ease, color 0.2s ease, opacity 0.2s ease;
}

.topnav a:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
}

.topnav a.is-active {
  background: #ffffff;
  color: #0056a4;
}

.nav-toggle {
  display: none;
  width: 48px;
  height: 48px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 0;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
}

.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  border-radius: 999px;
  background: #ffffff;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.nav-toggle.is-open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle.is-open span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.is-open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ===== HOME / HERO ===== */

.hero {
  padding: 1.8rem 0 0.8rem;
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) 360px;
  gap: 2rem;
  align-items: start;
}

.eyebrow {
  display: inline-block;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.88rem;
  font-weight: 800;
}

.hero-copy h1 {
  margin: 0.7rem 0 1rem;
  max-width: 8.2ch;
  font-size: clamp(3rem, 6vw, 5.2rem);
  line-height: 0.95;
  letter-spacing: -0.04em;
  color: #0a2852;
}

.hero-copy p,
.section-heading p {
  margin: 0;
  max-width: 700px;
  color: var(--muted);
  font-size: 1.12rem;
  line-height: 1.65;
}

.update-pill {
  margin-top: 2rem;
  max-width: 460px;
  min-height: 72px;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0 1.1rem;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 999px;
  box-shadow: var(--shadow);
}

.pill-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--success);
  flex: 0 0 auto;
}

.update-pill strong {
  color: var(--primary-dark);
  font-size: 1.04rem;
  line-height: 1.4;
}

.banxico-card {
  min-height: 250px;
  padding: 1.5rem;
  border-radius: 30px;
  background: var(--white);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  text-align: center;
}

.banxico-label {
  color: var(--muted);
  font-size: 1rem;
}

.banxico-rate {
  margin: 0.2rem 0;
  font-size: clamp(4rem, 8vw, 5.2rem);
  line-height: 1;
  letter-spacing: -0.05em;
  color: var(--primary);
}

.banxico-meta {
  color: var(--muted);
  font-size: 1rem;
}

/* ===== RATES ===== */

.rates-section {
  padding: 0.4rem 0 4rem;
}

.section-heading {
  text-align: center;
  max-width: 760px;
  margin: 0 auto 2rem;
}

.section-heading h2 {
  margin: 0 0 0.8rem;
  font-size: clamp(2rem, 4vw, 3rem);
  color: #0a2852;
}

.rates-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}

.rate-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: var(--shadow);
  padding: 1.35rem 1.3rem;
}

.rate-label {
  display: block;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.35;
}

.rate-value {
  display: block;
  margin: 1rem 0 0.7rem;
  color: var(--primary-dark);
  font-size: clamp(2.8rem, 4vw, 3.5rem);
  line-height: 1;
  letter-spacing: -0.05em;
}

.rate-note {
  color: var(--muted);
  font-size: 0.98rem;
}

/* ===== EXTRA INFO / SEO ===== */

.extra-info {
  padding: 1rem 0 4rem;
}

.extra-info-inner {
  max-width: 1180px;
  margin: 0 auto;
  background: #ffffff;
  border: 1px solid #c9d9ee;
  border-radius: 28px;
  padding: 2rem;
  box-shadow: 0 10px 30px rgba(9, 52, 112, 0.06);
}

.section-kicker {
  display: inline-block;
  margin-bottom: 0.8rem;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #0056a4;
}

.extra-info h2 {
  margin: 0 0 1rem;
  font-size: clamp(1.9rem, 3vw, 2.6rem);
  line-height: 1.1;
  color: #0a2a5e;
}

.extra-info h3 {
  margin: 1.6rem 0 0.7rem;
  font-size: 1.2rem;
  line-height: 1.3;
  color: #0a2a5e;
}

.extra-info p,
.extra-info li {
  font-size: 1rem;
  line-height: 1.8;
  color: #4e678d;
}

.extra-info p {
  margin: 0 0 1rem;
}

.extra-info ul {
  margin: 0 0 1rem 1.2rem;
  padding: 0;
}

.extra-info li {
  margin-bottom: 0.45rem;
}

/* ===== CONTACT PAGE ===== */

.contact-page {
  padding: 2.2rem 0 4rem;
}

.contact-layout {
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  gap: 1.5rem;
  align-items: start;
}

.contact-info-card,
.contact-form-card {
  background: #ffffff;
  border: 1px solid #c9d9ee;
  border-radius: 28px;
  box-shadow: 0 10px 30px rgba(9, 52, 112, 0.06);
}

.contact-info-card {
  padding: 2rem;
}

.contact-info-card h1 {
  margin: 0.45rem 0 1rem;
  font-size: clamp(2rem, 4vw, 3.15rem);
  line-height: 1.02;
  color: #0a2a5e;
}

.contact-info-card p {
  margin: 0 0 1.2rem;
  font-size: 1.03rem;
  line-height: 1.8;
  color: #4e678d;
}

.contact-points {
  margin: 0;
  padding-left: 1.2rem;
  color: #4e678d;
}

.contact-points li {
  margin-bottom: 0.55rem;
  line-height: 1.7;
}

.contact-form-card {
  padding: 2rem;
}

.contact-form {
  display: grid;
  gap: 1rem;
}

.form-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.form-field {
  display: grid;
  gap: 0.5rem;
}

.form-field label {
  font-size: 0.95rem;
  font-weight: 700;
  color: #0a2a5e;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  border: 1px solid #c9d9ee;
  border-radius: 16px;
  background: #fdfefe;
  padding: 0.95rem 1rem;
  font: inherit;
  color: #0a2a5e;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  resize: vertical;
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
  color: #88a0c0;
}

.contact-form input:focus,
.contact-form textarea:focus {
  border-color: #0056a4;
  box-shadow: 0 0 0 4px rgba(0, 86, 164, 0.12);
  background: #ffffff;
}

.primary-button {
  border: none;
  border-radius: 16px;
  background: #0056a4;
  color: #ffffff;
  padding: 0.95rem 1.35rem;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

.primary-button:hover {
  background: #004a8f;
  transform: translateY(-1px);
}

.form-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 0.25rem;
}

.form-status {
  margin: 0;
  font-weight: 700;
  color: #0a2a5e;
}

/* ===== FOOTER ===== */

.site-footer {
  margin-top: 2rem;
  background: linear-gradient(180deg, #005daa 0%, #00539a 100%);
  color: #ffffff;
}

.footer-inner {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr 1fr;
  gap: 1.5rem;
  align-items: center;
  padding: 1.4rem 0;
}

.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.9rem;
  text-decoration: none;
  color: #ffffff;
  margin-bottom: 0.65rem;
}

.site-footer .brand-mark {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: #ffffff;
  font-weight: 800;
  font-size: 1.2rem;
}

.site-footer .brand-copy strong {
  color: #ffffff;
  font-size: 1rem;
  font-weight: 800;
}

.footer-text {
  margin: 0;
  max-width: 360px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.95rem;
  line-height: 1.6;
}

.footer-nav {
  display: flex;
  justify-content: center;
  gap: 0.85rem;
  flex-wrap: wrap;
}

.footer-nav a {
  color: #dfeeff;
  text-decoration: none;
  font-weight: 700;
  padding: 0.7rem 0.95rem;
  border-radius: 999px;
  transition: background 0.2s ease, color 0.2s ease;
}

.footer-nav a:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
}

.footer-madeby {
  display: flex;
  justify-content: flex-end;
}

.footer-madeby a {
  color: #ffffff;
  text-decoration: none;
  font-weight: 700;
  text-align: right;
  transition: opacity 0.2s ease;
}

.footer-madeby a:hover {
  opacity: 0.82;
}

/* ===== LEGAL PAGES ===== */

.legal-page {
  padding: 2.2rem 0 4rem;
}

.legal-card {
  background: #ffffff;
  border: 1px solid #c9d9ee;
  border-radius: 28px;
  box-shadow: 0 10px 30px rgba(9, 52, 112, 0.06);
  padding: 2rem;
}

.legal-card h1 {
  margin: 0.45rem 0 0.6rem;
  font-size: clamp(2rem, 4vw, 3.15rem);
  line-height: 1.02;
  color: #0a2a5e;
}

.legal-meta {
  margin: 0 0 1.2rem;
  color: #6b82a3;
  font-size: 0.96rem;
}

.legal-card h2 {
  margin: 1.6rem 0 0.7rem;
  font-size: 1.25rem;
  line-height: 1.3;
  color: #0a2a5e;
}

.legal-card p,
.legal-card li {
  font-size: 1rem;
  line-height: 1.8;
  color: #4e678d;
}

.legal-card p {
  margin: 0 0 1rem;
}

.legal-card ul {
  margin: 0 0 1rem 1.2rem;
  padding: 0;
}

.legal-card li {
  margin-bottom: 0.45rem;
}

/* ===== BLOG ===== */

.blog-section {
  padding: 0.5rem 0 4rem;
}

.blog-section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1.5rem;
  margin-bottom: 1.6rem;
}

.blog-section-copy {
  max-width: 760px;
}

.blog-section-head h2 {
  margin: 0.45rem 0 0.8rem;
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.05;
  color: #0a2852;
}

.blog-section-head p {
  margin: 0;
  color: var(--muted);
  font-size: 1.04rem;
  line-height: 1.75;
}

.blog-view-all {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0.9rem 1.2rem;
  border-radius: 16px;
  background: #0056a4;
  color: #ffffff;
  text-decoration: none;
  font-weight: 800;
  white-space: nowrap;
  box-shadow: 0 10px 24px rgba(0, 86, 164, 0.18);
  transition: background 0.2s ease, transform 0.2s ease;
}

.blog-view-all:hover {
  background: #00498c;
  transform: translateY(-1px);
}

.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.1rem;
}

.blog-card {
  background: #ffffff;
  border: 1px solid #c9d9ee;
  border-radius: 26px;
  box-shadow: 0 10px 30px rgba(9, 52, 112, 0.06);
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.blog-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 36px rgba(9, 52, 112, 0.12);
  border-color: #b8cfe8;
}

.blog-card-link {
  display: block;
  height: 100%;
  text-decoration: none;
  color: inherit;
}

.blog-card-body {
  padding: 1.35rem;
}

.blog-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.8rem;
  margin-bottom: 1rem;
}

.blog-chip {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0.38rem 0.8rem;
  border-radius: 999px;
  background: #eef5fb;
  color: #0056a4;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.01em;
}

.blog-reading-time {
  color: #6c84a6;
  font-size: 0.92rem;
  font-weight: 700;
  white-space: nowrap;
}

.blog-card h3 {
  margin: 0 0 0.85rem;
  font-size: 1.24rem;
  line-height: 1.35;
  color: #0a2a5e;
}

.blog-card p {
  margin: 0 0 1.1rem;
  color: #4e678d;
  font-size: 1rem;
  line-height: 1.75;
}

.blog-card-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  padding-top: 0.95rem;
  border-top: 1px solid #e5eef8;
  color: #6c84a6;
  font-size: 0.92rem;
  font-weight: 700;
}

.blog-card--loading {
  min-height: 240px;
}

/* ===== BLOG PAGE ===== */

.blog-hero {
  padding: 2rem 0 1rem;
}

.blog-hero-card {
  background: linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
  border: 1px solid #c9d9ee;
  border-radius: 30px;
  box-shadow: 0 10px 30px rgba(9, 52, 112, 0.06);
  padding: 2rem;
}

.blog-hero-card h1 {
  margin: 0.45rem 0 0.8rem;
  font-size: clamp(2.1rem, 4vw, 3.3rem);
  line-height: 1.02;
  color: #0a2a5e;
}

.blog-hero-card p {
  margin: 0;
  max-width: 780px;
  color: #4e678d;
  font-size: 1.05rem;
  line-height: 1.8;
}

.blog-archive-section {
  padding: 0.5rem 0 4rem;
}

/* ===== POST PAGE ===== */

.post-page {
  padding: 2rem 0 4rem;
}

.post-card {
  background: #ffffff;
  border: 1px solid #c9d9ee;
  border-radius: 30px;
  box-shadow: 0 10px 30px rgba(9, 52, 112, 0.06);
  padding: 2rem;
}

.post-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-bottom: 1rem;
  color: #6c84a6;
  font-size: 0.95rem;
  font-weight: 700;
}

.post-card h1 {
  margin: 0 0 1rem;
  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: 1.05;
  color: #0a2a5e;
}

.post-card p,
.post-card li {
  color: #4e678d;
  font-size: 1rem;
  line-height: 1.85;
}

.post-card h2 {
  margin: 1.7rem 0 0.8rem;
  color: #0a2a5e;
  font-size: 1.3rem;
}

.post-card ul {
  margin: 0 0 1rem 1.2rem;
  padding: 0;
}

/* ===== RESPONSIVE ===== */

@media (max-width: 1100px) {
  .hero {
    grid-template-columns: 1fr;
  }

  .banxico-card {
    max-width: 420px;
  }

  .rates-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 980px) {
  .blog-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {

  .contact-layout,
  .footer-inner {
    grid-template-columns: 1fr;
  }

  .footer-inner {
    text-align: center;
  }

  .footer-logo,
  .footer-nav,
  .footer-madeby {
    justify-content: center;
  }

  .footer-text,
  .footer-madeby a {
    max-width: 100%;
    text-align: center;
  }

  .blog-section-head {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 768px) {
  .topbar-inner {
    min-height: 76px;
    gap: 1rem;
  }

  .brand-copy strong {
    font-size: 1rem;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .topnav {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    left: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0.35rem;
    background: #ffffff;
    border: 1px solid #c9dbee;
    border-radius: 22px;
    box-shadow: 0 16px 36px rgba(7, 44, 94, 0.12);
    padding: 0.75rem;
  }

  .topnav.is-open {
    display: flex;
  }

  .topnav a {
    color: #0a2a5e;
    background: transparent;
    border-radius: 14px;
    padding: 0.9rem 1rem;
  }

  .topnav a:hover {
    background: #eef5fb;
    color: #0056a4;
  }

  .topnav a.is-active {
    background: #0056a4;
    color: #ffffff;
  }

  .hero {
    padding-top: 2rem;
    gap: 1.5rem;
    grid-template-columns: 1fr;
  }

  .hero-copy h1 {
    max-width: 100%;
    font-size: 3.3rem;
  }

  .hero-copy p,
  .section-heading p {
    font-size: 1rem;
  }

  .update-pill {
    min-height: auto;
    align-items: flex-start;
    border-radius: 24px;
    padding: 1rem;
  }

  .banxico-card {
    min-height: 220px;
    padding: 1.4rem;
  }

  .section-heading {
    margin-bottom: 1.4rem;
  }

  .rates-grid {
    grid-template-columns: 1fr;
  }

  .rate-value {
    font-size: 3rem;
  }

  .extra-info {
    padding: 0.8rem 0 3rem;
  }

  .extra-info-inner {
    padding: 1.35rem 1.1rem 1.5rem;
    border-radius: 22px;
  }

  .extra-info h2 {
    font-size: 1.6rem;
  }

  .extra-info h3 {
    font-size: 1.08rem;
  }

  .extra-info p,
  .extra-info li {
    font-size: 0.97rem;
    line-height: 1.7;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .contact-info-card,
  .contact-form-card {
    padding: 1.3rem;
    border-radius: 22px;
  }

  .legal-card {
    padding: 1.35rem 1.1rem 1.5rem;
    border-radius: 22px;
  }

  .legal-card h1 {
    font-size: 1.8rem;
  }

  .legal-card h2 {
    font-size: 1.08rem;
  }

  .legal-card p,
  .legal-card li {
    font-size: 0.97rem;
    line-height: 1.7;
  }

  .blog-section {
    padding: 0.2rem 0 3rem;
  }

  .blog-grid {
    grid-template-columns: 1fr;
  }

  .blog-hero-card,
  .post-card {
    padding: 1.35rem 1.1rem 1.5rem;
    border-radius: 22px;
  }

  .blog-card-body {
    padding: 1.15rem;
  }

  .blog-card-top {
    flex-wrap: wrap;
    align-items: flex-start;
  }

  .blog-card h3 {
    font-size: 1.12rem;
  }

  .blog-card p {
    font-size: 0.97rem;
    line-height: 1.7;
  }

  .blog-card-meta {
    flex-direction: column;
    align-items: flex-start;
  }

  .blog-hero-card h1 {
    font-size: 1.95rem;
  }

  .blog-hero-card p {
    font-size: 0.98rem;
    line-height: 1.7;
  }
}

@media (max-width: 480px) {
  .container {
    width: min(1160px, calc(100% - 1rem));
  }

  .brand-mark {
    width: 44px;
    height: 44px;
    font-size: 1.2rem;
  }

  .topnav a {
    padding: 0.62rem 0.85rem;
    font-size: 0.94rem;
  }

  .hero-copy h1 {
    font-size: 2.8rem;
  }

  .banxico-rate,
  .rate-value {
    font-size: 2.8rem;
  }

.skip-link {
  position: absolute;
  top: -40px;
  left: 16px;
  background: #0057a8;
  color: #fff;
  padding: 10px 14px;
  border-radius: 8px;
  text-decoration: none;
  z-index: 1000;
  transition: top 0.2s ease;
}

.skip-link:focus {
  top: 16px;
}
}