/* =====================================================
   Trame Advisory, Financial Crime & Human Rights
   Palette: warm paper, deep teal, cooled coral accent
   ===================================================== */

:root {
  --navy-900: #0e3a38;   /* deep teal, dark sections + headings */
  --navy-800: #17514d;
  --navy-700: #1f6a64;
  --blue-600: #d24b39;   /* deep coral, links / hover / strong accent */
  --blue-500: #ef5a48;   /* cooled coral, primary accent */
  --blue-400: #f47c6a;   /* light coral */
  --blue-300: #f6a698;   /* peach, light accent on dark */
  --blue-100: #fadfd9;   /* coral tint */
  --blue-50:  #fdf3ee;   /* warm tint, alt section background */
  --ice:      #f4e7e0;   /* faint warm, oversized numerals */
  --cream:    #faf5ef;   /* page background */
  --white:    #fffdf9;   /* warm white, cards + white text */
  --ink:      #243330;   /* body text, dark teal-charcoal */
  --slate:    #5f6b68;   /* secondary text */
  --slate-light: #828d8a;
  --line:     #e7ded3;   /* warm hairline */

  /* light tints for text on the dark teal sections */
  --on-dark:       #e7eae6;
  --on-dark-soft:  #bcc7c3;
  --on-dark-muted: #94a29e;
  --on-dark-faint: #7e8c88;
  --on-dark-line:  rgba(246, 166, 152, 0.22);

  --maxw: 1140px;
  --radius: 14px;
  --radius-lg: 22px;
  --shadow-sm: 0 2px 10px rgba(60, 40, 55, 0.07);
  --shadow-md: 0 18px 40px rgba(60, 40, 55, 0.10);
  --shadow-lg: 0 30px 70px rgba(40, 25, 40, 0.16);

  --font-serif: "Spectral", Georgia, serif;
  --font-brand: "Fraunces", Georgia, serif;
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

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

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

html { scroll-behavior: smooth; }

html, body { max-width: 100%; overflow-x: clip; }

body {
  font-family: var(--font-sans);
  color: var(--ink);
  background: var(--cream);
  line-height: 1.65;
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a { color: inherit; text-decoration: none; }

.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding-left: max(24px, env(safe-area-inset-left));
  padding-right: max(24px, env(safe-area-inset-right));
}

h1, h2, h3, h4 { font-family: var(--font-serif); font-weight: 600; line-height: 1.15; color: var(--navy-900); letter-spacing: -0.01em; }

.eyebrow {
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--blue-500);
  margin-bottom: 14px;
}
.eyebrow.light { color: var(--blue-300); }

/* ===== 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;
  padding: 14px 26px;
  border-radius: 999px;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), background 0.25s var(--ease), color 0.25s var(--ease);
}
.btn-primary {
  background: linear-gradient(135deg, var(--blue-500), var(--blue-600));
  color: #fff;
  box-shadow: 0 10px 24px rgba(239, 90, 72, 0.28);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 16px 32px rgba(239, 90, 72, 0.38); }
.btn-ghost {
  background: transparent;
  color: var(--navy-800);
  border-color: var(--line);
}
.btn-ghost:hover { border-color: var(--blue-400); color: var(--blue-600); transform: translateY(-2px); }
.btn-block { width: 100%; }

/* ===== Header ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(250, 245, 239, 0.82);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.site-header.scrolled { border-bottom-color: var(--line); box-shadow: var(--shadow-sm); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 90px; }

.brand { display: inline-flex; align-items: center; gap: 14px; color: var(--navy-900); }
.brand-mark { color: var(--blue-500); display: inline-flex; align-items: center; }
.brand-text { display: inline-flex; flex-direction: column; justify-content: center; font-family: var(--font-brand); font-weight: 600; font-size: 2.05rem; letter-spacing: 0; line-height: 0.9; }
.brand-sub { font-family: var(--font-sans); font-weight: 500; font-size: 0.72rem; text-transform: uppercase; color: var(--slate); line-height: 1; margin-top: 6px; text-align: justify; text-align-last: justify; text-justify: inter-character; }

.nav-menu { list-style: none; display: flex; align-items: center; gap: 30px; }
.nav-menu a { font-size: 0.93rem; font-weight: 500; color: var(--slate); transition: color 0.2s var(--ease); }
.nav-menu a:hover { color: var(--blue-600); }
.nav-menu .nav-cta {
  background: var(--navy-800);
  color: #fff;
  padding: 10px 20px;
  border-radius: 999px;
}
.nav-menu .nav-cta:hover { background: var(--blue-600); color: #fff; }

.nav-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 8px; }
.nav-toggle span { width: 24px; height: 2px; background: var(--navy-800); border-radius: 2px; transition: transform 0.3s var(--ease), opacity 0.3s var(--ease); }

/* ===== Hero ===== */
.hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(120% 120% at 80% -10%, rgba(239, 90, 72, 0.12), transparent 55%),
    linear-gradient(180deg, var(--blue-50), var(--cream) 70%);
  padding: 92px 0 84px;
}
.hero-inner { position: relative; z-index: 2; max-width: 880px; }
.hero h1 {
  font-size: clamp(2.4rem, 5.2vw, 4rem);
  line-height: 1.06;
  margin-bottom: 24px;
  color: var(--navy-900);
}
.hero-lead { font-size: clamp(1.05rem, 1.6vw, 1.28rem); color: var(--slate); max-width: 720px; margin-bottom: 34px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; }

