/* ==========================================================================
   ivocontador // ESTUDIO CONTABLE & ASESORÍA FISCAL
   Design System: Inspired by Old Tom Capital (Webflow Editorial Aesthetic)
   Palette: Warm Sandstone (#efede7), Charcoal (#1c1c17), Vermillion Pop (#f34e30), Deep Olive (#2a3220)
   Typography: SF Pro Display
   ========================================================================== */

/* High-Availability SF Pro Display @font-face */
@font-face {
  font-family: 'SF Pro Display';
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  src: local('SF Pro Display Regular'),
       local('SF Pro Display'),
       local('SF Pro'),
       url('https://cdn.jsdelivr.net/gh/sahil-khanduri/sf-pro-display-cdn@latest/fonts/SFProDisplay-Regular.woff2') format('woff2'),
       url('https://fonts.cdnfonts.com/s/14883/SFProDisplay-Regular.woff') format('woff');
}

@font-face {
  font-family: 'SF Pro Display';
  font-weight: 500;
  font-style: normal;
  font-display: swap;
  src: local('SF Pro Display Medium'),
       url('https://cdn.jsdelivr.net/gh/sahil-khanduri/sf-pro-display-cdn@latest/fonts/SFProDisplay-Medium.woff2') format('woff2'),
       url('https://fonts.cdnfonts.com/s/14883/SFProDisplay-Medium.woff') format('woff');
}

@font-face {
  font-family: 'SF Pro Display';
  font-weight: 600;
  font-style: normal;
  font-display: swap;
  src: local('SF Pro Display Semibold'),
       local('SF Pro Display SemiBold'),
       url('https://cdn.jsdelivr.net/gh/sahil-khanduri/sf-pro-display-cdn@latest/fonts/SFProDisplay-Semibold.woff2') format('woff2'),
       url('https://fonts.cdnfonts.com/s/14883/SFProDisplay-Semibold.woff') format('woff');
}

@font-face {
  font-family: 'SF Pro Display';
  font-weight: 700;
  font-style: normal;
  font-display: swap;
  src: local('SF Pro Display Bold'),
       url('https://cdn.jsdelivr.net/gh/sahil-khanduri/sf-pro-display-cdn@latest/fonts/SFProDisplay-Bold.woff2') format('woff2'),
       url('https://fonts.cdnfonts.com/s/14883/SFProDisplay-Bold.woff') format('woff');
}

:root {
  /* Sand Theme (Default) */
  --sand--surface: #efede7;
  --sand--text: #1c1c17;
  --sand--line: #dad6c8;
  --sand--demoted: #726a4f;
  --sand--pop: #e84224;

  /* Black / Dark Theme */
  --black--surface: #1c1c17;
  --black--text: #edece9;
  --black--line: #2d2c24;
  --black--demoted: #939393;
  --black--pop: #e84224;

  /* Olive Green Theme (Exact tone from user swatch #464c40) */
  --green--surface: #464c40;
  --green--text: #f3f3f1;
  --green--demoted: #a8b0a2;
  --green--line: #383e33;

  /* Base Active Variables */
  --bg-surface: var(--sand--surface);
  --text-main: var(--sand--text);
  --text-demoted: var(--sand--demoted);
  --border-line: var(--sand--line);
  --accent-pop: #e84224;

  /* Typography */
  --font-mono: 'SF Pro Display', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --font-sans: 'SF Pro Display', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;

  /* Transitions */
  --ease-editorial: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-hover: cubic-bezier(0.65, 0, 0.35, 1);
  --transition-fast: 160ms var(--ease-hover);
  --transition-medium: 260ms var(--ease-hover);
  --transition-slow: 600ms var(--ease-editorial);
}

/* Base Reset & Quality Fixes */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

html {
  font-family: var(--font-sans);
  background-color: var(--black--surface);
  color: var(--text-main);
  scroll-behavior: smooth;
  text-rendering: optimizeLegibility;
}

body {
  background-color: var(--sand--surface);
  color: var(--sand--text);
  line-height: 1.5;
  overflow-x: hidden;
  font-size: 16px;
  position: relative;
}

::selection {
  background: var(--sand--text);
  color: var(--sand--surface);
}

::selection {
  background: var(--sand--text);
  color: var(--sand--surface);
}

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

button {
  background: none;
  border: none;
  color: inherit;
  font: inherit;
  cursor: pointer;
}

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

/* ==========================================================================
   TYPOGRAPHY
   ========================================================================== */

.mono {
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.kicker {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--sand--demoted);
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
}

.kicker::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  background-color: var(--sand--pop);
}

.display-title {
  font-size: clamp(2.4rem, 5.5vw, 5rem);
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: -0.035em;
  color: var(--sand--text);
  text-wrap: balance;
}

.section-title {
  font-size: clamp(1.8rem, 3.2vw, 3rem);
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: -0.025em;
  color: var(--sand--text);
}

p {
  text-align: justify;
  hyphens: auto;
}

.editorial-p {
  font-size: clamp(1.05rem, 1.25vw, 1.35rem);
  line-height: 1.6;
  font-weight: 300;
  color: var(--sand--demoted);
}

.editorial-p strong {
  font-weight: 500;
  color: var(--sand--text);
}

/* ==========================================================================
   BUTTONS & BADGES
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.85rem 1.4rem;
  border: 1px solid var(--sand--text);
  color: var(--sand--text);
  background: transparent;
  transition: all var(--transition-fast);
  cursor: pointer;
  white-space: nowrap;
}

.btn:hover {
  background-color: var(--sand--text);
  color: var(--sand--surface);
}

.btn-pop {
  border-color: var(--sand--pop);
  background-color: var(--sand--pop);
  color: #fff;
}

.btn-pop:hover {
  background-color: #d83e22;
  border-color: #d83e22;
  color: #fff;
}

.nav-consult-btn {
  background-color: #25d366;
  border-color: #25d366;
  color: #102c1a;
}

.nav-consult-btn:hover {
  background-color: #1fb85a;
  border-color: #1fb85a;
  color: #102c1a;
}

.btn-white {
  border-color: var(--black--text);
  color: var(--black--text);
}

.btn-white:hover {
  background-color: var(--black--text);
  color: var(--black--surface);
}

.btn-icon-arrow svg {
  width: 11px;
  height: 9px;
  transition: transform var(--transition-fast);
}

.btn:hover .btn-icon-arrow svg {
  transform: translateX(3px);
}

.tag-badge {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.25rem 0.55rem;
  border: 1px solid var(--sand--line);
  color: var(--sand--demoted);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.tag-badge.is-live::before {
  content: "";
  display: inline-block;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #10b981;
  animation: pulse-dot 2s infinite ease-in-out;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(1.3); }
}

/* ==========================================================================
   LAYOUT CONTAINERS & HAIRLINE GRIDS
   ========================================================================== */

