/* The site (model 2): famesrealestate.com's structure (line drawings, dark blocks) in the MVG brand:
   Newsreader + Instrument Sans, tinta / piedra / ladrillo. */
@font-face {
  font-family: "Newsreader";
  src: url("fonts/newsreader.woff2") format("woff2");
  font-weight: 200 800;
  font-display: swap;
}
@font-face {
  font-family: "Instrument Sans";
  src: url("fonts/instrument-sans.woff2") format("woff2");
  font-weight: 400 700;
  font-stretch: 75% 100%;
  font-display: swap;
}

:root {
  --ink: #172331;
  --ink-2: #33404f;
  --muted: #6b6f75;
  --rule: #cfc9bf;
  --paper: #ece8e1;
  --panel: #e4dfd7;
  --card: #f4f1ec;
  --dark: #172331;
  --on-dark: #aeb4bc;
  --line-dark: rgba(236, 232, 225, .16);
  --brick: #a9502f;
  --brick-on-dark: #c8714e;
  --serif: "Newsreader", Georgia, "Times New Roman", serif;
  --sans: "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --gutter: clamp(16px, 4vw, 56px);
  --max: 1200px;
  --header: 64px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--header); -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 1rem/1.65 var(--sans); -webkit-font-smoothing: antialiased; }
img, video, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--serif); font-weight: 400; line-height: 1.08; letter-spacing: -.01em; margin: 0; }
p { margin: 0; }
ul, ol, dl, dd { margin: 0; padding: 0; list-style: none; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; z-index: 100; background: var(--paper); padding: 8px 12px; }
:focus-visible { outline: 2px solid var(--brick); outline-offset: 3px; }
.wrap { width: 100%; max-width: calc(var(--max) + 2 * var(--gutter)); margin: 0 auto; padding: 0 var(--gutter); }

.label { font-size: .6875rem; font-weight: 500; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); }
.label span { color: var(--ink); }
section > .wrap > .label { display: flex; align-items: center; gap: 0; margin-bottom: 28px; }
section > .wrap > .label::after { content: ""; width: 32px; height: 1px; background: currentColor; margin-left: 16px; }
.prose { color: var(--ink-2); max-width: 54ch; }
.prose p + p { margin-top: 1em; }

/* ── logo: C2, mark only ───────────────────────────────────────────────────── */
.logo { display: block; }
.logo svg { height: 100%; width: auto; }
.logo-header { height: 28px; }
.logo-footer { height: 30px; }

/* ── header ────────────────────────────────────────────────────────────────── */
.site-header { position: fixed; inset: 0 0 auto; z-index: 20; height: var(--header); display: flex; align-items: center; transition: background-color .3s, color .3s, border-color .3s; border-bottom: 1px solid transparent; }
.site-header[data-state="over"] { color: var(--paper); --logo-accent: var(--brick-on-dark); --logo-knockout: var(--dark); }
.site-header[data-state="solid"] { background: rgba(236, 232, 225, .95); backdrop-filter: blur(8px); color: var(--ink); border-bottom-color: var(--rule); --logo-accent: var(--brick); --logo-knockout: var(--paper); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: block; text-decoration: none; }
.nav { display: flex; align-items: center; gap: 36px; }
.nav-links { display: flex; gap: 28px; font-size: .8125rem; }
.nav-links a, .langs a { text-decoration: none; opacity: .8; transition: opacity .2s; }
.nav-links a:hover, .langs a:hover, .nav-links a[aria-current] { opacity: 1; }
.nav-links a[aria-current] { text-decoration: underline; text-underline-offset: 6px; text-decoration-thickness: 1px; }
.langs { display: flex; gap: 2px; font-size: .6875rem; letter-spacing: .14em; }
.langs a { padding: 4px 6px; }
.langs a[aria-current] { opacity: 1; font-weight: 600; }
.nav-toggle { display: none; }

@media (max-width: 900px) {
  .nav-toggle { display: block; position: relative; z-index: 2; width: 44px; height: 44px; margin-right: -10px; background: none; border: 0; color: inherit; cursor: pointer; }
  .bars, .bars::before, .bars::after { position: absolute; left: 11px; width: 22px; height: 1px; background: currentColor; content: ""; transition: transform .25s; }
  .bars { top: 21px; }
  .bars::before { left: 0; top: -7px; }
  .bars::after { left: 0; top: 7px; }
  .nav-open .bars { background: transparent; }
  .nav-open .bars::before { transform: translateY(7px) rotate(45deg); }
  .nav-open .bars::after { transform: translateY(-7px) rotate(-45deg); }
  .nav { position: fixed; inset: 0; flex-direction: column; justify-content: center; gap: 40px; background: var(--dark); color: var(--paper); opacity: 0; visibility: hidden; transition: opacity .25s, visibility .25s; }
  .nav-open .nav { opacity: 1; visibility: visible; }
  .nav-open .site-header { color: var(--paper); }
  .nav-links { flex-direction: column; align-items: center; gap: 22px; font: 400 1.75rem/1.2 var(--serif); }
}

