/* ==========================================================================
   ApuaLegal — Shared Stylesheet
   Used across all pages: apualegal.com
   ========================================================================== */

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

:root {
  --ink:        #08090D;
  --ink-mid:    #3E4155;
  --ink-soft:   #8A8FA8;
  --blue:       #1247E8;
  --blue-dark:  #0D35B5;
  --blue-tint:  #EEF3FF;
  --white:      #FAFAFA;
  --border:     #E2E4EC;
  --green:      #22C55E;
  --green-tint: #F0FDF4;
  --ff-serif:   'Playfair Display', Georgia, serif;
  --ff-sans:    'Outfit', system-ui, sans-serif;
  --ff-mono:    'Space Mono', monospace;
  --ease:       cubic-bezier(.22,.68,0,1.2);
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--ff-sans);
  background: var(--white);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.container { max-width: 1100px; margin: 0 auto; padding: 0 28px; }
.mono { font-family: var(--ff-mono); font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; }
.tag {
  display: inline-block;
  font-family: var(--ff-mono);
  font-size: .68rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--blue);
  border: 1px solid var(--blue);
  border-radius: 2px;
  padding: 3px 10px;
  margin-bottom: 24px;
}

/* ==========================================================================
   NAV — Shared across all pages
   ========================================================================== */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 36px;
  background: rgba(250,250,250,.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}

.nav-logo {
  font-family: var(--ff-serif);
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: -.02em;
}
.nav-logo span { color: var(--blue); }

/* Nav variant: auth buttons (most pages) */
.nav-auth { display: flex; align-items: center; gap: 10px; }
.nav-signin {
  font-size: .875rem;
  font-weight: 500;
  color: var(--ink-mid);
  text-decoration: none;
  padding: 10px 18px;
  border-radius: 4px;
  border: 1.5px solid var(--border);
  transition: border-color .2s, color .2s;
}
.nav-signin:hover { border-color: var(--ink); color: var(--ink); }
.nav-signup {
  font-size: .875rem;
  font-weight: 500;
  color: #fff;
  text-decoration: none;
  padding: 10px 20px;
  border-radius: 4px;
  background: var(--blue);
  border: 1.5px solid var(--blue);
  transition: background .2s, transform .15s;
}
.nav-signup:hover { background: var(--blue-dark); transform: translateY(-1px); }

/* Mobile nav toggle (injected by /assets/nav.js) */
.nav-toggle {
  display: none;
  width: 40px;
  height: 40px;
  background: transparent;
  border: 1.5px solid var(--border);
  border-radius: 4px;
  cursor: pointer;
  padding: 0;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  margin-left: 8px;
  transition: border-color .2s;
}
.nav-toggle:hover { border-color: var(--ink); }
.nav-toggle span {
  display: block;
  width: 18px;
  height: 1.5px;
  background: var(--ink);
  transition: transform .2s, opacity .2s;
}
nav.nav-open .nav-toggle span:nth-child(1) { transform: translateY(5.5px) rotate(45deg); }
nav.nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
nav.nav-open .nav-toggle span:nth-child(3) { transform: translateY(-5.5px) rotate(-45deg); }

/* Nav dropdown menus */
.nav-links-dropdown {
  display: flex;
  align-items: center;
  gap: 28px;
}
.nav-dropdown {
  position: relative;
}
.nav-dropdown-trigger {
  font-size: .875rem;
  font-weight: 500;
  color: var(--ink-mid);
  text-decoration: none;
  padding: 8px 4px;
  transition: color .2s;
  cursor: pointer;
}
.nav-dropdown-trigger:hover {
  color: var(--ink);
}
.nav-dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  min-width: 190px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 8px 0;
  margin-top: 8px;
  box-shadow: 0 8px 24px rgba(0,0,0,.08);
  z-index: 200;
}
.nav-dropdown:hover .nav-dropdown-menu {
  display: block;
}
.nav-dropdown-menu a {
  display: block;
  padding: 8px 20px;
  font-size: .84rem;
  font-weight: 400;
  color: var(--ink-mid);
  text-decoration: none;
  transition: background .15s, color .15s;
}
.nav-dropdown-menu a:hover {
  background: var(--blue-tint);
  color: var(--blue);
}

/* Nav variant: right with back link (legal pages) */
.nav-right {
  display: flex;
  align-items: center;
  gap: 16px;
}
.nav-back {
  font-size: .875rem;
  color: var(--ink-mid);
  text-decoration: none;
  transition: color .2s;
}
.nav-back:hover { color: var(--ink); }

/* ==========================================================================
   PAGE CONTENT — Shared typography for inner pages
   ========================================================================== */
.page-content {
  max-width: 760px;
  margin: 0 auto;
  padding: 140px 28px 80px;
}