.page-wrapper {
  width: 100%;
  position: relative;
  background-color: var(--sand--surface);
}

.container-firm {
  max-width: 1480px;
  margin-left: auto;
  margin-right: auto;
  padding-left: clamp(1rem, 3.5vw, 3rem);
  padding-right: clamp(1rem, 3.5vw, 3rem);
}

.hairline-b {
  border-bottom: 1px solid var(--sand--line);
}

.hairline-t {
  border-top: 1px solid var(--sand--line);
}

.hairline-l {
  border-left: 1px solid var(--sand--line);
}

.hairline-r {
  border-right: 1px solid var(--sand--line);
}

/* ==========================================================================
   TOP BAR & NAVIGATION (OTC STYLE)
   ========================================================================== */

.navbar-main {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background-color: rgba(239, 237, 231, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--sand--line);
  transition: transform 0.4s var(--ease-editorial), background-color 0.3s ease;
}

.navbar-inner {
  height: var(--navbar-height, 72px);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand-lockup {
  flex: 1 1 0;
  display: flex;
  align-items: center;
  gap: 1.1rem;
  min-width: 0;
}

.brand-monogram {
  width: 32px;
  height: 32px;
  color: var(--sand--text);
  flex-shrink: 0;
}

.brand-logo-img {
  height: 34px;
  width: auto;
  max-width: 36px;
  object-fit: contain;
  flex-shrink: 0;
  display: block;
}

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

.brand-title {
  font-family: var(--font-mono);
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--sand--text);
  line-height: 1.1;
}

.brand-subtitle {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--sand--demoted);
}

.nav-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(1rem, 1.6vw, 2rem);
  flex-shrink: 0;
}

.nav-item {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--sand--text);
  padding: 0.5rem 0;
  position: relative;
  transition: color var(--transition-fast);
}

.nav-item::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 1px;
  background-color: var(--sand--pop);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform var(--transition-fast);
}

.nav-item:hover,
.nav-item.active {
  color: var(--sand--pop);
}

.nav-item:hover::after,
.nav-item.active::after {
  transform: scaleX(1);
  transform-origin: left;
}

.nav-right-actions {
  flex: 1 1 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 1.4rem;
}

.burger-btn {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  padding: 8px;
  border: 1px solid var(--sand--line);
}

.burger-line {
  width: 100%;
  height: 1.5px;
  background-color: var(--sand--text);
  transition: transform 0.3s ease, opacity 0.3s ease;
}

/* ==========================================================================
   INDEX COVER SECTION (FULL-WIDTH BRAND COVER WITH PARALLAX CURTAIN)
   ========================================================================== */

:root {
  --navbar-height: 72px;
}

.index-cover-section {
  position: sticky;
  top: var(--navbar-height);
  height: calc(100vh - var(--navbar-height));
  height: calc(100dvh - var(--navbar-height));
  min-height: 520px;
  width: 100%;
  background-color: var(--sand--surface);
  z-index: 1;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.hero-universe-lines {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  max-width: 1480px;
  left: 50%;
  transform: translateX(-50%);
  will-change: transform;
}

.universe-col-line {
  border-right: 1px solid rgba(218, 214, 200, 0.4);
  height: 100%;
}

.index-cover-inner {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 1rem 0 5.2rem 0;
}

/* Monumental Brand Stage (Full Width) */
.index-brand-stage {
  flex: 1;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 1540px;
  margin: 0 auto;
  padding: 0 clamp(1.5rem, 4vw, 4.5rem);
  will-change: transform, opacity;
  transform-origin: center center;
}

.index-brand-lockup {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(1.4rem, 3.2vw, 3.8rem);
  width: 100%;
}

.index-brand-logo {
  height: clamp(84px, 13vw, 168px);
  width: auto;
  object-fit: contain;
  display: block;
  flex-shrink: 0;
  image-rendering: -webkit-optimize-contrast;
}

.index-brand-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
}

.index-brand-title {
  font-family: var(--font-mono);
  font-size: clamp(2.6rem, 7vw, 7.6rem);
  font-weight: 700;
  letter-spacing: 0.14em;
  line-height: 0.95;
  color: var(--sand--text);
  text-transform: uppercase;
  margin: 0;
}

.index-brand-subtitle {
  font-family: var(--font-mono);
  font-size: clamp(0.72rem, 1.98vw, 2.15rem);
  font-weight: 500;
  letter-spacing: 0.26em;
  line-height: 1.15;
  color: #6a6454;
  text-transform: uppercase;
  margin-top: clamp(0.5rem, 1.2vw, 1.4rem);
  white-space: nowrap;
}

/* Bottom Bar of Cover */
/* Bottom Bar of Cover (Centered Animated Scroll Indicator) */
.index-cover-bottom {
  width: 100%;
  max-width: 1540px;
  margin: 0 auto;
  padding: 0 clamp(1.5rem, 4vw, 4.5rem);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  will-change: opacity, transform;
  flex-shrink: 0;
}

.index-scroll-cue {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 0.55rem;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0.5rem 1.2rem;
  user-select: none;
  transition: transform var(--transition-fast), opacity var(--transition-fast);
}

.index-scroll-cue:hover {
  transform: translateY(2px);
}

.index-scroll-label {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: lowercase;
  color: var(--sand--demoted);
  transition: color var(--transition-fast);
}

.index-scroll-cue:hover .index-scroll-label {
  color: var(--sand--text);
}

