/* Shared responsive layer for the César Correa staging site. */
*, *::before, *::after {
  box-sizing: border-box;
}

html,
body {
  max-width: 100%;
  overflow-x: clip;
}

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

.cc-mobile-toggle,
.cc-mobile-panel,
.cc-mobile-backdrop {
  display: none;
}

[data-cc-root] :is(a, button, input, summary):focus-visible {
  outline: 2px solid var(--orange-bright, #f7a832);
  outline-offset: 3px;
}

[data-cc-root] .cc-foot-lang {
  min-width: 40px;
  min-height: 40px;
}

[data-cc-root] > nav > a:first-child,
[data-cc-root] footer a {
  display: inline-flex !important;
  align-items: center;
  min-height: 44px;
}

[data-cc-root] .cc-desktop-nav > a,
[data-cc-root] #cc-lang-btn {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
}

[data-cc-root] details > summary {
  min-height: 48px;
}

/* Keep the same layered Royal Obsidian treatment behind portrait-page copy on desktop. */
[data-cc-root] > .cc-mobile-photo-scrim--home,
[data-cc-root] > .cc-mobile-photo-scrim--diagnostic,
[data-cc-root] > .cc-mobile-photo-scrim--about {
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(18, 14, 26, 0.64) 0%, rgba(18, 14, 26, 0.28) 54%, rgba(18, 14, 26, 0.08) 100%),
    linear-gradient(180deg, rgba(18, 14, 26, 0.6) 0%, rgba(18, 14, 26, 0.24) 34%, rgba(18, 14, 26, 0.45) 72%, rgba(18, 14, 26, 0.82) 100%) !important;
}

/* The source portraits have little room above the head; move only Home and About down. */
[data-cc-root] > div.cc-home-hero-bg {
  background-position: 58% 64px !important;
}

[data-cc-root] > div.cc-about-hero-bg {
  background-position: right 64px !important;
}

