/* ==========================================================================
   Grupo San Juanito S.A.S. — Landing Page
   Design system per Brand Kit: monochromatic charcoal/silver, Inter typeface
   ========================================================================== */

:root {
  /* Brand palette — Neutrals & Backgrounds */
  --bg-primary: #e0e0e0;
  --bg-secondary: #d4d4d4;
  --bg-tertiary: #c8c8c8;
  --bg-inverted: #3d3d3d;
  --bg-deep: #1a1a1a;

  /* Brand palette — Accents & Text */
  --accent-primary: #5f5f5f;
  --accent-secondary: #707070;
  --text-primary: #1a1a1a;
  --text-secondary: #505050;
  --white: #ffffff;
  --white-soft: rgba(255, 255, 255, 0.82);
  --white-faint: rgba(255, 255, 255, 0.14);

  /* Type */
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  /* Rhythm */
  --container: 1220px;
  --radius: 4px;
  --radius-lg: 10px;

  /* Motion */
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  color: var(--text-primary);
  background: var(--bg-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

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

ul {
  list-style: none;
}

button {
  font-family: inherit;
  cursor: pointer;
}

svg {
  display: block;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 clamp(1.25rem, 4vw, 2.5rem);
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  * {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ---------- Typography ---------- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-secondary);
}

.eyebrow::before {
  content: "";
  width: 28px;
  height: 1px;
  background: var(--accent-primary);
  display: inline-block;
}

.eyebrow--light {
  color: var(--white-soft);
}

.eyebrow--light::before {
  background: var(--white-soft);
}

.section-heading {
  font-weight: 700;
  font-size: clamp(1.9rem, 3.6vw, 2.9rem);
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin-top: 0.9rem;
}

.section-lede {
  margin-top: 1.1rem;
  max-width: 620px;
  color: var(--text-secondary);
  font-size: clamp(1rem, 1.4vw, 1.1rem);
}

.section-head {
  margin-bottom: clamp(2.5rem, 5vw, 4rem);
}

.section-head.center {
  text-align: center;
}

.section-head.center .section-lede {
  margin-left: auto;
  margin-right: auto;
}

.section-head.center .eyebrow::before {
  display: none;
}

section {
  padding: clamp(4rem, 9vw, 7.5rem) 0;
}

/* Keep anchored sections clear of the fixed header */
section[id] {
  scroll-margin-top: 72px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.95rem 1.9rem;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-radius: var(--radius);
  border: 1px solid transparent;
  transition: transform 0.35s var(--ease), background 0.3s var(--ease), border-color 0.3s var(--ease), color 0.3s var(--ease);
  white-space: nowrap;
}

.btn:active {
  transform: scale(0.97);
}

.btn-primary {
  background: var(--bg-deep);
  color: var(--white);
}

.btn-primary:hover {
  background: var(--accent-primary);
}

.btn-outline {
  border-color: rgba(26, 26, 26, 0.25);
  color: var(--text-primary);
}

.btn-outline:hover {
  border-color: var(--text-primary);
  background: rgba(26, 26, 26, 0.05);
}

.btn-outline-light {
  border-color: rgba(255, 255, 255, 0.35);
  color: var(--white);
}

.btn-outline-light:hover {
  border-color: var(--white);
  background: rgba(255, 255, 255, 0.08);
}

.btn-sm {
  padding: 0.75rem 1.4rem;
  font-size: 0.78rem;
}

/* ---------- Header ---------- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 1.35rem 0;
  transition: background 0.4s var(--ease), padding 0.4s var(--ease), box-shadow 0.4s var(--ease), border-color 0.4s var(--ease);
  border-bottom: 1px solid transparent;
  /* Header sits over the dark hero until the page scrolls */
  color: var(--white);
}

.site-header.is-scrolled {
  padding: 0.85rem 0;
  background: rgba(224, 224, 224, 0.86);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom-color: rgba(26, 26, 26, 0.08);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.05);
  color: var(--text-primary);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.brand-logo {
  display: block;
  width: 42px;
  height: 42px;
  border-radius: 8px;
  overflow: hidden;
  flex-shrink: 0;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
}

.brand-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.brand-word {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand-word strong {
  font-size: 0.86rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.brand-word span {
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: currentColor;
  opacity: 0.6;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: clamp(1.4rem, 2.4vw, 2.4rem);
}

.main-nav a {
  font-size: 0.83rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: currentColor;
  position: relative;
  padding: 0.3rem 0;
  white-space: nowrap;
}

.main-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 0;
  height: 1px;
  background: currentColor;
  transition: width 0.3s var(--ease);
}

/* The nav CTA is only for the mobile overlay menu */
.main-nav .btn {
  display: none;
}

/* Header CTA inverts against the dark hero */
.site-header:not(.is-scrolled) .header-actions .btn-primary {
  background: var(--white);
  color: var(--text-primary);
}

.site-header:not(.is-scrolled) .header-actions .btn-primary:hover {
  background: var(--bg-secondary);
}

.main-nav a:hover::after,
.main-nav a.active::after {
  width: 100%;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 42px;
  height: 42px;
  background: transparent;
  border: 1px solid currentColor;
  border-radius: 6px;
  z-index: 110;
  color: inherit;
}

.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 0 auto;
  background: currentColor;
  transition: transform 0.35s var(--ease), opacity 0.25s var(--ease);
}

/* While the mobile menu is open the toggle sits on the dark overlay */
.nav-toggle.is-open {
  color: var(--white);
  position: relative;
}

.nav-toggle.is-open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle.is-open span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.is-open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding: 8rem 0 5rem;
  background:
    radial-gradient(1100px 620px at 82% -10%, rgba(255, 255, 255, 0.06), transparent 60%),
    radial-gradient(900px 500px at 8% 110%, rgba(255, 255, 255, 0.05), transparent 55%),
    linear-gradient(160deg, #232323 0%, #1a1a1a 45%, #141414 100%);
  color: var(--white);
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.035'/%3E%3C/svg%3E");
  pointer-events: none;
  mix-blend-mode: overlay;
}

.hero .container {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: clamp(2.5rem, 6vw, 5rem);
  align-items: center;
}

.hero-title {
  font-weight: 700;
  font-size: clamp(2.4rem, 5.4vw, 4.4rem);
  line-height: 1.08;
  letter-spacing: -0.015em;
  margin-top: 1.25rem;
}

.hero-lede {
  margin-top: 1.6rem;
  max-width: 560px;
  font-size: clamp(1rem, 1.3vw, 1.15rem);
  color: var(--white-soft);
}

.hero-actions {
  margin-top: 2.6rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

/* Invert the primary CTA against the charcoal hero */
.hero .btn-primary {
  background: var(--white);
  color: var(--text-primary);
}

.hero .btn-primary:hover {
  background: var(--bg-secondary);
}

.hero-sectors {
  margin-top: 3.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.hero-sectors span {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.5rem 0.9rem;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  color: var(--white-soft);
}

.hero-mark {
  justify-self: center;
  width: min(360px, 82%);
  aspect-ratio: 1;
  position: relative;
}

.hero-mark img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 22px;
  box-shadow: 0 40px 90px -20px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.06);
}

.hero-mark::after {
  content: "";
  position: absolute;
  inset: -22px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 34px;
  pointer-events: none;
}

.scroll-cue {
  position: absolute;
  left: 50%;
  bottom: 2.2rem;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  color: var(--white-soft);
  font-size: 0.65rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  z-index: 1;
}

.scroll-cue .line {
  width: 1px;
  height: 34px;
  background: linear-gradient(var(--white-soft), transparent);
  animation: cue 2.2s var(--ease) infinite;
}

@keyframes cue {
  0% { transform: scaleY(0); transform-origin: top; opacity: 0; }
  40% { transform: scaleY(1); transform-origin: top; opacity: 1; }
  60% { transform: scaleY(1); transform-origin: bottom; opacity: 1; }
  100% { transform: scaleY(0); transform-origin: bottom; opacity: 0; }
}

/* ---------- Reveal on scroll ---------- */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.stagger > * {
  transition-delay: calc(var(--i, 0) * 90ms);
}

/* ---------- About ---------- */
.about {
  background: var(--bg-primary);
}

.about-grid {
  display: grid;
  grid-template-columns: 1.3fr 0.7fr;
  gap: clamp(2.5rem, 5vw, 4.5rem);
  align-items: start;
}

.about-copy p {
  color: var(--text-secondary);
  margin-bottom: 1.15rem;
  font-size: 1rem;
}

.about-copy p:last-child {
  margin-bottom: 0;
}

.fact-card {
  background: var(--white);
  border: 1px solid rgba(26, 26, 26, 0.08);
  border-radius: var(--radius-lg);
  padding: 2rem 1.75rem;
}

.fact-list {
  display: flex;
  flex-direction: column;
  gap: 1.35rem;
}

.fact-item {
  padding-bottom: 1.35rem;
  border-bottom: 1px solid rgba(26, 26, 26, 0.08);
}

.fact-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.fact-item .num {
  display: block;
  font-size: 1.7rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.fact-item .label {
  display: block;
  margin-top: 0.3rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-secondary);
}

/* ---------- Services ---------- */
.services {
  background: var(--bg-secondary);
}

/* 5 cards balance as 3 + 2: each card spans 2 of 6 tracks, the last two span 3 */
.services-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 1.5rem;
}

