/* ============================================================
   TRUE NORTH COS. — WEBSITE STYLES
   Clean & Minimal · Professional · Purposeful
   ============================================================ */

/* ── Reset & Base ── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --navy:        #1a2744;
  --navy-light:  #2a3a5c;
  --cobalt:      #0057D9;
  --cobalt-light:#2e74e8;
  --white:       #ffffff;
  --off-white:   #f5f6f8;
  --text:        #1a1a1a;
  --text-muted:  #6b6b6b;
  --border:      #e2e6ed;

  --font-serif: 'Cormorant Garamond', Georgia, serif;
  --font-sans:  'Inter', system-ui, -apple-system, sans-serif;

  --nav-h: 72px;
  --radius: 2px;
  --transition: 0.25s ease;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-sans);
  color: var(--text);
  background: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

/* ── Container ── */
.container {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 40px;
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  font-family: var(--font-sans);
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: background var(--transition), color var(--transition), border-color var(--transition);
  border-radius: var(--radius);
}

.btn--primary {
  background: var(--navy);
  color: var(--white);
  border-color: var(--navy);
}
.btn--primary:hover {
  background: var(--navy-light);
  border-color: var(--navy-light);
}

.btn--ghost {
  background: transparent;
  color: var(--navy);
  border-color: var(--navy);
}
.btn--ghost:hover {
  background: var(--navy);
  color: var(--white);
}

.btn--full { width: 100%; justify-content: center; }

/* ── Section Utilities ── */
.section-label {
  display: inline-block;
  font-family: var(--font-sans);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--cobalt);
  margin-bottom: 16px;
}
.section-label--light { color: var(--cobalt-light); }

.section-heading {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 400;
  line-height: 1.2;
  color: var(--navy);
  margin-bottom: 24px;
}
.section-heading em {
  font-style: italic;
  font-weight: 300;
  color: var(--cobalt);
}
.section-heading--light { color: var(--white); }
.section-heading--light em { color: var(--cobalt-light); }

.section-intro {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 64px;
}
.section-intro__body {
  color: var(--text-muted);
  font-size: 1.05rem;
}

/* ============================================================
   NAVIGATION
   ============================================================ */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(255,255,255,0.96);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.nav.scrolled {
  border-bottom-color: var(--border);
  box-shadow: 0 2px 20px rgba(26,39,68,0.06);
}

.nav__inner {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 40px;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav__logo-img {
  height: 36px;
  width: auto;
}
.nav__logo-text {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--navy);
  letter-spacing: 0.02em;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 40px;
}
.nav__links a {
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  transition: color var(--transition);
}
.nav__links a:hover { color: var(--navy); }

.nav__cta {
  padding: 10px 24px !important;
  background: var(--navy) !important;
  color: var(--white) !important;
  border-radius: var(--radius);
  transition: background var(--transition) !important;
}
.nav__cta:hover { background: var(--navy-light) !important; }

.nav__hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.nav__hamburger span {
  display: block;
  width: 24px;
  height: 1.5px;
  background: var(--navy);
  transition: transform var(--transition), opacity var(--transition);
}

.nav__mobile {
  display: none;
  padding: 16px 40px 24px;
  border-top: 1px solid var(--border);
}
.nav__mobile ul { display: flex; flex-direction: column; gap: 4px; }
.nav__mobile a {
  display: block;
  padding: 12px 0;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text);
  border-bottom: 1px solid var(--border);
}
.nav__mobile.open { display: block; }

/* ============================================================
   HERO
   ============================================================ */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: calc(var(--nav-h) + 80px) 40px 100px;
  max-width: 1160px;
  margin: 0 auto;
  position: relative;
}

.hero__eyebrow {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--cobalt);
  margin-bottom: 24px;
}

.hero__headline {
  font-family: var(--font-serif);
  font-size: clamp(3rem, 7vw, 5.5rem);
  font-weight: 300;
  line-height: 1.1;
  color: var(--navy);
  margin-bottom: 32px;
  max-width: 820px;
}
.hero__headline em {
  font-style: italic;
  color: var(--cobalt);
}

.hero__sub {
  font-size: 1.125rem;
  color: var(--text-muted);
  max-width: 560px;
  margin-bottom: 48px;
  line-height: 1.7;
}

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


/* ============================================================
   ABOUT
   ============================================================ */