/* ── hero ──────────────────────────────────────────────────────────────────── */
.hero { position: relative; min-height: min(100svh, 1000px); display: flex; flex-direction: column; justify-content: flex-end; color: var(--paper); overflow: hidden; background: var(--dark); }
.hero-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero-scrim { position: absolute; inset: 0; background: linear-gradient(to top, rgba(23, 35, 49, .85), rgba(23, 35, 49, .4) 55%, rgba(23, 35, 49, .55)); }
.hero-content { position: relative; padding-top: calc(var(--header) + clamp(24px, 6vh, 48px)); padding-bottom: clamp(48px, 10vh, 112px); }
.kicker { font-size: .6875rem; font-weight: 500; letter-spacing: .2em; text-transform: uppercase; color: #d9dde2; margin-bottom: 20px; }
.hero h1 { font-size: clamp(2.3rem, min(5.2vw, 7.2vh), 4.4rem); max-width: 19ch; }
.hero-lead { max-width: 44ch; margin-top: 28px; color: #d9dde2; font-size: clamp(1rem, 1.4vw, 1.125rem); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }
.btn { display: inline-block; padding: 14px 22px; font-size: .6875rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; text-decoration: none; border: 1px solid transparent; transition: background-color .2s, color .2s, border-color .2s; }
.btn-light { background: var(--paper); color: var(--ink); }
.btn-light:hover { background: var(--card); }
.btn-outline { border-color: rgba(236, 232, 225, .55); color: var(--paper); }
.btn-outline:hover { border-color: var(--paper); }

/* ── sections ──────────────────────────────────────────────────────────────── */
.section { padding: clamp(80px, 11vw, 150px) 0; }
.section h2, .section h1 { font-size: clamp(2.1rem, 4.2vw, 3.4rem); max-width: 16ch; }
/* a section's own page (/servicios/...): its heading is the h1 and it starts under the fixed header */
.page-first { padding-top: calc(var(--header) + clamp(56px, 8vw, 110px)); }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 96px); align-items: start; }

.stats-wrap { position: relative; margin-top: clamp(56px, 8vw, 96px); padding-top: 36px; border-top: 1px solid var(--rule); }
.draft-tag { position: absolute; top: -12px; right: 0; padding: 3px 10px; background: var(--paper); border: 1px dashed var(--brick); color: var(--brick); font-size: .625rem; letter-spacing: .16em; text-transform: uppercase; }
/* Columns sized to each figure and spread edge to edge, so a short one (+8) leaves no lopsided gap. */
.stats { display: grid; grid-template-columns: repeat(4, auto); justify-content: space-between; gap: 32px; }
.stats div { display: flex; flex-direction: column-reverse; gap: 10px; }
.stats dd { font: 400 clamp(2.4rem, 4.4vw, 3.6rem)/1 var(--serif); white-space: nowrap; font-variant-numeric: tabular-nums; }
.stats div:first-child dd { color: var(--brick); }
.stats dt { font-size: .625rem; font-weight: 500; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }

/* markets: dark */
.markets { background: var(--dark); color: var(--paper); }
.markets .label { color: var(--on-dark); margin-bottom: 20px; }
.markets .label span, .contact .label span { color: var(--paper); }
.markets .prose { color: var(--on-dark); }
.markets-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: clamp(32px, 5vw, 80px); align-items: center; margin-top: clamp(48px, 7vw, 88px); }
.map { margin: 0; }
.map svg { width: 100%; height: auto; color: var(--paper); }
.map .ctx { fill: none; stroke: currentColor; stroke-opacity: .16; stroke-width: .6; }
.map .secondary { fill: currentColor; fill-opacity: .07; stroke: currentColor; stroke-opacity: .5; stroke-width: .7; }
.map .main { fill: var(--brick-on-dark); fill-opacity: .3; stroke: var(--brick-on-dark); stroke-width: .9; }
.map circle { fill: var(--paper); }
.map text { fill: var(--paper); font: 500 9px var(--sans); }
.map .country { text-anchor: middle; dominant-baseline: middle; letter-spacing: .2em; font-weight: 600; opacity: .85; }
.map .city { font-size: 10px; letter-spacing: .04em; }
.map figcaption { display: flex; flex-wrap: wrap; gap: 8px 28px; margin-top: 18px; font-size: .625rem; letter-spacing: .16em; text-transform: uppercase; color: var(--on-dark); }
.map figcaption span { display: inline-flex; align-items: center; gap: 10px; }
.key { width: 14px; height: 10px; border: 1px solid; }
.key-main { background: rgba(200, 113, 78, .3); border-color: var(--brick-on-dark); }
.key-secondary { background: rgba(236, 232, 225, .07); border-color: rgba(236, 232, 225, .5); }
.sectors li { padding: 22px 24px; border: 1px solid var(--line-dark); }
.sectors li + li { margin-top: 12px; }
.sectors h3 { font-size: 1.5rem; margin-bottom: 10px; }
.sectors p { color: var(--on-dark); font-size: .875rem; }

