/* ============================================
   MEANING — Brand Stylesheet
   ============================================ */

@font-face {
  font-family: 'Blair Condensed';
  src: url('assets/fonts/ITC_Blair_Condensed_Medium.otf') format('opentype');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Brand palette */
  --navy: #0B1D33;
  --ivory: #F5F5F3;
  --taupe: #D7D4CE;
  --warm-gray: #A6A39E;
  --charcoal: #2C2C2C;

  /* Type */
  --font-display: 'Blair Condensed', 'Arial Narrow', sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* Rhythm */
  --gutter: clamp(24px, 6vw, 64px);
  --section-pad: clamp(72px, 12vw, 148px);
  --max-width: 1180px;

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

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--charcoal);
  background: var(--ivory);
  -webkit-font-smoothing: antialiased;
  font-size: 16px;
  line-height: 1.6;
}

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

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

/* ---------- Language visibility ---------- */
[data-en] { display: inline; }
[data-pt] { display: none; }
body.lang-pt [data-en] { display: none; }
body.lang-pt [data-pt] { display: inline; }

/* ---------- Type scale ---------- */
.eyebrow {
  font-family: var(--font-display);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.28em;
  font-size: 12px;
  color: var(--warm-gray);
}
.section--dark .eyebrow { color: var(--warm-gray); }

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 500;
  letter-spacing: 0.01em;
  margin: 0;
}

h1 {
  font-size: clamp(40px, 7vw, 84px);
  line-height: 1.04;
  letter-spacing: 0.005em;
}

h2 {
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.12;
}

h3 {
  font-size: clamp(19px, 2.2vw, 23px);
  line-height: 1.3;
}

p {
  margin: 0;
}

.lede {
  font-size: clamp(17px, 2vw, 20px);
  line-height: 1.55;
  max-width: 640px;
}

.body-text {
  font-size: 16px;
  color: var(--charcoal);
  max-width: 560px;
}
.section--dark .body-text { color: var(--taupe); }

/* ---------- Layout helpers ---------- */
.wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--gutter);
  position: relative;
}

.section {
  position: relative;
  padding: var(--section-pad) 0;
  overflow: hidden;
}

.section--light { background: var(--ivory); color: var(--charcoal); }
.section--dark  { background: var(--navy); color: var(--ivory); }

.section--dark h1, .section--dark h2, .section--dark h3 { color: var(--ivory); }

.hr {
  border: none;
  height: 1px;
  background: var(--taupe);
  width: 100%;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 1.1s var(--ease);
}
.section--dark .hr { background: rgba(245,245,243,0.22); }
.hr.in-view { transform: scaleX(1); }

/* ---------- Nav ---------- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(245,245,243,0.92);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--taupe);
}
.nav .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 18px;
  padding-bottom: 18px;
}
.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}
.nav-brand img { height: 26px; width: auto; }
.nav-brand span {
  font-family: var(--font-display);
  letter-spacing: 0.22em;
  font-size: 15px;
  font-weight: 500;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: clamp(16px, 3vw, 34px);
  font-size: 13px;
  letter-spacing: 0.04em;
}
.nav-links a {
  position: relative;
  padding: 4px 0;
  color: var(--charcoal);
}
.nav-links a.active { color: var(--navy); font-weight: 600; }
.nav-links a::after {
  content: '';
  position: absolute;
  left: 0; bottom: -2px;
  height: 1px;
  width: 0;
  background: var(--navy);
  transition: width 0.3s var(--ease);
}
.nav-links a:hover::after { width: 100%; }

.lang-toggle {
  display: flex;
  gap: 6px;
  font-family: var(--font-display);
  font-size: 12px;
  letter-spacing: 0.08em;
}
.lang-toggle button {
  border: none;
  background: none;
  cursor: pointer;
  color: var(--warm-gray);
  font-family: inherit;
  font-size: inherit;
  letter-spacing: inherit;
  padding: 4px 6px;
}
.lang-toggle button.active { color: var(--navy); font-weight: 600; }

.nav-toggle-mobile {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  flex-direction: column;
  gap: 5px;
  padding: 6px;
}
.nav-toggle-mobile span {
  width: 22px; height: 1.5px; background: var(--navy);
}

@media (max-width: 720px) {
  .nav-links { display: none; }
  .nav.open .nav-links {
    display: flex;
    position: absolute;
    top: 100%; left: 0; right: 0;
    background: var(--ivory);
    flex-direction: column;
    align-items: flex-start;
    padding: 20px var(--gutter) 28px;
    gap: 18px;
    border-bottom: 1px solid var(--taupe);
  }
  .nav-toggle-mobile { display: flex; }
}

/* ---------- Motif (arch/portal line art) ---------- */
.motif {
  position: absolute;
  pointer-events: none;
  z-index: 0;
  opacity: 0.5;
}
.motif svg { display: block; width: 100%; height: 100%; }
.section > .wrap { z-index: 1; }

/* ---------- Reveal on scroll ---------- */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
}
.reveal.in-view {
  opacity: 1;
  transform: translateY(0);
}
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ---------- Buttons / CTA ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  letter-spacing: 0.12em;
  font-size: 13px;
  text-transform: uppercase;
  padding: 15px 26px;
  border: 1px solid currentColor;
  transition: background 0.3s var(--ease), color 0.3s var(--ease);
}
.section--light .btn { color: var(--navy); }
.section--light .btn:hover { background: var(--navy); color: var(--ivory); }
.section--dark .btn { color: var(--ivory); }
.section--dark .btn:hover { background: var(--ivory); color: var(--navy); }