.about {
  padding: 120px 0;
  background: var(--off-white);
}

.about__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: start;
}

.about__text p {
  color: var(--text-muted);
  font-size: 1.05rem;
  line-height: 1.75;
  margin-bottom: 20px;
}
.about__text p:last-child { margin-bottom: 0; }

.about__stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
}

.stat { padding: 24px 0; border-top: 1px solid var(--border); }
.stat__number {
  display: block;
  font-family: var(--font-serif);
  font-size: 3rem;
  font-weight: 400;
  color: var(--navy);
  line-height: 1;
  margin-bottom: 8px;
}
.stat__label {
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* ============================================================
   SERVICES
   ============================================================ */
.services {
  padding: 120px 0;
}

.services__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2px;
  background: var(--border);
  border: 1px solid var(--border);
}

.service-card {
  background: var(--white);
  padding: 48px 40px;
  transition: background var(--transition);
}
.service-card:hover { background: var(--off-white); }

.service-card__icon {
  width: 40px;
  height: 40px;
  margin-bottom: 24px;
  color: var(--cobalt);
}
.service-card__icon svg { width: 100%; height: 100%; }

.service-card h3 {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 500;
  color: var(--navy);
  margin-bottom: 16px;
}
.service-card p {
  color: var(--text-muted);
  font-size: 0.975rem;
  line-height: 1.7;
}

/* ============================================================
   PORTFOLIO
   ============================================================ */
.portfolio {
  padding: 120px 0;
  background: var(--off-white);
}

/* Scroll container */
.portfolio-scroll-outer {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0;
  margin-top: 56px;
}

.portfolio-scroll {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  gap: 20px;
  padding: 8px 64px 24px;
  cursor: grab;
}
.portfolio-scroll:active { cursor: grabbing; }
.portfolio-scroll::-webkit-scrollbar { display: none; }

/* Nav arrows */
.portfolio-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  width: 44px;
  height: 44px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--navy);
  box-shadow: 0 2px 12px rgba(26,39,68,0.1);
  transition: background var(--transition), box-shadow var(--transition), opacity var(--transition);
  flex-shrink: 0;
}
.portfolio-nav:hover { background: var(--off-white); box-shadow: 0 4px 20px rgba(26,39,68,0.15); }
.portfolio-nav:disabled { opacity: 0.25; cursor: default; }
.portfolio-nav svg { width: 18px; height: 18px; }
.portfolio-nav--prev { left: 8px; }
.portfolio-nav--next { right: 8px; }

/* Cards */
.portfolio-card {
  flex-shrink: 0;
  scroll-snap-align: start;
  width: 220px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 36px 28px 28px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  transition: box-shadow var(--transition), transform var(--transition);
  text-decoration: none;
  color: inherit;
}
.portfolio-card:hover {
  box-shadow: 0 8px 32px rgba(26,39,68,0.09);
  transform: translateY(-2px);
}

.portfolio-card__logo {
  flex: 1;
  display: flex;
  align-items: center;
  min-height: 72px;
}
.portfolio-card__logo img {
  max-width: 100%;
  max-height: 72px;
  width: auto;
  object-fit: contain;
  filter: grayscale(100%);
  opacity: 0.6;
  transition: filter var(--transition), opacity var(--transition);
}
.portfolio-card:hover .portfolio-card__logo img {
  filter: grayscale(0%);
  opacity: 1;
}
.portfolio-card__logo--text {
  align-items: flex-start;
}
.portfolio-card__name {
  font-family: var(--font-serif);
  font-size: 1.4rem;
  font-weight: 500;
  color: var(--navy);
  line-height: 1.25;
}

.portfolio-card__badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.portfolio-card__badge {
  flex-shrink: 0;
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 3px 9px;
  background: var(--navy);
  color: var(--white);
  border-radius: 100px;
}
.portfolio-card__badge--advisory {
  background: transparent;
  color: var(--cobalt);
  border: 1px solid var(--cobalt);
}
.portfolio-card__badge--cofounded {
  background: transparent;
  color: var(--navy);
  border: 1px solid var(--navy);
}

/* ============================================================
   CONTACT
   ============================================================ */
.contact {
  padding: 120px 0;
  background: var(--navy);
}

.contact__inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}

.contact__inner--chat {
  align-items: center;
}

