/* ============================================================
   Amigos Income Tax Services — Design System
   ============================================================ */

:root {
  /* Brand */
  --teal: #2CD5C4;
  --teal-dark: #1CBDAD;
  --navy: #192E47;
  --navy-deep: #132235;
  --charcoal: #222222;
  --charcoal-soft: #333333;
  --ice: #F8F9FA;
  --white: #FFFFFF;
  --border: #E5E9EC;

  /* Type */
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-head: 'Merriweather', Georgia, serif;

  /* Layout */
  --max: 1200px;
  --radius: 6px;
  --shadow: 0 10px 30px rgba(19, 34, 53, 0.08);
  --shadow-lg: 0 20px 50px rgba(19, 34, 53, 0.18);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--charcoal-soft);
  background: var(--white);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--font-head);
  color: var(--navy);
  line-height: 1.25;
  margin: 0 0 .5em;
  font-weight: 700;
}

h1 { font-size: clamp(2rem, 4vw, 3rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.25rem); }
h3 { font-size: 1.25rem; }

p { margin: 0 0 1em; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
ul { padding-left: 1.2em; }

.container {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 24px;
}

.section { padding: 80px 0; }
.section--tight { padding: 56px 0; }
.section--ice { background: var(--ice); }
.section--navy { background: var(--navy); color: rgba(255,255,255,.85); }
.section--navy h2, .section--navy h3 { color: var(--white); }

.eyebrow {
  display: inline-block;
  font-size: .78rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--teal-dark);
  font-weight: 700;
  margin-bottom: 10px;
}

.section-head { text-align: center; max-width: 640px; margin: 0 auto 48px; }
.section-head .rule {
  width: 60px; height: 3px; background: var(--teal);
  margin: 14px auto 0; border: 0;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 14px 30px;
  border-radius: var(--radius);
  font-weight: 700;
  font-size: .82rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  cursor: pointer;
  border: 2px solid transparent;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease, color .15s ease;
}
.btn-primary { background: var(--teal); color: var(--navy-deep); }
.btn-primary:hover { background: var(--teal-dark); transform: translateY(-2px); box-shadow: var(--shadow); }
.btn-outline { background: transparent; border-color: rgba(255,255,255,.5); color: var(--white); }
.btn-outline:hover { border-color: var(--teal); color: var(--teal); }
.btn-dark { background: var(--navy); color: var(--white); }
.btn-dark:hover { background: var(--navy-deep); transform: translateY(-2px); }
.btn-block { display: block; width: 100%; text-align: center; }

/* ============ Header ============ */
.site-header {
  position: sticky; top: 0; z-index: 500;
  background: var(--white);
  border-bottom: 1px solid var(--border);
}
.nav-wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand img { height: 38px; width: auto; }
.brand-text {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--navy);
  line-height: 1.1;
}
.brand-text span { display: block; font-family: var(--font-body); font-size: .6rem; letter-spacing: .12em; color: var(--teal-dark); font-weight: 700; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 30px;
  list-style: none;
  margin: 0; padding: 0;
}
.nav-links a {
  font-size: .82rem;
  font-weight: 600;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--charcoal-soft);
  padding: 8px 0;
  position: relative;
}
.nav-links a:hover, .nav-links a.active { color: var(--teal-dark); }
.nav-links a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 2px;
  background: var(--teal); transform: scaleX(0); transform-origin: left;
  transition: transform .2s ease;
}
.nav-links a:hover::after, .nav-links a.active::after { transform: scaleX(1); }

.has-dropdown { position: relative; }
.dropdown {
  position: absolute; top: calc(100% + 14px); left: -18px;
  background: var(--white); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  min-width: 240px; padding: 8px; list-style: none;
  opacity: 0; visibility: hidden; transform: translateY(8px);
  transition: all .18s ease;
}
.has-dropdown:hover .dropdown, .has-dropdown:focus-within .dropdown {
  opacity: 1; visibility: visible; transform: translateY(0);
}
.dropdown a { display: block; padding: 10px 14px; text-transform: none; letter-spacing: 0; font-size: .88rem; border-radius: 4px; }
.dropdown a:hover { background: var(--ice); }
.dropdown a::after { display: none; }

.nav-cta { margin-left: 6px; }
.nav-cta .btn { padding: 14px 30px; }
.nav-cta a.btn::after { display: none; }
.nav-toggle {
  display: none; background: none; border: 0; cursor: pointer; padding: 6px;
}
.nav-toggle span { display: block; width: 24px; height: 2px; background: var(--navy); margin: 5px 0; transition: all .2s ease; }

