/* ============================================================
   KEYSTONE BUYER'S AGENT — Design System
   Independent Buyer Representation in Portugal
   ------------------------------------------------------------
   Palette: deep charcoal / champagne gold / ivory / stone
   Type:    Cormorant Garamond (display serif) + Manrope (sans)
   ============================================================ */

:root {
  --background: #0B0B0A;
  --surface: #12110F;
  --surface-soft: #1A1815;
  --text-primary: #F4EFE7;
  --text-secondary: #B9B0A3;
  --gold: #C8A96A;
  --gold-soft: #E1C98E;
  --stone: #8C867A;
  --line: rgba(200, 169, 106, 0.24);
  --line-faint: rgba(200, 169, 106, 0.12);

  --serif: "Cormorant Garamond", "Times New Roman", Georgia, serif;
  --sans: "Manrope", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;

  --ease: cubic-bezier(0.22, 0.61, 0.2, 1);
  --container: min(1240px, 90vw);
  --section-pad: clamp(6rem, 11vw, 11rem);
  --nav-h: 84px;
}

/* ---------- Reset / base ---------- */

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

html { scroll-behavior: smooth; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }

body {
  background: var(--background);
  color: var(--text-primary);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.7;
  font-weight: 300;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

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

::selection { background: rgba(200, 169, 106, 0.28); color: var(--text-primary); }

:focus-visible {
  outline: 1px solid var(--gold);
  outline-offset: 3px;
  border-radius: 2px;
}

/* Host-platform attribution pill (injected before </body> on deploys) —
   standalone websites carry the user's brand only. */
#hf-watermark {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

.skip-link {
  position: fixed; top: -100px; left: 16px; z-index: 200;
  background: var(--surface-soft); color: var(--text-primary);
  padding: 0.6rem 1.2rem; font-size: 0.8rem; letter-spacing: 0.08em;
  border: 1px solid var(--line); transition: top 0.25s var(--ease);
}
.skip-link:focus { top: 16px; }

.sr-only {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

/* ---------- Typography ---------- */

h1, h2, h3, .serif {
  font-family: var(--serif);
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: 0.005em;
}

.display-1 {
  font-size: clamp(2.75rem, 6.4vw, 5.9rem);
  line-height: 1.04;
}

.display-2 {
  font-size: clamp(2.1rem, 4.2vw, 3.7rem);
  line-height: 1.1;
}

.display-3 {
  font-size: clamp(1.55rem, 2.6vw, 2.2rem);
  line-height: 1.2;
}

em, .accent-i {
  font-style: italic;
  font-weight: 400;
  color: var(--gold-soft);
}

.lede {
  font-size: clamp(1.02rem, 1.35vw, 1.2rem);
  color: var(--text-secondary);
  line-height: 1.8;
  font-weight: 300;
}

.small { font-size: 0.85rem; color: var(--text-secondary); }

/* Eyebrow label — tracked uppercase micro-type */
.label {
  display: inline-flex;
  align-items: center;
  gap: 0.9rem;
  font-family: var(--sans);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--gold);
}
.label::before {
  content: "";
  width: 2.4rem; height: 1px;
  background: var(--gold);
  opacity: 0.7;
  transform-origin: left center;
}

/* ---------- Atmosphere: grain + vignette ---------- */

.grain, .vignette {
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 90;
}
.grain {
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%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.6'/%3E%3C/svg%3E");
  background-size: 160px 160px;
}
.vignette {
  background: radial-gradient(ellipse 120% 90% at 50% 45%, transparent 55%, rgba(5, 5, 4, 0.5) 100%);
  opacity: 0.8;
}

/* ---------- Buttons ---------- */

.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 1.02rem 2.1rem;
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  transition: color 0.45s var(--ease), border-color 0.45s var(--ease), background-color 0.45s var(--ease);
  white-space: nowrap;
}

.btn--gold {
  background: var(--gold);
  color: #171307;
  border: 1px solid var(--gold);
}
.btn--gold:hover { background: var(--gold-soft); border-color: var(--gold-soft); }

.btn--ghost {
  border: 1px solid var(--line);
  color: var(--text-primary);
  background: rgba(11, 11, 10, 0.25);
  backdrop-filter: blur(6px);
}
.btn--ghost:hover { border-color: var(--gold); color: var(--gold-soft); }

.btn .arr { transition: transform 0.45s var(--ease); }
.btn:hover .arr { transform: translateX(4px); }

/* ---------- Navbar ---------- */

.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 120;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  transition: background-color 0.5s var(--ease), border-color 0.5s var(--ease), height 0.5s var(--ease);
  border-bottom: 1px solid transparent;
}
.nav.is-scrolled {
  height: 68px;
  background: rgba(11, 11, 10, 0.78);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
  border-bottom-color: var(--line-faint);
}