.contact__text p {
  color: rgba(255,255,255,0.65);
  font-size: 1.05rem;
  line-height: 1.75;
  margin-top: 8px;
}

.contact__sub {
  margin-top: 20px !important;
  font-size: 0.95rem !important;
  color: rgba(255,255,255,0.45) !important;
}

.contact__cta-wrap {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 20px;
}

.contact__email-note {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.35);
}

.contact__email-note a {
  color: rgba(255,255,255,0.55);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.contact__email-note a:hover {
  color: rgba(255,255,255,0.85);
}

/* btn variants */
.btn--light {
  background: rgba(255,255,255,0.1);
  border-color: rgba(255,255,255,0.25);
  color: var(--white);
}
.btn--light:hover {
  background: rgba(255,255,255,0.18);
  border-color: rgba(255,255,255,0.5);
  color: var(--white);
}
.btn--lg {
  padding: 18px 36px;
  font-size: 0.9rem;
}
.btn__icon {
  width: 18px;
  height: 18px;
  display: inline-block;
  vertical-align: middle;
  margin-right: 10px;
  margin-bottom: 2px;
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  padding: 48px 0;
  background: #111b30;
  border-top: 1px solid rgba(255,255,255,0.06);
}

.footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}

.footer__logo {
  height: 28px;
  width: auto;
  margin-bottom: 12px;
  filter: brightness(0) invert(1) opacity(0.6);
}

.footer__tagline {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.3);
  line-height: 1.6;
}

.footer__links {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 20px;
}
.footer__links nav {
  display: flex;
  gap: 32px;
}
.footer__social {
  display: flex;
  gap: 16px;
}
.footer__social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  color: rgba(255,255,255,0.35);
  transition: color var(--transition);
}
.footer__social-link:hover { color: rgba(255,255,255,0.8); }
.footer__social-link svg { width: 18px; height: 18px; }
.footer__links a {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.35);
  transition: color var(--transition);
}
.footer__links a:hover { color: rgba(255,255,255,0.8); }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 960px) {
  .container { padding: 0 24px; }

  .about__grid { grid-template-columns: 1fr; gap: 48px; }
  .services__grid { grid-template-columns: 1fr; }
  .contact__inner { grid-template-columns: 1fr; gap: 48px; }
}

@media (max-width: 680px) {
  .nav__links { display: none; }
  .nav__hamburger { display: flex; }
  .nav__inner { padding: 0 24px; }
  .nav__mobile { padding: 16px 24px 24px; }

  .hero {
    padding: calc(var(--nav-h) + 48px) 24px 80px;
    min-height: 90vh;
  }
  .hero__actions { flex-direction: column; }

  .about { padding: 80px 0; }
  .about__stats { grid-template-columns: 1fr 1fr; }

  .services { padding: 80px 0; }

  .portfolio { padding: 80px 0; }
  .portfolio-scroll { padding: 8px 16px 24px; }
  .portfolio-card { width: 180px; padding: 28px 20px 20px; }
  .portfolio-nav { display: none; }

  .contact { padding: 80px 0; }
  .contact__cta-wrap { width: 100%; }
  .btn--lg { width: 100%; justify-content: center; }

  .footer__inner { flex-direction: column; align-items: flex-start; }
  .footer__links nav { flex-wrap: wrap; gap: 20px; }

  .section-intro { margin-bottom: 40px; }

  /* Chat widget full-screen on mobile */
  .chat-widget__panel {
    width: 100% !important;
    height: 100% !important;
    bottom: 0 !important;
    right: 0 !important;
    border-radius: 0 !important;
    max-height: 100vh !important;
  }
}

/* ============================================================
   CHAT WIDGET
   ============================================================ */

/* Backdrop */
.chat-widget__backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(10,15,30,0.45);
  z-index: 998;
  opacity: 0;
  transition: opacity 0.3s ease;
}

/* Panel */
.chat-widget__panel {
  position: fixed;
  bottom: 32px;
  right: 32px;
  width: 420px;
  max-height: 600px;
  background: var(--white);
  border-radius: 12px;
  box-shadow: 0 24px 64px rgba(10,15,30,0.22), 0 4px 16px rgba(10,15,30,0.12);
  display: flex;
  flex-direction: column;
  z-index: 999;
  transform: translateY(24px) scale(0.97);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.3s cubic-bezier(0.34,1.56,0.64,1), opacity 0.25s ease;
  overflow: hidden;
}