/* ============ Hero ============ */
.hero {
  position: relative;
  min-height: 62vh;
  display: flex; align-items: center;
  color: var(--white);
  overflow: hidden;
  background: var(--navy-deep);
}
.hero-slide {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
  opacity: 0; transition: opacity 1s ease;
  display: flex; align-items: center; justify-content: center;
}
.hero-slide.is-active { opacity: 1; }
.hero-slide::before {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(120deg, rgba(19,34,53,.86), rgba(19,34,53,.5));
}
.hero-inner { position: relative; z-index: 2; max-width: 760px; padding: 0 24px; margin: 0 auto; text-align: center; }
.hero .eyebrow { color: var(--teal); }
.hero h1 { color: var(--white); margin-bottom: .4em; }
.hero p.lead { font-size: 1.1rem; color: rgba(255,255,255,.85); max-width: 560px; margin-left: auto; margin-right: auto; }
.hero-cta { display: flex; gap: 16px; margin-top: 28px; flex-wrap: wrap; justify-content: center; }

.hero-dots {
  position: absolute; bottom: 26px; left: 50%; transform: translateX(-50%);
  display: flex; gap: 10px; z-index: 3;
}
.hero-dots button {
  width: 9px; height: 9px; border-radius: 50%; border: 0; background: rgba(255,255,255,.4);
  cursor: pointer; padding: 0;
}
.hero-dots button.is-active { background: var(--teal); }

.hero--page { min-height: 40vh; }
.hero--page .hero-inner { text-align: center; max-width: 900px; }
.hero--page h1 {
  display: inline-block;
  background: rgba(19,34,53,.55);
  padding: 14px 26px;
}
.hero--page .answer-first { color: rgba(255,255,255,.9); max-width: 700px; margin: 18px auto 0; font-size: 1.05rem; }

/* ============ Cards / Grids ============ */
.grid {
  display: grid; gap: 28px;
}
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 26px;
  box-shadow: var(--shadow);
  transition: transform .18s ease, box-shadow .18s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.card .icon {
  width: 52px; height: 52px; border-radius: 12px;
  background: rgba(44,213,196,.15); color: var(--teal-dark);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 18px; font-size: 1.4rem;
}
.card h3 { margin-bottom: 10px; }
.card a.card-link { color: var(--teal-dark); font-weight: 700; font-size: .85rem; text-transform: uppercase; letter-spacing: .04em; }

/* About / Hours split */
.split { display: grid; grid-template-columns: 1.1fr .9fr; gap: 60px; align-items: start; }
.hours-block dt { font-weight: 700; color: var(--navy); margin-top: 14px; }
.hours-block dd { margin: 2px 0 0; }

/* Testimonials */
.testimonial {
  background: var(--white); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 30px; box-shadow: var(--shadow); text-align: center;
}
.testimonial img {
  width: 110px; height: 110px; border-radius: 50%; object-fit: cover;
  margin: 0 auto 16px; border: 3px solid var(--teal);
}
.testimonial p { font-style: italic; color: var(--charcoal-soft); }
.testimonial .name { font-family: var(--font-head); color: var(--navy); font-weight: 700; margin-top: 12px; }

/* Trust badges */
.badges { display: flex; align-items: center; justify-content: center; gap: 60px; flex-wrap: wrap; }
.badges img { max-height: 115px; width: auto; filter: grayscale(15%); }

