/* México Mágico Tax Professional — palette taken from the wordmark. */

:root {
  --night: #000000;
  --ink: #1c140f;
  --ink-soft: #4e433b;
  --mute: #75685e;
  --line: #eadccf;
  --paper: #fffaf6;
  --paper-2: #fff1e6;
  --white: #ffffff;
  --surface: #ffffff;

  --red: #ef2b2b;
  --cyan: #00b3e3;
  --gold: #f5b400;
  --gold-deep: #d99a00;
  --purple: #7a3aa8;
  --teal: #009e90;
  --pink: #ff2d86;
  --link: #0b6d86;

  --wrap: 1120px;
  --gap: clamp(1rem, 2.4vw, 1.5rem);
  --radius: 18px;
  --shadow: 0 1px 2px rgba(40, 18, 8, .05), 0 14px 36px rgba(40, 18, 8, .07);

  --sans: "Nunito", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --display: "Outfit", ui-sans-serif, system-ui, sans-serif;
  color-scheme: light;
}

[data-theme="dark"] {
  --ink: #f6efe8;
  --ink-soft: #ddd2c6;
  --mute: #b7a89c;
  --line: #3d342c;
  --paper: #14110e;
  --paper-2: #1f1915;
  --surface: #2a221c;
  --link: #6ad8f4;
  --shadow: 0 1px 2px rgba(0, 0, 0, .35), 0 14px 36px rgba(0, 0, 0, .4);
  color-scheme: dark;
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

img, svg { max-width: 100%; height: auto; display: block; }

h1, h2, h3, h4 {
  font-family: var(--display);
  line-height: 1.12;
  margin: 0 0 .5em;
  color: var(--ink);
  font-weight: 800;
  letter-spacing: -.03em;
  text-wrap: balance;
}
h1 { font-size: clamp(2.2rem, 5vw, 3.7rem); }
h2 { font-size: clamp(1.7rem, 3.2vw, 2.45rem); }
h3 { font-size: clamp(1.15rem, 2vw, 1.4rem); letter-spacing: -.02em; }
h4 {
  font-size: .82rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  font-weight: 800;
}
p { margin: 0 0 1rem; color: var(--ink-soft); text-wrap: pretty; }

a { color: var(--link); text-underline-offset: 3px; }
a:hover { color: var(--pink); }

:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
  border-radius: 4px;
}
::selection { background: var(--gold); color: var(--ink); }

.wrap { width: min(100% - 2rem, var(--wrap)); margin-inline: auto; }

.eyebrow {
  font-family: var(--display);
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--red);
  margin: 0 0 .7rem;
}

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--gold);
  color: var(--ink);
  padding: .75rem 1.1rem;
  z-index: 300;
  font-weight: 800;
}
.skip:focus { left: .5rem; top: .5rem; }

.ribbon {
  height: 8px;
  background: linear-gradient(90deg,
    var(--red) 0 16.66%,
    var(--cyan) 16.66% 33.33%,
    var(--gold) 33.33% 50%,
    var(--purple) 50% 66.66%,
    var(--teal) 66.66% 83.33%,
    var(--pink) 83.33% 100%);
}

