/* ==========================================================================
   Orion Energy Advisors — design system
   Palette derived from the star-trail hero: deep teal ink, emerald accents.
   ========================================================================== */

:root {
  --ink: #0c1b1e;            /* near-black teal — headers, footer, dark bands */
  --ink-2: #10262a;          /* slightly lifted dark surface */
  --pine: #14524e;           /* deep teal */
  --teal: #1e6e68;           /* primary brand teal */
  --accent: #2fa093;         /* bright teal — links, hovers, details */
  --accent-soft: #bfe0da;    /* pale teal for text on dark */
  --paper: #ffffff;
  --paper-2: #f4f7f6;        /* alternate section background */
  --text: #22322f;           /* body text on light */
  --muted: #5c6f6b;          /* secondary text */
  --hairline: #e2e9e7;
  --hairline-dark: rgba(255, 255, 255, 0.14);

  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --sans: "Inter", -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;

  --max: 1160px;
  --pad: clamp(20px, 4vw, 48px);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  color: var(--text);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }

.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding-left: var(--pad);
  padding-right: var(--pad);
}

/* ---------- typography ---------- */

h1, h2, h3 { font-family: var(--serif); font-weight: 600; color: var(--ink); }

.eyebrow {
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 18px;
}

.dark .eyebrow, .eyebrow.on-dark { color: var(--accent); }

.lede {
  font-size: clamp(18px, 2vw, 21px);
  line-height: 1.6;
  color: var(--muted);
  max-width: 46em;
}

/* ---------- header ---------- */

.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  background: rgba(12, 27, 30, 0.55);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  transition: background 0.3s ease;
}

.site-header.scrolled { background: rgba(12, 27, 30, 0.92); }

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
}

.brand img { height: 40px; width: auto; }

.main-nav { display: flex; align-items: center; gap: 34px; }

.main-nav a {
  color: rgba(255, 255, 255, 0.82);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.02em;
}

.main-nav a:hover { color: #fff; text-decoration: none; }
.main-nav a.active { color: #fff; }

.main-nav a.btn-outline {
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 2px;
  padding: 9px 20px;
  color: #fff;
  transition: border-color 0.2s, background 0.2s;
}

.main-nav a.btn-outline:hover {
  border-color: var(--accent);
  background: rgba(47, 160, 147, 0.18);
}

/* mobile nav */
.nav-toggle {
  display: none;
  background: none;
  border: 0;
  cursor: pointer;
  padding: 8px;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: #fff;
  margin: 5px 0;
  transition: transform 0.25s, opacity 0.25s;
}

@media (max-width: 820px) {
  .nav-toggle { display: block; }
  .main-nav {
    position: absolute;
    top: 76px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    background: var(--ink);
    border-bottom: 1px solid var(--hairline-dark);
    display: none;
    padding: 8px 0 16px;
  }
  .main-nav.open { display: flex; }
  .main-nav a { padding: 13px var(--pad); width: 100%; font-size: 16px; }
  .main-nav a.btn-outline { border: 0; padding: 13px var(--pad); }
  .nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-toggle.open span:nth-child(2) { opacity: 0; }
  .nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
}

/* ---------- hero (home) ---------- */

.hero {
  position: relative;
  min-height: 92vh;
  display: flex;
  align-items: center;
  color: #fff;
  background: var(--ink);
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("../assets/hero-stars-1920.jpg");
  background-size: cover;
  background-position: center right;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg,
    rgba(12, 27, 30, 0.92) 0%,
    rgba(12, 27, 30, 0.72) 45%,
    rgba(12, 27, 30, 0.25) 100%);
}

.hero .wrap { position: relative; z-index: 2; padding-top: 120px; padding-bottom: 90px; }

.hero h1 {
  color: #fff;
  font-size: clamp(38px, 5.4vw, 64px);
  line-height: 1.12;
  letter-spacing: -0.01em;
  max-width: 15em;
  margin-bottom: 26px;
}

.hero .lede { color: rgba(255, 255, 255, 0.78); margin-bottom: 42px; }

/* subpage hero band */
.page-hero {
  position: relative;
  background: var(--ink);
  color: #fff;
  padding-top: 76px;
  overflow: hidden;
}

.page-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("../assets/hero-stars-1920.jpg");
  background-size: cover;
  background-position: center;
  opacity: 0.28;
}

.page-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, rgba(12,27,30,0.85) 20%, rgba(12,27,30,0.35) 100%);
}