/* Open state */
.chat-widget--open .chat-widget__backdrop {
  display: block;
  opacity: 1;
}
.chat-widget--open .chat-widget__panel {
  transform: translateY(0) scale(1);
  opacity: 1;
  pointer-events: all;
}

/* Header */
.chat-widget__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  background: var(--navy);
  flex-shrink: 0;
}

.chat-widget__header-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.chat-widget__avatar {
  width: 36px;
  height: 36px;
  background: var(--cobalt);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.chat-widget__avatar svg {
  width: 16px;
  height: 16px;
  color: var(--white);
}

.chat-widget__name {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--white);
  line-height: 1.2;
}
.chat-widget__status {
  font-size: 0.7rem;
  color: rgba(255,255,255,0.45);
  letter-spacing: 0.04em;
  margin-top: 2px;
}

.chat-widget__close {
  background: none;
  border: none;
  cursor: pointer;
  color: rgba(255,255,255,0.45);
  padding: 4px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  transition: color var(--transition);
}
.chat-widget__close:hover { color: var(--white); }
.chat-widget__close svg { width: 18px; height: 18px; }

/* Messages area */
.chat-widget__messages {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  scroll-behavior: smooth;
}
.chat-widget__messages::-webkit-scrollbar { width: 4px; }
.chat-widget__messages::-webkit-scrollbar-track { background: transparent; }
.chat-widget__messages::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }

/* Message bubbles */
.chat-msg {
  max-width: 85%;
  animation: msgIn 0.22s ease both;
}
@keyframes msgIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.chat-msg p {
  font-size: 0.9rem;
  line-height: 1.6;
  margin-bottom: 6px;
}
.chat-msg p:last-child { margin-bottom: 0; }

.chat-msg--assistant {
  align-self: flex-start;
}
.chat-msg--assistant p {
  background: var(--off-white);
  color: var(--text);
  padding: 12px 16px;
  border-radius: 4px 16px 16px 4px;
}
.chat-msg--assistant p:first-child { border-radius: 16px 16px 16px 4px; }
.chat-msg--assistant p:last-child  { border-radius: 4px 16px 16px 16px; }
.chat-msg--assistant p:only-child  { border-radius: 4px 16px 16px 16px; }

.chat-msg--user {
  align-self: flex-end;
}
.chat-msg--user p {
  background: var(--cobalt);
  color: var(--white);
  padding: 12px 16px;
  border-radius: 16px 4px 16px 16px;
}

/* Typing indicator */
.chat-msg--typing p {
  display: flex;
  align-items: center;
  gap: 5px;
  min-width: 48px;
  padding: 14px 18px;
}
.chat-msg--typing span {
  width: 6px;
  height: 6px;
  background: var(--text-muted);
  border-radius: 50%;
  animation: typingDot 1.2s ease infinite;
}
.chat-msg--typing span:nth-child(2) { animation-delay: 0.2s; }
.chat-msg--typing span:nth-child(3) { animation-delay: 0.4s; }
@keyframes typingDot {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
  30% { transform: translateY(-4px); opacity: 1; }
}

/* Lead captured confirmation */
.chat-msg--captured p {
  background: #e8f4e8;
  color: #2d6a2d;
  border-left: 3px solid #4caf50;
}

/* Input area */
.chat-widget__input-wrap {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  padding: 12px 16px;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
  background: var(--white);
}

.chat-widget__input {
  flex: 1;
  font-family: var(--font-sans);
  font-size: 0.9rem;
  color: var(--text);
  background: var(--off-white);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 10px 16px;
  outline: none;
  resize: none;
  line-height: 1.5;
  max-height: 120px;
  transition: border-color var(--transition);
  -webkit-appearance: none;
  appearance: none;
}
.chat-widget__input:focus { border-color: var(--cobalt); }
.chat-widget__input::placeholder { color: var(--text-muted); }

.chat-widget__send {
  width: 40px;
  height: 40px;
  background: var(--cobalt);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background var(--transition), transform var(--transition);
}
.chat-widget__send:hover { background: var(--cobalt-light); transform: scale(1.05); }
.chat-widget__send:disabled { background: var(--border); cursor: not-allowed; transform: none; }
.chat-widget__send svg { width: 16px; height: 16px; color: var(--white); }