.page-content h1 {
  font-family: var(--ff-serif);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -.02em;
  color: var(--ink);
  margin-bottom: 16px;
}

.page-content h2 {
  font-family: var(--ff-serif);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--ink);
  margin-top: 48px;
  margin-bottom: 16px;
}

.page-content h3 {
  font-size: 1.05rem;
  font-weight: 600;
  margin-top: 32px;
  margin-bottom: 12px;
}

.page-content p {
  color: var(--ink-mid);
  font-weight: 300;
  margin-bottom: 16px;
  line-height: 1.7;
}

.page-content ul, .page-content ol {
  color: var(--ink-mid);
  margin-bottom: 16px;
  padding-left: 24px;
  font-weight: 300;
  line-height: 1.8;
}

.page-content li {
  margin-bottom: 6px;
}

.page-content a {
  color: var(--blue);
  text-decoration: none;
}
.page-content a:hover {
  text-decoration: underline;
}

.page-subtitle {
  font-size: 1.15rem;
  color: var(--ink-mid);
  font-weight: 300;
  margin-bottom: 40px;
  line-height: 1.7;
}

.page-meta {
  font-family: var(--ff-mono);
  font-size: .72rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 48px;
}

.page-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 28px 0;
  font-size: .9rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
}
.page-content thead {
  background: var(--blue-tint);
}
.page-content th, .page-content td {
  text-align: left;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  color: var(--ink-mid);
  font-weight: 300;
  vertical-align: top;
}
.page-content tbody tr:last-child th,
.page-content tbody tr:last-child td {
  border-bottom: none;
}
.page-content th {
  font-weight: 500;
  color: var(--ink);
  font-size: .72rem;
  font-family: var(--ff-mono);
  letter-spacing: .1em;
  text-transform: uppercase;
}
.page-content td strong {
  color: var(--ink);
  font-weight: 500;
}

/* Reusable inline link — replaces repeated style="color:var(--blue);text-decoration:none;" */
.link-inline {
  color: var(--blue);
  text-decoration: none;
  transition: color .2s;
}
.link-inline:hover {
  color: var(--blue-dark);
  text-decoration: underline;
}

.contact-line {
  font-family: var(--ff-mono);
  font-size: .85rem;
  color: var(--blue);
  margin-top: 8px;
}
.contact-line a { color: var(--blue); text-decoration: none; }
.contact-line a:hover { text-decoration: underline; }

/* ==========================================================================
   ARTICLE CONTENT — Blog article pages
   ========================================================================== */
.article-content {
  max-width: 720px;
  margin: 0 auto;
  padding: 140px 28px 80px;
}

.back-link {
  display: inline-block;
  font-size: .85rem;
  font-weight: 500;
  color: var(--blue);
  text-decoration: none;
  margin-bottom: 32px;
  transition: color .2s;
}
.back-link:hover { color: var(--blue-dark); text-decoration: underline; }

.article-meta {
  font-family: var(--ff-mono);
  font-size: .7rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 16px;
}

.article-content h1 {
  font-family: var(--ff-serif);
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 700;
  line-height: 1.18;
  letter-spacing: -.02em;
  color: var(--ink);
  margin-bottom: 24px;
}

.article-content h2 {
  font-family: var(--ff-serif);
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--ink);
  margin-top: 40px;
  margin-bottom: 16px;
  line-height: 1.3;
}

.article-content p {
  color: var(--ink-mid);
  font-weight: 300;
  margin-bottom: 18px;
  line-height: 1.8;
  font-size: 1.02rem;
}

.article-content ul, .article-content ol {
  color: var(--ink-mid);
  font-weight: 300;
  margin-bottom: 18px;
  line-height: 1.8;
  font-size: 1.02rem;
  padding-left: 24px;
}

.article-content li {
  margin-bottom: 8px;
}

.article-content strong {
  color: var(--ink);
  font-weight: 500;
}

.article-divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 48px 0 32px;
}

.article-footer-note {
  font-size: .9rem;
  color: var(--ink-soft);
  font-style: italic;
  line-height: 1.7;
}

.article-footer-note a {
  color: var(--blue);
  text-decoration: none;
}

.article-footer-note a:hover {
  text-decoration: underline;
}

/* ==========================================================================
   FOOTER — Full footer (main pages)
   ========================================================================== */