.page-hero .wrap { position: relative; z-index: 2; padding-top: clamp(70px, 10vw, 120px); padding-bottom: clamp(56px, 8vw, 96px); }

.page-hero h1 {
  color: #fff;
  font-size: clamp(34px, 4.6vw, 56px);
  line-height: 1.12;
  margin-bottom: 22px;
}

.page-hero .lede { color: rgba(255, 255, 255, 0.78); }

/* ---------- buttons ---------- */

.btn-row { display: flex; gap: 16px; flex-wrap: wrap; }

.btn {
  display: inline-block;
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.03em;
  padding: 14px 30px;
  border-radius: 2px;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.btn:hover { text-decoration: none; }

.btn-solid { background: var(--accent); color: #fff; border: 1px solid var(--accent); }
.btn-solid:hover { background: #279184; border-color: #279184; }

.btn-ghost { border: 1px solid rgba(255, 255, 255, 0.5); color: #fff; }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent-soft); }

.btn-ink { border: 1px solid var(--ink); color: var(--ink); }
.btn-ink:hover { background: var(--ink); color: #fff; }

/* ---------- sections ---------- */

.section { padding: clamp(72px, 9vw, 130px) 0; }
.section.alt { background: var(--paper-2); }
.section.dark { background: var(--ink); color: rgba(255, 255, 255, 0.82); }
.section.dark h2, .section.dark h3 { color: #fff; }

.section h2 {
  font-size: clamp(30px, 3.6vw, 44px);
  line-height: 1.15;
  letter-spacing: -0.01em;
  max-width: 18em;
  margin-bottom: 24px;
}

.two-col {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: clamp(36px, 6vw, 90px);
  align-items: start;
}

.two-col p + p { margin-top: 1.2em; }

@media (max-width: 820px) {
  .two-col { grid-template-columns: 1fr; }
}

.more-link {
  display: inline-block;
  margin-top: 28px;
  font-weight: 600;
  font-size: 15px;
  color: var(--teal);
}
.more-link::after { content: "\2192"; margin-left: 8px; transition: margin 0.2s; }
.more-link:hover { text-decoration: none; color: var(--accent); }
.more-link:hover::after { margin-left: 13px; }

/* ---------- practice cards ---------- */

.practice-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(24px, 3vw, 40px);
  margin-top: 56px;
}

@media (max-width: 820px) { .practice-grid { grid-template-columns: 1fr; } }

.practice-card {
  display: block;
  background: var(--paper);
  border: 1px solid var(--hairline);
  color: inherit;
  transition: border-color 0.25s, transform 0.25s, box-shadow 0.25s;
}

.practice-card:hover {
  text-decoration: none;
  border-color: var(--accent);
  transform: translateY(-4px);
  box-shadow: 0 18px 40px -22px rgba(12, 27, 30, 0.35);
}

.practice-card .card-img {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--ink);
}

.practice-card .card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.practice-card:hover .card-img img { transform: scale(1.04); }

.practice-card .card-body { padding: 30px 32px 34px; }

.practice-card h3 { font-size: 26px; margin-bottom: 12px; }

.practice-card p { color: var(--muted); font-size: 16px; }

.practice-card .card-cta {
  display: inline-block;
  margin-top: 20px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--teal);
}
.practice-card .card-cta::after { content: "\2192"; margin-left: 8px; }
.practice-card:hover .card-cta { color: var(--accent); }

/* ---------- capabilities / numbered list ---------- */

.cap-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0 clamp(28px, 4vw, 56px);
  margin-top: 40px;
}

@media (max-width: 980px) { .cap-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px) { .cap-grid { grid-template-columns: 1fr; } }

.cap-grid.cols-2 { grid-template-columns: 1fr 1fr; }
@media (max-width: 640px) { .cap-grid.cols-2 { grid-template-columns: 1fr; } }

.cap {
  border-top: 1px solid var(--hairline);
  padding: 26px 0 34px;
}

.section.dark .cap { border-top-color: var(--hairline-dark); }

.cap .num {
  font-family: var(--serif);
  font-size: 15px;
  color: var(--accent);
  display: block;
  margin-bottom: 12px;
}

.cap h3 { font-size: 20px; margin-bottom: 10px; }

.cap p { font-size: 15.5px; color: var(--muted); }

.section.dark .cap p { color: rgba(255, 255, 255, 0.65); }

/* ---------- sector strip ---------- */

.sector-list {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 36px;
  list-style: none;
}

.sector-list li {
  font-size: 14.5px;
  font-weight: 500;
  padding: 10px 20px;
  border: 1px solid var(--hairline);
  border-radius: 999px;
  color: var(--text);
  background: var(--paper);
}

.section.dark .sector-list li {
  border-color: var(--hairline-dark);
  background: transparent;
  color: rgba(255, 255, 255, 0.85);
}

/* ---------- principles (how we work) ---------- */

.principles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(28px, 4vw, 56px);
  margin-top: 48px;
}

@media (max-width: 820px) { .principles { grid-template-columns: 1fr; } }

.principle { border-top: 2px solid var(--accent); padding-top: 24px; }

.principle h3 { font-size: 22px; margin-bottom: 12px; }

.principle p { font-size: 15.5px; }

.section.dark .principle p { color: rgba(255, 255, 255, 0.68); }

/* ---------- engagement list (practice pages) ---------- */

.engagement-list { list-style: none; margin-top: 36px; }

.engagement-list li {
  border-top: 1px solid var(--hairline);
  padding: 22px 0;
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
  gap: 8px clamp(24px, 4vw, 64px);
}

.engagement-list li:last-child { border-bottom: 1px solid var(--hairline); }

@media (max-width: 640px) { .engagement-list li { grid-template-columns: 1fr; } }

.engagement-list .term {
  font-family: var(--serif);
  font-size: 19px;
  font-weight: 600;
  color: var(--ink);
}

.engagement-list .desc { color: var(--muted); font-size: 15.5px; }

/* ---------- CTA band ---------- */

.cta-band {
  position: relative;
  background: var(--ink);
  color: #fff;
  overflow: hidden;
}

.cta-band::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("../assets/hero-stars-1920.jpg");
  background-size: cover;
  background-position: center;
  opacity: 0.32;
}