.nav__inner {
  width: var(--container);
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.85rem;
  flex-shrink: 0;
}
.brand__mark { width: 46px; height: auto; }
.brand__text { display: flex; flex-direction: column; line-height: 1; gap: 0.3rem; }
.brand__name {
  font-family: var(--serif);
  font-size: 1.18rem;
  font-weight: 600;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--text-primary);
}
.brand__sub {
  font-size: 0.52rem;
  font-weight: 500;
  letter-spacing: 0.46em;
  text-transform: uppercase;
  color: var(--gold);
}

.nav__links {
  display: flex;
  align-items: center;
  gap: clamp(0.9rem, 1.5vw, 1.8rem);
}
.nav__links a:not(.btn) {
  white-space: nowrap;
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-secondary);
  padding: 0.4rem 0;
  position: relative;
  transition: color 0.35s var(--ease);
}
.nav__links a:not(.btn)::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 100%; height: 1px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.45s var(--ease);
}
.nav__links a:not(.btn):hover { color: var(--text-primary); }
.nav__links a:not(.btn):hover::after { transform: scaleX(1); }
.nav__links .btn { padding: 0.72rem 1.5rem; }

/* Language switcher */
.lang { display: inline-flex; align-items: center; }
.lang__opt {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  color: var(--stone);
  padding: 0.4rem 0;
  transition: color 0.35s var(--ease);
}
.lang__opt + .lang__opt {
  margin-left: 0.85rem;
  padding-left: 0.85rem;
  border-left: 1px solid var(--line-faint);
}
.lang__opt:hover { color: var(--text-primary); }
.lang__opt.is-active { color: var(--gold); }

.menu__langs { margin-top: 1.8rem; }
.menu .menu__langs a {
  font-family: var(--sans);
  font-size: 0.85rem;
  border-bottom: 0;
  padding: 0.5rem 0;
  display: inline-flex;
}

.nav__toggle {
  display: none;
  flex-direction: column;
  gap: 6px;
  padding: 10px 4px;
}
.nav__toggle i {
  width: 26px; height: 1px;
  background: var(--text-primary);
  transition: transform 0.4s var(--ease), opacity 0.4s var(--ease);
}
.nav__toggle.is-open i:nth-child(1) { transform: translateY(3.5px) rotate(45deg); }
.nav__toggle.is-open i:nth-child(2) { transform: translateY(-3.5px) rotate(-45deg); }

/* Mobile menu overlay */
.menu {
  position: fixed; inset: 0;
  z-index: 110;
  background: rgba(11, 11, 10, 0.96);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0 8vw;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.5s var(--ease), visibility 0.5s;
}
.menu.is-open { opacity: 1; visibility: visible; }
.menu a {
  display: flex;
  align-items: baseline;
  gap: 1.2rem;
  padding: 0.9rem 0;
  border-bottom: 1px solid var(--line-faint);
  font-family: var(--serif);
  font-size: clamp(1.7rem, 6vw, 2.4rem);
  color: var(--text-primary);
}
.menu a .idx {
  font-family: var(--sans);
  font-size: 0.65rem;
  letter-spacing: 0.3em;
  color: var(--gold);
}
.menu .btn {
  margin-top: 2.4rem;
  align-self: stretch;
  white-space: normal;
  text-align: center;
  letter-spacing: 0.18em;
  padding: 1.05rem 1.2rem;
}
.menu a.btn--gold { color: #171307; font-family: var(--sans); font-size: 0.72rem; }

/* ---------- Hero ---------- */

.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  overflow: hidden;
}
.hero__bg {
  position: absolute; inset: -4% 0;
  z-index: -2;
}
.hero__bg img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: 62% 40%;
}
.hero__veil {
  position: absolute; inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(11, 11, 10, 0.88) 0%, rgba(11, 11, 10, 0.55) 42%, rgba(11, 11, 10, 0.12) 75%),
    linear-gradient(0deg, rgba(11, 11, 10, 0.96) 0%, rgba(11, 11, 10, 0.25) 30%, rgba(11, 11, 10, 0.4) 100%);
}

.hero__inner {
  width: var(--container);
  margin-inline: auto;
  padding-top: calc(var(--nav-h) + 4rem);
  padding-bottom: clamp(2.5rem, 5vh, 4.5rem);
}

.hero__content { max-width: 56rem; }

.hero__title { margin: 1.6rem 0 1.8rem; }

.hero__sub {
  max-width: 40rem;
  margin-bottom: 1.9rem;
}