.service-card {
  grid-column: span 2;
}

.service-card:nth-last-child(-n + 2) {
  grid-column: span 3;
}

.service-card {
  background: var(--white);
  border: 1px solid rgba(26, 26, 26, 0.07);
  border-radius: var(--radius-lg);
  padding: 2.25rem 1.9rem;
  transition: transform 0.45s var(--ease), box-shadow 0.45s var(--ease);
}

.service-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 24px 50px -20px rgba(26, 26, 26, 0.25);
}

.service-icon {
  width: 46px;
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: var(--bg-deep);
  color: var(--white);
  margin-bottom: 1.5rem;
}

.service-icon svg {
  width: 22px;
  height: 22px;
}

.service-card h3 {
  font-size: 1.08rem;
  font-weight: 700;
  margin-bottom: 0.7rem;
}

.service-card p {
  font-size: 0.92rem;
  color: var(--text-secondary);
}


/* ---------- Mission / Vision ---------- */
.mv {
  background: linear-gradient(165deg, #262626, #1a1a1a);
  color: var(--white);
}

.mv-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.mv-panel {
  padding: clamp(2.25rem, 4vw, 3.5rem);
  position: relative;
}

.mv-panel + .mv-panel {
  border-left: 1px solid rgba(255, 255, 255, 0.1);
}

.mv-panel .eyebrow {
  color: var(--white-soft);
}

.mv-panel .eyebrow::before {
  background: rgba(255, 255, 255, 0.5);
}

.mv-panel h3 {
  margin-top: 0.9rem;
  font-size: clamp(1.3rem, 2.2vw, 1.7rem);
  font-weight: 700;
  letter-spacing: -0.01em;
}

.mv-panel p {
  margin-top: 1.1rem;
  color: var(--white-soft);
  font-size: 0.98rem;
}

/* ---------- Purpose quote ---------- */
.purpose {
  background: var(--bg-primary);
}

.purpose-inner {
  max-width: 860px;
  margin: 0 auto;
  text-align: center;
}

.purpose blockquote {
  font-size: clamp(1.5rem, 3.4vw, 2.35rem);
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: -0.01em;
  color: var(--text-primary);
}

.purpose blockquote::before {
  content: "\201C";
}
.purpose blockquote::after {
  content: "\201D";
}

.purpose cite {
  display: block;
  margin-top: 1.75rem;
  font-style: normal;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-secondary);
}

