/* =============================================================
   EVERTRUST CONSULTING — style.css
   Premium consulting aesthetic: deep navy ground, soft greys,
   muted gold + teal accents, editorial serif headings.
   Edit the tokens in :root to re-theme the whole site.
============================================================= */

/* ---------- 1. DESIGN TOKENS ---------- */
:root {
  /* Surfaces (deep navy → charcoal layers) */
  --navy-900: #081320;   /* page base */
  --navy-850: #0a1827;
  --navy-800: #0c1d31;   /* alt sections */
  --navy-750: #102338;
  --navy-700: #13283f;   /* cards */
  --navy-600: #1c3651;   /* borders / hover */

  /* Text */
  --white:    #f4f7fb;
  --grey:     #aab7c7;   /* body copy */
  --grey-dim: #6f7e92;   /* labels / muted */

  /* Accents (muted, not neon) */
  --gold:      #c6a664;
  --gold-soft: #ddc594;
  --teal:      #4fa3a1;
  --teal-soft: #79c2c0;

  /* Type */
  --font-serif: "Spectral", Georgia, "Times New Roman", serif;
  --font-sans:  "Manrope", system-ui, -apple-system, sans-serif;

  /* Layout */
  --maxw: 1200px;
  --gutter: clamp(20px, 5vw, 48px);
  --section-y: clamp(72px, 10vw, 140px);
  --radius: 4px;
  --radius-lg: 8px;

  /* Motion */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---------- 2. RESET / BASE ---------- */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 90px; }

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.7;
  color: var(--grey);
  background: var(--navy-900);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

h1, h2, h3 { font-family: var(--font-serif); color: var(--white); font-weight: 500; line-height: 1.15; margin: 0; letter-spacing: -0.01em; }
p { margin: 0 0 1em; text-wrap: pretty; }
a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }
ul { margin: 0; padding: 0; list-style: none; }

.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }

/* ---------- 3. BUTTONS ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--font-sans); font-weight: 600; font-size: 0.95rem;
  letter-spacing: 0.01em;
  padding: 14px 28px; border-radius: var(--radius); cursor: pointer;
  border: 1px solid transparent; transition: all 0.3s var(--ease);
  white-space: nowrap;
}
.btn-primary {
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-soft) 100%);
  color: #14110a; box-shadow: 0 8px 24px -10px rgba(198,166,100,0.5);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 14px 30px -10px rgba(198,166,100,0.6); }
.btn-ghost { background: transparent; color: var(--white); border-color: var(--navy-600); }
.btn-ghost:hover { border-color: var(--teal); color: var(--teal-soft); background: rgba(79,163,161,0.06); }
.btn-block { width: 100%; }

/* ---------- 4. HEADER / NAV ---------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  padding: 18px 0;
  transition: background 0.3s var(--ease), padding 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.site-header.scrolled {
  background: rgba(8,19,32,0.85);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  padding: 12px 0;
  box-shadow: 0 1px 0 rgba(255,255,255,0.05);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; }

.brand { display: flex; align-items: center; gap: 14px; }
.brand-logo { height: 38px; width: auto; display: block; transition: height 0.3s var(--ease); }
.site-header.scrolled .brand-logo { height: 32px; }
.brand-divider { width: 1px; height: 30px; background: rgba(255,255,255,0.14); }
.brand-text { display: flex; flex-direction: column; line-height: 1; }
.brand-name { font-family: var(--font-serif); font-size: 1.25rem; color: var(--white); letter-spacing: 0.01em; }
.brand-sub { font-size: 0.7rem; letter-spacing: 0.32em; text-transform: uppercase; color: var(--grey-dim); margin-top: 3px; }

.main-nav { display: flex; align-items: center; gap: 32px; }
.main-nav > a:not(.btn) {
  font-size: 0.92rem; font-weight: 500; color: var(--grey);
  position: relative; padding: 4px 0; transition: color 0.25s var(--ease);
}
.main-nav > a:not(.btn)::after {
  content: ""; position: absolute; left: 0; bottom: -2px; width: 0; height: 1px;
  background: var(--gold); transition: width 0.3s var(--ease);
}
.main-nav > a:not(.btn):hover { color: var(--white); }
.main-nav > a:not(.btn):hover::after { width: 100%; }
.nav-cta { padding: 11px 22px; font-size: 0.9rem; }

/* Mobile hamburger — 44px hit area for accessibility */
.nav-toggle { display: none; flex-direction: column; align-items: center; justify-content: center; gap: 5px; width: 44px; height: 44px; background: none; border: 0; cursor: pointer; padding: 0; }
.nav-toggle span { width: 24px; height: 2px; background: var(--white); border-radius: 2px; transition: transform 0.3s var(--ease), opacity 0.3s var(--ease); }
.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); }