.hero__oath {
  display: inline-flex;
  align-items: center;
  gap: 1rem;
  padding: 0.85rem 1.4rem;
  border: 1px solid var(--line);
  border-left: 2px solid var(--gold);
  background: rgba(18, 17, 15, 0.5);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  font-family: var(--serif);
  font-size: clamp(1.05rem, 1.6vw, 1.3rem);
  font-style: italic;
  color: var(--gold-soft);
  margin-bottom: 2.6rem;
}

.hero__ctas { display: flex; flex-wrap: wrap; gap: 1rem; margin-bottom: clamp(3rem, 7vh, 5.5rem); }

/* Trust strip */
.trust {
  border-top: 1px solid var(--line-faint);
  padding-top: 1.7rem;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 1.4rem 2rem;
}
.trust li {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  font-size: 0.67rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-secondary);
  line-height: 1.55;
}
.trust li b {
  font-family: var(--serif);
  font-size: 0.95rem;
  font-weight: 500;
  font-style: italic;
  letter-spacing: 0.04em;
  text-transform: none;
  color: var(--gold);
}

/* Scroll cue */
.scroll-cue {
  position: absolute;
  right: clamp(1.4rem, 4vw, 3.4rem);
  bottom: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.9rem;
  z-index: 5;
}
.scroll-cue span {
  writing-mode: vertical-rl;
  font-size: 0.6rem;
  letter-spacing: 0.42em;
  text-transform: uppercase;
  color: var(--stone);
}
.scroll-cue::after {
  content: "";
  width: 1px; height: 72px;
  background: linear-gradient(var(--gold), transparent);
  animation: cueDrop 2.6s var(--ease) infinite;
}
@keyframes cueDrop {
  0% { transform: scaleY(0); transform-origin: top; }
  45% { transform: scaleY(1); transform-origin: top; }
  55% { transform: scaleY(1); transform-origin: bottom; }
  100% { transform: scaleY(0); transform-origin: bottom; }
}

/* ---------- The Journey (scroll-scrubbed film) ---------- */

.journey { position: relative; }
.journey__track { height: 560vh; }

.journey__stage {
  position: sticky;
  top: 0;
  height: 100vh; height: 100svh;
  overflow: hidden;
}

.journey__canvas {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
}

.journey__veil {
  position: absolute; inset: 0;
  background:
    linear-gradient(0deg, rgba(11, 11, 10, 0.82) 0%, transparent 34%),
    linear-gradient(180deg, rgba(11, 11, 10, 0.55) 0%, transparent 22%),
    linear-gradient(90deg, rgba(11, 11, 10, 0.42) 0%, transparent 38%);
  pointer-events: none;
}

/* HUD — progress indicator */
.hud {
  position: absolute;
  left: clamp(1.4rem, 4vw, 3.6rem);
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  z-index: 6;
}
.hud__item {
  display: grid;
  grid-template-columns: 2.2rem auto;
  align-items: baseline;
  gap: 0 0.9rem;
  opacity: 0.42;
  transition: opacity 0.5s var(--ease);
}
.hud__item.is-active { opacity: 1; }
.hud__num {
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  color: var(--stone);
  transition: color 0.5s var(--ease);
}
.hud__item.is-active .hud__num { color: var(--gold); }
.hud__name {
  font-size: 0.66rem;
  font-weight: 500;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--text-secondary);
  transition: color 0.5s var(--ease);
}
.hud__item.is-active .hud__name { color: var(--text-primary); }
.hud__bar {
  grid-column: 1 / -1;
  margin-top: 0.55rem;
  width: 100%; height: 1px;
  background: var(--line-faint);
  position: relative;
  overflow: hidden;
}
.hud__bar i {
  position: absolute; inset: 0;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: left center;
}

/* Scene copy overlays */
.scenes-copy {
  position: absolute;
  left: 0; right: 0;
  bottom: clamp(3rem, 9vh, 6.5rem);
  z-index: 5;
  pointer-events: none;
}
.scene-copy {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: var(--container);
  opacity: 0;
  visibility: hidden;
}
.scene-copy__inner { max-width: 44rem; margin-left: clamp(0rem, 8vw, 7rem); }
.scene-copy .label { margin-bottom: 1.1rem; }
.scene-copy .scene-title, .j-chapter .scene-title {
  font-family: var(--serif);
  font-weight: 500;
  line-height: 1.08;
  color: var(--text-primary); /* was a heading: keep the ivory, not the paragraph grey */
}
.scene-copy .scene-title {
  font-size: clamp(1.9rem, 3.6vw, 3.3rem);
  margin-bottom: 0.9rem;
}
.scene-copy p {
  color: var(--text-secondary);
  max-width: 34rem;
  font-size: clamp(0.95rem, 1.15vw, 1.05rem);
}

