/* ====================================================================
   ESTEEP — Shared base stylesheet
   Brand fonts: Aventa (display), Open Sans (body)
   Brand colors derived from Esteep logo (deep navy + green accent)
   ==================================================================== */

/* ---- Fonts ---- */
@font-face {
  font-family: "Aventa";
  src: url("../assets/fonts/Aventa-Variable.ttf") format("truetype-variations"),
       url("../assets/fonts/Aventa-Variable.ttf") format("truetype");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Aventa";
  src: url("../assets/fonts/Aventa-Variable-Italic.ttf") format("truetype-variations"),
       url("../assets/fonts/Aventa-Variable-Italic.ttf") format("truetype");
  font-weight: 100 900;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Open Sans";
  src: url("../assets/fonts/OpenSans-Light.ttf") format("truetype");
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Open Sans";
  src: url("../assets/fonts/OpenSans-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Open Sans";
  src: url("../assets/fonts/OpenSans-Semibold.ttf") format("truetype");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Open Sans";
  src: url("../assets/fonts/OpenSans-Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* ---- Design tokens ---- */
:root {
  /* Brand palette */
  --esteep-navy: #0B2340;       /* primary brand blue (matches logo) */
  --esteep-navy-deep: #071528;  /* deeper variant for dark sections */
  --esteep-green: #B4EA3D;      /* exact brand green (from Esteep brand package) */
  --esteep-green-dark: #8FC424; /* darker variant of the same hue for hover / text-on-white */
  --esteep-sand: #EFEAE0;       /* warm off-white */
  --esteep-paper: #FBFAF7;      /* body background */
  --esteep-ink: #111418;        /* primary text */
  --esteep-mute: #5A6672;       /* muted text */
  --esteep-line: rgba(11,35,64,0.12);
  --esteep-line-dark: rgba(255,255,255,0.14);

  /* Typography */
  --font-display: "Aventa", "Helvetica Neue", Arial, sans-serif;
  --font-body: "Open Sans", "Helvetica Neue", Arial, sans-serif;

  /* Layout */
  --wrap: 1240px;
  --pad: clamp(1.25rem, 3vw, 2.5rem);
  --section-y: clamp(4rem, 8vw, 7rem);
  --radius: 2px;

  /* Motion */
  --ease: cubic-bezier(.2,.7,.2,1);
}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-body);
  color: var(--esteep-ink);
  background: var(--esteep-paper);
  font-weight: 400;
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg, video { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }

/* ---- Typography ---- */
.eyebrow {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.78rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--esteep-green-dark);
  margin: 0 0 1.1rem;
}
.eyebrow--light { color: var(--esteep-green); }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.01em;
  margin: 0 0 0.6em;
  color: var(--esteep-navy);
}
h1 { font-size: clamp(2.4rem, 6vw, 4.6rem); font-weight: 500; letter-spacing: -0.02em; }
h2 { font-size: clamp(1.9rem, 3.6vw, 3rem); }
h3 { font-size: clamp(1.25rem, 1.8vw, 1.6rem); }
h4 { font-size: 1.05rem; letter-spacing: 0.02em; }
p { margin: 0 0 1em; color: var(--esteep-ink); max-width: 65ch; }
.lead { font-size: 1.18rem; color: var(--esteep-mute); line-height: 1.55; }

/* ---- Layout ---- */
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--pad); }
.wrap--narrow { max-width: 900px; }
.section { padding: var(--section-y) 0; }
.section--tight { padding: clamp(2.5rem, 5vw, 4rem) 0; }