/* services: numbered cards */
.services { background: var(--panel); }
.service-grid { display: grid; grid-template-columns: repeat(3, 1fr); margin-top: clamp(48px, 7vw, 80px); background: var(--card); border: 1px solid var(--rule); }
.service-grid li { padding: 32px 28px 40px; border-right: 1px solid var(--rule); }
.service-grid li:last-child { border-right: 0; }
.num { display: block; font-size: .6875rem; letter-spacing: .14em; color: var(--muted); margin-bottom: 18px; }
.service-grid h3 { font-size: 1.35rem; margin-bottom: 14px; }
.service-grid p { color: var(--ink-2); font-size: .875rem; }

/* operations: donut + cards */
.mix { display: grid; grid-template-columns: 120px 1fr; gap: 28px; align-items: center; margin: 36px 0 0; }
.mix svg { width: 120px; height: 120px; }
.mix .label { margin-bottom: 10px; }
.mix li { display: flex; align-items: center; gap: 10px; padding: 6px 0; border-bottom: 1px solid var(--rule); font-size: .875rem; }
.mix b { margin-left: auto; font-weight: 500; }
.swatch { width: 8px; height: 8px; flex: none; }

/* featured operations: layout A, two fichas side by side; subgrid lines up their rows */
.featured-title { margin-top: clamp(56px, 8vw, 104px); padding-top: 28px; border-top: 1px solid var(--rule); font-size: clamp(1.6rem, 2.6vw, 2.1rem); }
.ops { display: grid; grid-template-columns: 1fr 1fr; column-gap: clamp(28px, 4vw, 56px); margin-top: clamp(28px, 4vw, 44px); }
.ficha { display: grid; grid-row: span 6; grid-template-rows: subgrid; align-content: start; }
.ficha-media { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 28px; }
.ficha-media img { width: 100%; aspect-ratio: 1; object-fit: cover; background: var(--panel); }
.ficha-media img:only-child { grid-column: 1 / -1; aspect-ratio: 2; }
.ficha-media.drawing { aspect-ratio: 2; }
@media (min-width: 721px) {
  /* side by side: take the height of the other card's photos (the rows are shared via subgrid) */
  .ficha-media.drawing { aspect-ratio: auto; min-height: 200px; }
}
.drawing { display: flex; align-items: center; justify-content: center; background: var(--panel); color: #8d8a84; }
.drawing svg { width: 22%; height: auto; }
.ficha-meta { display: flex; gap: 14px; margin-bottom: 12px; font-size: .6875rem; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.ficha-meta span:first-child { color: var(--brick); }
.ficha h4 { font: 400 clamp(1.8rem, 3vw, 2.5rem)/1.08 var(--serif); letter-spacing: -.01em; margin: 0; }
.summary { margin-top: 16px; color: var(--ink-2); max-width: 52ch; }
.sheet { margin-top: 26px; border-top: 1px solid var(--ink); }
.sheet div { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--rule); }
.sheet dt { font-size: .625rem; font-weight: 500; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.sheet dd { font: 400 1.05rem/1.3 var(--serif); text-align: right; }
.credit { margin-top: 10px; font-size: .625rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }

/* team */
.team { border-top: 1px solid var(--rule); }
.people { display: grid; grid-template-columns: repeat(2, 1fr); gap: clamp(24px, 4vw, 64px); }
.people li { display: grid; grid-template-columns: 200px 1fr; gap: 28px; align-items: end; }
.people img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; filter: grayscale(1); background: var(--panel); }
.people h3 { font-size: 1.75rem; margin-bottom: 10px; }

/* contact: dark */
.contact { background: var(--dark); color: var(--paper); }
.contact .label { color: var(--on-dark); margin-bottom: 28px; }
.contact h2, .contact h1 { margin-bottom: 24px; }
.contact .prose { color: var(--on-dark); margin-bottom: 32px; }
.contact-list div { padding: 18px 0; border-bottom: 1px solid var(--line-dark); }
.contact-list dt { font-size: .625rem; font-weight: 500; letter-spacing: .18em; text-transform: uppercase; color: var(--on-dark); margin-bottom: 6px; }
.contact-list a { text-decoration: none; }
.contact-list a:hover { text-decoration: underline; text-underline-offset: 4px; }

.site-footer { background: var(--dark); color: var(--on-dark); padding: 28px 0 96px; border-top: 1px solid var(--line-dark); font-size: .75rem; --logo-accent: var(--brick-on-dark); --logo-knockout: var(--dark); }
.footer-inner { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 32px; }
.footer-inner .brand { color: var(--paper); }
.footer-nav { flex-basis: 100%; padding-bottom: 24px; margin-bottom: 8px; border-bottom: 1px solid var(--line-dark); }
.footer-nav ul { display: flex; flex-wrap: wrap; gap: 10px 28px; font-size: .8125rem; }
.footer-nav a { text-decoration: none; color: var(--paper); opacity: .8; }
.footer-nav a:hover, .footer-nav a[aria-current] { opacity: 1; }
/* section labels on the home link to the section's own page */
.label a { text-decoration: none; }
.label a:hover { text-decoration: underline; text-underline-offset: 4px; }
.copy { margin-right: auto; }
.legal { display: flex; gap: 18px; }
.legal a { text-decoration: none; }
.legal a:hover { color: var(--paper); }


/* legal page */
.legal-page .wrap > * { max-width: 760px; }
.legal-page h1 { margin-bottom: clamp(32px, 5vw, 56px); }
.legal-page h2 { font-size: clamp(1.5rem, 2.4vw, 1.9rem); margin: 48px 0 16px; padding-top: 24px; border-top: 1px solid var(--rule); scroll-margin-top: calc(var(--header) + 16px); }
.legal-page p { color: var(--ink-2); margin-top: 1em; }
.legal-page a { text-underline-offset: 3px; }
.legal-rows div { display: grid; grid-template-columns: 11rem 1fr; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--rule); }
.legal-rows dt { font-size: .625rem; font-weight: 500; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); padding-top: .3em; }
.legal-rows dd { color: var(--ink-2); }
@media (max-width: 720px) { .legal-rows div { grid-template-columns: 1fr; gap: 4px; } }