/* ---------- Values ---------- */
.values {
  background: var(--bg-tertiary);
}

.values-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}

.value-card {
  padding: 2rem 1.6rem;
  background: var(--white);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(26, 26, 26, 0.07);
}

.value-card .idx {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent-primary);
  letter-spacing: 0.08em;
}

.value-card h3 {
  margin-top: 0.9rem;
  font-size: 1.05rem;
  font-weight: 700;
}

.value-card p {
  margin-top: 0.6rem;
  font-size: 0.88rem;
  color: var(--text-secondary);
}

/* ---------- Contact ---------- */
.contact {
  background: var(--bg-deep);
  color: var(--white);
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2.5rem, 5vw, 5rem);
  align-items: center;
}

.contact-copy .section-lede {
  color: var(--white-soft);
}

.contact-methods {
  margin-top: 2.5rem;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.contact-method {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.25rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.contact-method:last-child {
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.contact-method .ic {
  width: 38px;
  height: 38px;
  flex-shrink: 0;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
}

.contact-method .ic svg {
  width: 18px;
  height: 18px;
  color: var(--white);
}

.contact-method .txt span {
  display: block;
}

.contact-method .txt .k {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.5);
  margin-bottom: 0.25rem;
}

.contact-method .txt .v {
  font-size: 1rem;
  font-weight: 600;
}

.contact-method a.v:hover {
  text-decoration: underline;
}

.contact-actions {
  margin-top: 2.25rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.contact-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-lg);
  padding: clamp(2rem, 3vw, 2.75rem);
}

.contact-card .brand-logo {
  width: 56px;
  height: 56px;
  border-radius: 10px;
  margin-bottom: 1.75rem;
}

.contact-card h3 {
  font-size: 1.3rem;
  font-weight: 700;
  line-height: 1.3;
}

.contact-card p {
  margin-top: 1rem;
  color: var(--white-soft);
  font-size: 0.92rem;
}

.contact-card .nit {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 0.78rem;
  letter-spacing: 0.05em;
  color: rgba(255, 255, 255, 0.55);
}

/* ---------- Footer ---------- */
.site-footer {
  background: #141414;
  color: rgba(255, 255, 255, 0.6);
  padding: 3rem 0 2rem;
}

.footer-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 2rem;
  flex-wrap: wrap;
  padding-bottom: 2.25rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1.75rem;
}

