/* =========================================================
   PREFAB BARCELONA — Design System
   Inspired by b720.com / ferrater.com
   Swiss International Style · Jost Typography
   ========================================================= */

@import url('https://fonts.googleapis.com/css2?family=Jost:ital,wght@0,200;0,300;0,400;0,500;0,600;0,700;1,300;1,400&display=swap');

/* =========================================================
   1. TOKENS
   ========================================================= */
:root {
  /* Colors — minimal, architectural */
  --color-bg:          #ffffff;
  --color-bg-alt:      #f5f5f3;
  --color-bg-dark:     #0f0f0f;
  --color-text:        #0f0f0f;
  --color-text-muted:  #4a4a4a;
  --color-text-light:  #767676;
  --color-border:      #e0e0e0;
  --color-border-dark: rgba(255,255,255,0.15);
  --color-accent:      #0f0f0f;   /* accent IS black in Swiss style */
  --color-highlight:   #c8b89a;   /* warm stone — GRC concrete color */
  --color-nav-bg:      #d1d5db;   /* gris formigó / perla */

  /* Typography */
  --font-body:    'Jost', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --font-heading: 'Jost', 'Helvetica Neue', Helvetica, Arial, sans-serif;

  /* Spacing */
  --space-xs:  0.5rem;
  --space-sm:  1rem;
  --space-md:  2rem;
  --space-lg:  4rem;
  --space-xl:  7rem;
  --space-xxl: 11rem;

  /* Layout */
  --container:  1160px;
  --radius:     0px;   /* No border-radius — Swiss style */
  --nav-h:      130px;  /* 100px main + 30px sub */
  --banner-h:   0px;
}

/* =========================================================
   2. RESET & BASE
   ========================================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; font-size: 18px; }

body {
  font-family: var(--font-body);
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
  font-weight: 300;
  -webkit-font-smoothing: antialiased;
  padding-top: var(--banner-h);
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

/* =========================================================
   3. TYPOGRAPHY SCALE
   ========================================================= */
h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 300;
  line-height: 1.1;
  letter-spacing: -0.01em;
}

.display {
  font-size: clamp(2rem, 6vw, 48px);
  font-weight: 200;
  letter-spacing: -0.03em;
  line-height: 0.95;
}

.headline {
  font-size: clamp(1.8rem, 5vw, 48px);
  font-weight: 300;
  letter-spacing: -0.02em;
}

.overline {
  font-size: 1.5rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

/* =========================================================
   4. LAYOUT
   ========================================================= */
.container {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: clamp(1.5rem, 5vw, 4rem);
}

.section {
  padding-block: var(--space-xl);
  border-top: 1px solid var(--color-border);
}

.section--dark {
  background: var(--color-bg-dark);
  color: #fff;
  border-top: none;
  --color-accent: #fff;
  --color-text: #fff;
  --color-text-muted: rgba(255,255,255,0.55);
  --color-text-light: rgba(255,255,255,0.35);
  --color-border: rgba(255,255,255,0.1);
}

.section--alt {
  background: var(--color-bg-alt);
}

/* =========================================================
   5. NAVIGATION — minimal, fixed
   ========================================================= */
.site-nav {
  position: fixed;
  top: var(--banner-h);
  left: 0; right: 0;
  width: 100%;
  z-index: 100;
  background: var(--color-nav-bg);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-border);
}

.nav-inner {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: clamp(1.5rem, 5vw, 4rem);
  padding-block: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.nav-left {
  display: flex;
  align-items: center;
}

.nav-right {
  display: flex;
  align-items: flex-start;
}

@media (max-width: 900px) {
  .nav-right {
    align-items: center;
  }
}

.nav-links-wrapper {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.6rem;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 0;
  text-decoration: none;
  flex-shrink: 0;
}

.nav-logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1;
}

.nav-logo-top {
  font-size: 2.1rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-text);
}

.nav-logo-bottom {
  font-size: 2rem;
  font-weight: 400;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--color-text);
  margin-top: -4px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2.5rem;
}

.nav-links a {
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-text);
  transition: color 0.2s, opacity 0.2s;
  white-space: nowrap;
}

.nav-links a:hover,
.nav-links a.active { opacity: 0.6; }

