/* Terra Search Partners
   Layout idea: a cream, editorial site in the logo's own colours. Quiet cream pages,
   charcoal bands where contrast is needed, bronze used sparingly for rules and markers.
   The one bold element is the world map on the home page. */
:root {
  --cream:    #F2EEE6;  /* page background (logo cream) */
  --linen:    #E8E0D1;  /* alternate band */
  --charcoal: #23282E;  /* text, contrast bands (logo "A") */
  --bronze:   #B07D45;  /* accent rules and markers (logo right peak) */
  --sand:     #D3AA78;  /* accent on charcoal (logo left peak) */
  --umber:    #7E5A2E;  /* accent text on cream ("Search Partners") */
  --stone:    #5C5A55;  /* secondary text */
  --font-display: "Montserrat", "Helvetica Neue", Arial, sans-serif;
  --font-body: "Source Serif 4", Georgia, "Times New Roman", serif;
  --measure: 64ch;
  --gutter: clamp(20px, 5vw, 72px);
  --rule: 1px solid rgba(35, 40, 46, .16);
  color-scheme: light;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--cream);
  color: var(--charcoal);
  font-family: var(--font-body);
  font-size: 1.125rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; }
a { color: var(--umber); text-underline-offset: 3px; }
a:hover { color: var(--charcoal); }
:focus-visible { outline: 2px solid var(--bronze); outline-offset: 3px; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: inherit;
  margin: 0;
  text-wrap: balance;
}
h1 { font-weight: 300; font-size: clamp(2.5rem, 5.4vw, 4.4rem); line-height: 1.08; letter-spacing: -0.02em; }
h2 { font-weight: 400; font-size: clamp(1.9rem, 3.4vw, 2.75rem); line-height: 1.15; letter-spacing: -0.015em; }
h3 { font-weight: 600; font-size: 1.15rem; line-height: 1.3; letter-spacing: 0; }
p { margin: 0; }
.lede { font-size: clamp(1.15rem, 1.6vw, 1.32rem); line-height: 1.6; max-width: 52ch; color: var(--stone); }

.wrap { max-width: 1240px; margin: 0 auto; padding: 0 var(--gutter); }
.band { padding: clamp(72px, 9vw, 128px) 0; }
.band-linen { background: var(--linen); }
.band-dark { background: var(--charcoal); color: var(--cream); }
.band-dark .lede, .band-dark p { color: rgba(242, 238, 230, .78); }
.band-dark a { color: var(--sand); }
.band-dark :focus-visible { outline-color: var(--sand); }
.band + .band:not(.band-linen):not(.band-dark) { border-top: var(--rule); }

/* A short bronze rule that opens each section: a brand device taken from the logo baseline */
.rule-mark { display: block; width: 44px; height: 2px; background: var(--bronze); margin-bottom: 28px; }
.band-dark .rule-mark { background: var(--sand); }

.head {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: clamp(24px, 5vw, 88px);
  align-items: end;
  margin-bottom: clamp(44px, 5vw, 72px);
}
.head p { max-width: var(--measure); color: var(--stone); }
.band-dark .head p { color: rgba(242, 238, 230, .78); }

