/*
 * H&C federated visual layer
 * Grammar shared with Paraíso, reinterpreted for a legal/professional context.
 * Loaded after components.css so the migrated component system remains intact.
 */

:root {
  --dark: #10182d;
  --dark-2: #17233e;
  --dark-footer: #090d18;
  --light: #f6f2e9;
  --light-2: #ebe6dc;
  --accent: #8fd5c5;
  --accent-hover: #6bb9a8;
  --accent-dim: rgba(143, 213, 197, 0.12);
  --hot: #d79b7c;

  --text-dark: #172033;
  --text-muted: #626b78;
  --text-light: #f8f4eb;
  --text-light-muted: #cbd2d5;

  --border-dark: rgba(255, 255, 255, 0.16);
  --border-dark-soft: rgba(255, 255, 255, 0.09);
  --border-light: rgba(23, 32, 51, 0.15);
  --border-light-soft: rgba(23, 32, 51, 0.09);

  --max-w: 1180px;
  --section-py: clamp(5.5rem, 9vw, 8.5rem);
  --fs-display: clamp(3.3rem, 7.2vw, 6.5rem);
  --fs-h2: clamp(2.45rem, 4.8vw, 4.35rem);
}

html {
  scroll-padding-top: 6rem;
  background: var(--dark);
}

body {
  background: var(--light);
  color: var(--text-dark);
}