.footer-nav a {
  font-size: 0.82rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.7);
}

.footer-nav a:hover {
  color: var(--white);
}

.footer-bottom {
  margin-top: 1.75rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  font-size: 0.76rem;
  letter-spacing: 0.02em;
}

/* ---------- Back to top ---------- */
.to-top {
  position: fixed;
  right: 1.5rem;
  bottom: 1.5rem;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--bg-deep);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity 0.35s var(--ease), transform 0.35s var(--ease), visibility 0.35s;
  z-index: 90;
}

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

.to-top svg {
  width: 18px;
  height: 18px;
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 980px) {
  .hero .container {
    grid-template-columns: 1fr;
    text-align: left;
  }

  .hero-mark {
    display: none;
  }

  .about-grid,
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .service-card,
  .service-card:nth-last-child(-n + 2) {
    grid-column: span 1;
  }

  /* Odd card count: let the last card fill its row */
  .service-card:last-child {
    grid-column: span 2;
  }

  .values-grid {
    grid-template-columns: repeat(2, 1fr);
  }

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

  .mv-panel + .mv-panel {
    border-left: none;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
  }
}

@media (max-width: 920px) {
  .header-actions .btn {
    display: none;
  }

  .nav-toggle {
    display: flex;
  }

  .main-nav {
    position: fixed;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 1.75rem;
    padding: 2rem clamp(1.5rem, 8vw, 3rem);
    background: var(--bg-deep);
    transform: translateX(100%);
    transition: transform 0.5s var(--ease), visibility 0.5s;
    z-index: 105;
    visibility: hidden;
  }

  .main-nav.is-open {
    transform: translateX(0);
    visibility: visible;
  }

  .main-nav a {
    color: var(--white);
    font-size: 1.4rem;
    white-space: normal;
  }

  .main-nav .btn {
    display: inline-flex;
    margin-top: 1rem;
    color: var(--text-primary);
    background: var(--white);
    font-size: 0.85rem;
  }
}

@media (max-width: 760px) {
  .services-grid,
  .values-grid {
    grid-template-columns: 1fr;
  }

  .service-card,
  .service-card:nth-last-child(-n + 2),
  .service-card:last-child {
    grid-column: auto;
  }

  .hero {
    padding-top: 7rem;
  }

  .hero-actions .btn {
    width: 100%;
  }

  .contact-card {
    order: -1;
  }
}