.scroll-arrow-track {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.scroll-arrow-svg {
  width: 16px;
  height: 22px;
  color: var(--sand--pop);
  animation: scrollArrowMotion 1.6s ease-in-out infinite;
  display: block;
}

@keyframes scrollArrowMotion {
  0%, 100% {
    transform: translateY(0);
    opacity: 0.95;
  }
  50% {
    transform: translateY(7px);
    opacity: 0.4;
  }
}

/* ==========================================================================
   MAIN CONTENT FLOW (CURTAIN THAT ROLLS OVER THE COVER)
   ========================================================================== */

.main-content-flow {
  position: relative;
  z-index: 2;
  background-color: var(--sand--surface);
  border-top: 1px solid var(--sand--line);
  box-shadow: 0 -25px 60px rgba(28, 28, 23, 0.08);
}

/* Firm Overview Section */
.firm-overview-section {
  position: relative;
  padding: clamp(4.5rem, 8vw, 7.5rem) 0;
  border-bottom: 1px solid var(--sand--line);
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.25fr 0.75fr;
  gap: clamp(2rem, 5vw, 5rem);
  align-items: end;
  position: relative;
  z-index: 2;
}

.hero-left {
  display: flex;
  flex-direction: column;
  gap: 1.8rem;
}

.hero-right-meta {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  padding-bottom: 0.5rem;
  border-left: 1px solid var(--sand--line);
  padding-left: clamp(1.2rem, 3vw, 2.5rem);
}

.meta-block {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.meta-label {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--sand--demoted);
}

.meta-value {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--sand--text);
}

.hero-sub-row {
  margin-top: 3.5rem;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--sand--line);
  padding-top: 2rem;
  gap: 1.5rem;
  position: relative;
  z-index: 2;
}

.metric-card {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.metric-number {
  font-family: var(--font-mono);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--sand--text);
  letter-spacing: -0.02em;
}

.metric-label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--sand--demoted);
}

/* ==========================================================================
   STATEMENT / MANIFESTO SECTION (THE ROTATING WHEEL ICON)
   ========================================================================== */

.statement-section {
  background-color: var(--green--surface);
  color: var(--green--text);
  padding: clamp(5rem, 9vw, 9rem) 0;
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--green--line);
}

.statement-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  max-width: 980px;
  margin: 0 auto;
  gap: clamp(2rem, 4vw, 3.5rem);
  position: relative;
  z-index: 2;
}

.statement-text-1 {
  font-size: clamp(1.75rem, 3.2vw, 3rem);
  font-weight: 300;
  line-height: 1.25;
  letter-spacing: -0.02em;
  color: #f3f3f1;
}

.statement-text-2 {
  font-size: clamp(1.2rem, 1.8vw, 1.6rem);
  font-weight: 300;
  line-height: 1.5;
  color: var(--green--demoted);
  max-width: 820px;
}

.spinning-star-wrapper {
  width: 64px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.spinning-star {
  width: 100%;
  height: 100%;
  animation: star-spin 16s linear infinite;
  color: #f3f3f1;
}

@keyframes star-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.star-center-dot {
  position: absolute;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background-color: var(--sand--pop);
}

/* ==========================================================================
   ABOUT SECTION (FIRM SPLIT)
   ========================================================================== */

.about-section {
  padding: clamp(4.5rem, 7vw, 7.5rem) 0;
  border-bottom: 1px solid var(--sand--line);
  background-color: var(--sand--surface);
}

.about-header {
  margin-bottom: clamp(2rem, 4vw, 3.5rem);
  max-width: 850px;
}

.about-split-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(2.5rem, 5vw, 6rem);
  align-items: stretch;
}

.about-sticky-col {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.about-image-card {
  position: relative;
  border: 1px solid var(--sand--line);
  overflow: hidden;
  background-color: #ded9cd;
  flex: 1;
  min-height: 0;
}

.about-image-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 40%;
}

.about-badge-overlay {
  position: absolute;
  bottom: 1rem;
  left: 1rem;
  background: rgba(28, 28, 23, 0.9);
  color: #fff;
  padding: 0.4rem 0.8rem;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.about-editorial-col {
  display: flex;
  flex-direction: column;
  gap: 1.8rem;
}

.about-credentials-table {
  margin-top: 0.5rem;
  border-top: 1px solid var(--sand--line);
  border-bottom: 1px solid var(--sand--line);
}

.cred-row {
  display: grid;
  grid-template-columns: 180px 1fr;
  padding: 0.85rem 0;
  border-bottom: 1px solid rgba(218, 214, 200, 0.5);
  font-size: 0.88rem;
}

.cred-row:last-child {
  border-bottom: none;
}

.cred-label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--sand--demoted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.cred-val {
  color: var(--sand--text);
  font-weight: 450;
}

/* ==========================================================================
   PRACTICES / SERVICES SECTION (OTC PORTFOLIO STYLE)
   ========================================================================== */

.practices-section {
  padding: clamp(4.5rem, 7vw, 7.5rem) 0;
  background-color: var(--sand--surface);
  border-bottom: 1px solid var(--sand--line);
  content-visibility: auto;
  contain-intrinsic-size: auto 750px;
}

.practices-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 3.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--sand--line);
}

.practices-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: -1px;
  border-top: 1px solid var(--sand--line);
  border-left: 1px solid var(--sand--line);
}

.practice-card {
  padding: clamp(1.8rem, 2.4vw, 2.4rem);
  border-right: 1px solid var(--sand--line);
  border-bottom: 1px solid var(--sand--line);
  background-color: var(--sand--surface);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 220px;
  position: relative;
  transition: background-color var(--transition-medium);
}

.practice-card:hover {
  background-color: #e8e5dc;
}

.practice-top {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.practice-index {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  color: var(--sand--demoted);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.practice-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: transparent;
  border: 1px solid var(--sand--line);
  transition: all var(--transition-fast);
}

.practice-card:hover .practice-dot {
  background-color: var(--sand--pop);
  border-color: var(--sand--pop);
}

.practice-title {
  font-size: 1.35rem;
  font-weight: 500;
  line-height: 1.25;
  letter-spacing: -0.015em;
  color: var(--sand--text);
}

.practice-details {
  display: none;
  margin-top: 1.2rem;
  padding-top: 1.2rem;
  border-top: 1px solid var(--sand--line);
  animation: fadeInDetails 0.3s ease forwards;
}

.practice-card.is-expanded {
  background-color: #e4e1d7;
}

.practice-card.is-expanded .practice-details {
  display: block;
}

.practice-desc {
  font-size: 0.92rem;
  line-height: 1.6;
  color: var(--sand--demoted);
}

.practice-footer-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--sand--text);
  padding: 1rem 0 0 0;
  border-top: 1px dashed var(--sand--line);
  border-left: none;
  border-right: none;
  border-bottom: none;
  background: transparent;
  cursor: pointer;
  margin-top: 1.5rem;
  transition: color var(--transition-fast);
}

.practice-footer-btn:hover {
  color: var(--sand--pop);
}