/* Journey mode switch: chapters by default (no-JS / mobile / reduced motion);
   JS promotes to canvas scrub on capable viewports via .scrub-on */
.journey__track { display: none; }
.journey.scrub-on .journey__track { display: block; }
.journey.scrub-on .journey__chapters { display: none; }
.j-chapter {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  border-bottom: 1px solid var(--line-faint);
}
.j-chapter__bg { position: absolute; inset: 0; z-index: -2; }
.j-chapter__bg img { width: 100%; height: 100%; object-fit: cover; }
.j-chapter__veil {
  position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(0deg, rgba(11, 11, 10, 0.92) 0%, rgba(11, 11, 10, 0.18) 55%, rgba(11, 11, 10, 0.45) 100%);
}
.j-chapter__inner {
  width: var(--container);
  margin-inline: auto;
  padding: 6rem 0 4.5rem;
}
.j-chapter .label { margin-bottom: 1rem; }
.j-chapter .scene-title { font-size: clamp(1.9rem, 7.4vw, 2.6rem); margin-bottom: 0.8rem; }
.j-chapter p { color: var(--text-secondary); max-width: 32rem; }

/* ---------- Sections (shared) ---------- */

.section {
  position: relative;
  padding: var(--section-pad) 0;
}
.section--surface { background: var(--surface); }
.wrap { width: var(--container); margin-inline: auto; }

.sec-head { max-width: 52rem; margin-bottom: clamp(3rem, 6vw, 5rem); }
.sec-head .label { margin-bottom: 1.5rem; }
.sec-head h2 { margin-bottom: 1.4rem; }
.sec-head .lede { max-width: 44rem; }

/* Large serif statement */
.statement {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: clamp(2.4rem, 5vw, 4rem) 0;
  margin: clamp(3rem, 6vw, 5rem) 0;
  text-align: center;
}
.statement p {
  font-family: var(--serif);
  font-size: clamp(1.5rem, 3vw, 2.5rem);
  line-height: 1.35;
  color: var(--text-secondary);
}
.statement p strong {
  display: block;
  font-weight: 500;
  color: var(--text-primary);
}
.statement p strong .accent-i { color: var(--gold-soft); }

/* ---------- Pillar cards (Why Keystone) ---------- */

.pillars {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line-faint);
  border: 1px solid var(--line-faint);
}
.pillar {
  background: var(--surface);
  padding: clamp(2rem, 3.4vw, 3.2rem);
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  min-height: 300px;
  transition: background-color 0.6s var(--ease);
}
.pillar:hover { background: var(--surface-soft); }
.pillar__num {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1rem;
  color: var(--gold);
}
.pillar h3 { font-size: clamp(1.6rem, 2.2vw, 2.1rem); margin-top: auto; }
.pillar p { color: var(--text-secondary); font-size: 0.95rem; }

/* ---------- Services — editorial index rows ---------- */

.svc-list { border-top: 1px solid var(--line); }
.svc-row {
  display: grid;
  grid-template-columns: 5.5rem 1fr 1.6fr;
  gap: 1.5rem 2.5rem;
  padding: clamp(1.7rem, 2.6vw, 2.4rem) 0;
  border-bottom: 1px solid var(--line-faint);
  align-items: baseline;
  transition: background-color 0.5s var(--ease);
}
.svc-row:hover { background: rgba(26, 24, 21, 0.5); }
.svc-row__num {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.24em;
  color: var(--gold);
}
.svc-row h2, .svc-row h3 { font-size: clamp(1.3rem, 1.8vw, 1.7rem); }
.svc-row p { color: var(--text-secondary); font-size: 0.95rem; max-width: 44rem; }

/* ---------- Process — sticky rail + steps ---------- */

.process { display: grid; grid-template-columns: 1fr 1.35fr; gap: clamp(2.5rem, 6vw, 7rem); }
.process__rail { position: relative; }
.process__rail-inner { position: sticky; top: calc(var(--nav-h) + 3rem); }
.process__rail .label { margin-bottom: 1.5rem; }
.process__rail h2 { margin-bottom: 1.6rem; }
.process__fixed {
  margin-top: 2.4rem;
  padding: 1.5rem 1.7rem;
  border: 1px solid var(--line);
  border-left: 2px solid var(--gold);
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1.1rem, 1.5vw, 1.3rem);
  color: var(--gold-soft);
  max-width: 26rem;
}