/* Sub-nav label & links */
.nav-sub-label {
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--color-text-light);
  flex-shrink: 0;
}

.nav-sub-links {
  display: flex;
  align-items: center;
  gap: 2.5rem;
}

.nav-sub-links a {
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  transition: color 0.2s;
  white-space: nowrap;
}

.nav-sub-links a:hover,
.nav-sub-links a.active { color: var(--color-text); }

.nav-cta {
  font-size: 1rem !important;
  font-weight: 600 !important;
  letter-spacing: 0.14em !important;
  color: var(--color-bg) !important;
  background: var(--color-text);
  padding: 0.55rem 1.2rem;
  transition: opacity 0.2s !important;
}
.nav-cta:hover { opacity: 0.7 !important; }

/* Mobile hamburger */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 1.5px;
  background: var(--color-text);
  transition: all 0.3s;
}

@media (max-width: 900px) {
  .nav-links { display: none; }
  .nav-sub-links { display: none; }
  .nav-toggle { display: flex; }
  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: calc(var(--banner-h) + 100px);
    left: 0; right: 0;
    background: var(--color-bg);
    padding: 2rem;
    gap: 1.5rem;
    border-bottom: 1px solid var(--color-border);
    z-index: 99;
  }
}

/* =========================================================
   6. HERO
   ========================================================= */
.hero {
  position: relative;
  height: 100svh;
  min-height: 600px;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  background: var(--color-bg-dark);
}

.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0.4;
  filter: grayscale(30%);
}

.hero-content {
  position: relative;
  z-index: 2;
  padding-bottom: var(--space-lg);
  max-width: var(--container);
  margin-inline: auto;
  width: 100%;
  padding-inline: clamp(1.5rem, 5vw, 4rem);
  text-shadow: 0 4px 16px rgba(0,0,0,0.85);
}

.hero-eyebrow {
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #fff;
  margin-bottom: 1.5rem;
}
@media (max-width: 768px) {
  .hero-eyebrow { display: none; }
}

.hero-title {
  font-size: clamp(2.5rem, 6vw, 48px);
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 0.95;
  color: #fff;
}

.hero-title em {
  font-style: italic;
  font-weight: 600;
  color: #fff;
}

.hero-subtitle {
  margin-top: 1.5rem;
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
  max-width: 480px;
  line-height: 1.6;
}

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

/* =========================================================
   7. BUTTONS
   ========================================================= */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  padding: 0.85rem 1.8rem;
  cursor: pointer;
  text-decoration: none;
  transition: opacity 0.2s, background 0.2s, color 0.2s;
  border: none;
}

.btn-primary {
  background: var(--color-text);
  color: var(--color-bg);
}
.section--dark .btn-primary {
  background: #fff;
  color: #0f0f0f;
}
.btn-primary:hover { opacity: 0.75; }

.btn-outline {
  background: transparent;
  color: var(--color-text);
  border: 1px solid var(--color-text);
}
.btn-outline:hover { background: var(--color-text); color: var(--color-bg); }
.section--dark .btn-outline {
  color: #fff;
  border-color: rgba(255,255,255,0.5);
}
.section--dark .btn-outline:hover { background: #fff; color: #0f0f0f; }

.btn-outline-light {
  background: transparent;
  color: #fff;
  border: 1px solid rgba(255,255,255,0.5);
}
.btn-outline-light:hover { border-color: #fff; }

.btn-text {
  background: none;
  padding: 0;
  letter-spacing: 0.1em;
  text-decoration: underline;
  text-underline-offset: 4px;
}

/* =========================================================
   8. SECTION HEADERS
   ========================================================= */
.section-header { margin-bottom: var(--space-lg); }

.section-number {
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--color-text-light);
  margin-bottom: 1rem;
}

.section-title-lg {
  font-size: clamp(1.8rem, 4vw, 48px);
  font-weight: 300;
  letter-spacing: -0.02em;
  line-height: 1.05;
}

.section-lead {
  font-size: 1.25rem;
  font-weight: 300;
  line-height: 1.7;
  color: var(--color-text-muted);
  max-width: 640px;
  margin-top: 1.5rem;
}

.ruled-title {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}
.ruled-title::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--color-border);
}

