/* ============================================
   PAHB — Justice & Precision Design System
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Open+Sans:wght@400;500;600;700;800&display=swap');

/* --- Design Tokens --- */
:root {
  --surface: #121414;
  --surface-dim: #121414;
  --surface-bright: #37393a;
  --surface-container-lowest: #0c0f0f;
  --surface-container-low: #1a1c1c;
  --surface-container: #1e2020;
  --surface-container-high: #282a2b;
  --surface-container-highest: #333535;
  --surface-charcoal: #0D0D0D;
  --surface-variant: #333535;
  --on-surface: #e2e2e2;
  --on-surface-variant: #d2c5ab;
  --inverse-surface: #e2e2e2;
  --inverse-on-surface: #2f3131;
  --outline: #9b9078;
  --outline-variant: #4f4632;
  --surface-tint: #f4bf00;
  --border-gold-mute: #806400;
  --text-placeholder: #666666;
  --primary: #ffeabb;
  --on-primary: #3e2e00;
  --primary-container: #ffc800;
  --on-primary-container: #6e5500;
  --inverse-primary: #755b00;
  --primary-fixed: #ffdf92;
  --primary-fixed-dim: #f4bf00;
  --secondary: #c8c6c5;
  --on-secondary: #313030;
  --secondary-container: #474746;
  --on-secondary-container: #b7b5b4;
  --tertiary: #eeebeb;
  --on-tertiary: #303030;
  --tertiary-container: #d1cfcf;
  --on-tertiary-container: #595858;
  --error: #ffb4ab;
  --on-error: #690005;
  --error-container: #93000a;
  --on-error-container: #ffdad6;
  --background: #121414;
  --on-background: #e2e2e2;
  --unit: 8px;
  --container-max: 1280px;
  --gutter: 24px;
  --margin-mobile: 16px;
  --margin-desktop: 64px;
  --rounded-sm: 0.125rem;
  --rounded: 0.25rem;
  --rounded-md: 0.375rem;
  --rounded-lg: 0.5rem;
  --rounded-xl: 0.75rem;
  --rounded-full: 9999px;
  --nav-height: 72px;
}

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-height);
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  /* overflow-x: hidden; */
}

body {
  font-family: 'Open Sans', sans-serif;
  font-weight: 400;
  line-height: 1.6;
  color: var(--on-surface);
  background-color: var(--surface-charcoal);
  /* overflow-x: hidden; */
}

img, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }

/* --- Typography --- */
.eyebrow {
  font-family: 'Open Sans', sans-serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--primary-container);
  margin-bottom: 12px;
}

h1, h2, h3, h4 { font-family: 'Open Sans', sans-serif; color: var(--on-surface); line-height: 1.2; }

h1 { font-size: 36px; font-weight: 700; }
h2 { font-size: 32px; font-weight: 600; line-height: 1.25; margin-bottom: 24px; }
h3 { font-size: 24px; font-weight: 600; line-height: 1.33; margin-bottom: 16px; }
h4 { font-size: 18px; font-weight: 600; }

p { font-size: 16px; line-height: 1.75; color: var(--secondary); margin-bottom: 16px; }
p:last-child { margin-bottom: 0; }

@media (min-width: 971px) {
  h1 { font-size: 48px; letter-spacing: -0.02em; line-height: 56px; }
  h2 { font-size: 36px; }
  h3 { font-size: 28px; }
}

/* --- Layout --- */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--margin-mobile);
}

@media (min-width: 971px) {
  .container { padding: 0 var(--margin-desktop); }
}

section {
  padding: 80px 0;
  position: relative;
}

@media (min-width: 971px) {
  section { padding: 120px 0; }
}

/* --- Gold Sidebar (Desktop) --- */
@media (min-width: 971px) {
  body::before {
    content: '';
    position: fixed;
    left: 0; top: 0; bottom: 0;
    width: 55px;
    background: linear-gradient(to bottom, var(--primary-container), var(--primary-fixed-dim), transparent);
    z-index: 1001;
  }
}