/* ---------- 5. HERO ---------- */
.hero {
  position: relative; min-height: 100vh; display: flex; align-items: center;
  padding: 140px 0 90px; overflow: hidden;
  background:
    radial-gradient(120% 80% at 80% 0%, var(--navy-750) 0%, var(--navy-900) 55%);
}
.hero-bg { position: absolute; inset: 0; z-index: 0; }
.hero-grid { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-glow {
  position: absolute; top: -10%; right: -5%; width: 60vw; height: 60vw; max-width: 760px; max-height: 760px;
  background: radial-gradient(circle, rgba(79,163,161,0.16) 0%, rgba(79,163,161,0) 65%);
  filter: blur(10px); pointer-events: none;
}
.hero-dots {
  position: absolute; inset: 0;
  background-image: radial-gradient(rgba(169,182,198,0.10) 1px, transparent 1.4px);
  background-size: 26px 26px;
  -webkit-mask-image: radial-gradient(120% 90% at 75% 30%, #000 0%, transparent 60%);
          mask-image: radial-gradient(120% 90% at 75% 30%, #000 0%, transparent 60%);
  opacity: 0.6;
}
/* animated plot lines (drawn in) */
.plot { stroke-dasharray: 2600; stroke-dashoffset: 2600; animation: draw 3.4s var(--ease) forwards 0.4s; }
.plot-teal { animation-delay: 0.7s; }
@keyframes draw { to { stroke-dashoffset: 0; } }

.hero-inner { position: relative; z-index: 1; max-width: 940px; }
.eyebrow {
  display: inline-block; font-size: 0.8rem; font-weight: 600; letter-spacing: 0.22em;
  text-transform: uppercase; color: var(--gold); margin: 0 0 24px;
  padding-bottom: 14px; border-bottom: 1px solid var(--navy-600);
}
.hero-title { font-size: clamp(2.4rem, 6vw, 4.4rem); font-weight: 500; max-width: 16ch; margin-bottom: 28px; }
.hero-sub { font-size: clamp(1.05rem, 2vw, 1.3rem); max-width: 60ch; color: var(--grey); margin-bottom: 40px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 16px; }

/* ---------- 6. TRUST STRIP ---------- */
.trust-strip { background: var(--navy-800); border-block: 1px solid rgba(255,255,255,0.05); }
.trust-grid { display: grid; grid-template-columns: repeat(4, 1fr); }
.trust-item {
  display: flex; align-items: center; gap: 12px;
  padding: 30px var(--gutter); font-size: 0.95rem; font-weight: 500; color: var(--white);
  border-left: 1px solid rgba(255,255,255,0.05);
}
.trust-item:first-child { border-left: 0; padding-left: 0; }
.trust-icon { color: var(--teal); font-size: 0.7rem; }

/* ---------- 7. SECTION SCAFFOLD ---------- */
.section { padding-block: var(--section-y); position: relative; }
.section-head { margin-bottom: 56px; }
.section-head.center { text-align: center; max-width: 720px; margin-inline: auto; }
.kicker {
  font-size: 0.78rem; font-weight: 700; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--teal); margin: 0 0 16px;
}
.kicker.gold { color: var(--gold); }
.section-title { font-size: clamp(1.9rem, 4vw, 3rem); }
.section-lead { font-size: 1.12rem; color: var(--grey); margin-top: 20px; }

/* ---------- 8. ABOUT ---------- */
.about { background: var(--navy-900); }
.about-grid { display: grid; grid-template-columns: 0.85fr 1.15fr; gap: clamp(32px, 6vw, 88px); align-items: start; }
.about-body p { font-size: 1.15rem; color: var(--grey); }
.about-body p:last-child { margin-bottom: 0; }
.about .section-head { margin-bottom: 0; }
.about-grid .section-title { font-size: clamp(1.7rem, 3.4vw, 2.5rem); }

/* ---------- 9. SERVICES ---------- */
.services { background: var(--navy-850); }
.cards-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.card {
  position: relative; background: var(--navy-700);
  border: 1px solid rgba(255,255,255,0.06); border-radius: var(--radius-lg);
  padding: 38px 34px; overflow: hidden;
  transition: transform 0.4s var(--ease), border-color 0.4s var(--ease), box-shadow 0.4s var(--ease);
}
.card::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 2px;
  background: linear-gradient(90deg, var(--gold), var(--teal));
  transform: scaleX(0); transform-origin: left; transition: transform 0.45s var(--ease);
}
.card:hover { transform: translateY(-6px); border-color: var(--navy-600); box-shadow: 0 26px 50px -28px rgba(0,0,0,0.8); }
.card:hover::before { transform: scaleX(1); }
.card-num { font-family: var(--font-serif); font-size: 0.95rem; color: var(--gold); letter-spacing: 0.1em; }
.card-title { font-size: 1.4rem; margin: 14px 0 16px; }
.card p { font-size: 0.98rem; color: var(--grey); margin: 0; }

/* ---------- 10. FRACTIONAL CFO HIGHLIGHT ---------- */
.cfo-highlight {
  background:
    radial-gradient(100% 120% at 0% 0%, rgba(79,163,161,0.10) 0%, transparent 45%),
    radial-gradient(90% 120% at 100% 100%, rgba(198,166,100,0.10) 0%, transparent 45%),
    var(--navy-800);
  border-block: 1px solid rgba(255,255,255,0.05);
}
.cfo-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(36px, 6vw, 80px); align-items: center; }
.cfo-sub { font-size: 1.25rem; color: var(--gold-soft); font-family: var(--font-serif); font-style: italic; margin: 12px 0 32px; }
.cfo-list { display: grid; grid-template-columns: 1fr 1fr; gap: 2px; background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.06); border-radius: var(--radius-lg); overflow: hidden; }
.cfo-list li {
  background: var(--navy-750); padding: 22px 24px; font-size: 1rem; color: var(--white); font-weight: 500;
  display: flex; align-items: center; gap: 12px; transition: background 0.3s var(--ease);
}
.cfo-list li::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--teal); flex-shrink: 0; }
.cfo-list li:hover { background: var(--navy-700); }