/* =========================================================
   9. GRID LAYOUTS
   ========================================================= */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-md); }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-md); }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-sm); }

@media (max-width: 900px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}
@media (min-width: 600px) and (max-width: 900px) {
  .grid-3 { grid-template-columns: 1fr 1fr; }
  .grid-4 { grid-template-columns: 1fr 1fr; }
}

/* GRC Timeline section */
.grc-timeline-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-lg);
}

/* Materiales section — text + photo pairs side by side */
.materiales-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px;
}
.materiales-grid > figure {
  display: flex;
  flex-direction: column;
}
.materiales-grid > figure > img {
  flex: 1;
  object-fit: cover;
  width: 100%;
  min-height: 0;
}
@media (max-width: 900px) {
  .materiales-grid { grid-template-columns: 1fr; }
}

/* Content + image split */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-lg);
  align-items: center;
}
.split--reverse { direction: rtl; }
.split--reverse > * { direction: ltr; }

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

.split-image {
  aspect-ratio: 4/3;
  overflow: hidden;
  background: var(--color-bg-alt);
}
.split-image img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(15%); }

/* =========================================================
   10. STATS BAR
   ========================================================= */
.stats-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--color-border);
}
@media (max-width: 768px) { .stats-bar { grid-template-columns: 1fr 1fr; } }

.stat-item {
  padding: var(--space-md);
  border-right: 1px solid var(--color-border);
}
.stat-item:last-child { border-right: none; }

.stat-number {
  font-size: clamp(2rem, 5vw, 48px);
  font-weight: 200;
  letter-spacing: -0.03em;
  line-height: 1;
}
.stat-label {
  font-size: 1rem;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-top: 0.5rem;
}

/* =========================================================
   11. GALLERY GRID
   ========================================================= */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
}
@media (max-width: 600px) { .gallery-grid { grid-template-columns: 1fr; } }
@media (min-width: 600px) and (max-width: 900px) { .gallery-grid { grid-template-columns: 1fr 1fr; } }

.gallery-item {
  position: relative;
  overflow: hidden;
  background: var(--color-bg-alt);
  aspect-ratio: 4/3;
}
.gallery-item img {
  width: 100%; height: 100%;
  object-fit: cover;
  filter: grayscale(10%);
  transition: transform 0.6s ease, filter 0.4s;
}
.gallery-item:hover img { transform: scale(1.04); filter: grayscale(0%); }

.gallery-caption {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0);
  display: flex;
  align-items: flex-end;
  padding: 1.25rem;
  transition: background 0.3s;
  opacity: 0;
}
.gallery-item:hover .gallery-caption {
  background: rgba(0,0,0,0.45);
  opacity: 1;
}
.gallery-caption-text {
  color: #fff;
  font-size: 1rem;
  font-weight: 400;
  letter-spacing: 0.08em;
}
.gallery-caption-type {
  font-size: 1rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.6);
  margin-bottom: 0.2rem;
}

/* =========================================================
   12. BOOK PRESENTATION
   ========================================================= */
.book-layout {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: var(--space-xl);
  align-items: start;
}
@media (max-width: 900px) {
  .book-layout { grid-template-columns: 1fr; gap: var(--space-lg); }
  .book-cover-wrap { position: static; }
  .book-cover { max-width: 280px; margin-inline: auto; display: block; }
}

.book-cover-wrap {
  position: sticky;
  top: calc(var(--banner-h) + var(--nav-h) + 2rem);
}

.book-cover {
  width: 100%;
  max-width: 360px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.18);
}

.book-price-block {
  margin-top: var(--space-md);
  padding: var(--space-md);
  background: var(--color-bg-alt);
  border-top: 3px solid var(--color-text);
}

.book-price {
  font-size: 2.5rem;
  font-weight: 200;
  letter-spacing: -0.02em;
}

.book-price-note {
  font-size: 1rem;
  color: var(--color-text-muted);
  margin-bottom: 1rem;
}

.info-label {
  font-size: 1.15rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-bottom: 0.4rem;
}

.info-cell {
  background: var(--color-bg);
  padding: 1.5rem;
}

.book-toc { margin-top: var(--space-md); }