/* ---- Buttons / links ---- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.95rem 1.5rem;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.92rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: all 0.3s var(--ease);
  border: 1px solid transparent;
}
.btn-primary {
  background: var(--esteep-navy);
  color: #fff;
}
.btn-primary:hover { background: var(--esteep-green-dark); }
.btn-ghost {
  background: transparent;
  color: var(--esteep-navy);
  border-color: var(--esteep-navy);
}
.btn-ghost:hover { background: var(--esteep-navy); color: #fff; }
.btn-ghost--light {
  color: #fff;
  border-color: rgba(255,255,255,0.5);
}
.btn-ghost--light:hover { background: #fff; color: var(--esteep-navy); }
.btn .arrow { display: inline-block; transition: transform 0.3s var(--ease); }
.btn:hover .arrow { transform: translateX(4px); }

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  font-size: 0.9rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--esteep-navy);
  border-bottom: 1px solid var(--esteep-navy);
  padding-bottom: 2px;
  transition: gap 0.3s var(--ease);
}
.link-arrow:hover { gap: 0.85rem; }
.link-arrow--light { color: #fff; border-color: #fff; }
.link-arrow--green { color: var(--esteep-green-dark); border-color: var(--esteep-green-dark); }

/* ---- Header / nav (shared across sub-sites) ---- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(251,250,247,0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--esteep-line);
}
.site-header--dark {
  background: rgba(7,21,40,0.82);
  border-bottom-color: var(--esteep-line-dark);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.1rem var(--pad);
  max-width: var(--wrap);
  margin: 0 auto;
  gap: 2rem;
}
.nav-brand { display: flex; align-items: center; gap: 0.7rem; }
.nav-brand img { height: 32px; width: auto; }
.nav-brand-label {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 0.72rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--esteep-mute);
  padding-left: 0.8rem;
  margin-left: 0.1rem;
  border-left: 1px solid var(--esteep-line);
}
.site-header--dark .nav-brand-label { color: rgba(255,255,255,0.65); border-left-color: var(--esteep-line-dark); }

.nav-links {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 2.2rem;
  align-items: center;
}
.nav-links a {
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--esteep-ink);
  position: relative;
  padding: 0.3rem 0;
  transition: color 0.2s;
}
.site-header--dark .nav-links a { color: rgba(255,255,255,0.85); }
.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s var(--ease);
}
.nav-links a:hover::after,
.nav-links a.is-active::after { transform: scaleX(1); }

/* ---- Nav crossover switcher ----
   The "Real Estate →" / "Investments →" link swaps the whole site context.
   Each crossover is styled as a pill that previews the destination's brand
   scheme so it's clearly distinguished from the in-section nav links.

   IMPORTANT: The attribute selector uses a permissive substring match
   (`real-estate` / `investments`) rather than `../real-estate/`.
   Many static hosts rewrite relative hrefs (pretty URLs, trailing-slash
   normalization, absolute-path rewrites), which makes `../` brittle in
   production. In-section nav links (thesis.html, portfolio.html,
   about.html, approach.html, etc.) don't contain those strings, so
   there's no collision risk. */
.nav-links a[href*="real-estate"],
.nav-links a[href*="investments"] {
  display: inline-block;
  padding: 0.45rem 1rem;
  border-radius: 999px;
  border: 1px solid transparent;
  line-height: 1.1;
  transition: background 0.2s var(--ease),
              color 0.2s var(--ease),
              border-color 0.2s var(--ease);
}
/* Pill is the affordance — suppress the underline animation on these links. */
.nav-links a[href*="real-estate"]::after,
.nav-links a[href*="investments"]::after { display: none; }

/* On INVESTMENTS (dark nav) — "Real Estate →" sits quietly on the bar by
   default (outlined), then flips to the light RE scheme on hover.
   NOTE: prefixed with `body` to out-specify the page-level color overrides
   in investments.css (`.inv-body .nav-links a`) so the pill visually wins. */
body .site-header--dark .nav-links a[href*="real-estate"] {
  background: transparent;
  color: #fff;
  border-color: rgba(255,255,255,0.55);
}
body .site-header--dark .nav-links a[href*="real-estate"]:hover {
  background: #fff;
  color: var(--esteep-navy);
  border-color: #fff;
}

/* On REAL ESTATE (light nav) — "Investments →" previews the dark Inv scheme.
   Prefixed with `body` to out-specify `body > .site-header .nav-links a`
   in real-estate.css. */
body .site-header:not(.site-header--dark) .nav-links a[href*="investments"] {
  background: var(--esteep-navy);
  color: #fff;
  border-color: var(--esteep-navy);
}
body .site-header:not(.site-header--dark) .nav-links a[href*="investments"]:hover {
  background: var(--esteep-green);
  color: var(--esteep-navy);
  border-color: var(--esteep-green);
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  padding: 0.5rem;
  color: inherit;
}
.nav-toggle span {
  display: block;
  width: 24px;
  height: 1.5px;
  background: currentColor;
  margin: 5px 0;
  transition: all 0.3s;
}