/* Value strip */
.value-strip { display: grid; grid-template-columns: repeat(3, 1fr); background: var(--navy-deep); }
.value-strip .value {
  display: flex; flex-direction: column; color: var(--white);
}
.value-strip .value-media {
  height: 130px; background: var(--ice);
  display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.value-strip .value-media img {
  max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain;
}
.value-strip .value span {
  display: block; text-align: center; padding: 18px 16px;
  font-family: var(--font-head); font-size: 1.15rem; font-weight: 700;
}

/* CTA banner */
.cta-banner { text-align: center; }
.cta-banner .rule { width: 60px; height: 3px; background: var(--teal); margin: 14px auto 30px; border: 0; }

/* Contact form */
.contact-form { display: grid; gap: 16px; max-width: 720px; margin: 0 auto; }
.contact-form input, .contact-form textarea {
  width: 100%; padding: 16px 18px; border-radius: var(--radius);
  border: 1px solid rgba(255,255,255,.18); background: rgba(255,255,255,.06);
  color: var(--white); font-family: var(--font-body); font-size: .95rem;
}
.contact-form input::placeholder, .contact-form textarea::placeholder { color: rgba(255,255,255,.5); }
.contact-form textarea { min-height: 140px; resize: vertical; }
.contact-form button { justify-self: start; }
.form-note { font-size: .82rem; color: var(--teal); margin-top: 4px; display: none; }
.form-note.is-visible { display: block; }

/* Contact info cards (contact page) */
.info-card { text-align: center; }
.info-card .icon { margin: 0 auto 18px; }
.map-frame { border: 0; width: 100%; height: 420px; border-radius: var(--radius); box-shadow: var(--shadow); }

/* FAQ accordion */
.faq { border-top: 1px solid var(--border); max-width: 820px; margin: 0 auto; }
.faq-item { border-bottom: 1px solid var(--border); }
.faq-q {
  width: 100%; text-align: left; background: none; border: 0; cursor: pointer;
  padding: 20px 4px; display: flex; justify-content: space-between; align-items: center;
  font-family: var(--font-head); font-weight: 700; color: var(--navy); font-size: 1.02rem;
}
.faq-q .plus { font-size: 1.4rem; color: var(--teal-dark); transition: transform .2s ease; }
.faq-item.is-open .faq-q .plus { transform: rotate(45deg); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height .25s ease; }
.faq-a p { padding: 0 4px 20px; color: var(--charcoal-soft); }

/* Footer */
.site-footer { background: #0f1b28; color: rgba(255,255,255,.65); padding: 56px 0 22px; }
.footer-top { text-align: center; }
.footer-top h3 { color: var(--white); }
.footer-meta { display: flex; justify-content: center; gap: 6px; flex-direction: column; align-items: center; margin: 18px 0; font-size: .92rem; }
.footer-social { display: flex; gap: 12px; justify-content: center; margin-top: 20px; }
.footer-social a {
  width: 38px; height: 38px; border-radius: 50%; background: var(--teal);
  color: var(--navy-deep); display: flex; align-items: center; justify-content: center;
  font-size: .95rem; transition: transform .15s ease, background .15s ease;
}
.footer-social a:hover { transform: translateY(-3px); background: var(--teal-dark); }
.footer-social a svg { display: block; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.08); margin-top: 40px; padding-top: 20px;
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px;
  font-size: .78rem;
}
.footer-bottom a { color: rgba(255,255,255,.65); text-decoration: underline; text-underline-offset: 2px; }
.footer-bottom a:hover { color: var(--teal); }

/* App page specifics */
.qr-split { display: grid; grid-template-columns: auto 1fr; gap: 60px; align-items: center; }
.qr-split img.qr { width: 160px; height: 160px; border: 8px solid var(--white); box-shadow: var(--shadow); }
.code-pill {
  display: inline-block; background: var(--ice); border: 1px dashed var(--teal-dark);
  padding: 2px 10px; border-radius: 4px; font-weight: 700; color: var(--navy);
}
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px 32px; }
.feature { display: flex; gap: 16px; align-items: flex-start; }
.feature .icon { flex-shrink: 0; }
.store-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.store-card { background: var(--ice); border-radius: var(--radius); padding: 36px; text-align: center; }
.store-card img.badge { height: 42px; margin: 0 auto 16px; }

/* Register steps (TaxPass How To Register) */
.register-steps { list-style: none; margin: 0 auto; padding: 0; max-width: 760px; display: grid; gap: 28px; }
.register-steps li { display: grid; grid-template-columns: 44px 1fr; gap: 20px; align-items: start; }
.register-step-num {
  width: 44px; height: 44px; border-radius: 50%; background: var(--teal); color: var(--navy-deep);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-head); font-weight: 700; font-size: 1.1rem;
}
.register-step-body h3 { margin: 4px 0 10px; font-size: 1.1rem; }
.register-step-body p { margin: 0 0 8px; color: var(--charcoal-soft); }
.register-step-note { font-size: .88rem; font-style: italic; }
.register-field-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.register-field-list li { display: grid; grid-template-columns: 110px 1fr; gap: 12px; align-items: baseline; }
.register-field-list strong { color: var(--navy); }
.register-field-list span { color: var(--charcoal-soft); }
.register-field-list .code-pill { margin: 0 2px; }
.phone-strip { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; justify-items: center; }
.phone-strip img { width: 100%; max-width: 190px; height: auto; border-radius: 14px; box-shadow: var(--shadow-lg); border: 1px solid var(--border); }