.toc-chapter {
  display: flex;
  gap: 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--color-border);
  align-items: baseline;
}
.toc-num {
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  color: var(--color-text-light);
  min-width: 4rem;
  flex-shrink: 0;
  white-space: nowrap;
  text-transform: uppercase;
}
.toc-title {
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.4;
}

/* =========================================================
   13. CONSULTING PACKAGES
   ========================================================= */
.service-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2px;
  margin-top: var(--space-lg);
  background: var(--color-border);
}
@media (max-width: 768px) {
  .service-grid {
    grid-template-columns: 1fr;
  }
  .service-grid > [style*="grid-column"] {
    grid-column: auto;
  }
  .service-card {
    padding: var(--space-sm) var(--space-sm);
  }
}

.service-card {
  background: var(--color-bg);
  padding: var(--space-md);
  position: relative;
  display: flex;
  flex-direction: column;
}
.service-card--featured { background: var(--color-bg-dark); color: #fff; }

.service-duration {
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-text-light);
  margin-bottom: 1rem;
}
.service-card--featured .service-duration { color: rgba(255,255,255,0.45); padding-right: 9rem; }

.service-name {
  font-size: 1.4rem;
  font-weight: 300;
  margin-bottom: 1rem;
  letter-spacing: -0.01em;
}

.service-description {
  font-size: 1rem;
  color: var(--color-text-muted);
  line-height: 1.7;
  margin-bottom: 1.5rem;
}
.service-card--featured .service-description { color: rgba(255,255,255,0.55); }

.service-includes {
  font-size: 1rem;
  color: var(--color-text-muted);
  line-height: 1.8;
  margin-bottom: 1.5rem;
}
.service-card--featured .service-includes { color: rgba(255,255,255,0.5); }
.service-includes li::before { content: '— '; }

.service-price {
  font-size: 2rem;
  font-weight: 200;
  letter-spacing: -0.02em;
  margin-bottom: 1.5rem;
  border-top: 1px solid var(--color-border);
  padding-top: 1rem;
  margin-top: auto;
}
.service-card--featured .service-price {
  border-color: rgba(255,255,255,0.15);
}

/* =========================================================
   14. CONTACT FORM
   ========================================================= */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
@media (max-width: 600px) { .form-grid { grid-template-columns: 1fr; } }

.form-field { display: flex; flex-direction: column; gap: 0.4rem; }
.form-field.full { grid-column: 1 / -1; }