.steps { position: relative; padding-left: 2.6rem; }
.steps::before {
  content: "";
  position: absolute;
  left: 0.4rem; top: 0.6rem; bottom: 0.6rem;
  width: 1px;
  background: var(--line-faint);
}
.steps__line {
  position: absolute;
  left: 0.4rem; top: 0.6rem;
  width: 1px; height: calc(100% - 1.2rem);
  background: var(--gold);
  transform: scaleY(0);
  transform-origin: top center;
}
.step { position: relative; padding: 0 0 clamp(2.6rem, 4.5vw, 4rem); }
.step:last-child { padding-bottom: 0; }
.step::before {
  content: "";
  position: absolute;
  left: -2.6rem; top: 0.55rem;
  width: 9px; height: 9px;
  transform: translateX(0.4rem) translateX(-50%) rotate(45deg);
  background: var(--background);
  border: 1px solid var(--gold);
}
.step__num {
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.7rem;
  display: block;
}
.step h3 { font-size: clamp(1.5rem, 2vw, 1.9rem); margin-bottom: 0.7rem; }
.step p { color: var(--text-secondary); max-width: 32rem; font-size: 0.97rem; }

/* ---------- About ---------- */

.about-grid {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: clamp(2.5rem, 6vw, 7rem);
  align-items: start;
}
.about-grid .sec-head { margin-bottom: 0; }
.about-copy p + p { margin-top: 1.3rem; }

.keypoints { border-top: 1px solid var(--line); }
.keypoints li {
  display: flex;
  align-items: baseline;
  gap: 1.1rem;
  padding: 1.05rem 0.2rem;
  border-bottom: 1px solid var(--line-faint);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-secondary);
}
.keypoints li::before {
  content: "";
  width: 7px; height: 7px;
  transform: rotate(45deg);
  border: 1px solid var(--gold);
  flex-shrink: 0;
  position: relative;
  top: -1px;
}

/* ---------- Team ---------- */

.team-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1.4rem, 2.5vw, 2.5rem);
}
.team-card {
  border: 1px solid var(--line-faint);
  background: var(--surface);
  transition: border-color 0.6s var(--ease);
}
.team-card:hover { border-color: var(--line); }
.team-card__portrait {
  aspect-ratio: 4 / 4.6;
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(120% 100% at 50% 0%, rgba(200, 169, 106, 0.12) 0%, transparent 55%),
    linear-gradient(170deg, var(--surface-soft) 0%, #14120f 60%, #0e0d0b 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}
.team-card__portrait svg.mark-bg {
  position: absolute;
  bottom: -14%;
  right: -10%;
  width: 64%;
  opacity: 0.1;
}
.team-card__initials {
  font-family: var(--serif);
  font-size: clamp(3.2rem, 5vw, 4.6rem);
  font-weight: 500;
  letter-spacing: 0.08em;
  color: var(--gold);
  opacity: 0.85;
}
.team-card__portrait .ph-note {
  position: absolute;
  bottom: 1rem; left: 0; right: 0;
  text-align: center;
  font-size: 0.56rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--stone);
  opacity: 0.7;
}
.team-card__body { padding: 1.7rem 1.8rem 2rem; }
.team-card__body h2, .team-card__body h3 { font-size: 1.55rem; margin-bottom: 0.35rem; }
.team-card__role {
  font-size: 0.64rem;
  font-weight: 600;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--gold);
  display: block;
  margin-bottom: 1.05rem;
}
.team-card__body p { font-size: 0.92rem; color: var(--text-secondary); }

.team-statement {
  margin-top: clamp(3rem, 6vw, 5rem);
  text-align: center;
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1.25rem, 2.2vw, 1.8rem);
  color: var(--text-secondary);
}
.team-statement .accent-i { color: var(--gold-soft); }

/* ---------- Who we help ---------- */

.who-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 1px;
  background: var(--line-faint);
  border: 1px solid var(--line-faint);
}
.who-card {
  grid-column: span 2;
  background: var(--background);
  padding: clamp(1.8rem, 2.8vw, 2.6rem);
  min-height: 240px;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  transition: background-color 0.6s var(--ease);
}
.who-card:hover { background: var(--surface); }
.who-card:nth-child(4) { grid-column: 1 / span 3; }
.who-card:nth-child(5) { grid-column: 4 / span 3; }
.who-card__num {
  font-family: var(--serif);
  font-style: italic;
  color: var(--gold);
  font-size: 0.95rem;
}
.who-card h3 { font-size: clamp(1.35rem, 1.9vw, 1.7rem); margin-top: auto; }
.who-card p { color: var(--text-secondary); font-size: 0.92rem; max-width: 30rem; }

/* ---------- Algarve expertise band ---------- */