/* News */
.post-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; }
.post-card {
  background: var(--white); border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column;
}
.post-image { width: 100%; height: 190px; object-fit: cover; }
.post-body { padding: 22px; flex: 1; display: flex; flex-direction: column; }
.post-body h3 { font-size: 1.08rem; }
.post-body .read-more {
  margin-top: auto; color: var(--teal-dark); font-weight: 700; font-size: .85rem; text-transform: uppercase;
  background: none; border: 0; padding: 0; font-family: inherit; cursor: pointer; text-align: left;
}
.post-body .read-more:hover { color: var(--navy); }
.loading-msg, .error-msg { text-align: center; padding: 40px; color: var(--charcoal-soft); grid-column: 1/-1; }
.load-more-wrap { text-align: center; margin-top: 40px; }
.load-more-wrap .btn:disabled { opacity: .6; cursor: default; transform: none; box-shadow: none; }
.skeleton {
  background: linear-gradient(90deg, var(--ice) 25%, #eef1f3 37%, var(--ice) 63%);
  background-size: 400% 100%; animation: shimmer 1.4s infinite;
  border-radius: var(--radius); height: 320px;
}
@keyframes shimmer { 0% { background-position: 100% 0; } 100% { background-position: -100% 0; } }

/* Blog post popup modal */
body.modal-open { overflow: hidden; }
.post-modal-overlay {
  position: fixed; inset: 0; background: rgba(19,34,53,.68); z-index: 1000;
  display: flex; align-items: center; justify-content: center; padding: 24px;
  opacity: 0; visibility: hidden; transition: opacity .2s ease;
}
.post-modal-overlay.is-open { opacity: 1; visibility: visible; }
.post-modal {
  background: var(--white); border-radius: var(--radius); width: 100%; max-width: 720px;
  max-height: 88vh; overflow-y: auto; position: relative; box-shadow: var(--shadow-lg);
}
.post-modal-close {
  position: absolute; top: 14px; right: 14px; width: 36px; height: 36px; border-radius: 50%;
  border: 0; background: rgba(19,34,53,.08); color: var(--navy-deep); font-size: 1.5rem; line-height: 1;
  cursor: pointer; display: flex; align-items: center; justify-content: center; z-index: 2;
}
.post-modal-close:hover { background: rgba(19,34,53,.16); }
.post-modal-image { width: 100%; height: 260px; object-fit: cover; display: block; }
.post-modal-body { padding: 30px 34px 36px; }
.post-modal-date { font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; color: var(--teal-dark); font-weight: 700; }
.post-modal-body h2 { margin: 8px 0 20px; }
.post-modal-article { color: var(--charcoal-soft); line-height: 1.75; }
.post-modal-article p { margin: 0 0 16px; }
.post-modal-article img { max-width: 100%; height: auto; border-radius: var(--radius); }
.post-modal-source { display: inline-block; margin-top: 8px; color: var(--teal-dark); font-weight: 700; font-size: .85rem; text-transform: uppercase; }
@media (max-width: 720px) {
  .post-modal-body { padding: 24px 20px 28px; }
  .post-modal-image { height: 190px; }
}

/* JSON-LD helper text (visually hidden, for direct-answer AI parsing) */
.answer-first { font-size: 1.08rem; color: var(--charcoal-soft); max-width: 760px; }

/* Utility */
.mt-0 { margin-top: 0; }
.text-center { text-align: center; }

/* ============ Responsive ============ */
@media (max-width: 960px) {
  .split, .grid-2 { grid-template-columns: 1fr; }
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .value-strip { grid-template-columns: 1fr; }
  .qr-split { grid-template-columns: 1fr; text-align: center; }
  .qr-split img.qr { margin: 0 auto; }
  .feature-grid { grid-template-columns: 1fr; }
  .store-grid { grid-template-columns: 1fr; }
  .phone-strip { grid-template-columns: repeat(3, 1fr); }
  .post-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 720px) {
  .nav-links {
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--white); border-top: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
    max-height: 0; overflow: hidden; transition: max-height .25s ease;
  }
  .nav-links.is-open { max-height: 480px; }
  .nav-links li { border-bottom: 1px solid var(--border); }
  .nav-links a { display: block; padding: 16px 24px; }
  .has-dropdown .dropdown {
    position: static; opacity: 1; visibility: visible; transform: none;
    box-shadow: none; border: 0; display: none; padding: 0 0 0 16px;
  }
  .has-dropdown.is-open .dropdown { display: block; }
  .nav-cta { margin: 14px 24px 18px; }
  .nav-toggle { display: block; }
  .grid-3, .grid-4, .post-grid { grid-template-columns: 1fr; }
  .badges { gap: 30px; }
  .footer-bottom { justify-content: center; text-align: center; }
  .phone-strip { grid-template-columns: 1fr; }
}