@media (max-width: 820px) {
  .nav-toggle { display: block; }
  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    /* Explicit solid background so the dropdown is readable over page content.
       `inherit` didn't work because .nav has no background set. */
    background: #fff;
    flex-direction: column;
    padding: 2rem var(--pad);
    gap: 1.4rem;
    border-top: 1px solid var(--esteep-line);
    border-bottom: 1px solid var(--esteep-line);
    box-shadow: 0 14px 30px rgba(11,35,64,0.08);
    transform: translateY(-10px);
    opacity: 0;
    pointer-events: none;
    transition: all 0.25s var(--ease);
  }
  /* Dark variant (Investments pages use .site-header--dark) */
  .site-header--dark .nav-links {
    background: var(--esteep-navy-deep);
    border-top-color: rgba(255,255,255,0.12);
    border-bottom-color: rgba(255,255,255,0.12);
    box-shadow: 0 14px 30px rgba(0,0,0,0.45);
  }
  .nav-links.is-open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }
}

/* ---- Footer ---- */
.site-footer {
  background: var(--esteep-navy-deep);
  color: rgba(255,255,255,0.82);
  padding: clamp(3.5rem, 6vw, 5.5rem) 0 2rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 3rem;
  align-items: start;
}
.footer-brand img { height: 42px; margin-bottom: 1.2rem; }
.footer-brand img.footer-brand-mark { height: auto; width: 72px; margin-bottom: 1.2rem; }
/* The STP mark in every footer doubles as a link back to the splash
   page. Subtle hover feedback only — keeps the footer quiet. */
.footer-brand-link {
  display: inline-block;
  line-height: 0;
  transition: opacity 0.25s ease, transform 0.25s ease, filter 0.25s ease;
}
.footer-brand-link:hover {
  opacity: 0.85;
  transform: scale(1.04);
  filter: drop-shadow(0 0 12px rgba(180,234,61,0.4));
}
.footer-brand p { color: rgba(255,255,255,0.6); font-size: 0.94rem; }
.footer-col h4 {
  color: #fff;
  font-family: var(--font-body);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  margin-bottom: 1.2rem;
}
.footer-col ul { list-style: none; margin: 0; padding: 0; }
.footer-col li { margin-bottom: 0.6rem; font-size: 0.95rem; }
.footer-col a { color: rgba(255,255,255,0.7); transition: color 0.2s; }
.footer-col a:hover { color: var(--esteep-green); }
.footer-bottom {
  margin-top: 3rem;
  padding-top: 1.6rem;
  border-top: 1px solid rgba(255,255,255,0.12);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.82rem;
  color: rgba(255,255,255,0.5);
  letter-spacing: 0.05em;
}
.footer-bottom a:hover { color: #fff; }
@media (max-width: 720px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 2rem; }
  .footer-brand { grid-column: 1 / -1; }
  .footer-bottom { flex-direction: column; gap: 0.6rem; }
}

/* ---- Utilities ---- */
.grid { display: grid; gap: clamp(1.2rem, 2vw, 2rem); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) {
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}

.text-center { text-align: center; }
.divider {
  width: 48px;
  height: 2px;
  background: var(--esteep-green);
  margin: 0 0 1.8rem;
}
.divider--center { margin-left: auto; margin-right: auto; }

/* Reveal-on-scroll (JS enhanced) */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.9s var(--ease), transform 0.9s var(--ease); }
.reveal.is-visible { opacity: 1; transform: translateY(0); }

/* ---- Shared contact / form layout (palette-agnostic — colors resolved via :root overrides) ---- */
.re-contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: clamp(2rem, 5vw, 5rem);
}
@media (max-width: 820px) {
  .re-contact-grid { grid-template-columns: 1fr; }
}
.re-contact-info h3 { margin-bottom: 0.2rem; }
.re-contact-info p { color: var(--esteep-mute); }
.re-contact-info .info-row {
  display: flex;
  gap: 1rem;
  align-items: center;
  padding: 1.1rem 0;
  border-top: 1px solid var(--esteep-line);
  font-size: 0.95rem;
}
.re-contact-info .info-row:last-child { border-bottom: 1px solid var(--esteep-line); }
.re-contact-info .info-label {
  min-width: 110px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--esteep-mute);
}

.form-field { margin-bottom: 1.4rem; }
.form-field label {
  display: block;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--esteep-mute);
  margin-bottom: 0.5rem;
}
.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  padding: 0.9rem 0;
  font: inherit;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--esteep-line);
  color: var(--esteep-ink);
  outline: none;
  transition: border-color 0.2s;
}
.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus { border-color: var(--esteep-navy); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.4rem; }
@media (max-width: 560px) { .form-grid { grid-template-columns: 1fr; } }