/* ── reveal ────────────────────────────────────────────────────────────────── */
.js .reveal { opacity: 0; transform: translateY(14px); transition: opacity .7s ease, transform .7s ease; }
.js .reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
}

/* ── responsive ────────────────────────────────────────────────────────────── */
@media (min-width: 721px) {
  /* the text sits on the left over a busy video: darken that side */
  .hero-scrim { background: linear-gradient(to right, rgba(23, 35, 49, .5), rgba(23, 35, 49, 0) 65%), linear-gradient(to top, rgba(23, 35, 49, .85), rgba(23, 35, 49, .4) 55%, rgba(23, 35, 49, .55)); }
}
/* language hint (site.js), bottom right */
.lang-hint { position: fixed; right: 16px; bottom: 16px; z-index: 30; display: flex; align-items: center; gap: 14px; max-width: calc(100vw - 32px); padding: 6px 6px 6px 16px; background: var(--paper); color: var(--ink); border: 1px solid var(--rule); box-shadow: 0 6px 24px rgba(23, 35, 49, .18); font-size: .8125rem; }
.lang-hint[hidden] { display: none; }
.lang-hint a { font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.lang-hint button { width: 32px; height: 32px; border: 0; background: transparent; color: var(--muted); font: 400 1.25rem/1 var(--sans); cursor: pointer; }
.lang-hint button:hover { color: var(--ink); }

@media (max-width: 980px) {
  .service-grid { grid-template-columns: 1fr; }
  .service-grid li { border-right: 0; border-bottom: 1px solid var(--rule); }
  .service-grid li:last-child { border-bottom: 0; }
  .service-grid p { max-width: 64ch; }
  .stats { grid-template-columns: 1fr 1fr; }
  .markets-grid { grid-template-columns: 1fr; }
  .people li { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .split, .people, .ops { grid-template-columns: 1fr; }
  .ficha + .ficha { margin-top: 56px; }
  .stats { grid-template-columns: 1fr; gap: 0; }
  .stats div { flex-direction: row-reverse; justify-content: flex-end; align-items: baseline; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--rule); }
  .stats dd { font-size: 2rem; min-width: 4.4em; }
  .people { gap: 40px; }
  .people li { grid-template-columns: 140px 1fr; }
  .mix { grid-template-columns: 96px 1fr; }
  .mix svg { width: 96px; height: 96px; }
  .map text { font-size: 13px; }
  .map .city { font-size: 14px; }
}