/* ---------------------------------------------------------------- header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--night);
}
.bar {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-height: 92px;
  padding-block: .45rem;
}
.brand { display: flex; margin-right: auto; line-height: 0; min-width: 0; }
.brand img { height: 84px; width: auto; }

.nav { display: flex; align-items: center; gap: .15rem; }
.nav a {
  display: inline-flex;
  align-items: center;
  padding: .5rem .75rem;
  border-radius: 999px;
  color: rgba(255, 255, 255, .88);
  text-decoration: none;
  font-weight: 800;
  font-size: .95rem;
}
.nav a:hover { background: rgba(255, 255, 255, .08); color: #fff; }
.nav a[aria-current="page"] { background: var(--gold); color: var(--ink); }

.nav-call {
  margin-left: .35rem;
  background: transparent;
  box-shadow: inset 0 0 0 2px var(--gold);
  color: var(--gold) !important;
}
.nav-call:hover { background: var(--gold); color: var(--ink) !important; }

.lang {
  display: flex;
  gap: .2rem;
  margin-left: .45rem;
  padding-left: .7rem;
  border-left: 1px solid rgba(255, 255, 255, .18);
}
.lang a { font-size: .8rem; letter-spacing: .06em; padding: .4rem .55rem; }
.lang a[aria-current="true"] { background: var(--gold); color: var(--ink); }

.nav-toggle {
  display: none;
  flex: 0 0 auto;
  border: 1.5px solid rgba(255, 255, 255, .75);
  background: transparent;
  border-radius: 10px;
  padding: .5rem .65rem;
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: #fff;
  margin: 4px 0;
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  margin-left: .35rem;
  border-radius: 999px;
  border: 1.5px solid rgba(255, 255, 255, .75);
  background: transparent;
  color: #fff;
  cursor: pointer;
  flex: 0 0 auto;
}
.theme-toggle:hover { background: rgba(255, 255, 255, .08); }
.theme-toggle svg { width: 20px; height: 20px; display: block; }
.theme-toggle .theme-sun { display: none; }
[data-theme="dark"] .theme-toggle .theme-moon { display: none; }
[data-theme="dark"] .theme-toggle .theme-sun { display: block; }

@media (max-width: 980px) {
  .brand img { height: 68px; }
  .bar { min-height: 80px; }
  .nav-toggle { display: block; }
  .nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    background: var(--night);
    padding: .4rem 1rem 1.1rem;
    border-top: 1px solid rgba(255, 255, 255, .08);
    box-shadow: 0 18px 30px rgba(0, 0, 0, .28);
  }
  .nav.open { display: flex; }
  .nav a { padding: .75rem .4rem; }
  .nav-call { margin: .25rem 0 0; justify-content: center; }
  .lang {
    border-left: 0;
    border-top: 1px solid rgba(255, 255, 255, .14);
    margin: .4rem 0 0;
    padding: .7rem 0 0;
  }
}

/* ------------------------------------------------------------------ hero */
.hero { padding: clamp(2.4rem, 6vw, 4.6rem) 0 clamp(2rem, 5vw, 3.6rem); }
.hero-grid {
  display: grid;
  gap: clamp(1.6rem, 4vw, 3.2rem);
  align-items: center;
}
@media (min-width: 900px) {
  .hero-grid { grid-template-columns: 1.05fr .95fr; }
}
.lede {
  font-size: clamp(1.08rem, 1.7vw, 1.25rem);
  max-width: 38rem;
  color: var(--ink-soft);
}
.actions { display: flex; flex-wrap: wrap; gap: .7rem; margin: 1.3rem 0 0; }

.hero-frame {
  margin: 0;
  padding: 8px;
  border-radius: 28px;
  background: linear-gradient(140deg, var(--red), var(--gold) 32%, var(--cyan) 64%, var(--pink));
  box-shadow: var(--shadow);
}
.hero-frame img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  object-position: 68% 30%;
  border-radius: 22px;
}