.practice-arrow {
  transition: transform var(--transition-fast), color var(--transition-fast);
  display: inline-block;
}

.practice-card.is-expanded .practice-arrow {
  transform: rotate(180deg);
  color: var(--sand--pop);
}

@keyframes fadeInDetails {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ==========================================================================
   FISCAL CALENDAR TICKER (ARCA / AFIP VENCIMIENTOS)
   ========================================================================== */

.calendar-section {
  padding: clamp(4.5rem, 7vw, 7.5rem) 0;
  background-color: #e9e6dd;
  border-bottom: 1px solid var(--sand--line);
  content-visibility: auto;
  contain-intrinsic-size: auto 750px;
}

.calendar-header {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 2.5rem;
}

.calendar-header-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 1rem 2rem;
}

.calendar-official-notice {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.5rem;
  padding: clamp(1.5rem, 3vw, 2.5rem);
  border: 1px solid var(--sand--line);
  background: var(--sand--surface);
}

.calendar-official-notice h3 {
  font-size: 1.35rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
}

.calendar-official-notice p {
  color: var(--sand--demoted);
  line-height: 1.5;
}

.calendar-filters {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.5rem;
  margin: 1rem 0;
}

.cal-filter-btn {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.75rem 0.65rem;
  min-height: 3.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  line-height: 1.35;
  border: 1px solid var(--sand--line);
  background: var(--sand--surface);
  color: var(--sand--text);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.cal-filter-btn.active, .cal-filter-btn:hover {
  background: var(--sand--text);
  border-color: var(--sand--text);
  color: var(--sand--surface);
}

.calendar-table-wrapper {
  background: var(--sand--surface);
  border: 1px solid var(--sand--line);
  overflow-x: auto;
}

.calendar-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
  text-align: left;
}

.calendar-table th {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--sand--demoted);
  padding: 1rem 1.4rem;
  border-bottom: 1px solid var(--sand--line);
  background: #f4f2ec;
}

.calendar-table td {
  padding: 1.1rem 1.4rem;
  border-bottom: 1px solid var(--sand--line);
  color: var(--sand--text);
  vertical-align: middle;
}

.calendar-table th:nth-last-child(-n + 2),
.calendar-table td:nth-last-child(-n + 2) {
  text-align: center;
  padding-left: 0.75rem;
  padding-right: 0.75rem;
  white-space: nowrap;
}

.calendar-table td:last-child a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  width: 8.5rem;
  height: 2.75rem;
  padding: 0.45rem 0.7rem;
  border: 1px solid rgba(232, 66, 36, 0.35);
  background: rgba(232, 66, 36, 0.05);
  text-decoration: none;
}

.calendar-table .status-tag,
.calendar-mobile-card .status-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  width: 8.5rem;
  height: 2.75rem;
  text-align: center;
  line-height: 1.25;
}

.calendar-table tr:last-child td {
  border-bottom: none;
}

.calendar-table tr:hover td {
  background-color: #f7f6f2;
}

.status-tag {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.2rem 0.5rem;
  display: inline-block;
  border: 1px solid;
}

.status-tag.is-urgent {
  border-color: var(--sand--pop);
  color: var(--sand--pop);
  background: rgba(243, 78, 48, 0.06);
}

.status-tag.is-active {
  border-color: #2a3220;
  color: #2a3220;
  background: rgba(42, 50, 32, 0.06);
}

/* ==========================================================================
   INTERACTIVE TAX DIAGNOSTIC CALCULATOR (OTC FORM STYLE)
   ========================================================================== */

.diagnostic-section {
  padding: clamp(5rem, 8vw, 8rem) 0;
  background-color: var(--sand--surface);
  border-bottom: 1px solid var(--sand--line);
  content-visibility: auto;
  contain-intrinsic-size: auto 750px;
}

.diagnostic-card {
  border: 1px solid var(--sand--line);
  background-color: #f6f5f0;
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
}

.diagnostic-card.desktop-only {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: stretch;
}

.diagnostic-card.desktop-only .diagnostic-info,
.diagnostic-card.desktop-only .diagnostic-form-wrapper {
  padding: clamp(2rem, 3vw, 3rem);
}

.diagnostic-card.desktop-only .diagnostic-info {
  justify-content: flex-start;
}

.diagnostic-card.desktop-only .diagnostic-result-box {
  margin-top: auto;
}

.diagnostic-card.desktop-only .form-step-label {
  align-items: flex-start;
  gap: 1rem;
  line-height: 1.5;
}

.diagnostic-card.desktop-only .step-num {
  flex: 0 0 auto;
}

.diagnostic-card.desktop-only .radio-pills-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.diagnostic-card.desktop-only .radio-pill:last-child {
  grid-column: 1 / -1;
}

.diagnostic-card.desktop-only .radio-pill-box {
  box-sizing: border-box;
  min-height: 3.75rem;
  height: 100%;
  justify-content: center;
  text-align: center;
  line-height: 1.4;
}

.diagnostic-card.desktop-only .radio-pill input:focus-visible + .radio-pill-box {
  outline: 2px solid var(--sand--pop);
  outline-offset: 2px;
}

.diagnostic-info {
  padding: clamp(2rem, 4vw, 4rem);
  border-right: 1px solid var(--sand--line);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 2rem;
}

.diagnostic-form-wrapper {
  padding: clamp(2rem, 4vw, 4rem);
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.form-step-group {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.form-step-label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--sand--text);
  display: flex;
  justify-content: space-between;
}

.step-num {
  color: var(--sand--pop);
}

.radio-pills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.6rem;
}

.radio-pill {
  position: relative;
  display: block;
  cursor: pointer;
}

.radio-pill input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.radio-pill-box {
  padding: 0.85rem 1rem;
  border: 1px solid var(--sand--line);
  background: var(--sand--surface);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--sand--text);
  transition: all var(--transition-fast);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.radio-pill input:checked + .radio-pill-box {
  background-color: var(--sand--text);
  border-color: var(--sand--text);
  color: var(--sand--surface);
}

.diagnostic-result-box {
  border: 1px dashed var(--sand--line);
  padding: 1.5rem;
  background: #eae7de;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.result-tagline {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--sand--demoted);
}

.result-main {
  font-size: 1.15rem;
  font-weight: 500;
  color: var(--sand--text);
}

.result-advice {
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--sand--demoted);
}

/* ==========================================================================
   RESPONSIVE SWITCHERS & DEDICATED MOBILE COMPONENTS
   ========================================================================== */