/* ---------- 11. DELIVERY MODEL ---------- */
.delivery { background: var(--navy-900); }
.pillars-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.pillar { padding: 34px 28px 30px; border-top: 2px solid var(--navy-600); transition: border-color 0.35s var(--ease); }
.pillar:hover { border-top-color: var(--gold); }
.pillar-index { font-family: var(--font-serif); font-size: 2.4rem; color: var(--navy-600); display: block; margin-bottom: 14px; transition: color 0.35s var(--ease); }
.pillar:hover .pillar-index { color: var(--teal); }
.pillar h3 { font-size: 1.2rem; margin-bottom: 12px; }
.pillar p { font-size: 0.96rem; margin: 0; }

/* ---------- 12. WHY EVERTRUST ---------- */
.why { background: var(--navy-850); }
.why-grid { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: clamp(32px, 6vw, 80px); align-items: center; }
.why-list { display: grid; gap: 2px; }
.why-list li {
  display: flex; align-items: center; gap: 18px; padding: 20px 4px;
  border-bottom: 1px solid rgba(255,255,255,0.07); font-size: 1.08rem; color: var(--white); font-weight: 500;
}
.why-list li:last-child { border-bottom: 0; }
.why-tick {
  flex-shrink: 0; width: 30px; height: 30px; border-radius: 50%;
  display: grid; place-items: center; font-size: 0.85rem; font-weight: 700;
  color: var(--gold); border: 1px solid rgba(198,166,100,0.4); background: rgba(198,166,100,0.08);
}

/* ---------- 13. ENGAGEMENT TYPES ---------- */
.engagements { background: var(--navy-900); }
.engage-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.engage-item {
  background: var(--navy-800); border: 1px solid rgba(255,255,255,0.06); border-radius: var(--radius);
  padding: 28px 26px; font-size: 1.05rem; font-weight: 500; color: var(--white);
  position: relative; padding-left: 52px; transition: border-color 0.3s var(--ease), background 0.3s var(--ease);
}
.engage-item::before {
  content: ""; position: absolute; left: 26px; top: 50%; transform: translateY(-50%);
  width: 10px; height: 10px; border: 2px solid var(--teal); border-radius: 2px; transform: translateY(-50%) rotate(45deg);
}
.engage-item:hover { border-color: var(--navy-600); background: var(--navy-750); }

/* ---------- 14. CONTACT ---------- */
.contact { background: var(--navy-850); }
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(40px, 6vw, 84px); align-items: start; }
.contact-lead { font-size: 1.1rem; margin: 20px 0 40px; max-width: 46ch; }
.contact-details { display: grid; gap: 24px; }
.contact-details li { display: flex; flex-direction: column; gap: 4px; }
.cd-label { font-size: 0.74rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--grey-dim); }
.contact-details a, .contact-details li > span:last-child { font-size: 1.15rem; color: var(--white); }
.contact-details a:hover { color: var(--gold-soft); }