.banner-show { display: flex; flex-direction: column; gap: .65rem; }
.banner-viewport { display: grid; border-radius: 22px; overflow: hidden; }
.banner-slide {
  grid-area: 1 / 1;
  position: relative;
  display: block;
  color: #fff;
  text-decoration: none;
  opacity: 0;
  visibility: hidden;
}
.banner-slide.is-active { opacity: 1; visibility: visible; }
.banner-slide img {
  aspect-ratio: 16 / 9;
  object-position: center;
  border-radius: 0;
}
.banner-copy {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: grid;
  gap: .2rem;
  padding: 2.4rem 1rem 1rem;
  background: linear-gradient(transparent, rgba(0, 0, 0, .82));
}
.banner-copy .eyebrow { color: var(--gold); margin: 0; }
.banner-copy strong {
  font-family: var(--display);
  font-size: clamp(1.25rem, 2vw, 1.7rem);
  letter-spacing: -.03em;
  line-height: 1.1;
}
.banner-copy span:last-child {
  color: rgba(255, 255, 255, .9);
  font-size: .95rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.banner-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
}
.banner-controls button {
  border: 0;
  background: rgba(0, 0, 0, .45);
  color: #fff;
  cursor: pointer;
}
.banner-prev, .banner-next {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  font-size: 1.4rem;
  line-height: 1;
}
.banner-dots { display: flex; gap: .4rem; }
.banner-dots button {
  width: 10px;
  height: 10px;
  padding: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, .55);
}
.banner-dots button[aria-selected="true"] { background: var(--gold); width: 22px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .45rem;
  padding: .85rem 1.35rem;
  border-radius: 999px;
  font-family: var(--sans);
  font-weight: 800;
  font-size: 1rem;
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
  line-height: 1.1;
}
.btn-primary { background: var(--gold); color: var(--ink); }
.btn-primary:hover { background: var(--gold-deep); color: var(--ink); }
.btn-line { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn-line:hover { background: var(--ink); color: var(--paper); }
.btn-light { background: #fff; color: var(--ink); }
.btn-light:hover { background: var(--gold); color: var(--ink); }
.btn[disabled] { opacity: .65; cursor: progress; }

/* ----------------------------------------------------------------- bands */
.band { padding: 0 0 clamp(2.2rem, 5vw, 3.4rem); }
.band-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: .8rem;
}
.band-list li {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 1rem 1.05rem 1.05rem;
  border-top: 5px solid var(--gold);
}
.band-list li:nth-child(1) { border-top-color: var(--red); }
.band-list li:nth-child(2) { border-top-color: var(--cyan); }
.band-list li:nth-child(3) { border-top-color: var(--purple); }
.band-list li:nth-child(4) { border-top-color: var(--pink); }
.band-list strong {
  display: block;
  font-family: var(--display);
  font-size: 1.25rem;
  letter-spacing: -.02em;
  color: var(--ink);
}
.band-list span { display: block; color: var(--mute); font-size: .92rem; margin-top: .15rem; }
.band-list a { color: inherit; text-decoration: none; }
.band-list a:hover { color: var(--link); }
@media (max-width: 800px) {
  .band-list { grid-template-columns: 1fr 1fr; }
}

section { padding: clamp(2.6rem, 6vw, 4.6rem) 0; }
.section-soft { background: var(--paper-2); }
.section-head { max-width: 42rem; margin: 0 auto clamp(1.6rem, 3vw, 2.3rem); }
.section-head.center { text-align: center; }
.section-head p { font-size: 1.05rem; }

.page-hero {
  background: var(--night);
  color: #fff;
  padding: clamp(2.2rem, 5vw, 3.4rem) 0;
}
.page-hero h1, .page-hero p { color: #fff; }
.page-hero p { max-width: 38rem; color: rgba(255, 255, 255, .82); margin-bottom: 0; font-size: 1.12rem; }
.page-hero .eyebrow { color: var(--gold); }
.page-hero a { color: var(--gold); font-weight: 800; text-decoration: none; }
.page-hero a:hover { color: #fff; }

.specialist {
  display: flex;
  gap: 1rem;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: .9rem 1rem;
  margin-top: 1.25rem;
}
.specialist img {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  object-fit: cover;
  flex: 0 0 auto;
}
.specialist h2 { font-size: 1.15rem; margin: 0 0 .15rem; }
.specialist p { margin: 0; }
.specialist a { font-weight: 800; }

.related { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .6rem; }
.related a {
  display: inline-block;
  padding: .55rem .95rem;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--ink);
  text-decoration: none;
  font-weight: 800;
}
.related a:hover { border-color: var(--gold); color: var(--ink); }

.split {
  display: grid;
  gap: clamp(1.4rem, 4vw, 3rem);
  align-items: center;
}
@media (min-width: 860px) {
  .split { grid-template-columns: 1fr 1fr; }
  .split.reverse > :first-child { order: 2; }
}
.split img {
  width: 100%;
  border-radius: 20px;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  box-shadow: var(--shadow);
}
.split .specialist { min-width: 0; max-width: 100%; }
.split .specialist > div { min-width: 0; }
.split .specialist img {
  width: 76px;
  height: 76px;
  max-width: 76px;
  aspect-ratio: 1;
  border-radius: 50%;
  box-shadow: none;
  flex: 0 0 auto;
}
.office-a { object-position: center 22%; }
.office-b { object-position: 70% 24%; }
.office-c { object-position: 72% 32%; }

.grid { display: grid; gap: var(--gap); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 900px) { .grid-3 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px) { .grid-3 { grid-template-columns: 1fr; } }

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-top: 6px solid var(--pink);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 1px 0 rgba(40, 18, 8, .03);
}
.card:nth-child(6n+1) { border-top-color: var(--red); }
.card:nth-child(6n+2) { border-top-color: var(--cyan); }
.card:nth-child(6n+3) { border-top-color: var(--gold); }
.card:nth-child(6n+4) { border-top-color: var(--purple); }
.card:nth-child(6n+5) { border-top-color: var(--teal); }
.card:nth-child(6n+6) { border-top-color: var(--pink); }
.card > a {
  color: inherit;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  height: 100%;
}
.card > a:hover h3 { color: var(--link); }
.card img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.card .more {
  display: inline-block;
  margin-top: .85rem;
  font-weight: 800;
  color: var(--link);
}
.card-body { padding: 1.15rem 1.25rem 1.35rem; }
.card-body h3 { margin-bottom: .35rem; }
.card-body p:last-child { margin-bottom: 0; }

.center-cta { text-align: center; margin: 1.6rem 0 0; }

.value {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.35rem 1.3rem 1.45rem;
  border-top: 6px solid var(--red);
}
.value:nth-child(2) { border-top-color: var(--gold); }
.value:nth-child(3) { border-top-color: var(--cyan); }
.value h3 { margin-bottom: .35rem; }
.value p:last-child { margin: 0; }

.person { text-align: center; }
.avatar {
  width: 168px;
  height: 168px;
  margin: 0 auto 1rem;
  padding: 5px;
  border-radius: 50%;
  background: conic-gradient(from 30deg, var(--red), var(--gold), var(--cyan), var(--teal), var(--purple), var(--pink), var(--red));
}
.avatar img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  object-position: center 20%;
  background: var(--surface);
}
.avatar .pos-b { object-position: 68% 18%; }
.avatar .pos-c { object-position: 72% 28%; }
.person h3 { margin-bottom: .15rem; font-size: 1.25rem; }
.person .role { color: var(--mute); font-weight: 700; margin: 0 0 .45rem; font-size: .95rem; }
.person a { font-weight: 800; font-size: .92rem; word-break: break-word; }