.algarve {
  position: relative;
  padding: var(--section-pad) 0;
  overflow: hidden;
}
.algarve__bg { position: absolute; inset: -8% 0; z-index: -2; }
.algarve__bg img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 62%; }
.algarve__veil {
  position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(90deg, rgba(11, 11, 10, 0.93) 0%, rgba(11, 11, 10, 0.72) 55%, rgba(11, 11, 10, 0.45) 100%),
    linear-gradient(0deg, rgba(11, 11, 10, 1) 0%, transparent 18%, transparent 82%, rgba(11, 11, 10, 1) 100%);
}
.algarve .sec-head { margin-bottom: clamp(2.5rem, 5vw, 4rem); }

.truths {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
  max-width: 58rem;
}
.truths li {
  border-bottom: 1px solid var(--line);
  border-right: 1px solid var(--line);
  padding: clamp(1.6rem, 2.6vw, 2.4rem);
  font-family: var(--serif);
  font-size: clamp(1.15rem, 1.8vw, 1.5rem);
  line-height: 1.4;
  color: var(--text-primary);
  background: rgba(11, 11, 10, 0.35);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}
.truths li span { color: var(--gold-soft); font-style: italic; }

/* ---------- FAQ ---------- */

.faq-list { border-top: 1px solid var(--line); max-width: 56rem; }
.faq-item { border-bottom: 1px solid var(--line-faint); }
.faq-item__q {
  width: 100%;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 2rem;
  text-align: left;
  padding: 1.55rem 0.2rem;
  transition: color 0.4s var(--ease);
}
.faq-item__q:hover { color: var(--gold-soft); }
.faq-item__q h2, .faq-item__q h3 {
  font-size: clamp(1.2rem, 1.7vw, 1.5rem);
  font-weight: 500;
}
.faq-item__icon {
  position: relative;
  width: 13px; height: 13px;
  flex-shrink: 0;
  align-self: center;
}
.faq-item__icon::before, .faq-item__icon::after {
  content: "";
  position: absolute;
  background: var(--gold);
  transition: transform 0.5s var(--ease);
}
.faq-item__icon::before { left: 0; top: 6px; width: 13px; height: 1px; }
.faq-item__icon::after { left: 6px; top: 0; width: 1px; height: 13px; }
.faq-item.is-open .faq-item__icon::after { transform: scaleY(0); }
.faq-item__a {
  overflow: hidden;
  height: 0;
}
.faq-item__a p {
  padding: 0 0.2rem 1.7rem;
  color: var(--text-secondary);
  max-width: 46rem;
  font-size: 0.97rem;
}

/* ---------- Final CTA ---------- */

.cta-band {
  position: relative;
  padding: clamp(8rem, 16vw, 14rem) 0;
  overflow: hidden;
  text-align: center;
}
.cta-band__bg { position: absolute; inset: -8% 0; z-index: -2; }
.cta-band__bg img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 55%; }
.cta-band__veil {
  position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(90% 90% at 50% 60%, rgba(11, 11, 10, 0.42) 0%, rgba(11, 11, 10, 0.9) 100%),
    linear-gradient(0deg, rgba(11, 11, 10, 1) 0%, transparent 22%, transparent 80%, rgba(11, 11, 10, 1) 100%);
}
.cta-band__inner { max-width: 52rem; margin-inline: auto; }
.cta-band .label { justify-content: center; margin-bottom: 1.6rem; }
.cta-band .label::before { display: none; }
.cta-band h2 { margin-bottom: 1.5rem; }
.cta-band .lede { margin-bottom: 2.6rem; max-width: 40rem; margin-inline: auto; }
.cta-band__ctas { display: flex; justify-content: center; flex-wrap: wrap; gap: 1rem; }

/* ---------- Footer ---------- */

.footer {
  border-top: 1px solid var(--line-faint);
  background: var(--background);
  padding: clamp(3.5rem, 6vw, 5.5rem) 0 2.4rem;
}
.footer__top {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr;
  gap: 3rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid var(--line-faint);
}
.footer__brand .brand { margin-bottom: 1.2rem; }
.footer__brand p {
  font-size: 0.8rem;
  color: var(--text-secondary);
  max-width: 24rem;
  letter-spacing: 0.06em;
}
.footer__brand .footer__brandof {
  margin-top: 0.5rem;
  font-size: 0.7rem;
  color: var(--stone);
  letter-spacing: 0.1em;
}
.footer__h {
  font-size: 0.64rem;
  font-weight: 600;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1.2rem;
}
.footer__nav li { margin-bottom: 0.55rem; }
.footer__nav a {
  font-size: 0.85rem;
  color: var(--text-secondary);
  transition: color 0.35s var(--ease);
}
.footer__nav a:hover { color: var(--gold-soft); }
.footer__contact p { font-size: 0.85rem; color: var(--text-secondary); margin-bottom: 0.55rem; }