/* Buttons */
.btn {
  display: inline-block;
  font-family: var(--font-display); font-weight: 500; font-size: .95rem; letter-spacing: .02em;
  text-decoration: none;
  padding: 14px 26px;
  border: 1px solid var(--charcoal);
  border-radius: 0;
}
.btn-solid { background: var(--charcoal); color: var(--cream); }
.btn-solid:hover { background: #333A42; color: var(--cream); }
.btn-line { color: var(--charcoal); background: transparent; }
.btn-line:hover { background: var(--charcoal); color: var(--cream); }
.band-dark .btn-solid { background: var(--sand); border-color: var(--sand); color: var(--charcoal); }
.band-dark .btn-solid:hover { background: #E0BC8E; }
.actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 40px; }

/* Header */
.site-header { background: var(--cream); border-bottom: var(--rule); position: sticky; top: 0; z-index: 20; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 84px; }
.brand { display: block; line-height: 0; }
.brand img { height: 44px; width: auto; }
.nav { display: flex; align-items: center; gap: clamp(18px, 2.4vw, 34px); font-family: var(--font-display); font-size: .92rem; font-weight: 500; }
.nav a { color: var(--charcoal); text-decoration: none; padding: 6px 0; border-bottom: 2px solid transparent; }
.nav a:hover { border-bottom-color: var(--sand); }
.nav a[aria-current="page"] { border-bottom-color: var(--bronze); }
.nav .btn { padding: 11px 18px; border-bottom: 1px solid var(--charcoal); }
.nav .btn:hover { border-bottom-color: var(--charcoal); color: var(--cream); }

/* Page hero (inner pages) */
.page-hero { padding: clamp(72px, 9vw, 136px) 0 clamp(56px, 7vw, 96px); }
.page-hero .wrap { display: grid; gap: 28px; }
.page-hero h1 { max-width: 18ch; }
.crumb { font-family: var(--font-display); font-size: .9rem; font-weight: 500; color: var(--umber); }

/* Home hero */
.hero { padding: clamp(80px, 10vw, 150px) 0 clamp(72px, 8vw, 120px); position: relative; overflow: hidden; }
.hero .wrap { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); gap: clamp(40px, 6vw, 96px); align-items: end; }
.hero h1 { max-width: 15ch; }
.hero .lede { margin-top: 30px; }
.coords { display: grid; gap: 0; border-top: 1px solid var(--charcoal); }
.coord { display: grid; grid-template-columns: 1fr auto; gap: 16px; align-items: baseline; padding: 18px 0; border-bottom: var(--rule); }
.coord strong { font-family: var(--font-display); font-weight: 600; font-size: 1.05rem; }
.coord span { display: block; font-size: .95rem; color: var(--stone); }
.coord .ll { font-family: var(--font-display); font-size: .85rem; color: var(--umber); font-variant-numeric: tabular-nums; white-space: nowrap; }
.coords-note { font-size: .9rem; color: var(--stone); padding-top: 14px; }

/* Two-column statements */
.pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(32px, 6vw, 96px); }
.pair h3 { font-size: 1.3rem; font-weight: 500; margin-bottom: 14px; }
.pair p { max-width: 52ch; color: var(--stone); }
.pair > div { border-top: 1px solid var(--charcoal); padding-top: 26px; }

/* Map */
.map-wrap { margin-top: 8px; }
.world { display: block; width: 100%; height: auto; overflow: visible; }
.m-land { fill: none; stroke: rgba(211, 170, 120, .38); stroke-width: 3.6; stroke-linecap: round; }
.m-arc { fill: none; stroke: var(--sand); stroke-width: 1.1; opacity: .75;
  stroke-dasharray: var(--len); stroke-dashoffset: 0;
  animation: draw 1.6s cubic-bezier(.3,.6,.2,1) both; animation-delay: calc(var(--i) * 120ms + 200ms); }
@keyframes draw { from { stroke-dashoffset: var(--len); } to { stroke-dashoffset: 0; } }
@media (prefers-reduced-motion: reduce) { .m-arc { animation: none; } }
.m-link { fill: none; stroke: var(--cream); stroke-width: 1.4; stroke-dasharray: 2 5; stroke-linecap: round; }
.m-reg { fill: var(--charcoal); stroke: var(--sand); stroke-width: 1.5; }
.m-reg-t { fill: rgba(242, 238, 230, .72); font-family: var(--font-display); font-size: 13px; font-weight: 500; }
.m-halo { fill: rgba(176, 125, 69, .28); }
.m-off { fill: var(--sand); stroke: var(--charcoal); stroke-width: 2; }
.m-off-t { fill: var(--cream); font-family: var(--font-display); font-size: 17px; font-weight: 600; }
.m-off-s { fill: rgba(242, 238, 230, .65); font-family: var(--font-body); font-size: 12.5px; }
.map-key { display: flex; flex-wrap: wrap; gap: 28px; margin-top: 28px; font-family: var(--font-display); font-size: .85rem; color: rgba(242, 238, 230, .72); }
.map-key span { display: inline-flex; align-items: center; gap: 10px; }
.k-off { width: 12px; height: 12px; border-radius: 50%; background: var(--sand); box-shadow: 0 0 0 4px rgba(176,125,69,.35); }
.k-reg { width: 9px; height: 9px; border-radius: 50%; border: 1.5px solid var(--sand); }
.k-arc { width: 26px; height: 1px; background: var(--sand); }

/* Sector list */
.sectors { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; border-top: 1px solid var(--charcoal); }
.sector { padding: 30px 28px 34px 0; display: grid; gap: 12px; align-content: start; }
.sector + .sector { padding-left: 28px; border-left: var(--rule); }
.sector p { font-size: 1rem; color: var(--stone); }