@media (max-width: 1024px) {
  [data-cc-root] .cc-grid-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  [data-cc-root] .cc-grid-3 {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  [data-cc-root] .cc-grid-split {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  [data-cc-root] :is(.cc-grid-2, .cc-grid-3, .cc-grid-4, .cc-grid-split) > * {
    min-width: 0;
  }
}

@media (max-width: 900px) {
  [data-cc-root] > nav {
    min-height: 72px;
    padding: 12px 20px !important;
    background: rgba(18, 14, 26, 0.94) !important;
    border-bottom: 1px solid var(--line, rgba(242, 238, 248, 0.12));
    backdrop-filter: blur(18px) !important;
    -webkit-backdrop-filter: blur(18px) !important;
  }

  [data-cc-root] > nav > a:first-child {
    position: relative;
    z-index: 53;
    min-height: 44px;
  }

  [data-cc-root] > nav > .cc-desktop-nav {
    display: none !important;
  }

  .cc-mobile-toggle {
    position: relative;
    z-index: 53;
    display: inline-grid;
    place-items: center;
    width: 48px;
    height: 48px;
    padding: 0;
    color: #f2eef8;
    background: rgba(36, 26, 51, 0.82);
    border: 1px solid rgba(242, 238, 248, 0.22);
    border-radius: 8px;
    cursor: pointer;
  }

  .cc-mobile-toggle svg {
    width: 24px;
    height: 24px;
  }

  .cc-mobile-toggle .cc-menu-close,
  .cc-mobile-toggle[aria-expanded="true"] .cc-menu-open {
    display: none;
  }

  .cc-mobile-toggle[aria-expanded="true"] .cc-menu-close {
    display: block;
  }

  .cc-mobile-backdrop {
    position: fixed;
    inset: 0;
    z-index: 51;
    display: block;
    visibility: hidden;
    background: rgba(9, 7, 14, 0.62);
    opacity: 0;
    transition: opacity 180ms ease, visibility 180ms ease;
  }

  .cc-mobile-panel {
    position: fixed;
    top: 82px;
    right: 12px;
    left: 12px;
    z-index: 52;
    display: flex;
    visibility: hidden;
    flex-direction: column;
    gap: 4px;
    max-height: calc(100dvh - 94px);
    padding: 12px;
    overflow-y: auto;
    background: rgba(24, 16, 32, 0.98);
    border: 1px solid rgba(242, 238, 248, 0.2);
    border-radius: 14px;
    box-shadow: 0 24px 80px rgba(9, 7, 14, 0.72);
    opacity: 0;
    transform: translateY(-8px);
    transition: opacity 180ms ease, transform 180ms ease, visibility 180ms ease;
  }

  .cc-mobile-panel[data-open="true"],
  .cc-mobile-backdrop[data-open="true"] {
    visibility: visible;
    opacity: 1;
  }

  .cc-mobile-panel[data-open="true"] {
    transform: translateY(0);
  }

  .cc-mobile-panel > a {
    display: flex !important;
    align-items: center;
    min-height: 48px;
    width: 100%;
    padding: 13px 14px !important;
    color: rgba(242, 238, 248, 0.84) !important;
    font-family: var(--font-mono) !important;
    font-size: 13px !important;
    letter-spacing: 0.08em !important;
    text-transform: uppercase;
    text-decoration: none;
    background: transparent !important;
    border: 1px solid transparent !important;
    border-radius: 7px !important;
  }

  .cc-mobile-panel > a[data-active],
  .cc-mobile-panel > a[aria-current="page"] {
    color: #f2eef8 !important;
    background: rgba(160, 107, 255, 0.12) !important;
    border-color: rgba(160, 107, 255, 0.25) !important;
  }

  .cc-mobile-panel > a.cc-mobile-call-cta {
    justify-content: center;
    min-height: 52px;
    margin-top: 8px;
    color: #fff !important;
    font-family: var(--font-sans) !important;
    font-size: 14px !important;
    font-weight: 600;
    letter-spacing: 0 !important;
    text-transform: none;
    background: var(--royal) !important;
    border-color: var(--royal) !important;
    border-radius: 4px !important;
  }

  .cc-mobile-panel > a.cc-mobile-call-cta:hover,
  .cc-mobile-panel > a.cc-mobile-call-cta:focus-visible {
    background: var(--royal-bright) !important;
    border-color: var(--royal-bright) !important;
  }

  .cc-mobile-languages {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin-top: 8px;
    padding-top: 12px;
    border-top: 1px solid rgba(242, 238, 248, 0.14);
  }

  .cc-mobile-languages button {
    min-height: 44px;
    color: rgba(242, 238, 248, 0.84);
    font-family: var(--font-mono);
    font-size: 12px;
    letter-spacing: 0.08em;
    background: rgba(242, 238, 248, 0.05);
    border: 1px solid rgba(242, 238, 248, 0.16);
    border-radius: 6px;
    cursor: pointer;
  }

  body.cc-menu-open {
    overflow: hidden;
  }

  [data-cc-root] > div[style*="background-image"] {
    background-position: 62% center !important;
  }

  [data-cc-root] > div.cc-home-hero-bg,
  [data-cc-root] > div.cc-about-hero-bg {
    background-position: 62% 64px !important;
  }

  /*
   * On mobile, copy spans more of the photograph, so a stronger page-tuned scrim
   * protects white, purple, and gold text without flattening the image.
   */
  [data-cc-root] > .cc-mobile-photo-scrim--home {
    background:
      linear-gradient(90deg, rgba(18, 14, 26, 0.28) 0%, rgba(18, 14, 26, 0.12) 72%, rgba(18, 14, 26, 0.04) 100%),
      linear-gradient(180deg, rgba(18, 14, 26, 0.72) 0%, rgba(18, 14, 26, 0.58) 30%, rgba(18, 14, 26, 0.78) 68%, rgba(18, 14, 26, 0.94) 100%) !important;
  }

  [data-cc-root] > .cc-mobile-photo-scrim--diagnostic {
    background:
      linear-gradient(90deg, rgba(18, 14, 26, 0.3) 0%, rgba(18, 14, 26, 0.14) 72%, rgba(18, 14, 26, 0.06) 100%),
      linear-gradient(180deg, rgba(18, 14, 26, 0.74) 0%, rgba(18, 14, 26, 0.62) 30%, rgba(18, 14, 26, 0.8) 68%, rgba(18, 14, 26, 0.95) 100%) !important;
  }

  [data-cc-root] > .cc-mobile-photo-scrim--about {
    background:
      linear-gradient(90deg, rgba(18, 14, 26, 0.26) 0%, rgba(18, 14, 26, 0.1) 72%, rgba(18, 14, 26, 0.04) 100%),
      linear-gradient(180deg, rgba(18, 14, 26, 0.7) 0%, rgba(18, 14, 26, 0.56) 30%, rgba(18, 14, 26, 0.76) 68%, rgba(18, 14, 26, 0.94) 100%) !important;
  }

  [data-cc-root] header {
    min-height: auto !important;
    padding: 120px 24px 60px !important;
  }

  [data-cc-root] section {
    padding: 64px 24px !important;
  }

  [data-cc-root] footer {
    padding: 40px 24px 28px !important;
  }

  [data-cc-root] .cc-feature-image {
    min-height: 220px !important;
  }

  [data-cc-root] .cc-min-card {
    min-height: auto !important;
  }

  [data-cc-root] .cc-form-row {
    width: 100%;
  }

  [data-cc-root] .cc-form-row .lm-input {
    width: 100%;
    min-width: 0 !important;
  }
}

@media (max-width: 900px) and (max-height: 500px) and (orientation: landscape) {
  [data-cc-root] > div.cc-home-hero-bg {
    background-position: 62% 64px !important;
  }

  [data-cc-root] > div.cc-about-hero-bg {
    background-position: 62% 88px !important;
  }

  [data-cc-root] > div.cc-diagnostic-hero-bg {
    background-position: 62% 24% !important;
  }
}

@media (max-width: 640px) {
  [data-cc-root] > nav {
    padding-inline: 16px !important;
  }

  [data-cc-root] > nav > a:first-child {
    gap: 10px !important;
  }

  [data-cc-root] > nav > a:first-child svg {
    width: 27px;
    height: 27px;
  }

  [data-cc-root] > nav > a:first-child span {
    font-size: 17px !important;
  }

  [data-cc-root] header {
    padding: 112px 20px 52px !important;
  }

  [data-cc-root] section {
    padding: 52px 20px !important;
  }

  [data-cc-root] footer {
    padding: 36px 20px 24px !important;
  }

  [data-cc-root] h1 {
    font-size: 2.45rem !important;
    line-height: 1.06 !important;
    letter-spacing: -0.025em !important;
    overflow-wrap: anywhere;
  }

  [data-cc-root] h2 {
    font-size: 1.8rem !important;
    line-height: 1.12 !important;
  }

  [data-cc-root] :is(.cc-grid-4, .cc-grid-3, .cc-grid-2) {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  [data-cc-root] .cc-form-row {
    flex-direction: column !important;
    align-items: stretch !important;
  }

  [data-cc-root] .cc-form-row :is(input, button, a) {
    width: 100% !important;
    min-height: 48px;
  }

  [data-cc-root] .cc-cta-row {
    align-items: stretch !important;
  }

  [data-cc-root] .cc-cta-row > :is(a, button) {
    justify-content: center;
    width: 100%;
    min-height: 48px;
  }

  [data-cc-root] [style*="padding:clamp(38px"],
  [data-cc-root] [style*="padding:clamp(36px"],
  [data-cc-root] [style*="padding:clamp(32px"],
  [data-cc-root] [style*="padding:clamp(30px"],
  [data-cc-root] [style*="padding:clamp(28px"] {
    padding: 28px 24px !important;
  }

  [data-cc-root] footer > div {
    align-items: flex-start !important;
    flex-direction: column !important;
  }

  [data-cc-root] footer a {
    min-height: 44px;
  }
}

@media (max-width: 380px) {
  [data-cc-root] h1 {
    font-size: 2.15rem !important;
  }

  [data-cc-root] > nav > a:first-child span {
    font-size: 16px !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .cc-mobile-panel,
  .cc-mobile-backdrop {
    transition: none !important;
  }
}
/* External profile stays secondary to the diagnostic and LUMEN actions. */
.cc-about-linkedin {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin-top: 16px;
  color: #d5c2f7;
  font-size: 14px;
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: rgba(213, 194, 247, .5);
  text-underline-offset: 4px;
}
.cc-about-linkedin:hover,
.cc-footer-linkedin:hover { color: #f2eef8; text-decoration-color: currentColor; }
.cc-about-linkedin:focus-visible,
.cc-footer-linkedin:focus-visible { outline: 2px solid #f7a832; outline-offset: 4px; }
.cc-footer-linkedin {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  color: rgba(242, 238, 248, .72);
  font-family: var(--font-mono);
  font-size: 11px;
  text-decoration: underline;
  text-underline-offset: 3px;
}