/* ============================================
   NAVIGATION
   ============================================ */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-height);
  z-index: 1000;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255, 200, 0, 0.08);
  transition: transform 0.35s ease;
  display: flex;
  align-items: center;
}

.nav--hidden { transform: translateY(-100%); }

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--margin-mobile);
}

@media (min-width: 971px) {
  .nav__inner { padding: 0 var(--margin-desktop); }
}

.nav__logo img { height: 36px; width: auto; }

.nav__links {
  display: none;
  gap: 32px;
  align-items: center;
}

.nav__links a {
  font-family: 'Open Sans', sans-serif;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--secondary);
  text-shadow: 0 0 5px #00000052;
  transition: color 0.3s;
  position: relative;
}

.nav__links a::after {
  content: '';
  position: absolute;
  bottom: -4px; left: 0;
  width: 0; height: 2px;
  background: var(--primary-container);
  transition: width 0.3s;
}

.nav__links a:hover,
.nav__links a.active { color: var(--primary-container); }
.nav__links a:hover::after,
.nav__links a.active::after { width: 100%; }

@media (min-width: 971px) {
  .nav__links { display: flex; }
}

/* Hamburger */
.hamburger {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 28px;
  padding: 4px 0;
  z-index: 1002;
}

.hamburger span {
  display: block;
  height: 3px;
  width: 100%;
  background: var(--on-surface);
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
  transform-origin: center;
}

.hamburger.active span:nth-child(1) { transform: translateY(11px) rotate(45deg); }
.hamburger.active span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.hamburger.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (min-width: 971px) {
  .hamburger { display: none; }
}

/* Mobile Menu */
.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 999;
  background: rgba(12, 15, 15, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 40px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s;
}

.mobile-menu.active {
  opacity: 1;
  pointer-events: all;
}

.mobile-menu a {
  font-family: 'Open Sans', sans-serif;
  font-size: 28px;
  font-weight: 600;
  color: var(--on-surface);
  transition: color 0.3s;
}

.mobile-menu a:hover { color: var(--primary-container); }

/* ============================================
   HERO
   ============================================ */
.hero {
  position: relative;
  height: 100vh;
  min-height: 500px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 0;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: 0;
  width: 100%;
  height: 50%;
  background: linear-gradient(to top, var(--surface-charcoal), transparent);
  pointer-events: none;
}

.hero__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(13,13,13,0.3) 0%,
    rgba(13,13,13,0.55) 50%,
    rgba(13,13,13,0.95) 100%
  );
}

.hero__content {
    position: relative;    
    z-index: 2;
    padding: 0 var(--margin-mobile);
    max-width: 900px;
}

@media (min-width: 971px) {
  
  .hero__content {
    display: flex;
    flex-direction: row-reverse;
      align-items: center;
    justify-content: space-between;
    gap: 40px;}
}

.hero__logo {
  width: 60%;
  margin-block: 30px;
  animation: fadeDown 1s ease 0.3s both;
}

@media (min-width: 971px) {
  .hero__logo { width: 326px; 
  margin-bottom: 0px;}
}
.hero__intro {
  display: flex;
  flex-direction: column;
  gap: 24px;
  align-items: left;
  justify-content: left;
  animation: fadeUp 1s ease 0.6s both;
}
.hero__title {
  margin-bottom: 20px;
  animation: fadeUp 1s ease 0.6s both;
}

.hero__subtitle {
  font-size: 16px;
  color: var(--secondary);
  max-width: 600px;
  animation: fadeUp 1s ease 0.8s both;
}

@media (min-width: 971px) {
  .hero__subtitle { font-size: 18px; }
}

.hero__cta { animation: fadeUp 1s ease 1s both;
  align-self: center; }
@media (min-width: 971px) {
  .hero__cta { align-self: flex-start; }}


.hero__scroll {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  animation: bounce 2s ease infinite 2s;
}

.hero__scroll svg { width: 28px; height: 28px; stroke: var(--primary-container); }