/* Seniority steps: four ascending columns, echoing the logo's peaks */
.levels { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; align-items: end; }
.level { background: var(--cream); border-top: 3px solid var(--bronze); padding: 22px 22px 26px; display: grid; gap: 10px; align-content: start; }
.level:nth-child(1) { min-height: 190px; }
.level:nth-child(2) { min-height: 240px; }
.level:nth-child(3) { min-height: 290px; }
.level:nth-child(4) { min-height: 340px; background: var(--charcoal); color: var(--cream); border-top-color: var(--sand); }
.level p { font-size: .98rem; color: var(--stone); }
.level:nth-child(4) p { color: rgba(242, 238, 230, .78); }
.levels-axis { display: flex; justify-content: space-between; margin-top: 14px; font-family: var(--font-display); font-size: .82rem; color: var(--stone); }

/* Statement */
.statement { font-family: var(--font-display); font-weight: 300; font-size: clamp(1.6rem, 3vw, 2.4rem); line-height: 1.3; letter-spacing: -0.01em; max-width: 30ch; }

/* Definition-style rows (expertise, approach) */
.rows { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--charcoal); }
.row { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: clamp(20px, 4vw, 64px); padding: 30px 0; border-bottom: var(--rule); }
.row h3 { font-size: 1.25rem; font-weight: 500; }
.row p { max-width: var(--measure); color: var(--stone); }
.row .tags { margin-top: 14px; font-family: var(--font-display); font-size: .88rem; color: var(--charcoal); line-height: 1.8; }

.cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(32px, 6vw, 96px); }
.list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--charcoal); }
.list li { padding: 15px 0; border-bottom: var(--rule); font-family: var(--font-display); font-size: 1rem; font-weight: 500; }
.list li span { display: block; font-family: var(--font-body); font-weight: 400; font-size: .95rem; color: var(--stone); margin-top: 2px; }
.cols h3 { font-size: 1.35rem; font-weight: 500; margin-bottom: 18px; }

/* Process */
.process { list-style: none; margin: 0; padding: 0; counter-reset: s; border-top: 1px solid var(--charcoal); }
.stage { counter-increment: s; display: grid; grid-template-columns: 90px minmax(0, 5fr) minmax(0, 7fr) minmax(0, 3fr); gap: clamp(16px, 3vw, 44px); padding: 34px 0; border-bottom: var(--rule); align-items: start; }
.stage::before { content: counter(s, decimal-leading-zero); font-family: var(--font-display); font-weight: 300; font-size: 2.4rem; line-height: 1; color: var(--bronze); }
.stage h3 { font-size: 1.3rem; font-weight: 500; }
.stage p { color: var(--stone); max-width: 58ch; }
.stage .out { font-family: var(--font-display); font-size: .88rem; line-height: 1.5; }
.stage .out b { display: block; font-weight: 600; color: var(--umber); margin-bottom: 4px; }

/* Offices */
.offices { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2px; background: rgba(35,40,46,.16); }
.office { background: var(--cream); padding: clamp(28px, 4vw, 52px); display: grid; gap: 14px; align-content: start; }
.band-linen .office { background: var(--cream); }
.office h3 { font-size: 1.6rem; font-weight: 400; }
.office .where { font-family: var(--font-display); font-size: .9rem; color: var(--umber); font-weight: 500; }
.office p { color: var(--stone); }

/* Contact */
.contact-grid { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: clamp(40px, 6vw, 96px); align-items: start; }
.contact-list { margin: 0; border-top: 1px solid var(--charcoal); }
.contact-list > div { padding: 22px 0; border-bottom: var(--rule); }
.contact-list dt { font-family: var(--font-display); font-size: .88rem; font-weight: 500; color: var(--umber); }
.contact-list dd { margin: 6px 0 0; font-size: 1.2rem; }

/* CTA band */
.cta .wrap { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 32px; align-items: end; }
.cta h2 { max-width: 20ch; }

/* Footer */
.site-footer { background: var(--charcoal); color: rgba(242, 238, 230, .7); font-size: .95rem; padding: 64px 0 32px; }
.site-footer a { color: rgba(242, 238, 230, .85); text-decoration: none; }
.site-footer a:hover { color: var(--sand); }
.site-footer :focus-visible { outline-color: var(--sand); }
.foot { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 3fr) minmax(0, 3fr); gap: 40px; }
.foot img { height: 40px; width: auto; }
.foot h4 { font-weight: 500; font-size: .85rem; color: var(--sand); margin-bottom: 12px; }
.foot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.foot-base { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-top: 56px; padding-top: 22px; border-top: 1px solid rgba(242,238,230,.14); font-size: .85rem; }