::selection {
  background: var(--accent);
  color: var(--dark);
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

/* ── Navigation ─────────────────────────────────── */
.c-nav {
  min-height: 4.9rem;
  padding: 0 var(--pad-x);
  background: rgba(16, 24, 45, 0.9);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: none;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.c-nav.is-scrolled {
  background: rgba(9, 13, 24, 0.96);
  border-bottom-color: rgba(255, 255, 255, 0.1);
  box-shadow: 0 12px 35px rgba(4, 8, 17, 0.12);
}

.c-nav__logo {
  display: inline-flex;
  align-items: baseline;
  gap: 0.8rem;
  color: var(--text-light);
  text-decoration: none;
}

.c-nav__brand-mark {
  font-family: var(--f-serif);
  font-size: 1.55rem;
  font-weight: 400;
  letter-spacing: 0.015em;
  line-height: 1;
}

.c-nav__brand-name {
  color: var(--accent);
  font-size: 0.56rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.c-nav__links a,
.c-nav__toggle {
  color: var(--text-light-muted) !important;
  font-weight: 500;
  letter-spacing: 0.13em;
}

.c-nav__links a:hover,
.c-nav__toggle:hover,
.c-nav__item--has-submenu.is-open .c-nav__toggle {
  color: var(--text-light) !important;
}

.c-nav__submenu-wrap {
  padding-top: 0;
}

.mmm__inner,
.mmi__inner,
.mmd__inner {
  background: rgba(9, 13, 24, 0.985) !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
  box-shadow: 0 1.5rem 4rem rgba(0, 0, 0, 0.32) !important;
}

.mmm__moment-link:hover,
.mmi__col-heading:hover,
.mmd__link:hover {
  border-color: rgba(143, 213, 197, 0.42) !important;
}

/* ── Hero ───────────────────────────────────────── */
.c-hero {
  min-height: 96svh;
  padding: clamp(8.5rem, 14vw, 11rem) var(--pad-x) 7rem;
  background:
    radial-gradient(circle at 84% 23%, rgba(143, 213, 197, 0.12), transparent 25%),
    radial-gradient(circle at 70% 76%, rgba(215, 155, 124, 0.08), transparent 26%),
    linear-gradient(135deg, #10182d 0%, #111a30 48%, #0b1121 100%);
  isolation: isolate;
}

.c-hero::before {
  opacity: 0.82;
  mask-image: linear-gradient(to bottom, #000 0%, #000 68%, transparent 100%);
}

.c-hero::after {
  background:
    radial-gradient(circle at 76% 28%, rgba(143, 213, 197, 0.12), transparent 17%),
    radial-gradient(circle at 58% 72%, rgba(215, 155, 124, 0.07), transparent 22%);
  opacity: 1;
}

.c-hero__inner {
  max-width: var(--max-w);
}

.c-hero__inner::after {
  content: 'H&C';
  position: absolute;
  z-index: -1;
  right: -0.05em;
  bottom: -0.08em;
  color: rgba(255, 255, 255, 0.025);
  font-family: var(--f-serif);
  font-size: clamp(10rem, 26vw, 24rem);
  font-style: italic;
  font-weight: 300;
  line-height: 0.65;
  pointer-events: none;
  user-select: none;
}

.c-hero__eyebrow {
  margin-bottom: 1.35rem;
  color: var(--accent);
  font-size: 0.64rem;
  font-weight: 500;
  letter-spacing: 0.23em;
}

.c-hero__headline {
  max-width: 950px;
  margin-bottom: 1.5rem;
  color: var(--text-light);
  font-size: var(--fs-display);
  font-weight: 300;
  line-height: 0.96;
  letter-spacing: -0.035em;
}

.c-hero__sub {
  max-width: 700px;
  margin-bottom: 0;
  color: var(--text-light);
  font-family: var(--f-serif);
  font-size: clamp(1.45rem, 2.6vw, 2.2rem);
  font-weight: 300;
  line-height: 1.23;
}

.c-hero__brief {
  max-width: 650px;
  margin-top: 1.35rem;
  color: var(--text-light-muted);
  font-size: clamp(0.96rem, 1.35vw, 1.08rem);
  line-height: 1.85;
}

.c-hero__ctas {
  margin-top: 2.8rem;
}

.c-hero .btn--solid {
  color: var(--dark);
  font-weight: 500;
}

.c-hero .btn--ghost {
  color: var(--text-light);
  border-color: rgba(255, 255, 255, 0.28);
}

.c-hero .btn--ghost:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: rgba(143, 213, 197, 0.06);
}

.c-hero__practice-rail {
  width: min(100%, 900px);
  margin-top: clamp(3.5rem, 7vw, 5.5rem);
  padding-top: 1.35rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem 1.65rem;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.c-hero__practice-rail span {
  position: relative;
  color: rgba(203, 210, 213, 0.72);
  font-size: 0.61rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.c-hero__practice-rail span:not(:last-child)::after {
  content: '';
  position: absolute;
  top: 50%;
  right: -0.85rem;
  width: 2px;
  height: 2px;
  border-radius: 50%;
  background: var(--accent);
}

.c-hero__scroll span {
  color: rgba(203, 210, 213, 0.6);
}

/* ── Global section hierarchy ───────────────────── */
.section {
  border-top: 1px solid transparent;
}

.section--dark {
  background:
    linear-gradient(135deg, rgba(23, 35, 62, 0.62), transparent 48%),
    var(--dark);
  border-top-color: rgba(255, 255, 255, 0.07);
}

.section--dark-2 {
  background: var(--dark-2);
}

.section--light {
  background: var(--light);
}

.section--light-2 {
  background: var(--light-2);
}

.section--light,
.section--light-2 {
  --accent: #4f8f81;
  --accent-hover: #397568;
  --accent-dim: rgba(79, 143, 129, 0.1);
}

.u-eyebrow {
  margin-bottom: 1.2rem;
  color: var(--accent);
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.19em;
}

.u-headline {
  max-width: 920px;
  margin-bottom: 1.5rem;
  color: var(--text-dark);
  font-size: var(--fs-h2);
  font-weight: 300;
  line-height: 1.04;
  letter-spacing: -0.026em;
}

.section--dark .u-headline,
.section--dark-2 .u-headline,
.is-dark .u-headline {
  color: var(--text-light);
}

.section--dark .u-headline em,
.section--dark-2 .u-headline em,
.c-statement.is-dark em {
  color: var(--accent);
  font-weight: 300;
}

.section--dark .u-body,
.section--dark-2 .u-body,
.section--dark .diag-intro {
  color: var(--text-light-muted);
}

.btn {
  min-height: 3.15rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 0;
  font-size: 0.67rem;
  font-weight: 500;
  letter-spacing: 0.14em;
}

.btn--solid {
  color: var(--dark);
}

/* ── Home: moment / scene system ────────────────── */
.entrada-momentos {
  padding-top: clamp(5rem, 8vw, 7.2rem);
  padding-bottom: clamp(5rem, 8vw, 7.2rem);
}

.entrada-momentos .section__inner {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(280px, 0.65fr);
  gap: clamp(3rem, 8vw, 8rem);
  align-items: end;
}

.entrada-momentos .u-headline {
  margin-bottom: 0;
}

.entrada-momentos__sub {
  max-width: 620px;
  color: var(--text-light-muted);
  line-height: 1.9;
}

.momento-section {
  position: relative;
}

.momento-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: var(--pad-x);
  width: clamp(3.5rem, 8vw, 7rem);
  height: 2px;
  background: var(--accent);
  opacity: 0.7;
}

.momento-section .momento-header {
  max-width: 900px;
  margin-bottom: clamp(3rem, 6vw, 4.8rem);
}

.momento-intro,
.instr-intro {
  max-width: 740px;
  color: var(--text-muted);
  font-size: clamp(0.98rem, 1.35vw, 1.08rem);
  line-height: 1.9;
}

.triada {
  gap: 1px;
  background: rgba(23, 32, 51, 0.15);
  border: 1px solid rgba(23, 32, 51, 0.15);
}

.triada-card {
  min-height: 360px;
  background: var(--light);
}

.triada-card__media img {
  filter: saturate(0.82) contrast(1.04);
}

.triada-card__label {
  left: 0;
  right: auto;
  bottom: 0;
  width: min(88%, 330px);
  padding: 1.25rem 1.4rem;
  background: rgba(246, 242, 233, 0.95);
  border-top: 1px solid rgba(23, 32, 51, 0.12);
  border-right: 1px solid rgba(23, 32, 51, 0.12);
  box-shadow: none;
}

.triada-card__label h3 {
  color: var(--text-dark);
  font-size: clamp(1.15rem, 1.7vw, 1.45rem);
  font-weight: 400;
  line-height: 1.2;
}

.triada-card__hover {
  background: rgba(10, 17, 32, 0.91) !important;
}

.triada-card__hover-title {
  color: var(--text-light);
  font-size: clamp(1.35rem, 2vw, 1.8rem);
  font-weight: 400;
}

.triada-card__hover-desc {
  color: var(--text-light-muted);
}

.triada-card__hover-link,
.momento-cta__link {
  color: var(--accent);
}

.momento-cta {
  border-top-color: rgba(23, 32, 51, 0.13);
}

/* ── Diagnostics as a distinct intervention layer ─ */
.diag-edinsel-grid {
  gap: 1px;
  background: rgba(255, 255, 255, 0.09);
  border: 1px solid rgba(255, 255, 255, 0.09);
}

.diag-edinsel-card {
  min-height: 300px;
  padding: clamp(2rem, 4vw, 3rem);
  background: rgba(23, 35, 62, 0.52);
  border: 0;
}

.diag-edinsel-card h3 {
  color: var(--text-light);
  font-size: clamp(1.45rem, 2.4vw, 2rem);
  font-weight: 300;
  line-height: 1.16;
}

.diag-edinsel-card p {
  color: var(--text-light-muted);
}

.diag-edinsel-card__cta {
  color: var(--accent);
  font-weight: 500;
}

/* ── Instruments: professional, reticular, durable ─ */
.instr-grid {
  gap: 1px;
  background: var(--border-light);
  border: 1px solid var(--border-light);
}

.instr-card {
  min-height: 280px;
  padding: clamp(1.75rem, 3.5vw, 2.5rem);
  gap: 1rem;
  background: var(--light);
  border: 0;
  box-shadow: none;
  transition: background 180ms ease, transform 180ms ease;
}

.section--light-2 .instr-card {
  background: #f2eee5;
}

.instr-card:hover {
  background: #fffaf0;
  border: 0;
  box-shadow: none;
  transform: translateY(-2px);
}

.instr-card h3 {
  color: var(--text-dark);
  font-size: clamp(1.3rem, 2vw, 1.65rem);
  font-weight: 400;
  line-height: 1.16;
}

.instr-card p {
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.78;
}

.instr-card__link {
  color: #4f8f81;
  font-weight: 500;
}

/* ── Generic migrated cards and editorial blocks ── */
.c-cardgrid,
.recursos-grid {
  background: var(--border-light);
  border-color: var(--border-light);
}

.c-card,
.recurso-item {
  background: var(--light);
}

.c-card:hover,
.recurso-item:hover {
  background: #fffaf0;
}

.c-card__title,
.recurso-item h3 {
  color: var(--text-dark);
}

.c-callout {
  border-color: var(--accent);
}

/* ── Footer ─────────────────────────────────────── */
.c-footer {
  background: var(--dark-footer);
}

/* ── Motion / polish ────────────────────────────── */
.fade-in {
  transform: translateY(12px);
}

.fade-in.visible {
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

@media (max-width: 900px) {
  .c-nav__brand-name { display: none; }

  .entrada-momentos .section__inner {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .c-hero__inner::after {
    right: -0.2em;
    opacity: 0.7;
  }
}

@media (max-width: 680px) {
  :root {
    --fs-display: clamp(2.9rem, 14vw, 4.5rem);
    --fs-h2: clamp(2.15rem, 10vw, 3.25rem);
  }

  .c-hero {
    min-height: auto;
    padding-top: 8.25rem;
    padding-bottom: 6rem;
  }

  .c-hero__practice-rail {
    gap: 0.65rem 1.35rem;
  }

  .c-hero__scroll {
    display: none;
  }

  .triada-card {
    min-height: 300px;
  }
}