.hero-glow {
  position: absolute;
  top: -180px; right: -160px;
  width: 560px; height: 560px;
  background: radial-gradient(circle, rgba(244, 124, 106, 0.18), transparent 65%);
  border-radius: 50%;
  z-index: 1;
}

/* ===== Sections ===== */
.section { padding: 96px 0; }
.section-head { max-width: 720px; margin-bottom: 56px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head h2 { font-size: clamp(1.9rem, 3.4vw, 2.7rem); }
.section-intro { margin-top: 18px; color: var(--slate); font-size: 1.08rem; }

/* ===== Mission ===== */
.mission { background: var(--white); }
.mission-grid { display: grid; grid-template-columns: 1fr; gap: 56px; align-items: start; }
.mission-lead { max-width: 760px; margin: 0 auto; text-align: center; }
.mission-lead p { color: var(--slate); margin-bottom: 18px; font-size: 1.12rem; }
.mission-lead strong { color: var(--navy-800); }

/* ===== Services overview ===== */
.services { background: var(--blue-50); border-top: 1px solid var(--line); }
.service-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; }
.service-card {
  position: relative;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 44px 40px 40px;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), border-color 0.35s var(--ease);
}
.service-card::before {
  content: "";
  position: absolute; inset: 0 0 auto 0;
  height: 4px;
  background: linear-gradient(90deg, var(--blue-500), var(--blue-300));
  transform: scaleX(0); transform-origin: left;
  transition: transform 0.4s var(--ease);
}
.service-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); border-color: var(--blue-300); }
.service-card:hover::before { transform: scaleX(1); }
.service-index { position: absolute; top: 30px; right: 36px; font-family: var(--font-serif); font-size: 2.6rem; color: var(--ice); font-weight: 600; }
.service-icon {
  width: 56px; height: 56px;
  display: grid; place-items: center;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--blue-500), var(--blue-600));
  color: #fff;
  margin-bottom: 22px;
  box-shadow: 0 8px 20px rgba(239, 90, 72, 0.28);
}
.service-card h3 { font-size: 1.42rem; margin-bottom: 14px; max-width: 320px; }
.service-card p { color: var(--slate); margin-bottom: 22px; }

.link-arrow { font-weight: 600; color: var(--blue-600); display: inline-flex; align-items: center; gap: 7px; transition: gap 0.25s var(--ease); }
.link-arrow span { transition: transform 0.25s var(--ease); }
.link-arrow:hover { gap: 11px; }
.link-arrow:hover span { transform: translateX(2px); }

/* ===== Service detail ===== */
.detail { padding: 100px 0; }
.detail-dashboard { background: var(--navy-900); }
.detail-litigation { background: var(--white); }
.detail-grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 60px; align-items: center; }
.detail-grid.reverse .detail-copy { order: 2; }

/* dark detail (dashboard) */
.detail-dashboard .eyebrow { color: var(--blue-300); }
.detail-dashboard h2 { color: #fff; font-size: clamp(1.8rem, 3.2vw, 2.5rem); margin-bottom: 18px; }
.detail-dashboard .lead,
.detail-dashboard .detail-copy > p { color: var(--on-dark); font-size: 1.06rem; line-height: 1.7; margin-bottom: 16px; }
.detail-dashboard .detail-copy strong { color: #fff; }

.detail-feature {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--on-dark-line);
  border-radius: var(--radius-lg);
  padding: 38px 36px;
  backdrop-filter: blur(6px);
}
.detail-feature h3 { color: #fff; font-size: 1.3rem; margin-bottom: 22px; }
.feature-list { list-style: none; display: flex; flex-direction: column; gap: 16px; }
.feature-list li { position: relative; padding-left: 30px; color: var(--on-dark-soft); font-size: 0.98rem; line-height: 1.55; }
.feature-list li::before {
  content: "";
  position: absolute; left: 0; top: 8px;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, var(--blue-400), var(--blue-600));
  box-shadow: 0 0 0 4px rgba(239, 90, 72, 0.20);
}
.feature-list li strong { color: #fff; }
.feature-foot { margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--on-dark-line); }
.feature-foot p { color: var(--on-dark-muted); font-size: 0.92rem; }

/* light detail (litigation) */
.detail-litigation h2 { font-size: clamp(1.8rem, 3.2vw, 2.5rem); margin-bottom: 18px; }
.detail-litigation .lead,
.detail-litigation .detail-copy > p { color: var(--slate); font-size: 1.06rem; line-height: 1.7; margin-bottom: 16px; }
.detail-feature.alt {
  background: var(--blue-50);
  border: 1px solid var(--line);
  backdrop-filter: none;
}
.detail-feature.alt h3 { color: var(--navy-900); }
.detail-feature.alt .feature-list li { color: var(--slate); }
.detail-feature.alt .feature-list li strong { color: var(--navy-800); }

.case-callout {
  margin-top: 26px;
  background: var(--white);
  border: 1px solid var(--line);
  border-left: 4px solid var(--blue-500);
  border-radius: 12px;
  padding: 22px 24px;
}
.case-tag {
  display: inline-block;
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--blue-600);
  background: var(--blue-100);
  padding: 4px 12px; border-radius: 999px;
  margin-bottom: 12px;
}
.case-callout p { color: var(--slate); font-size: 0.98rem; }