/* Base Visibility (Desktop default) */
.mobile-only {
  display: none !important;
}

.desktop-only {
  display: block;
}

.diagnostic-card.desktop-only {
  display: grid;
}

/* --------------------------------------------------------------------------
   A. MOBILE FISCAL CALENDAR FEED (EVENT CARDS)
   -------------------------------------------------------------------------- */
.calendar-mobile-feed {
  display: none;
  flex-direction: column;
  gap: 1rem;
  margin-top: 1.5rem;
  width: 100%;
}

.calendar-mobile-card {
  background-color: #f7f6f2;
  border: 1px solid var(--sand--line);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  transition: border-color var(--transition-fast), transform var(--transition-fast);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
}

.calendar-mobile-card:active {
  border-color: var(--sand--pop);
}

.cal-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.cal-card-cat {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--sand--demoted);
}

.cal-card-title {
  font-size: 1.08rem;
  font-weight: 600;
  color: var(--sand--text);
  line-height: 1.25;
  margin: 0;
}

.cal-card-subtitle {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--sand--demoted);
  margin-top: -0.45rem;
}

.cal-card-meta-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.5rem;
  padding: 0.85rem 0.65rem;
  background: #edeae0;
  border: 1px solid var(--sand--line);
}

.cal-meta-item {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.cal-meta-label {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--sand--demoted);
  font-weight: 500;
}

.cal-meta-val {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--sand--text);
  line-height: 1.2;
}

.cal-meta-val.cal-highlight {
  color: var(--sand--pop);
  font-weight: 700;
}

.cal-card-bottom {
  display: flex;
  justify-content: stretch;
  padding-top: 0.2rem;
}

.cal-card-action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  width: 100%;
  gap: 0.45rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--sand--pop);
  font-weight: 600;
  text-decoration: none;
  padding: 0.45rem 0.85rem;
  border: 1px solid rgba(232, 66, 36, 0.35);
  background: rgba(232, 66, 36, 0.05);
  transition: all var(--transition-fast);
}

.cal-card-action-btn:active {
  background: var(--sand--pop);
  color: #fff;
}

.cal-card-action-btn .action-arrow {
  font-size: 0.85rem;
  transition: transform var(--transition-fast);
}

.cal-card-action-btn:active .action-arrow {
  transform: translateX(3px);
}

/* --------------------------------------------------------------------------
   B. MOBILE TAX SIMULATOR (SIMULADOR FISCAL MOBILE)
   -------------------------------------------------------------------------- */
.diagnostic-mobile-card {
  display: none;
  flex-direction: column;
  gap: 1.75rem;
  background-color: #f6f5f0;
  border: 1px solid var(--sand--line);
  padding: 1.6rem 1.2rem;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.03);
}

.diag-mobile-header {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  border-bottom: 1px solid var(--sand--line);
  padding-bottom: 1.25rem;
}

.diag-mobile-form {
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}

.diag-mobile-step {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.diag-step-header {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.step-num-pill {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  font-weight: 700;
  color: #fff;
  background-color: var(--sand--pop);
  padding: 0.22rem 0.55rem;
  display: inline-block;
  flex-shrink: 0;
}

.diag-step-title {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--sand--text);
  line-height: 1.3;
}

.diag-options-stack {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.diag-opt-card {
  display: block;
  cursor: pointer;
  position: relative;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

.diag-opt-card input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}

.opt-card-inner {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.85rem 1rem;
  background: var(--sand--surface);
  border: 1px solid var(--sand--line);
  transition: all var(--transition-fast);
  min-height: 48px;
}

.opt-radio-circle {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid var(--sand--demoted);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}

.opt-radio-circle::after {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #fff;
  opacity: 0;
  transform: scale(0);
  transition: all var(--transition-fast);
}

.diag-opt-card input:checked + .opt-card-inner {
  background-color: #1c1c17;
  border-color: #1c1c17;
  color: #fff;
  box-shadow: 0 3px 10px rgba(28, 28, 23, 0.15);
}

.diag-opt-card input:checked + .opt-card-inner .opt-radio-circle {
  border-color: var(--sand--pop);
  background: var(--sand--pop);
}

.diag-opt-card input:checked + .opt-card-inner .opt-radio-circle::after {
  opacity: 1;
  transform: scale(1);
}

.opt-text {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.opt-title {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--sand--text);
  line-height: 1.3;
}

.diag-opt-card input:checked + .opt-card-inner .opt-title {
  color: #fff;
}

.opt-desc {
  font-size: 0.72rem;
  color: var(--sand--demoted);
  line-height: 1.35;
}

.diag-opt-card input:checked + .opt-card-inner .opt-desc {
  color: #dad6c8;
}

/* Mobile Result Card (Directly below Step 2) */
.diag-mobile-result-box {
  border: 1px solid rgba(232, 66, 36, 0.4);
  border-left: 4px solid var(--sand--pop);
  padding: 1.35rem 1.15rem;
  background: #1c1c17;
  color: #fff;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  margin-top: 0.5rem;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.result-badge-row {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.result-live-indicator {
  width: 8px;
  height: 8px;
  background-color: #25d366;
  border-radius: 50%;
  box-shadow: 0 0 10px #25d366;
  flex-shrink: 0;
}

.diag-mobile-result-box .result-tagline {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #dad6c8;
}

.diag-mobile-result-box .result-main {
  font-size: 1.18rem;
  font-weight: 600;
  color: #fff;
  line-height: 1.3;
  margin: 0;
}

.diag-mobile-result-box .result-advice {
  font-size: 0.85rem;
  line-height: 1.55;
  color: #b5b3aa;
  margin: 0;
}

.btn-whatsapp-direct {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  background-color: #25d366;
  color: #12120e;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 1rem 1.1rem;
  text-decoration: none;
  margin-top: 0.4rem;
  border: none;
  cursor: pointer;
  transition: transform var(--transition-fast), background-color var(--transition-fast);
}

.btn-whatsapp-direct:active {
  transform: scale(0.98);
  background-color: #20ba5a;
}

/* ==========================================================================
   LOCATION / GOOGLE MAPS SECTION
   ========================================================================== */

.location-section {
  padding: clamp(4.5rem, 7vw, 7.5rem) 0;
  background-color: var(--sand--surface);
  border-bottom: 1px solid var(--sand--line);
  content-visibility: auto;
  contain-intrinsic-size: auto 750px;
}

.location-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 3rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--sand--line);
}