@media (max-width: 480px) {
  .brand-word span {
    display: none;
  }
}

/* ==========================================================================
   Subpages (Cumplimiento, Datos Personales, Actualidad)
   ========================================================================== */

.page-hero {
  position: relative;
  padding: clamp(8rem, 14vw, 10.5rem) 0 clamp(3rem, 6vw, 4.5rem);
  background:
    radial-gradient(900px 500px at 85% -20%, rgba(255, 255, 255, 0.06), transparent 60%),
    linear-gradient(160deg, #232323 0%, #1a1a1a 55%, #141414 100%);
  color: var(--white);
}

.page-hero h1 {
  font-weight: 700;
  font-size: clamp(2rem, 4.5vw, 3.4rem);
  line-height: 1.12;
  letter-spacing: -0.015em;
  margin-top: 1rem;
  max-width: 820px;
}

.page-hero .lede {
  margin-top: 1.2rem;
  max-width: 680px;
  color: var(--white-soft);
  font-size: clamp(0.98rem, 1.3vw, 1.08rem);
}

/* Sub-nav within a page */
.subnav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 2.4rem;
}

.subnav a {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.55rem 1.05rem;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  color: var(--white-soft);
  transition: background 0.3s var(--ease), color 0.3s var(--ease), border-color 0.3s var(--ease);
}

.subnav a:hover {
  background: var(--white);
  border-color: var(--white);
  color: var(--text-primary);
}

/* Definition cards: default 2×2; use .def-grid--3 when there are exactly three */
.def-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

.def-grid--3 {
  grid-template-columns: repeat(3, 1fr);
}

@media (max-width: 900px) {
  .def-grid,
  .def-grid--3 {
    grid-template-columns: 1fr;
  }
}

.def-card {
  background: var(--white);
  border: 1px solid rgba(26, 26, 26, 0.08);
  border-radius: var(--radius-lg);
  padding: 2rem 1.8rem;
}

.def-card h3 {
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.35;
}

.def-card h3 .abbr {
  color: var(--accent-secondary);
}

.def-card p {
  margin-top: 0.8rem;
  font-size: 0.92rem;
  color: var(--text-secondary);
}

.def-card .examples {
  margin-top: 1.1rem;
  padding-top: 1.1rem;
  border-top: 1px solid rgba(26, 26, 26, 0.08);
}

.def-card .examples strong {
  display: block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-bottom: 0.6rem;
}

.def-card .examples ul {
  list-style: none;
}

.def-card .examples li {
  position: relative;
  padding-left: 1.1rem;
  font-size: 0.88rem;
  color: var(--text-secondary);
  margin-bottom: 0.4rem;
}

.def-card .examples li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.6em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent-secondary);
}

/* Document download rows */
.doc-links {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.doc-link {
  display: flex;
  align-items: center;
  gap: 1.1rem;
  padding: 1.15rem 1.4rem;
  /* Charcoal action button so it stands out from the white info cards */
  background: var(--bg-deep);
  color: var(--white);
  border: 1px solid transparent;
  border-radius: var(--radius-lg);
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), background 0.35s var(--ease);
  /* Uniform size for every document button: half the content width, centered */
  width: 50%;
  margin-left: auto;
  margin-right: auto;
}

@media (max-width: 900px) {
  .doc-link {
    width: 100%;
  }
}

.doc-link:hover {
  transform: translateY(-3px);
  background: var(--accent-primary);
  box-shadow: 0 18px 40px -16px rgba(26, 26, 26, 0.45);
}

.doc-link .ic {
  width: 42px;
  height: 42px;
  flex-shrink: 0;
  border-radius: 9px;
  background: var(--white);
  color: var(--bg-deep);
  display: flex;
  align-items: center;
  justify-content: center;
}

.doc-link .ic svg {
  width: 19px;
  height: 19px;
}

.doc-link .txt {
  min-width: 0;
}

.doc-link .txt strong {
  display: block;
  font-size: 0.94rem;
  font-weight: 700;
  line-height: 1.35;
}

.doc-link .txt span {
  display: block;
  margin-top: 0.15rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.6);
}