/* ============================================
   BUTTONS
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: 'Open Sans', sans-serif;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.04em;
  padding: 14px 32px;
  border-radius: var(--rounded);
  transition: all 0.3s ease;
  cursor: pointer;
}

.btn--primary {
  background: var(--primary-container);
  color: #000;
}

.btn--primary:hover {
  background: var(--primary-fixed-dim);
  box-shadow: 0 0 24px rgba(255, 200, 0, 0.25);
}

.btn--secondary {
  background: transparent;
  border: 1px solid var(--primary-container);
  color: var(--on-surface);
}

.btn--secondary:hover {
  background: rgba(255, 200, 0, 0.08);
}

.btn--tertiary {
  background: color-mix(in srgb, var(--on-tertiary) 30%, transparent);
  border: 1px solid var(--primary-container);
  color: var(--primary-container) !important;
  transition: background 0.6s ease;
}

.btn--tertiary:hover {
  background: rgba(255, 200, 0, 0.08);
}

.nav__links a.btn--tertiary::after,
.nav__links a.btn--tertiary:hover::after { width: 0 !important; }

/* ============================================
   ABOUT SECTION
   ============================================ */
.about { background: var(--surface-charcoal); }

.about__intro { max-width: 720px; margin-bottom: 64px; }

.about__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

@media (min-width: 600px) {
  .about__grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 971px) {
  .about__grid { grid-template-columns: repeat(3, 1fr); }
}

/* --- Cards --- */
.card {
  background: var(--surface-container-low);
  border: 1px solid var(--surface-container-highest);
  border-radius: var(--rounded-lg);
  padding: 32px 24px;
  transition: border-color 0.3s, box-shadow 0.3s, translate 0.5s ease-in-out;
}

.card:hover {
  border-color: var(--primary-container);
  box-shadow: 0 0 20px rgba(255, 200, 0, 0.08);
  translate: 0 -5px;
}

.card__icon {
  width: 70px;
  height: 70px;
  margin-bottom: 20px;
  color: var(--primary-container);
}

.card__title {
  font-family: 'Open Sans', sans-serif;
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--on-surface);
}

.card__text {
  font-size: 14px;
  line-height: 1.7;
  color: var(--on-surface-variant);
  margin-bottom: 0;
}

/* ============================================
   ASESORIA SECTION
   ============================================ */
.asesoria {
  background: var(--surface-container-lowest);
  overflow-x: hidden; 
}

.asesoria__services {
  margin-bottom: 80px;
}

.gold-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 24px;
}

.gold-list li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 15px;
  line-height: 1.7;
  color: var(--secondary);
}

.gold-list li::before {
      content: '';
    flex-shrink: 0;
    width: 8px;
    height: 8px;
    margin-top: 9px;
    background: var(--primary-container);
    border-radius: 1px;
}

/* Modalidades */
.modalidades__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  margin-top: 32px;
}

@media (min-width: 600px) {
  .modalidades__grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 971px) {
  .modalidades__grid { grid-template-columns: repeat(3, 1fr); }
}

.modalidad-card {
  background: var(--surface-container);
  border: 1px solid var(--surface-container-highest);
  border-radius: 6px 6px 0 0;
  padding: 28px 24px;
  border-bottom: 3px solid var(--primary-container);
  transition: box-shadow 0.3s, translate 0.3s ease-in-out;
}

.modalidad-card:hover {
  box-shadow: 0 0 20px rgba(255, 200, 0, 0.06);
  translate: 0 -5px;
}

.modalidad-card h4 { margin-bottom: 12px; color: var(--primary); }
.modalidad-card p { font-size: 14px; color: var(--on-surface-variant); }

/* Contact channels */
.channels { margin-top: 32px; }
.channels li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 15px;
  color: var(--secondary);
  line-height: 1.7;
  margin-bottom: 12px;
}
.channels li::before {
  content: '→';
  color: var(--primary-container);
  font-weight: 700;
  flex-shrink: 0;
}

/* ============================================
   SERVICIOS SECTION
   ============================================ */
.servicios { background: var(--surface); }

.servicios__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  margin-top: 40px;
}

@media (min-width: 971px) {
  .servicios__grid { grid-template-columns: repeat(2, 1fr); }
}