.form-field label {
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

/* Expert selector labels — override the form-field uppercase style */
label.expert-option {
  text-transform: none;
  font-size: 1rem;
  font-weight: 300;
  letter-spacing: 0;
  color: var(--color-text);
}

input, textarea, select {
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 300;
  padding: 0.75rem 1rem;
  border: 1px solid var(--color-border);
  background: var(--color-bg);
  color: var(--color-text);
  outline: none;
  transition: border-color 0.2s;
  width: 100%;
}
input:focus, textarea:focus, select:focus { border-color: var(--color-text); }
textarea { resize: vertical; min-height: 130px; }

/* Radio & Checkbox — reset the global width:100% */
input[type="radio"],
input[type="checkbox"] {
  width: auto;
  padding: 0;
  border: none;
  background: none;
  flex-shrink: 0;
  cursor: pointer;
  accent-color: var(--color-text);
  width: 1rem;
  height: 1rem;
  margin-top: 2px;
}

/* =========================================================
   15. TEAM
   ========================================================= */
.team-avatar {
  width: 80px; height: 80px;
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  color: var(--color-text-muted);
  flex-shrink: 0;
}

.team-role {
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-top: 0.2rem;
}

/* =========================================================
   16. FOOTER
   ========================================================= */
.site-footer {
  background: var(--color-bg-dark);
  color: rgba(255,255,255,0.45);
  padding: 2.5rem 0 1.5rem;
  margin-top: auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: var(--space-lg);
  padding-bottom: 0.5rem;
  border-bottom: none;
}
@media (max-width: 768px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .footer-grid { grid-template-columns: 1fr; } }

.footer-brand-name {
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: #fff;
  margin-bottom: 0.75rem;
}

.footer-tagline {
  font-size: 1rem;
  line-height: 1.6;
  margin-bottom: 1.25rem;
}

.footer-col-title {
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.25);
  margin-bottom: 1rem;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-links a {
  font-size: 1rem;
  font-weight: 300;
  color: rgba(255,255,255,0.45);
  transition: color 0.2s;
}
.footer-links a:hover { color: #fff; }

.footer-bottom {
  padding-top: var(--space-sm);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 1rem;
  gap: 1rem;
  flex-wrap: wrap;
}

/* =========================================================
   17. UTILITIES
   ========================================================= */
.text-center { text-align: center; }
.text-muted { color: var(--color-text-muted); }

.mt-sm  { margin-top: var(--space-sm); }
.mt-md  { margin-top: var(--space-md); }
.mt-lg  { margin-top: var(--space-lg); }

.fade-up {
  opacity: 0;
  transform: translateY(20px);
  animation: fadeUp 0.8s ease forwards;
}
.fade-up:nth-child(2) { animation-delay: 0.15s; }
.fade-up:nth-child(3) { animation-delay: 0.3s; }

@keyframes fadeUp {
  to { opacity: 1; transform: none; }
}

/* =========================================================
   18. HORIZONTAL RULE DIVIDERS
   ========================================================= */
.hr { border: none; border-top: 1px solid var(--color-border); margin: var(--space-lg) 0; }
.hr--dark { border-color: rgba(255,255,255,0.1); }

/* =========================================================
   19. HIGHLIGHT BAND (warm concrete color)
   ========================================================= */
.band-highlight {
  background: var(--color-highlight);
  color: var(--color-bg-dark);
  padding: var(--space-md) clamp(1.5rem, 5vw, 4rem);
  font-size: 1rem;
  font-weight: 400;
  letter-spacing: 0.03em;
}

/* =========================================================
   20. PROCESS STEPS
   ========================================================= */
.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  border-top: 1px solid var(--color-border);
  margin-top: var(--space-lg);
}
@media (max-width: 900px) { .steps { grid-template-columns: 1fr; } }

.step {
  padding: var(--space-md);
  border-right: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
}
.step:last-child { border-right: none; }
@media (max-width: 900px) {
  .step { border-right: none; }
  .step:last-child { border-bottom: none; }
}

.step-num {
  font-size: 2rem;
  font-weight: 200;
  letter-spacing: -0.02em;
  color: var(--color-text-light);
  margin-bottom: 0.5rem;
}

.step-title {
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
}

.step-desc {
  font-size: 1rem;
  color: var(--color-text-muted);
  line-height: 1.6;
}

/* =========================================================
   21. FAQ — accordion
   ========================================================= */
.faq-item {
  border-bottom: 1px solid var(--color-border);
}

.faq-item summary {
  list-style: none;
  padding: 1.25rem 0;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 400;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: '+';
  font-size: 1.4rem;
  font-weight: 200;
  flex-shrink: 0;
  transition: transform 0.3s;
}
.faq-item[open] summary::after { transform: rotate(45deg); }

.faq-body {
  padding: 0 0 1.25rem;
  font-size: 1rem;
  color: var(--color-text-muted);
  line-height: 1.7;
  max-width: 680px;
}

/* =========================================================
   22. NOTICE / ALERT
   ========================================================= */
.notice {
  padding: 1.25rem var(--space-md);
  background: var(--color-bg-alt);
  border-left: 3px solid var(--color-text);
  font-size: 1rem;
  line-height: 1.7;
  color: var(--color-text-muted);
}

.notice strong { color: var(--color-text); font-weight: 500; }

/* =========================================================
   23. REUSABLE TYPOGRAPHY CLASSES
   Replace repetitive inline font-size/color/line-height styles
   ========================================================= */

/* Body paragraphs — standard and small */
.body-text {
  font-size: 1rem;
  font-weight: 300;
  line-height: 1.8;
  color: var(--color-text-muted);
}
.body-text-lg {
  font-size: 1.05rem;
  line-height: 1.9;
  margin-bottom: 1.5rem;
}
.body-text-bio {
  font-size: 1rem;
  line-height: 1.9;
  color: var(--color-text);
  margin-bottom: 1rem;
}

/* Property cards (the stat-like blocks in grc-gfrc, uhpc) */
.prop-value {
  font-size: 2.5rem;
  font-weight: 200;
  letter-spacing: -0.03em;
  margin-bottom: 0.5rem;
}
.prop-label {
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-bottom: 0.75rem;
}
.prop-title {
  font-size: 1rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
}
.prop-desc {
  font-size: 1rem;
  color: var(--color-text-muted);
  line-height: 1.7;
}

/* Uppercase labels / eyebrows */
.label-caps {
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-text-light);
  margin-bottom: 0.75rem;
}