.footer__bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 2.2rem;
}
.footer__legal {
  font-size: 0.72rem;
  color: var(--stone);
  max-width: 46rem;
  line-height: 1.65;
}
.footer__copy { font-size: 0.72rem; color: var(--stone); letter-spacing: 0.08em; }

/* ---------- Page hero (internal pages) ---------- */

.page-hero {
  position: relative;
  display: flex;
  align-items: flex-end;
  min-height: min(74svh, 720px);
  padding-top: calc(var(--nav-h) + 4rem);
  padding-bottom: clamp(3rem, 7vw, 6rem);
  overflow: hidden;
}
.page-hero--short { min-height: min(58svh, 560px); }
.page-hero__bg { position: absolute; inset: -4% 0; z-index: -2; }
.page-hero__bg img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 45%; }
.page-hero__veil {
  position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(90deg, rgba(11, 11, 10, 0.92) 0%, rgba(11, 11, 10, 0.6) 48%, rgba(11, 11, 10, 0.2) 100%),
    linear-gradient(0deg, rgba(11, 11, 10, 0.98) 0%, rgba(11, 11, 10, 0.3) 45%, rgba(11, 11, 10, 0.55) 100%);
}
.page-hero__inner { position: relative; }
.page-hero .label { margin-bottom: 1.5rem; }
.page-hero h1 { max-width: 20ch; margin-bottom: 1.6rem; }
.page-hero .lede { max-width: 46rem; }

/* ---------- Section CTA row ---------- */

.sec-cta { margin-top: clamp(2.5rem, 4vw, 3.5rem); }

/* ---------- Services index (homepage summary) ---------- */

.svc-index {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--line-faint);
  border: 1px solid var(--line-faint);
}
.svc-index__item {
  display: flex;
  align-items: baseline;
  gap: 1.2rem;
  padding: clamp(1.15rem, 1.8vw, 1.6rem) clamp(1.2rem, 2vw, 1.9rem);
  background: var(--surface);
  transition: background-color 0.5s var(--ease), color 0.5s var(--ease);
}
.svc-index__item:hover { background: var(--surface-soft); }
.svc-index__num {
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  color: var(--gold);
  flex-shrink: 0;
}
.svc-index__item h3 {
  font-size: clamp(1.12rem, 1.4vw, 1.35rem);
  font-weight: 500;
  line-height: 1.25;
}

/* ---------- Active nav state ---------- */

.nav__links a[aria-current="page"] { color: var(--text-primary); }
.nav__links a[aria-current="page"]::after { transform: scaleX(1); opacity: 0.5; }
.menu a[aria-current="page"] { color: var(--gold-soft); }

/* ---------- Contact page ---------- */

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

