/* ============================================================
   CHASE ANALYTICS CORPORATION — LAYOUT
   Reset · Nav · Footer · Section scaffolding
   Light-first. Institutional. Restrained.
   ============================================================ */

/* Reset */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  background: var(--c-bg);
  color: var(--c-text);
  font-family: var(--f-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }

/* Container */
.container {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--sp-md);
}

/* Nav — light background, gold bottom border */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: var(--nav-h);
  background: var(--c-bg);
  display: flex;
  align-items: center;
  box-shadow: 0 1px 0 var(--c-border);
}

nav::after {
  content: "";
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 2px;
  background: var(--grad-h);
}

.nav-inner {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--sp-md);
  display: flex;
  align-items: center;
  gap: var(--sp-lg);
}

.nav-logo {
  font-family: var(--f-display);
  font-size: 1.15rem;
  font-weight: 400;
  color: var(--c-text);
  letter-spacing: 0.03em;
  flex-shrink: 0;
  line-height: 1;
}

.nav-logo span {
  color: var(--c-gold);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--sp-md);
  margin-left: auto;
  list-style: none;
}

.nav-links a {
  font-family: var(--f-mono);
  font-size: 0.70rem;
  letter-spacing: 0.06em;
  color: var(--c-text-muted);
  transition: color 0.2s;
  text-transform: uppercase;
}

.nav-links a:hover { color: var(--c-text); }

.nav-cta {
  font-family: var(--f-mono);
  font-size: 0.70rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--c-bg-dark);
  background: var(--c-gold);
  padding: 0.45rem 1.1rem;
  border-radius: var(--r-sm);
  transition: opacity 0.2s;
  flex-shrink: 0;
  text-transform: uppercase;
}

.nav-cta:hover { opacity: 0.85; }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  margin-left: auto;
  flex-direction: column;
  gap: 5px;
  padding: 0.25rem;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 1.5px;
  background: var(--c-text);
  transition: all 0.25s;
}

/* Sections */
section { padding: var(--sp-xl) 0; }
section.mid { background: var(--c-bg-mid); }

section.dark {
  background: var(--c-bg-navy);
  color: var(--c-text-inv);
}

.section-label {
  font-family: var(--f-mono);
  font-size: 0.65rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--c-gold);
  margin-bottom: var(--sp-sm);
  display: block;
}

section.dark .section-label { color: var(--c-gold); }

.section-headline {
  font-family: var(--f-display);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 300;
  line-height: 1.15;
  color: var(--c-text);
  margin-bottom: var(--sp-sm);
}

section.dark .section-headline { color: var(--c-text-inv); }

.section-sub {
  font-size: 1rem;
  color: var(--c-text-muted);
  max-width: 580px;
  line-height: 1.75;
}

section.dark .section-sub { color: var(--c-text-inv-muted); }

/* Divider */
.divider {
  height: 1px;
  background: var(--grad-h);
  margin: var(--sp-xl) 0;
}

/* Page wrap — pushes content below fixed nav */
.page-wrap {
  padding-top: calc(var(--nav-h) + var(--sp-xl));
  padding-bottom: var(--sp-xl);
}

/* Footer — intentional dark callback to ADAT interior */
footer {
  background: var(--c-bg-dark);
  padding: var(--sp-lg) 0;
  position: relative;
}

footer::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: var(--grad-h);
}

.footer-inner {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--sp-md);
  flex-wrap: wrap;
}

.footer-logo {
  font-family: var(--f-display);
  font-size: 1.1rem;
  font-weight: 400;
  color: var(--c-text-inv);
  letter-spacing: 0.02em;
}

.footer-logo span { color: var(--c-gold); }

.footer-tagline {
  font-family: var(--f-mono);
  font-size: 0.65rem;
  letter-spacing: 0.06em;
  color: var(--c-text-inv-muted);
  margin-top: 0.4rem;
  max-width: 260px;
  line-height: 1.6;
}

.footer-links {
  display: flex;
  gap: var(--sp-md);
  list-style: none;
  flex-wrap: wrap;
}

.footer-links a {
  font-family: var(--f-mono);
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  color: var(--c-text-inv-muted);
  transition: color 0.2s;
  text-transform: uppercase;
}

.footer-links a:hover { color: var(--c-gold); }

.footer-bottom {
  width: 100%;
  margin-top: var(--sp-lg);
  padding-top: var(--sp-sm);
  border-top: 1px solid rgba(240, 237, 230, 0.10);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--sp-sm);
}

.footer-copy {
  font-family: var(--f-mono);
  font-size: 0.62rem;
  color: rgba(240, 237, 230, 0.30);
  letter-spacing: 0.04em;
}

.footer-legal {
  display: flex;
  gap: var(--sp-md);
  list-style: none;
}

.footer-legal a {
  font-family: var(--f-mono);
  font-size: 0.62rem;
  color: rgba(240, 237, 230, 0.30);
  letter-spacing: 0.04em;
  transition: color 0.2s;
}

.footer-legal a:hover { color: var(--c-gold); }

/* Responsive */
@media (max-width: 768px) {
  .nav-links, .nav-cta { display: none; }
  .nav-toggle { display: flex; }

  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: var(--nav-h); left: 0; right: 0;
    background: var(--c-bg);
    padding: var(--sp-md);
    gap: var(--sp-sm);
    border-bottom: 1px solid var(--c-border);
    z-index: 99;
  }

  section { padding: var(--sp-lg) 0; }
  .footer-inner { flex-direction: column; }
}

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