/* form */
.contact-form {
  display: grid; grid-template-columns: 1fr 1fr; gap: 20px;
  background: var(--navy-800); border: 1px solid rgba(255,255,255,0.07);
  border-radius: var(--radius-lg); padding: clamp(28px, 4vw, 44px);
}
.field { display: flex; flex-direction: column; gap: 8px; }
.field-full { grid-column: 1 / -1; }
.field label { font-size: 0.82rem; font-weight: 600; letter-spacing: 0.04em; color: var(--grey); }
.field input, .field select, .field textarea {
  font-family: var(--font-sans); font-size: 1rem; color: var(--white);
  background: var(--navy-750); border: 1px solid var(--navy-600); border-radius: var(--radius);
  padding: 13px 15px; transition: border-color 0.25s var(--ease), box-shadow 0.25s var(--ease);
  width: 100%;
}
.field select { appearance: none; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23aab7c7' stroke-width='1.5' fill='none'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 15px center; padding-right: 38px;
}
.field textarea { resize: vertical; min-height: 110px; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--teal); box-shadow: 0 0 0 3px rgba(79,163,161,0.15);
}
.field input::placeholder, .field textarea::placeholder { color: var(--grey-dim); }
.form-note { font-size: 0.88rem; margin: 14px 0 0; min-height: 1.2em; color: var(--teal-soft); }

/* ---------- 15. FOOTER ---------- */
.site-footer { background: var(--navy-900); border-top: 1px solid rgba(255,255,255,0.07); padding: 56px 0 40px; }
.footer-inner { display: grid; gap: 28px; }
.footer-brand { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.footer-logo { height: 52px; width: auto; margin-bottom: 6px; }
.footer-brand .brand-name { font-size: 1.3rem; }
.footer-tagline { font-size: 0.92rem; color: var(--grey-dim); letter-spacing: 0.02em; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 28px; }
.footer-nav a { font-size: 0.92rem; color: var(--grey); transition: color 0.25s var(--ease); }
.footer-nav a:hover { color: var(--gold-soft); }
.footer-copy { font-size: 0.82rem; color: var(--grey-dim); margin: 0; padding-top: 24px; border-top: 1px solid rgba(255,255,255,0.06); }

/* ---------- 16. SCROLL-REVEAL ANIMATION ---------- */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
/* gentle stagger when several reveals share a parent */
.cards-grid .reveal.in,
.pillars-grid .reveal.in,
.engage-grid .reveal.in,
.cfo-list .reveal.in,
.why-list .reveal.in { transition-delay: var(--d, 0s); }

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

/* =============================================================
   17. RESPONSIVE
============================================================= */
@media (max-width: 980px) {
  .trust-grid { grid-template-columns: repeat(2, 1fr); }
  .trust-item { border-left: 0; padding: 24px var(--gutter); }
  .trust-item:nth-child(odd) { padding-left: 0; }
  .cards-grid { grid-template-columns: repeat(2, 1fr); }
  .pillars-grid { grid-template-columns: repeat(2, 1fr); }
  .engage-grid { grid-template-columns: repeat(2, 1fr); }
  .about-grid, .cfo-grid, .why-grid, .contact-grid { grid-template-columns: 1fr; }
  .cfo-intro { text-align: left; }
}

@media (max-width: 720px) {
  .cards-grid, .pillars-grid, .engage-grid, .cfo-list, .trust-grid { grid-template-columns: 1fr; }
  .trust-item, .trust-item:nth-child(odd) { padding: 20px 0; border-bottom: 1px solid rgba(255,255,255,0.05); }
  .trust-grid .trust-item:last-child { border-bottom: 0; }
  .contact-form { grid-template-columns: 1fr; }
  .hero { min-height: auto; padding-top: 120px; }
}

/* Nav collapses to a drawer below 1024px — BEFORE the desktop nav
   (5 links + CTA) would overflow the bar and get clipped. */
@media (max-width: 1024px) {
  .nav-toggle { display: flex; }
  .main-nav {
    position: fixed; inset: 0 0 0 auto; width: min(82vw, 340px);
    flex-direction: column; align-items: flex-start; justify-content: center; gap: 26px;
    background: var(--navy-850); padding: 48px 40px;
    transform: translateX(100%); transition: transform 0.4s var(--ease);
    box-shadow: -20px 0 60px -20px rgba(0,0,0,0.7); z-index: 90;
  }
  .main-nav.open { transform: translateX(0); }
  .main-nav > a:not(.btn) { font-size: 1.15rem; }
  .nav-cta { margin-top: 8px; }

  body.nav-open { overflow: hidden; }
  /* Solid header while the drawer is open so its top edge reads cleanly */
  body.nav-open .site-header { background: rgba(8,19,32,0.92); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
}

@media (max-width: 420px) {
  .brand-sub { display: none; }
  .btn { padding: 13px 22px; }
  .hero-actions { width: 100%; }
  .hero-actions .btn { flex: 1; }
}