/* ===== Clients ===== */
.clients { background: linear-gradient(180deg, var(--blue-50), var(--white)); }
.client-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.client {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 30px 28px;
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), border-color 0.3s var(--ease);
}
.client:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--blue-300); }
.client h3 { font-size: 1.15rem; margin-bottom: 10px; color: var(--navy-800); }
.client p { color: var(--slate); font-size: 0.95rem; }

/* ===== Contact ===== */
.contact {
  background:
    radial-gradient(120% 120% at 10% 0%, rgba(239, 90, 72, 0.20), transparent 55%),
    linear-gradient(135deg, var(--navy-900), var(--navy-700));
}
.contact-inner { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: start; }
.contact-copy h2 { color: #fff; font-size: clamp(1.8rem, 3.2vw, 2.5rem); margin-bottom: 18px; }
.contact-copy p { color: var(--on-dark-soft); font-size: 1.05rem; }

.contact-form { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.field { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.field-full { grid-column: 1 / -1; }
.field label { font-size: 0.82rem; font-weight: 600; color: var(--on-dark); letter-spacing: 0.02em; }
.field input, .field select, .field textarea {
  font-family: var(--font-sans);
  font-size: 0.96rem;
  color: #fff;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid var(--on-dark-line);
  border-radius: 10px;
  padding: 12px 14px;
  transition: border-color 0.2s var(--ease), background 0.2s var(--ease);
}
.field input::placeholder, .field textarea::placeholder { color: var(--on-dark-faint); }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--blue-400);
  background: rgba(255, 255, 255, 0.12);
}
.field select option { color: var(--ink); }
.contact-form .btn { grid-column: 1 / -1; }
.form-note { grid-column: 1 / -1; font-size: 0.82rem; color: var(--on-dark-muted); text-align: center; }

/* ===== Footer ===== */
.site-footer { background: var(--navy-900); color: var(--on-dark-soft); padding: 64px 0 30px; }
.footer-inner { display: grid; grid-template-columns: 1.2fr 1fr; gap: 40px; padding-bottom: 40px; border-bottom: 1px solid var(--on-dark-line); }
.footer-brand .brand { color: #fff; margin-bottom: 14px; }
.footer-brand .brand-mark { color: var(--blue-300); }
.footer-brand .brand-sub { color: var(--on-dark-muted); }
.footer-brand > p { color: var(--on-dark-muted); font-size: 0.95rem; max-width: 280px; }
.footer-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; }
.footer-nav h4 { font-family: var(--font-sans); font-size: 0.78rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--blue-300); margin-bottom: 14px; }
.footer-nav a { display: block; color: var(--on-dark-soft); font-size: 0.94rem; padding: 5px 0; transition: color 0.2s var(--ease); }
.footer-nav a:hover { color: #fff; }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; padding-top: 24px; gap: 16px; flex-wrap: wrap; }
.footer-bottom p { font-size: 0.85rem; color: var(--on-dark-faint); }

/* ===== Reveal animation ===== */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
.reveal.is-visible { opacity: 1; transform: none; }

/* ===== Responsive ===== */
@media (max-width: 900px) {
  .nav-toggle { display: flex; z-index: 60; }
  .nav-menu {
    position: fixed;
    inset: 90px 0 auto 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    background: var(--cream);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-md);
    padding: 18px 24px 26px;
    transform: translateY(-130%);
    transition: transform 0.35s var(--ease);
  }
  .nav-menu.open { transform: translateY(0); }
  .nav-menu li { width: 100%; }
  .nav-menu a { display: block; padding: 12px 0; font-size: 1rem; }
  .nav-menu .nav-cta { display: inline-block; margin-top: 8px; }
  .nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  .mission-grid, .detail-grid, .contact-inner, .footer-inner { grid-template-columns: 1fr; gap: 40px; }
  .detail-grid.reverse .detail-copy { order: 0; }
  .service-cards { grid-template-columns: 1fr; }
  .client-grid { grid-template-columns: 1fr 1fr; }
  .contact-form { grid-template-columns: 1fr; }
}

@media (max-width: 620px) {
  .section { padding: 70px 0; }
  .hero { padding: 64px 0 60px; }
  .client-grid { grid-template-columns: 1fr; }
  .footer-nav { grid-template-columns: 1fr 1fr; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
}

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