/* Accordion */
.accordion {
  background: var(--surface-container-low);
  border: 1px solid var(--surface-container-highest);
  border-radius: var(--rounded-lg);
  overflow: hidden;
  transition: border-color 0.3s;
}

.accordion:hover,
.accordion.open { border-color: var(--border-gold-mute); }

.accordion__header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 24px;
  cursor: pointer;
  width: 100%;
  text-align: left;
}

.accordion__number {
    flex-shrink: 0;
    width: 75px;
    height: 75px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 200, 0, 0.1);
    border-radius: var(--rounded);
    font-family: 'Open Sans', sans-serif;
    font-weight: 700;
    font-size: 36px;
    color: var(--primary-container);
}

.accordion__title {
  flex: 1;
  font-family: 'Open Sans', sans-serif;
  font-size: 16px;
  font-weight: 600;
  color: var(--on-surface);
}

.accordion__chevron {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  color: var(--primary-container);
  transition: transform 0.3s;
}

.accordion.open .accordion__chevron { transform: rotate(180deg); }

.accordion__body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease;
}

.accordion.open .accordion__body { max-height: 600px; }

.accordion__content {
  padding: 0 24px 24px;
}

.accordion__content li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 14px;
  line-height: 1.7;
  color: var(--on-surface-variant);
  margin-bottom: 10px;
}

.accordion__content li::before {
      content: '';
    flex-shrink: 0;
    width: 8px;
    height: 8px;
    margin-top: 9px;
    background: var(--primary-container);
    border-radius: 1px;
}

/* ============================================
   FOOTER / CONTACT
   ============================================ */
.footer {
  background: var(--surface-container-lowest);
  padding: 80px 0 0;
  border-top: 1px solid var(--surface-container-highest);
  overflow-x: clip;
}

.footer__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 60px;
}

@media (min-width: 971px) {
  .footer__grid { grid-template-columns: 1fr 1fr; gap: 80px; }
}

.footer__info { display: flex; flex-direction: column; gap: 60px; }

.footer__logo img { height: 100px; width: auto; }

.footer__contact-item {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  color: var(--secondary);
  margin-bottom: 16px;
}

.footer__contact-item img,
.footer__contact-item svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  opacity: 0.7;
}

.footer__contact-item a { transition: color 0.3s; }
.footer__contact-item a:hover { color: var(--primary-container); }

.footer__social {
  display: flex;
  gap: 16px;
  margin-top: 8px;
}

.footer__social a {
  width: 40px; height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--surface-container-highest);
  border-radius: var(--rounded);
  transition: border-color 0.3s, background 0.3s;
}

.footer__social a:hover {
  border-color: var(--primary-container);
  background: rgba(255, 200, 0, 0.08);
}

.footer__social a img { width: 18px; height: 18px; }

/* Form */
.form { display: flex; flex-direction: column; gap: 32px; }

.form__group {
  position: relative;
  border-bottom: 2px solid var(--surface-container-highest);
  transition: border-color 0.3s;
}

.form__group:focus-within { border-color: var(--primary-container); }

.form__input,
.form__textarea {
  width: 100%;
  background: transparent;
  border: none;
  outline: none;
  font-family: 'Open Sans', sans-serif;
  font-size: 16px;
  color: var(--on-surface);
  padding: 20px 0 8px;
}

.form__textarea {
  resize: none;
  min-height: 48px;
  overflow: hidden;
}

.form__label {
  position: absolute;
  left: 0;
  top: 20px;
  font-size: 14px;
  color: var(--text-placeholder);
  pointer-events: none;
  transition: all 0.3s;
}

.form__input:focus ~ .form__label,
.form__input:valid ~ .form__label,
.form__textarea:focus ~ .form__label,
.form__textarea:not(:placeholder-shown) ~ .form__label {
  top: 0;
  font-size: 11px;
  color: var(--primary-container);
  letter-spacing: 0.05em;
}

.form__submit { align-self: flex-start; }