/* Section eyebrow (used on grc-gfrc, consultoria pages) */
.section-eyebrow {
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-bottom: 1.5rem;
}

/* Section title (medium size, used on interior pages) */
.section-title {
  font-size: clamp(1.6rem, 3.5vw, 2.5rem);
  font-weight: 300;
  letter-spacing: -0.01em;
  line-height: 1.1;
}

/* Divider line */
.divider {
  width: 60px;
  height: 1px;
  background: var(--color-border);
  margin: var(--space-md) 0;
}

/* Figcaption */
.fig-caption {
  font-size: 1rem;
  color: var(--color-text-muted);
  padding: 0.5rem 0.25rem;
  background: var(--color-bg);
}
.fig-credit {
  display: block;
  margin-top: 0.2rem;
  font-size: 1rem;
  opacity: 0.55;
}

/* =========================================================
   24. UTILITY CLASSES — inline style cleanup
   min font-size: 1rem (16px) everywhere
   ========================================================= */

.ruled-title {
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--color-text-light);
  margin-bottom: 0;
}
.obra-tag {
  font-size: 1rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: 0.2rem;
}
.info-cell { background: var(--color-bg); padding: 1rem 1.25rem; }
.info-cell-value { font-size: 1rem; font-weight: 400; }
.detail-label-dark {
  font-size: 1rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.3);
  margin-bottom: 0.4rem;
}
.detail-value-dark { font-size: 1rem; color: rgba(255,255,255,0.6); }
.consulta-duration {
  font-size: 1rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.3);
  margin-bottom: 0.75rem;
}
.consulta-desc {
  font-size: 1rem;
  color: rgba(255,255,255,0.4);
  line-height: 1.6;
  margin-bottom: 1rem;
}
.badge-tag {
  font-size: 1rem;
  padding: 0.35rem 0.85rem;
  border: 1px solid var(--color-border);
  font-weight: 400;
}
.featured-badge {
  position: absolute;
  top: var(--space-md);
  right: var(--space-md);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.5);
  border: 1px solid rgba(255,255,255,0.2);
  padding: 0.25rem 0.6rem;
  line-height: 1.4;
}
.material-desc {
  font-size: 1rem;
  color: var(--color-text-muted);
  line-height: 1.8;
  margin-bottom: 1.25rem;
}
.material-list {
  font-size: 1rem;
  color: var(--color-text-muted);
  line-height: 1.9;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}
.material-desc--dark {
  font-size: 1rem;
  color: rgba(255,255,255,0.55);
  line-height: 1.8;
  margin-bottom: 1.25rem;
}
.material-list--dark {
  font-size: 1rem;
  color: rgba(255,255,255,0.45);
  line-height: 1.9;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}
.feature-text { font-size: 1rem; color: var(--color-text-muted); }
.book-meta { font-size: 1rem; color: var(--color-text-muted); margin-top: 0.2rem; }
.author-label { font-size: 1rem; letter-spacing: 0.12em; text-transform: uppercase; }
.footer-email { font-size: 1rem; margin-top: 0.25rem; }

/* =========================================================
   25. MOBILE RESPONSIVE FIXES
   ========================================================= */

/* Prevent body horizontal overflow on mobile */
html, body { overflow-x: hidden; max-width: 100vw; }

/* Mobile-only sub menu inside hamburger (hidden on desktop) */
.nav-mobile-sub { display: none; }

/* Compendio info grid */
.compendio-info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
}

/* Consulta Abierta grid — base styles (moved from inline) */
.consulta-abierta-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px;
  background: var(--color-border);
  margin-top: var(--space-md);
}