.location-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  border: 1px solid var(--sand--line);
  background-color: #f6f5f0;
}

.location-info-card {
  padding: clamp(2rem, 3.5vw, 3.5rem);
  border-right: 1px solid var(--sand--line);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 2rem;
}

.loc-details-list {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  border-top: 1px solid var(--sand--line);
  border-bottom: 1px solid var(--sand--line);
  padding: 1.2rem 0;
}

.loc-item {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.location-map-frame {
  min-height: 420px;
  width: 100%;
  position: relative;
  background-color: #e5e2d8;
}

.location-map-frame iframe {
  width: 100%;
  height: 100%;
  min-height: 420px;
  display: block;
}

@media (max-width: 900px) {
  .location-grid {
    grid-template-columns: 1fr;
  }
  .location-info-card {
    border-right: none;
    border-bottom: 1px solid var(--sand--line);
  }
  .location-map-frame {
    height: 350px;
    min-height: 350px;
  }
}

/* ==========================================================================
   CALL TO ACTION (DARK CHARCOAL OTC STYLE)
   ========================================================================== */

.cta-section {
  background-color: var(--sand--surface);
  color: var(--sand--text);
  padding: clamp(4.5rem, 7vw, 7.5rem) 0;
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--sand--line);
  content-visibility: auto;
  contain-intrinsic-size: auto 600px;
}

.cta-background-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}

.cta-header {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 1rem 2rem;
  margin-bottom: 3.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--sand--line);
}

.cta-direct-container {
  position: relative;
  z-index: 2;
  width: 100%;
}

.cta-buttons-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  width: 100%;
}

.cta-action-btn {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  min-height: 12rem;
  box-sizing: border-box;
  padding: clamp(1.5rem, 2.5vw, 2.5rem);
  line-height: 1.5;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.02);
  color: #fff;
  transition: all var(--transition-fast);
  text-decoration: none;
}

.cta-intro {
  max-width: 34rem;
  margin-top: 0.9rem;
  color: var(--sand--demoted);
  font-size: 1rem;
  line-height: 1.6;
}

.cta-action-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.5rem;
  min-width: 0;
}

.cta-action-label {
  color: var(--sand--demoted);
  margin-bottom: 1.1rem;
  font-size: 0.65rem;
  letter-spacing: 0.12em;
}

.cta-action-title {
  color: var(--sand--text);
  font-family: var(--font-sans, sans-serif);
  font-size: clamp(1.35rem, 1.7vw, 1.65rem);
  font-weight: 400;
  letter-spacing: -0.025em;
  text-transform: none;
}

.cta-action-detail {
  color: var(--sand--demoted);
  font-size: 0.7rem;
  letter-spacing: 0.02em;
  text-transform: none;
}

.cta-action-btn:hover .cta-action-copy > span {
  color: inherit;
}

.cta-action-btn:focus-visible {
  outline: 2px solid var(--sand--pop);
  outline-offset: -4px;
}

.cta-action-btn.btn-whatsapp,
.cta-action-btn.btn-email,
.cta-action-btn.btn-instagram {
  border-color: var(--sand--line);
  border: 1px solid #bcb6a5;
  color: var(--sand--pop);
  background: #f8f7f2;
}

.cta-action-btn.btn-whatsapp:hover,
.cta-action-btn.btn-email:hover,
.cta-action-btn.btn-instagram:hover {
  background: #e8e5dc;
  border-color: var(--sand--text);
  color: var(--sand--pop);
}

.cta-action-btn:hover .cta-action-label,
.cta-action-btn:hover .cta-action-detail {
  color: var(--sand--demoted);
}

.cta-action-btn:hover .cta-action-title {
  color: var(--sand--text);
}

.cta-action-btn .btn-icon-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border: 1px solid var(--sand--text);
  border-radius: 50%;
  color: var(--sand--text);
  flex: 0 0 auto;
}

/* ==========================================================================
   FOOTER (EDITORIAL MINIMALISM)
   ========================================================================== */

.footer-section {
  background-color: #161612;
  color: #8e8d88;
  padding: 5rem 0 3rem;
  font-size: 0.82rem;
  content-visibility: auto;
  contain-intrinsic-size: auto 400px;
}

.footer-top {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 3rem;
  padding-bottom: 4rem;
  border-bottom: 1px solid #28271f;
}

.footer-col {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.footer-heading {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #d1cfc7;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.footer-link {
  color: #8e8d88;
  transition: color var(--transition-fast);
}

.footer-link:hover {
  color: #fff;
}

.footer-bottom {
  padding-top: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.footer-copy {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  color: #686762;
}

.footer-social {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

/* ==========================================================================
   MOBILE MENU DRAWER & MODAL OVERLAY
   ========================================================================== */

.mobile-drawer {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background-color: var(--sand--surface);
  z-index: 1050;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 2rem;
  transform: translateY(-100%);
  transition: transform 0.5s var(--ease-editorial), opacity 0.4s ease, visibility 0.4s ease;
  pointer-events: none;
  visibility: hidden;
  opacity: 0;
}

.mobile-drawer.is-open {
  transform: translateY(0);
  pointer-events: auto;
  visibility: visible;
  opacity: 1;
}

.mobile-drawer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--sand--line);
}

.mobile-nav-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin: auto 0;
}

.mobile-nav-item {
  font-size: 2rem;
  font-weight: 350;
  letter-spacing: -0.02em;
  color: var(--sand--text);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.mobile-nav-item:hover {
  color: var(--sand--pop);
}

.mobile-nav-item.mobile-consult-btn {
  justify-content: center;
  width: 100%;
  padding: 0.9rem 1rem;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: #102c1a;
}

.mobile-drawer-footer {
  border-top: 1px solid var(--sand--line);
  padding-top: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* ==========================================================================
   FLOATING BACK TO TOP BUTTON (GREEN BRAND TONE)
   ========================================================================== */

.back-to-top-btn {
  position: fixed;
  bottom: 2.2rem;
  right: 2.2rem;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background-color: var(--green--surface); /* Exact requested green tone #464c40 */
  color: #f3f3f1;
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.22);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(14px);
  transition: opacity 0.3s ease, transform 0.3s var(--ease-editorial), background-color 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  z-index: 900;
}

.back-to-top-btn.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top-btn:hover {
  background-color: #383e33; /* Darker green shade on hover */
  border-color: rgba(255, 255, 255, 0.35);
  transform: translateY(-3px);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.3);
}