/* Footer bottom */
.footer__bottom {
  margin-top: 60px;
  padding: 24px 0;
  border-top: 1px solid var(--surface-container-highest);
  text-align: center;
}

.footer__bottom p {
  font-size: 13px;
  color: var(--text-placeholder);
}

/* ============================================
   WHATSAPP WIDGET
   ============================================ */
.whatsapp {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 900;
  width: 56px;
  height: 56px;
  border-radius: var(--rounded-full);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px color-mix(in srgb, var(--primary-container) 30%, transparent);
  transition: transform 0.3s, box-shadow 0.3s;
}

.whatsapp:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 24px var(--primary-container);
}

.whatsapp img {
  width: 100%;
  height: 100%;
}

/* ============================================
   SCROLL ANIMATIONS — Pure CSS (scroll-driven)
   ============================================
   Uses animation-timeline: view() for Chromium 115+.
   Wrapped in @supports: unsupported browsers show
   content normally without animation.
   ============================================ */

@supports (animation-timeline: view()) {
  @keyframes scrollRevealUp {
    from { opacity: 0; transform: translateY(160px); }
  }

  @keyframes scrollRevealLeft {
    from { opacity: 0; transform: translateX(-60px); }
  }

  @keyframes scrollRevealRight {
    from { opacity: 0; transform: translateX(60px); }
  }

  .reveal {
    animation: scrollRevealUp ease both;
    animation-timeline: view();
    animation-range: entry 0% entry 80%;
  }

  .reveal--left {
    animation: scrollRevealLeft ease both;
    animation-timeline: view();
    animation-range: entry 0% entry 30%;
  }

  .reveal--right {
    animation: scrollRevealRight ease both;
    animation-timeline: view();
    animation-range: entry 0% entry 30%;
  }

  /* Stagger: even children start slightly later */
  .stagger > :nth-child(2),
  .stagger > :nth-child(4),
  .stagger > :nth-child(6) {
    animation-range: entry 5% entry 35%;
  }

  .stagger > :nth-child(3) { animation-range: entry 3% entry 33%; }
  .stagger > :nth-child(5) { animation-range: entry 6% entry 36%; }
}

/* Section divider line */
.divider {
  width: 60px;
  height: 3px;
  background: var(--primary-container);
  border-radius: 2px;
  margin-bottom: 24px;
}

/* ============================================
   KEYFRAMES (time-based — hero only)
   ============================================ */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

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

@keyframes bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(10px); }
}

/* Subtle noise texture overlay */
.noise::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.03;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 256px;
}

/* ============================================
   FORM STATUS
   ============================================ */
.form__status {
  padding: 16px;
  border-radius: var(--rounded);
  font-size: 14px;
  display: none;
}

.form__status--success {
  display: block;
  background: rgba(37, 211, 102, 0.1);
  border: 1px solid rgba(37, 211, 102, 0.3);
  color: #25D366;
}

.form__status--error {
  display: block;
  background: rgba(255, 180, 171, 0.1);
  border: 1px solid rgba(255, 180, 171, 0.3);
  color: var(--error);
}

input:-internal-autofill-selected {
  background: transparent;
  background-color: transparent !important;
  color: var(--on-surface);
  transition: color 0.5s ease, background-color 0.5s ease;
}

/* ============================================
   SEPARADOR — Frame animation sequence
   ============================================ */
.separador {
  height: 240px;
  width: 100vw;
  position: relative;
  left: 50%;
  transform: translateX(-50%);
  margin-bottom: 60px;
  overflow: hidden;
}

.separador__sticky {
  width: 100%;
  height: 100%;
}

#separador-canvas {
  display: block;
  width: 100%;
  height: 100%;
  transition: opacity 0.4s ease;
}

/* Fade-out al salir del viewport — scroll-driven */
@supports (animation-timeline: view()) {
  #separador-canvas {
    animation: sepFadeOut linear both;
    animation-timeline: view();
    animation-range: exit -20% exit 30%;
    transition: none;
  }

  @keyframes sepFadeOut {
    from { opacity: 1; }
    to   { opacity: 0; }
  }
}