/* Responsive */
@media (max-width: 1000px) {
  .sectors { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sector:nth-child(3) { padding-left: 0; border-left: 0; }
  .sector:nth-child(n+3) { border-top: var(--rule); }
  .stage { grid-template-columns: 64px minmax(0, 1fr); }
  .stage > p, .stage .out { grid-column: 2; }
}
@media (max-width: 860px) {
  .site-header .wrap { flex-wrap: wrap; min-height: 0; padding-top: 14px; padding-bottom: 10px; row-gap: 8px; }
  .nav { width: 100%; overflow-x: auto; gap: 22px; padding-bottom: 4px; }
  .nav .btn { display: none; }
  .brand img { height: 36px; }
  .hero .wrap, .head, .pair, .cols, .contact-grid, .cta .wrap, .foot { grid-template-columns: minmax(0, 1fr); }
  .levels { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .level:nth-child(n) { min-height: 0; }
  .offices { grid-template-columns: minmax(0, 1fr); }
  .row { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .m-reg-t { font-size: 18px; }
  .m-off-t { font-size: 22px; }
  .m-off-s { display: none; }
}
@media (max-width: 560px) {
  body { font-size: 1.06rem; }
  .sectors, .levels { grid-template-columns: minmax(0, 1fr); }
  .sector, .sector + .sector { padding-left: 0; border-left: 0; }
  .sector + .sector { border-top: var(--rule); }
  .stage { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .stage > p, .stage .out { grid-column: 1; }
  .levels-axis { display: none; }
}

/* Fixes after review */
.nav .btn-solid, .nav .btn-solid:hover { color: var(--cream); }
.m-reg-t, .m-off-t, .m-off-s { paint-order: stroke; stroke: var(--charcoal); stroke-width: 5px; stroke-linejoin: round; }

/* Project lifecycle (expertise page): phases are a true sequence, shown as a chain */
.col-intro { color: var(--stone); margin-bottom: 26px; max-width: 46ch; }
.lifecycle { border-top: 1px solid var(--charcoal); padding: 20px 0 24px; }
.lifecycle h4 { font-weight: 600; font-size: 1.05rem; margin-bottom: 14px; }
.phases { list-style: none; margin: 0; padding: 0 0 0 6px; display: grid; gap: 0; font-family: var(--font-display); font-size: .95rem; font-weight: 500; }
.phases li { position: relative; padding: 5px 0 5px 24px; border-left: 1px solid var(--sand); }
.phases li::before { content: ""; position: absolute; left: -5px; top: 50%; width: 9px; height: 9px; margin-top: -4.5px; border-radius: 50%; background: var(--cream); border: 1.5px solid var(--bronze); }
.phases li:first-child { border-image: linear-gradient(to bottom, transparent 50%, var(--sand) 50%) 1; }
.phases li:last-child { border-image: linear-gradient(to bottom, var(--sand) 50%, transparent 50%) 1; }
.band-linen .phases li::before { background: var(--linen); }

/* Language switch (EN / PT) and header CTA, kept together on the right of the header */
.tools { display: flex; align-items: center; gap: 18px; flex: none; }
.site-header .nav { margin-left: auto; }
.nav a { white-space: nowrap; }
.lang { display: inline-flex; border: 1px solid rgba(35, 40, 46, .35); font-family: var(--font-display); }
.lang a { padding: 7px 11px; font-size: .8rem; font-weight: 600; letter-spacing: .04em; line-height: 1; color: var(--stone); text-decoration: none; }
.lang a:hover { color: var(--charcoal); background: var(--linen); }
.lang a[aria-current="true"] { background: var(--charcoal); color: var(--cream); }
.tools .btn { padding: 11px 18px; }
.tools .btn-solid, .tools .btn-solid:hover { color: var(--cream); }
@media (max-width: 860px) {
  .site-header .nav { order: 3; margin-left: 0; }
  .tools { margin-left: auto; }
  .tools .btn { display: none; }
}
@media (max-width: 480px) { .site-header .nav { gap: 16px; font-size: .86rem; } }