.quote-band { background: var(--night); }
.quote-band blockquote { margin: 0 auto; max-width: 46rem; text-align: center; }
.quote-band p {
  color: #fff;
  font-size: clamp(1.15rem, 2.2vw, 1.45rem);
  font-weight: 700;
  line-height: 1.45;
  margin: 0;
}
.quote-band footer {
  margin-top: 1.1rem;
  color: var(--gold);
  font-family: var(--display);
  font-weight: 800;
  letter-spacing: .02em;
}

/* --------------------------------------------------------------- contact */
.contact-grid { display: grid; gap: clamp(1.2rem, 3vw, 2rem); align-items: start; }
@media (min-width: 880px) {
  .contact-grid { grid-template-columns: .82fr 1.18fr; }
}
.facts { list-style: none; margin: 0; padding: 0; display: grid; gap: .85rem; }
.facts li {
  display: flex;
  gap: .85rem;
  align-items: flex-start;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: .9rem 1rem;
}
.facts .ico {
  flex: 0 0 .7rem;
  height: .7rem;
  margin-top: .4rem;
  border-radius: 50%;
  background: var(--gold);
}
.facts li:nth-child(1) .ico { background: var(--red); }
.facts li:nth-child(2) .ico { background: var(--cyan); }
.facts li:nth-child(3) .ico { background: var(--pink); }
.facts strong {
  display: block;
  font-size: .75rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--mute);
  font-weight: 800;
}
.facts a { color: var(--ink); font-weight: 800; text-decoration: none; }
.facts a:hover { color: var(--link); text-decoration: underline; }