/* Orange variant when overlapping with the green statement section or dark background */
.back-to-top-btn.is-orange {
  background-color: var(--sand--pop); /* Brand orange #e84224 */
  border-color: rgba(255, 255, 255, 0.32);
  box-shadow: 0 6px 22px rgba(232, 66, 36, 0.42);
}

.back-to-top-btn.is-orange:hover {
  background-color: #d8371a;
  border-color: rgba(255, 255, 255, 0.5);
  transform: translateY(-3px);
  box-shadow: 0 10px 28px rgba(232, 66, 36, 0.55);
}

.back-to-top-btn:active {
  transform: translateY(0);
}

.back-to-top-btn svg {
  width: 17px;
  height: 17px;
  transition: transform 0.2s ease;
}

.back-to-top-btn:hover svg {
  transform: translateY(-2px);
}

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

@media (max-width: 1080px) {
  .practices-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Base Collapsible Container (Desktop: always visible) */
.section-collapse-btn {
  display: none;
}
.section-collapse-content {
  display: block;
}

@media (max-width: 900px) {
  /* Switch to mobile-optimized components */
  .desktop-only {
    display: none !important;
  }
  .mobile-only {
    display: block !important;
  }
  .calendar-mobile-feed.mobile-only {
    display: flex !important;
  }
  .diagnostic-mobile-card.mobile-only {
    display: flex !important;
  }

  /* Mobile Collapsible Sections */
  .section-collapse-btn {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 0.9rem 1.25rem;
    margin-top: 1.25rem;
    background-color: var(--sand--surface);
    border: 1px solid var(--sand--line);
    color: var(--sand--text);
    font-family: var(--font-sans);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    cursor: pointer;
    border-radius: 0;
    transition: background-color var(--transition-fast), border-color var(--transition-fast), color var(--transition-fast);
  }

  .section-collapse-btn:hover,
  .section-collapse-btn:active {
    background-color: #e4e1d7;
    border-color: var(--sand--text);
  }

  .section-collapse-btn.is-open {
    background-color: var(--sand--text);
    color: var(--sand--surface);
    border-color: var(--sand--text);
  }

  .section-collapse-btn .collapse-btn-icon {
    font-size: 0.95rem;
    font-weight: 700;
    transition: transform var(--transition-medium);
    display: inline-block;
  }

  .section-collapse-btn.is-open .collapse-btn-icon {
    transform: rotate(180deg);
  }

  .section-collapse-content {
    display: none;
    margin-top: 1.25rem;
  }

  .section-collapse-content.is-open {
    display: block !important;
    animation: accordionFadeIn 0.3s ease-out;
  }

  /* Calendar filters stay visible and aligned on smaller screens. */
  .calendar-filters {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.5rem;
    width: 100%;
    margin: 0 0 1rem;
  }

  .cal-filter-btn {
    width: 100%;
    min-width: 0;
    min-height: 3.25rem;
    padding: 0.65rem 0.5rem;
    font-size: 0.7rem;
    white-space: normal;
  }

  .cal-filter-btn:last-child {
    grid-column: 1 / -1;
  }

  .nav-links,
  .nav-right-actions > .nav-consult-btn {
    display: none;
  }
  .burger-btn {
    display: flex;
  }
  .hero-grid {
    grid-template-columns: 1fr;
  }
  .hero-right-meta {
    border-left: none;
    border-top: 1px solid var(--sand--line);
    padding-left: 0;
    padding-top: 1.5rem;
  }
  .hero-sub-row {
    grid-template-columns: repeat(2, 1fr);
  }
  .about-split-grid {
    grid-template-columns: 1fr;
  }
  .about-image-card {
    aspect-ratio: 4 / 5;
  }
  .cta-buttons-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  .footer-top {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

@media (max-width: 640px) {
  :root {
    --navbar-height: 64px;
  }

  /* 1. Global Touch & Scroll Safeguards */
  html, body {
    overflow-x: hidden;
    width: 100%;
    position: relative;
    -webkit-text-size-adjust: 100%;
  }

  .page-wrapper {
    overflow-x: hidden;
    width: 100%;
  }

  .container-firm {
    padding-left: 1.15rem;
    padding-right: 1.15rem;
  }

  /* 2. Top Navbar on Mobile */
  .navbar-inner {
    height: 64px;
  }

  .brand-lockup {
    gap: 0.75rem;
  }

  .navbar-inner .brand-logo-img {
    height: 42px;
    max-width: 44px;
  }

  .brand-title {
    font-size: 0.95rem;
    letter-spacing: 0.08em;
  }

  .brand-subtitle {
    font-size: clamp(0.48rem, 2.3vw, 0.6rem);
    letter-spacing: 0.02em;
    white-space: nowrap;
  }

  .nav-right-actions {
    gap: 0.75rem;
  }

  .nav-right-actions .btn {
    padding: 0.42rem 0.75rem !important;
    font-size: 0.65rem !important;
  }

  .burger-btn {
    width: 42px;
    height: 42px;
    padding: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 2px;
  }

  /* 3. Mobile Navigation Drawer */
  .mobile-drawer {
    padding: calc(1.25rem + env(safe-area-inset-top, 0px)) 1.25rem calc(1.5rem + env(safe-area-inset-bottom, 0px)) 1.25rem;
    height: 100dvh;
  }

  .mobile-nav-item {
    font-size: 1.55rem;
    padding: 0.35rem 0;
  }

  /* 4. Index Cover on Mobile */
  .index-cover-section {
    min-height: 460px;
    height: calc(100vh - 64px);
    height: calc(100dvh - 64px);
    top: 64px;
  }

  .index-cover-inner {
    padding: 1rem 0 calc(2rem + env(safe-area-inset-bottom, 0px)) 0;
  }

  .index-brand-stage {
    padding: 0 1rem;
  }

  .index-brand-lockup {
    gap: clamp(0.75rem, 3.2vw, 1.2rem);
  }

  .index-brand-logo {
    height: clamp(54px, 15.5vw, 76px);
  }

  .index-brand-title {
    font-size: clamp(1.9rem, 8.8vw, 2.75rem);
    letter-spacing: 0.09em;
    line-height: 0.95;
  }

  .index-brand-subtitle {
    font-size: clamp(0.52rem, 2.38vw, 0.7rem);
    letter-spacing: 0.12em;
    margin-top: 0.4rem;
    white-space: nowrap;
  }

  .index-cover-bottom {
    justify-content: center;
    padding: 0 1rem 1.2rem;
  }

  .index-scroll-cue {
    padding: 0.4rem 0.8rem;
    gap: 0.45rem;
  }

  .index-scroll-label {
    font-size: 0.68rem;
    letter-spacing: 0.14em;
  }

  .scroll-arrow-track {
    width: 22px;
    height: 24px;
  }

  .scroll-arrow-svg {
    width: 14px;
    height: 18px;
  }

  /* 5. Firm Overview Section */
  .firm-overview-section {
    padding: 3.5rem 0 3rem;
  }

  .hero-grid {
    grid-template-columns: 1fr;
    gap: 2.2rem;
  }

  .hero-left {
    gap: 1.25rem;
  }

  .display-title {
    font-size: clamp(1.85rem, 7.2vw, 2.5rem);
    line-height: 1.15;
    letter-spacing: -0.025em;
  }

  .editorial-p {
    font-size: 0.95rem;
    line-height: 1.5;
  }

  .hero-left .btn {
    width: 100%;
    justify-content: center;
    padding: 0.85rem 1.2rem;
    font-size: 0.74rem;
  }

  .hero-right-meta {
    border-left: none;
    border-top: 1px solid var(--sand--line);
    padding-left: 0;
    padding-top: 1.5rem;
    gap: 1.2rem;
  }

  .meta-value {
    font-size: 0.9rem;
  }

  .hero-sub-row {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem 1rem;
    margin-top: 2.5rem;
    padding-top: 1.5rem;
  }

  .metric-number {
    font-size: 1.35rem;
  }

  .metric-label {
    font-size: 0.65rem;
    line-height: 1.3;
  }

  /* 6. Statement Section */
  .statement-section {
    padding: 3.5rem 0;
  }

  .statement-inner {
    gap: 1.4rem;
  }

  .statement-text-1 {
    font-size: clamp(1.4rem, 5.8vw, 1.85rem);
    line-height: 1.3;
  }

  .statement-text-2 {
    font-size: 0.95rem;
    line-height: 1.55;
  }

  .spinning-star-wrapper {
    width: 48px;
    height: 48px;
  }

  /* 7. About Section */
  .about-section {
    padding: 3.5rem 0;
  }

  .about-split-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .about-sticky-col {
    gap: 1.25rem;
  }

  .section-title {
    font-size: clamp(1.75rem, 6.5vw, 2.25rem);
    line-height: 1.15;
  }

  .cred-row {
    grid-template-columns: 1fr;
    gap: 0.35rem;
  }

  .about-body-col {
    gap: 1.4rem;
  }

  .about-body-col .editorial-lead {
    font-size: 1.15rem;
    line-height: 1.5;
  }

  /* 8. Practices Section */
  .practices-section {
    padding: 3.5rem 0;
  }

  .practices-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 1.75rem;
    padding-bottom: 1.25rem;
  }

  .practices-grid {
    grid-template-columns: 1fr;
    border-left: 1px solid var(--sand--line);
    border-right: 1px solid var(--sand--line);
  }

  .practice-card {
    padding: 1.4rem 1.2rem;
  }

  .practice-title {
    font-size: 1.15rem;
  }

  .practice-toggle-btn {
    min-height: 42px;
    padding: 0.4rem 0;
  }

  /* 9. Fiscal Calendar Section (Mobile Event Cards) */
  .calendar-section {
    padding: 3.5rem 0;
  }

  .calendar-header {
    gap: 0.75rem;
    margin-bottom: 1.5rem;
  }

  .calendar-mobile-card {
    padding: 1.15rem 1rem;
  }

  .cal-card-title {
    font-size: 1.02rem;
  }

  /* 10. Diagnostic Tool (Mobile Step-by-Step Simulator) */
  .diagnostic-section {
    padding: 3.5rem 0;
  }

  .diagnostic-mobile-card {
    padding: 1.35rem 1rem;
    gap: 1.5rem;
  }

  /* 11. Location Section */
  .location-section {
    padding: 3.5rem 0;
  }

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

  .location-info-card {
    padding: 1.5rem 1.2rem;
    border-right: none;
    border-bottom: 1px solid var(--sand--line);
    gap: 1.5rem;
  }

  .location-map-frame {
    height: 280px;
    min-height: 280px;
  }

  .location-map-frame iframe {
    height: 280px;
    min-height: 280px;
  }

  /* 12. Direct Contact Section */
  .cta-section {
    padding: 3.5rem 0;
  }

  .cta-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 1.75rem;
    padding-bottom: 1.25rem;
  }

  .cta-buttons-grid {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  .cta-action-btn {
    padding: 1.15rem 1.2rem;
    font-size: 0.74rem;
    min-height: 8.5rem;
  }

  /* 13. Footer */
  .footer-section {
    padding: 3rem 0 2rem;
  }

  .footer-top {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
    padding-top: 1.5rem;
  }

  /* 14. Floating Back to Top Button */
  .back-to-top-btn {
    bottom: calc(1.2rem + env(safe-area-inset-bottom, 0px));
    right: 1.2rem;
    width: 44px;
    height: 44px;
  }

  .back-to-top-btn svg {
    width: 15px;
    height: 15px;
  }
}

@media (max-width: 380px) {
  .brand-subtitle {
    display: none;
  }
  .index-brand-title {
    font-size: 1.75rem;
    letter-spacing: 0.06em;
  }
  .index-brand-subtitle {
    font-size: 0.48rem;
    letter-spacing: 0.08em;
  }
  .hero-sub-row {
    grid-template-columns: 1fr;
  }
}

.calendar-live { margin-bottom: 1.5rem; }
#calendar-live-status { color: var(--sand--demoted); line-height: 1.5; margin-bottom: 1rem; }
#calendar-live-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.75rem; }
.calendar-live-card { padding: 1.25rem; border: 1px solid var(--sand--line); background: var(--sand--surface); }
.calendar-live-card h3 { font-size: 1rem; margin-bottom: 0.5rem; }
.calendar-live-card p { color: var(--sand--demoted); font-size: 0.88rem; line-height: 1.5; }
.calendar-live-card .calendar-live-meta { margin-top: 0.75rem; color: var(--sand--text); font-weight: 600; }
#calendar-more:not([hidden]) { margin-top: 1rem; }
@media (max-width: 640px) { #calendar-live-list { grid-template-columns: 1fr; } }