.form__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(1.2rem, 2vw, 1.8rem);
}
.field { display: flex; flex-direction: column; gap: 0.6rem; }
.field--full { grid-column: 1 / -1; }
.field label {
  font-size: 0.64rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text-secondary);
}
.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 0.95rem 1rem;
  font-family: var(--sans);
  font-size: 0.95rem;
  font-weight: 300;
  color: var(--text-primary);
  background: var(--surface);
  border: 1px solid var(--line-faint);
  border-radius: 0;
  transition: border-color 0.4s var(--ease), background-color 0.4s var(--ease);
  -webkit-appearance: none;
  appearance: none;
}
.field textarea { resize: vertical; min-height: 8rem; line-height: 1.7; }
.field select {
  background-image: linear-gradient(45deg, transparent 50%, var(--gold) 50%),
                    linear-gradient(135deg, var(--gold) 50%, transparent 50%);
  background-position: calc(100% - 1.15rem) calc(50% + 2px), calc(100% - 0.85rem) calc(50% + 2px);
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  padding-right: 2.6rem;
}
.field select option { background: var(--surface); color: var(--text-primary); }
.field input::placeholder,
.field textarea::placeholder { color: var(--stone); opacity: 0.65; }
.field input:hover,
.field select:hover,
.field textarea:hover { border-color: rgba(200, 169, 106, 0.24); }
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--gold);
  background: var(--surface-soft);
}
.field input[aria-invalid="true"],
.field textarea[aria-invalid="true"] { border-color: #8d5b4c; }

.form__note {
  margin-top: 1.8rem;
  font-size: 0.78rem;
  line-height: 1.7;
  color: var(--stone);
  max-width: 42rem;
}
.form__actions {
  margin-top: 1.8rem;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.2rem;
}
.form__status { font-size: 0.8rem; color: var(--gold-soft); }
.form__status[data-state="error"] { color: #d09a86; }

.form__success {
  border: 1px solid var(--line);
  border-left: 2px solid var(--gold);
  background: var(--surface);
  padding: clamp(2rem, 4vw, 3.2rem);
}
.form__success .label { margin-bottom: 1.2rem; }
.form__success-title { margin-bottom: 1rem; }

.contact-aside { position: sticky; top: calc(var(--nav-h) + 2.5rem); }
.contact-card {
  border: 1px solid var(--line-faint);
  background: var(--surface);
  padding: clamp(1.8rem, 2.8vw, 2.4rem);
}
.contact-card .label { margin-bottom: 1.1rem; }
.contact-card h2 { font-size: clamp(1.4rem, 1.9vw, 1.75rem); margin-bottom: 0.9rem; }
.contact-card p { font-size: 0.92rem; color: var(--text-secondary); }

.contact-points { margin-top: 2rem; border-top: 1px solid var(--line-faint); }
.contact-points li {
  display: flex;
  align-items: baseline;
  gap: 0.9rem;
  padding: 0.85rem 0.2rem;
  border-bottom: 1px solid var(--line-faint);
  font-size: 0.74rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-secondary);
}
.contact-points li::before {
  content: "";
  width: 6px; height: 6px;
  transform: rotate(45deg);
  border: 1px solid var(--gold);
  flex-shrink: 0;
}
.contact-legal {
  margin-top: 2rem;
  font-size: 0.72rem;
  line-height: 1.65;
  color: var(--stone);
}

/* Honeypot — off-screen, never shown to a human */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- Reveal primitives (JS adds .is-inview) ---------- */

html.js .reveal { opacity: 0; transform: translateY(26px); }
html.js .reveal-line { transform: scaleX(0); transform-origin: left center; }

html.js.no-motion .reveal { opacity: 1; transform: none; }
html.js.no-motion .reveal-line { transform: none; }

/* ---------- Responsive ---------- */

/* With four languages the full link row only fits on wide desktops;
   below 1280px the page links collapse into the burger menu while the
   language switcher and CTA stay visible. */
@media (max-width: 1280px) {
  .nav__links a:not(.btn):not(.lang__opt) { display: none; }
  .nav__toggle { display: flex; }
}

@media (max-width: 1080px) {
  .process { grid-template-columns: 1fr; }
  .process__rail-inner { position: static; }
  .svc-row { grid-template-columns: 4rem 1fr; }
  .svc-row p { grid-column: 2; }
  .contact-grid { grid-template-columns: 1fr; }
  .contact-aside { position: static; }
}

@media (max-width: 900px) {
  :root { --nav-h: 72px; }
  .nav__links { display: none; }

  .trust { grid-template-columns: repeat(2, 1fr); gap: 1.1rem 1.6rem; }
  .scroll-cue { display: none; }

  .svc-index { grid-template-columns: 1fr; }
  .form__grid { grid-template-columns: 1fr; }
  .page-hero { min-height: min(68svh, 620px); padding-top: calc(var(--nav-h) + 3rem); }
  .page-hero h1 { max-width: none; }

  .pillars { grid-template-columns: 1fr; }
  .pillar { min-height: 0; }
  .pillar h3 { margin-top: 0.4rem; }

  .about-grid { grid-template-columns: 1fr; }
  .team-grid { grid-template-columns: 1fr; max-width: 30rem; margin-inline: auto; }
  .who-grid { grid-template-columns: 1fr; }
  .who-card, .who-card:nth-child(4), .who-card:nth-child(5) { grid-column: 1; min-height: 0; }
  .who-card h3 { margin-top: 0.4rem; }
  .truths { grid-template-columns: 1fr; }

  .footer__top { grid-template-columns: 1fr; gap: 2.2rem; }

  .hud {
    left: 0; right: 0; top: auto;
    bottom: calc(1.1rem + env(safe-area-inset-bottom, 0px));
    transform: none;
    flex-direction: row;
    justify-content: center;
    align-items: start;
    gap: 1.1rem;
    padding: 0 1rem;
  }
  .hud__item { grid-template-columns: auto; gap: 0.3rem; justify-items: center; }
  .hud__name { display: none; }
  .hud__bar { width: 1.5rem; margin-top: 0.4rem; opacity: 0; transition: opacity 0.4s var(--ease); }
  .hud__item.is-active .hud__bar { opacity: 1; }
  .scenes-copy { bottom: calc(clamp(4rem, 12vh, 7rem) + env(safe-area-inset-bottom, 0px)); }
}

@media (max-width: 560px) {
  .hero__ctas .btn { width: 100%; }
  .cta-band__ctas .btn { width: 100%; }
  .brand__name { font-size: 1.02rem; }
  .brand__mark { width: 40px; }
}

/* ---------- Reduced motion ---------- */

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