.form {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(1.2rem, 3vw, 1.8rem);
  box-shadow: var(--shadow);
}
.field { margin-bottom: 1rem; }
.field label { display: block; font-size: .92rem; font-weight: 800; margin-bottom: .35rem; }
.field .req { color: var(--red); }
.field input, .field select, .field textarea {
  width: 100%;
  padding: .8rem .9rem;
  font: inherit;
  font-size: 1rem;
  color: var(--ink);
  background: var(--paper);
  border: 1.5px solid var(--line);
  border-radius: 12px;
}
.field textarea { min-height: 8rem; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px rgba(0, 179, 227, .25);
  background: var(--surface);
}
.field .err { display: none; color: #a31622; font-size: .86rem; font-weight: 700; margin-top: .3rem; }
.field.invalid input, .field.invalid select, .field.invalid textarea { border-color: var(--red); }
.field.invalid .err { display: block; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-note { font-size: .88rem; color: var(--mute); margin: .8rem 0 0; }
.form-status { margin-top: .9rem; padding: .85rem 1rem; border-radius: 12px; display: none; font-weight: 700; }
.form-status.show { display: block; }
.form-status.ok { background: #e7f7ef; color: #14653c; border: 1px solid #b7e4c9; }
.form-status.bad { background: #fdecec; color: #8d1d28; border: 1px solid #f3c4c8; }
[data-theme="dark"] .form-status.ok { background: #143526; color: #b7ebc9; border-color: #1f6b45; }
[data-theme="dark"] .form-status.bad { background: #3a161b; color: #ffc9ce; border-color: #8d1d28; }
[data-theme="dark"] .field .err { color: #ffb4bc; }
[data-theme="dark"] .page-hero,
[data-theme="dark"] .quote-band { box-shadow: inset 0 -4px 0 var(--gold); }

/* ---------------------------------------------------------------- footer */
.site-footer { background: var(--night); color: rgba(255, 255, 255, .8); padding: 0 0 1.4rem; }
.site-footer .wrap { padding-top: clamp(2rem, 5vw, 3rem); }
.site-footer h4 { color: #fff; margin-bottom: .8rem; }
.site-footer a { color: rgba(255, 255, 255, .82); text-decoration: none; font-weight: 700; }
.site-footer a:hover { color: var(--gold); }
.site-footer p { color: rgba(255, 255, 255, .72); }
.footer-logo { height: 72px; width: auto; margin-bottom: .8rem; }
.footer-grid {
  display: grid;
  gap: 1.8rem;
  grid-template-columns: 1.4fr .7fr 1fr;
}
@media (max-width: 760px) {
  .footer-grid { grid-template-columns: 1fr; }
}
.footer-links { list-style: none; margin: 0; padding: 0; display: grid; gap: .4rem; }
.footer-bottom {
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, .12);
  display: flex;
  flex-wrap: wrap;
  gap: .6rem 1.4rem;
  justify-content: space-between;
  font-size: .9rem;
  color: rgba(255, 255, 255, .62);
}