.cta-band::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(12,27,30,0.9) 0%, rgba(12,27,30,0.45) 100%);
}

.cta-band .wrap {
  position: relative;
  z-index: 2;
  padding-top: clamp(72px, 9vw, 120px);
  padding-bottom: clamp(72px, 9vw, 120px);
}

.cta-band h2 {
  color: #fff;
  font-size: clamp(30px, 3.8vw, 46px);
  max-width: 16em;
  margin-bottom: 18px;
}

.cta-band p { color: rgba(255, 255, 255, 0.75); max-width: 38em; margin-bottom: 36px; }

/* ---------- contact ---------- */

.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 6fr);
  gap: clamp(40px, 6vw, 90px);
}

@media (max-width: 820px) { .contact-grid { grid-template-columns: 1fr; } }

.contact-info h3 { font-size: 20px; margin: 28px 0 6px; }
.contact-info a.email { font-size: 19px; font-weight: 600; }

.contact-form label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 26px 0 8px;
}

.contact-form label:first-child { margin-top: 0; }

.contact-form input,
.contact-form textarea {
  width: 100%;
  font-family: var(--sans);
  font-size: 16px;
  color: var(--text);
  background: var(--paper);
  border: 1px solid var(--hairline);
  border-radius: 2px;
  padding: 13px 16px;
  transition: border-color 0.2s;
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--accent);
}

.contact-form textarea { min-height: 160px; resize: vertical; }

.contact-form button {
  margin-top: 32px;
  cursor: pointer;
  background: var(--ink);
  color: #fff;
  border: 1px solid var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.03em;
  padding: 15px 38px;
  border-radius: 2px;
  transition: background 0.2s;
}

.contact-form button:hover { background: var(--pine); border-color: var(--pine); }

/* ---------- footer ---------- */

.site-footer {
  background: var(--ink);
  color: rgba(255, 255, 255, 0.6);
  padding: 64px 0 40px;
  font-size: 14.5px;
}

.footer-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 40px;
  flex-wrap: wrap;
  padding-bottom: 40px;
  border-bottom: 1px solid var(--hairline-dark);
}

.footer-top img { height: 36px; width: auto; margin-bottom: 16px; }

.footer-top .tagline { max-width: 30em; }

.footer-nav { display: flex; gap: 56px; flex-wrap: wrap; }

.footer-nav h4 {
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.45);
  margin-bottom: 14px;
}

.footer-nav ul { list-style: none; }
.footer-nav li { margin-bottom: 10px; }
.footer-nav a { color: rgba(255, 255, 255, 0.75); }
.footer-nav a:hover { color: #fff; text-decoration: none; }

.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding-top: 28px;
  font-size: 13.5px;
  color: rgba(255, 255, 255, 0.4);
}

/* ---------- reveal animation ---------- */

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
}