/* Contacto directo grid — base styles (moved from inline) */
.contacto-directo-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-xl);
  align-items: start;
}

/* ---- Mobile breakpoint ---- */
@media (max-width: 900px) {

  /* Show mobile sub-links inside hamburger */
  .nav-links.open .nav-mobile-sub {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    width: 100%;
    padding-top: 0;
    margin-top: 0;
    border-top: none;
    align-items: center;
  }
  .nav-mobile-sub a {
    font-size: 1rem;
    font-weight: 500;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--color-text-muted);
    text-align: center;
  }
  .nav-mobile-sub a:hover,
  .nav-mobile-sub a.active {
    color: var(--color-text);
  }

  /* Center the main nav links too */
  .nav-links.open {
    align-items: center;
  }

  /* Stack grids vertically */
  .consulta-abierta-grid { grid-template-columns: 1fr; }
  .contacto-directo-grid { grid-template-columns: 1fr; gap: var(--space-lg); }

  /* Compendio: book layout breathing room + right margin fix */
  .book-layout { grid-template-columns: 1fr; gap: var(--space-lg); }
  .book-cover-wrap { position: static; }
  .book-cover { max-width: 280px; margin-inline: auto; display: block; }
  .container { padding-inline: 1.25rem; box-sizing: border-box; }
  *, *::before, *::after { max-width: 100vw; box-sizing: border-box; }
  .book-toc, .info-cell, .toc-title, .notice, .headline, p, div { overflow-wrap: break-word; word-break: break-word; }
  .compendio-info-grid { grid-template-columns: 1fr; }

  /* Timeline grid: stack on mobile with gap */
  .grc-timeline-grid { grid-template-columns: 1fr; gap: var(--space-lg); }

  /* Materiales grid: interleave text and images on mobile */
  .materiales-grid { grid-template-columns: 1fr; }

  /* Nav height on mobile = only main row */
  :root { --nav-h: 50px; }
}

/* =========================================================
   25. INTERIOR PAGE WRAPPER
   ========================================================= */
.interior-page {
  padding-top: calc(var(--banner-h) + var(--nav-h));
}
.interior-page > .section:first-of-type {
  border-top: none;
  padding-top: calc(var(--space-xl) / 2);
}

/* =========================================================
   26. LANGUAGE SELECTOR
   ========================================================= */
.lang-selector {
  position: relative;
  margin-left: 2.5rem;
  flex-shrink: 0;
}

.lang-selector__btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-text);
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  transition: opacity 0.2s;
}
.lang-selector__btn:hover {
  opacity: 0.6;
}
.lang-selector__btn svg {
  transition: transform 0.2s;
}
.lang-selector__btn[aria-expanded="true"] svg {
  transform: rotate(180deg);
}

.lang-selector__dropdown {
  position: absolute;
  top: calc(100% + 0.35rem);
  right: 0;
  min-width: 100%;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  list-style: none;
  margin: 0;
  padding: 0.25rem 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: opacity 0.2s, visibility 0.2s, transform 0.2s;
  z-index: 110;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}
.lang-selector__dropdown.open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.lang-selector__dropdown li {
  margin: 0;
  padding: 0;
}
.lang-selector__dropdown a {
  display: block;
  padding: 0.4rem 0.75rem;
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  text-decoration: none;
  transition: color 0.2s, background 0.2s;
  white-space: nowrap;
}
.lang-selector__dropdown a:hover {
  color: var(--color-text);
  background: var(--color-bg-alt);
}
.lang-selector__dropdown a[aria-current="true"] {
  color: var(--color-text);
  font-weight: 600;
}

@media (max-width: 900px) {
  .lang-selector {
    margin-left: 1rem;
  }
}


/* Utilities extrated from inline JSON styles */
.text-brand-italic {
  font-family: var(--font-heading);
  font-style: italic;
}
.normal-case {
  text-transform: none !important;
}
.text-muted-sm {
  font-size: 0.7em;
  color: var(--color-text-muted);
}
.block-subtext {
  display: block;
  font-size: 0.85rem;
  opacity: 0.65;
  margin-top: 0.15rem;
}
.link-underline {
  text-decoration: underline;
  text-underline-offset: 3px;
}