.btn-row { display: flex; gap: 18px; flex-wrap: wrap; margin-top: 40px; }

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  letter-spacing: 0.06em;
  border-bottom: 1px solid var(--taupe);
  padding-bottom: 3px;
  transition: border-color 0.3s var(--ease), gap 0.3s var(--ease);
}
.link-arrow:hover { gap: 12px; border-color: var(--navy); }
.section--dark .link-arrow { border-color: rgba(245,245,243,0.3); }
.section--dark .link-arrow:hover { border-color: var(--ivory); }

/* ---------- Hero ---------- */
.hero {
  min-height: 92vh;
  display: flex;
  align-items: center;
  padding-top: 120px;
}
.hero .wrap { width: 100%; }
.hero-eyebrow { margin-bottom: 26px; }
.hero h1 { max-width: 780px; }
.hero .lede { margin-top: 26px; color: var(--taupe); }

/* ---------- Grids ---------- */
.pair-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
}
@media (min-width: 780px) {
  .pair-grid {
    grid-template-columns: 1fr 1px 1fr;
    align-items: start;
  }
}
.pair-grid .divider {
  background: var(--taupe);
  width: 1px;
  justify-self: center;
  align-self: stretch;
}
.section--dark .pair-grid .divider { background: rgba(245,245,243,0.22); }
.pair-cell { padding: 36px 0; }
@media (min-width: 780px) {
  .pair-cell:first-child { padding-right: 48px; }
  .pair-cell:last-child { padding-left: 48px; }
}
.pair-cell .kicker {
  font-family: var(--font-display);
  letter-spacing: 0.06em;
  font-size: 20px;
  margin-bottom: 14px;
  display: block;
}

.principles-list {
  display: flex;
  flex-direction: column;
}
.principle-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  padding: 38px 0;
  border-top: 1px solid var(--taupe);
}
.principle-row:last-child { border-bottom: 1px solid var(--taupe); }
@media (min-width: 780px) {
  .principle-row { grid-template-columns: 280px 1fr; gap: 40px; }
}
.principle-row .kicker {
  font-family: var(--font-display);
  font-size: 22px;
  letter-spacing: 0.01em;
}

.value-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 44px;
  margin-top: 56px;
}
@media (min-width: 640px) {
  .value-grid { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 1000px) {
  .value-grid { grid-template-columns: repeat(4, 1fr); }
}
.value-item .glyph {
  width: 34px; height: 34px;
  margin-bottom: 20px;
}
.value-item h3 { margin-bottom: 12px; }
.value-item p { color: var(--charcoal); font-size: 15px; }

/* ---------- Footer ---------- */
.footer {
  padding: 56px 0 40px;
  background: var(--navy);
  color: var(--taupe);
}
.footer .wrap {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
}
.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}
.footer-brand img { height: 22px; }
.footer-brand span {
  font-family: var(--font-display);
  letter-spacing: 0.2em;
  font-size: 13px;
}
.footer-links {
  display: flex;
  gap: 26px;
  font-size: 13px;
}
.footer-meta {
  font-size: 12px;
  color: var(--warm-gray);
  width: 100%;
  padding-top: 24px;
  border-top: 1px solid rgba(245,245,243,0.12);
  margin-top: 8px;
}

/* ---------- Page header (non-home pages) ---------- */
.page-hero {
  padding-top: 168px;
  padding-bottom: 80px;
}
.page-hero h1 { max-width: 720px; }
.page-hero .lede { margin-top: 22px; color: var(--taupe); }

/* ---------- Contact form ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 56px;
}
@media (min-width: 860px) {
  .contact-grid { grid-template-columns: 1fr 1fr; }
}
.field {
  margin-bottom: 22px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.field label {
  font-family: var(--font-display);
  letter-spacing: 0.08em;
  font-size: 12px;
  text-transform: uppercase;
  color: var(--warm-gray);
}
.field input, .field textarea {
  border: none;
  border-bottom: 1px solid var(--taupe);
  background: transparent;
  font-family: var(--font-body);
  font-size: 16px;
  color: var(--charcoal);
  padding: 10px 2px;
  transition: border-color 0.3s var(--ease);
}
.field input:focus, .field textarea:focus {
  outline: none;
  border-color: var(--navy);
}
.field textarea { resize: vertical; min-height: 110px; }

.contact-direct {
  display: flex;
  flex-direction: column;
  gap: 22px;
}
.contact-direct a {
  font-family: var(--font-display);
  font-size: 22px;
  letter-spacing: 0.01em;
  border-bottom: 1px solid var(--taupe);
  padding-bottom: 6px;
  display: inline-block;
}
.contact-direct a:hover { border-color: var(--navy); }

button.btn-submit {
  font-family: var(--font-display);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 13px;
  background: var(--navy);
  color: var(--ivory);
  border: 1px solid var(--navy);
  padding: 15px 30px;
  cursor: pointer;
  transition: opacity 0.3s var(--ease);
  margin-top: 8px;
}
button.btn-submit:hover { opacity: 0.85; }

/* focus visibility */
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--navy);
  outline-offset: 3px;
}