.doc-link .arrow {
  margin-left: auto;
  flex-shrink: 0;
  color: rgba(255, 255, 255, 0.75);
  transition: transform 0.35s var(--ease);
}

.doc-link:hover .arrow {
  transform: translateX(4px);
}

.doc-link .arrow svg {
  width: 18px;
  height: 18px;
}

/* Forms */
.form-card {
  background: var(--white);
  border: 1px solid rgba(26, 26, 26, 0.08);
  border-radius: var(--radius-lg);
  padding: clamp(1.75rem, 3vw, 2.5rem);
}

.form-card h3 {
  font-size: 1.15rem;
  font-weight: 700;
}

.form-card .hint {
  margin-top: 0.5rem;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

/* Embedded Microsoft Forms */
.form-embed {
  margin-top: 1.5rem;
  border-radius: 8px;
  overflow: hidden;
  background: var(--white);
}

.form-embed iframe {
  display: block;
  width: 100%;
  height: 640px;
  border: none;
}

.form-grid {
  margin-top: 1.6rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.1rem;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.form-field.full {
  grid-column: 1 / -1;
}

.form-field label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-secondary);
}

.form-field input,
.form-field select,
.form-field textarea {
  font-family: inherit;
  font-size: 0.95rem;
  color: var(--text-primary);
  background: var(--bg-primary);
  border: 1px solid rgba(26, 26, 26, 0.14);
  border-radius: 6px;
  padding: 0.8rem 0.95rem;
  transition: border-color 0.25s var(--ease), background 0.25s var(--ease);
  width: 100%;
}

.form-field textarea {
  min-height: 120px;
  resize: vertical;
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--text-primary);
  background: var(--white);
}

.form-actions {
  margin-top: 1.6rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
}

.form-note {
  font-size: 0.78rem;
  color: var(--text-secondary);
}

.form-note a {
  font-weight: 700;
  text-decoration: underline;
}

/* Channels list (alt reporting channels) */
.channel-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.channel-item {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  padding: 1.1rem 0;
  border-top: 1px solid rgba(26, 26, 26, 0.1);
}

.channel-item:last-child {
  border-bottom: 1px solid rgba(26, 26, 26, 0.1);
}

.channel-item .ic {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  border-radius: 8px;
  background: var(--bg-deep);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
}

.channel-item .ic svg {
  width: 16px;
  height: 16px;
}

.channel-item .k {
  display: block;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-secondary);
}

.channel-item .v {
  display: block;
  margin-top: 0.2rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
  word-break: break-word;
}

.channel-item a.v:hover {
  text-decoration: underline;
}

/* Two-column layout: content + aside */
.split {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: clamp(2rem, 4vw, 3.5rem);
  align-items: start;
}

/* Info list (datos personales types, derechos) */
.info-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.info-item {
  background: var(--white);
  border: 1px solid rgba(26, 26, 26, 0.08);
  border-radius: var(--radius-lg);
  padding: 1.4rem 1.5rem;
}

.info-item h4 {
  font-size: 0.95rem;
  font-weight: 700;
}

.info-item p {
  margin-top: 0.45rem;
  font-size: 0.88rem;
  color: var(--text-secondary);
}

.chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.2rem;
}

.chip-list span {
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.45rem 0.9rem;
  background: var(--white);
  border: 1px solid rgba(26, 26, 26, 0.12);
  border-radius: 999px;
  color: var(--text-secondary);
}

.check-list {
  margin-top: 1.2rem;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.check-list li {
  position: relative;
  padding-left: 1.9rem;
  font-size: 0.95rem;
  color: var(--text-secondary);
}

.check-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.22em;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  background: var(--bg-deep);
}

.check-list li::after {
  content: "";
  position: absolute;
  left: 4.5px;
  top: 0.47em;
  width: 8px;
  height: 4.5px;
  border-left: 2px solid var(--white);
  border-bottom: 2px solid var(--white);
  transform: rotate(-45deg);
}

/* Alternating section backgrounds on subpages */
.band-light { background: var(--bg-primary); }
.band-mid { background: var(--bg-secondary); }

@media (max-width: 900px) {
  .split {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .form-grid {
    grid-template-columns: 1fr;
  }
}