footer {
  background: var(--ink);
  color: #A0A8C0;
  padding: 56px 0 40px;
}
.footer-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding-bottom: 40px;
  border-bottom: 1px solid #1A1D2E;
}
.footer-logo {
  font-family: var(--ff-serif);
  font-size: 1.4rem;
  font-weight: 400;
  color: #fff;
  text-decoration: none;
}
.footer-logo span { color: var(--blue); }
.footer-tagline {
  font-size: .8rem;
  color: #8A92B0;
  margin-top: 6px;
  font-weight: 300;
}
.footer-brand { max-width: 220px; }
.footer-socials {
  display: flex;
  gap: 12px;
  margin-top: 18px;
}
.footer-socials a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: 1px solid #2A2F4A;
  border-radius: 4px;
  color: #8A92B0;
  transition: border-color .2s, color .2s;
}
.footer-socials a:hover { border-color: var(--blue); color: var(--blue); }
.footer-bottom-links {
  display: flex;
  gap: 20px;
}
.footer-bottom-links a {
  font-size: .75rem;
  color: #8A92B0;
  text-decoration: none;
  transition: color .2s;
}
.footer-bottom-links a:hover { color: #fff; }
.footer-links {
  display: flex;
  gap: 56px;
}
.footer-col h4 {
  font-size: .7rem;
  font-family: var(--ff-mono);
  letter-spacing: .12em;
  text-transform: uppercase;
  color: #A0A8C0;
  margin-bottom: 16px;
}
.footer-col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.footer-col a {
  color: #C5CCE0;
  text-decoration: none;
  font-size: .85rem;
  font-weight: 300;
  transition: color .2s;
}
.footer-col a:hover { color: #fff; }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 32px;
}
.footer-copy {
  font-size: .78rem;
  color: #8A92B0;
  font-weight: 300;
}
.footer-built {
  font-family: var(--ff-mono);
  font-size: .65rem;
  letter-spacing: .1em;
  color: #7A82A0;
  text-transform: uppercase;
}
.footer-built span { color: var(--blue); }

/* ==========================================================================
   FOOTER — Simple footer (legal pages)
   ========================================================================== */
.footer-inner {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 28px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}
/* Note: legal pages use footer with padding: 40px 0; — override in page-specific style */

/* ==========================================================================
   RECOGNITION & TEAM — About page shared
   ========================================================================== */
.recognition-badges {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin: 24px 0 40px;
}
.badge {
  display: inline-block;
  font-family: var(--ff-mono);
  font-size: .68rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--blue);
  border: 1px solid var(--blue);
  border-radius: 2px;
  padding: 6px 14px;
}
.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 24px;
  margin-top: 24px;
  margin-bottom: 40px;
}
.team-card {
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 28px 20px;
  text-align: center;
}
.team-avatar {
  width: 64px;
  height: 64px;
  background: var(--blue-tint);
  border-radius: 50%;
  margin: 0 auto 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--ff-serif);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--blue);
}
.team-card h3 {
  font-family: var(--ff-sans);
  font-size: .95rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 4px;
}
.team-card p {
  font-size: .8rem;
  color: var(--ink-soft);
  font-weight: 400;
  margin-bottom: 0;
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 900px) {
  .contact-layout { grid-template-columns: 1fr; gap: 32px; }
  #hubspot-form-target fieldset.form-columns-2 { grid-template-columns: 1fr; gap: 0; }
}

@media (max-width: 768px) {
  nav { padding: 14px 20px; }
  .nav-toggle { display: flex; }
  .nav-links-dropdown {
    display: none;
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: rgba(250,250,250,.98);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--border);
    padding: 8px 0 16px;
    max-height: calc(100vh - 64px);
    overflow-y: auto;
  }
  nav.nav-open .nav-links-dropdown { display: flex; }
  .nav-links-dropdown > .nav-dropdown,
  .nav-links-dropdown > a {
    width: 100%;
    padding: 0 20px;
  }
  .nav-dropdown-trigger {
    display: block;
    padding: 14px 0;
    font-size: 1rem;
    border-bottom: 1px solid var(--border);
  }
  .nav-dropdown-menu {
    position: static !important;
    display: flex !important;
    flex-direction: column;
    box-shadow: none !important;
    border: none !important;
    padding: 0 0 12px !important;
    background: transparent !important;
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
    gap: 6px;
  }
  .nav-dropdown-menu a {
    padding: 8px 0 8px 12px;
    font-size: .9rem;
    color: var(--ink-mid);
  }
  .footer-top { flex-direction: column; gap: 36px; }
  .footer-links { flex-direction: column; gap: 32px; }
  .footer-bottom { flex-direction: column; gap: 12px; text-align: center; }
  .team-grid { grid-template-columns: 1fr 1fr; }
  .page-content table { font-size: .82rem; }
  .page-content th, .page-content td { padding: 10px 12px; }
  .page-content { overflow-x: hidden; }
  .page-content table { display: block; overflow-x: auto; max-width: 100%; }
}

@media (max-width: 600px) {
  .nav-right { gap: 10px; }
  .nav-back { display: none; }
  .footer-inner { flex-direction: column; text-align: center; }
  .nav-auth .nav-signin { display: none; }
  .page-content { padding: 110px 20px 60px; }
  .article-content { padding: 110px 20px 60px; }
}
