/**
 * ============================================================
 * File      : legalyatra.css
 * Purpose   : Core brand stylesheet — design tokens, typography,
 *             buttons, navigation, footer, ticker, modal, and
 *             shared components. Loaded by every page via
 *             header.php.
 * ------------------------------------------------------------
 * Created   : 2026-05-31 13:00
 * Created By: Legalyatra Dev
 * ------------------------------------------------------------
 * Modified  : 2026-07-13 12:00
 * Modified By: Neo
 * ------------------------------------------------------------
 * Changelog :
 *   - 2026-05-31 [Legalyatra Dev] : Initial brand foundation
 *   - 2026-05-31 [Legalyatra Dev] : Added path-picker modal styles (ADR-005)
 *   - 2026-07-13 [Neo] : Added nav smart sign-in styles — picker
 *     button, portal dropdown, direct-portal button + Switch link,
 *     and mobile (≤880px) inline-dropdown adjustments.
 *   - 2026-07-13 [Neo] : Fix — [hidden] attribute was defeated by
 *     display:inline-flex on .nav-login-btn/.nav-login-direct, so
 *     both login states rendered at once. Restated [hidden] with
 *     !important scoped to .nav-login.
 * ============================================================
 */

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

/* ─── Design tokens (CSS variables) ─── */
:root {
  --bg: #FAF8F3;
  --bg-soft: #F2EFE6;
  --bg-card: #FFFFFF;
  --ink: #0A0A0A;
  --ink-2: #2A2A2A;
  --muted: #6B6B6B;
  --green: #0F3D2E;
  --green-2: #1B5E40;
  --green-bg: #E8F2EC;
  --gold: #B08D3F;
  --gold-2: #8F6F25;
  --gold-light: #D4B675;
  --gold-bg: #F5EDD8;
  --border: rgba(10,10,10,0.08);
  --border-2: rgba(10,10,10,0.14);
  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 22px;
  --success: #16A34A;
  --warning: #D97706;
  --danger: #DC2626;
}

/* ─── Base typography ─── */
body {
  font-family: 'Inter Tight', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--ink);
  font-size: 15.5px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
a { color: var(--green); text-decoration: none; }
a:hover { color: var(--green-2); }
.serif, em.serif { font-family: 'Fraunces', Georgia, serif; font-style: italic; font-weight: 400; }

/* ─── Top progress bar ─── */
.progress-bar {
  position: fixed; top: 0; left: 0;
  height: 2px; width: 0;
  background: var(--gold);
  z-index: 1000;
  animation: progressFill 1.2s ease forwards;
}
@keyframes progressFill { to { width: 100%; opacity: 0; } }

/* ─── Top Navigation ─── */
nav.topnav {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 48px;
  position: sticky; top: 0; z-index: 100;
  background: rgba(250,248,243,0.85);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid var(--border);
}
.logo { display: flex; align-items: center; gap: 11px; text-decoration: none; }
.logo-img { height: 48px; width: auto; display: block; }
.logo-mark {
  width: 34px; height: 34px;
  background: var(--green);
  border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  font-family: 'Fraunces', serif;
  font-style: italic; font-weight: 500;
  font-size: 20px;
  color: var(--gold-light);
  box-shadow: 0 2px 8px rgba(15,61,46,0.15);
  overflow: hidden;
}
.logo-mark img { width: 100%; height: 100%; object-fit: contain; }
.logo-name { font-size: 17px; font-weight: 600; color: var(--ink); letter-spacing: -0.3px; }
.logo-name em { font-family: 'Fraunces', serif; font-style: italic; font-weight: 500; color: var(--green); }

.nav-menu { list-style: none; display: flex; align-items: center; gap: 4px; }
.nav-menu a {
  text-decoration: none; font-size: 13.5px; font-weight: 500;
  color: var(--muted); padding: 8px 14px; border-radius: 8px;
  transition: all 0.18s;
}
.nav-menu a:hover { color: var(--ink); background: var(--bg-soft); }
.nav-cta {
  background: var(--green) !important; color: #fff !important;
  padding: 9px 18px !important; border-radius: 100px !important;
  font-weight: 600 !important;
  transition: all 0.2s !important;
}
.nav-cta:hover { background: var(--green-2) !important; transform: translateY(-1px); }

/* ─── Nav smart sign-in ─── */
.nav-login { position: relative; display: flex; align-items: center; gap: 8px; }
/* CSS display on these elements beats the [hidden] UA rule — restate it stronger */
.nav-login [hidden] { display: none !important; }
.nav-login-btn,
.nav-login-direct {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: inherit; font-size: 13.5px; font-weight: 600;
  color: var(--green);
  background: transparent;
  border: 1px solid var(--border-2);
  padding: 8px 16px; border-radius: 100px;
  cursor: pointer; text-decoration: none;
  transition: all 0.18s;
}
.nav-login-btn:hover,
.nav-login-direct:hover { border-color: var(--green); background: var(--green-bg); }
.nav-login-btn .chev { transition: transform 0.18s; }
.nav-login.is-open .nav-login-btn .chev { transform: rotate(180deg); }
.nav-login-switch {
  background: transparent; border: none; cursor: pointer;
  font-family: inherit; font-size: 12px; font-weight: 500;
  color: var(--muted); text-decoration: underline;
  padding: 4px;
}
.nav-login-switch:hover { color: var(--ink); }
.nav-login-menu {
  display: none;
  position: absolute; top: calc(100% + 10px); right: 0;
  min-width: 240px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 14px 36px rgba(15,61,46,0.14);
  padding: 6px;
  z-index: 200;
}
.nav-login.is-open .nav-login-menu { display: block; }
.nav-login-menu a {
  display: block;
  padding: 10px 12px !important;
  border-radius: 10px;
}
.nav-login-menu a:hover { background: var(--bg-soft); }
.nav-login-title { display: block; font-size: 13.5px; font-weight: 600; color: var(--ink); }
.nav-login-sub { display: block; font-size: 12px; font-weight: 400; color: var(--muted); margin-top: 1px; }

.nav-mobile-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--border-2);
  padding: 8px 10px;
  border-radius: 8px;
  cursor: pointer;
}
.nav-mobile-toggle span {
  display: block;
  width: 18px; height: 2px;
  background: var(--ink);
  margin: 3px 0;
  transition: all 0.2s;
}

/* ─── Buttons ─── */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 14.5px; font-weight: 600;
  text-decoration: none; cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  border: none; outline: none;
  font-family: inherit;
}
.btn-primary {
  background: var(--green); color: #fff;
  padding: 15px 30px;
  border-radius: 100px;
  box-shadow: 0 4px 14px rgba(15,61,46,0.18);
  position: relative; overflow: hidden;
}
.btn-primary::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(120deg, transparent 30%, rgba(255,255,255,0.18), transparent 70%);
  transform: translateX(-100%);
  transition: transform 0.6s;
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(15,61,46,0.28);
  background: var(--green-2);
  color: #fff;
}
.btn-primary:hover::after { transform: translateX(100%); }
.btn-primary .arrow { transition: transform 0.2s; }
.btn-primary:hover .arrow { transform: translateX(3px); }
.btn-secondary {
  background: transparent; color: var(--ink);
  padding: 14px 26px;
  border: 1.5px solid var(--border-2);
  border-radius: 100px;
  font-weight: 500;
}
.btn-secondary:hover { border-color: var(--green); color: var(--green); background: var(--green-bg); }
.btn-ghost {
  background: transparent; color: var(--green);
  padding: 10px 16px;
  border-radius: 100px;
  font-weight: 600;
}
.btn-ghost:hover { background: var(--green-bg); }

/* ─── Section heads ─── */
.section-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  margin-bottom: 44px;
  gap: 32px;
  flex-wrap: wrap;
}
.eyebrow {
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 12px;
  display: flex; align-items: center; gap: 8px;
}
.eyebrow::before {
  content: ''; width: 24px; height: 1.5px;
  background: var(--gold);
  display: inline-block;
}
.section-title {
  font-family: 'Inter Tight', sans-serif;
  font-size: clamp(28px, 3.4vw, 42px);
  font-weight: 600;
  letter-spacing: -1.2px;
  line-height: 1.1;
  max-width: 640px;
}
.section-title em {
  font-family: 'Fraunces', serif;
  font-style: italic;
  font-weight: 400;
  color: var(--green);
}
.section-sub {
  color: var(--muted);
  font-size: 15px;
  max-width: 340px;
  line-height: 1.6;
}

/* ─── Live chip ─── */
.live-chip {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--green-bg);
  color: var(--green);
  font-size: 12px; font-weight: 600;
  padding: 6px 14px;
  border-radius: 100px;
  border: 1px solid rgba(15,61,46,0.18);
}
.pulse-dot {
  width: 8px; height: 8px; border-radius: 50%; background: var(--success);
  box-shadow: 0 0 0 0 rgba(22,163,74,0.6);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(22,163,74,0.6); transform: scale(1); }
  50% { box-shadow: 0 0 0 8px rgba(22,163,74,0); transform: scale(1.15); }
}

/* ─── Live ticker ─── */
.ticker-band {
  background: var(--green);
  color: #fff;
  overflow: hidden;
  padding: 14px 0;
  border-top: 1px solid rgba(255,255,255,0.06);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  position: relative;
}
.ticker-band::before, .ticker-band::after {
  content: '';
  position: absolute; top: 0; bottom: 0;
  width: 80px;
  z-index: 2;
  pointer-events: none;
}
.ticker-band::before { left: 0; background: linear-gradient(90deg, var(--green), transparent); }
.ticker-band::after { right: 0; background: linear-gradient(-90deg, var(--green), transparent); }
.ticker-track {
  display: flex;
  gap: 56px;
  animation: tickerScroll 36s linear infinite;
  white-space: nowrap;
  width: max-content;
}
@keyframes tickerScroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
.ticker-item {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 13.5px;
  color: rgba(255,255,255,0.85);
  font-weight: 500;
}
.ticker-item .icon { color: var(--gold-light); font-size: 13px; }
.ticker-item .area { color: #fff; font-weight: 600; }
.ticker-sep { color: rgba(255,255,255,0.25); font-size: 8px; }

/* ─── Footer ─── */
footer.site-footer {
  background: var(--ink);
  color: rgba(255,255,255,0.65);
  padding: 56px 48px 24px;
  margin-top: 60px;
}
.foot-grid {
  max-width: 1280px; margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  padding-bottom: 36px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.foot-brand .logo-name { color: #fff; }
.foot-brand .logo-name em { color: var(--gold-light); }
.foot-brand .logo-mark { background: var(--gold); color: var(--green); }
.foot-brand .foot-logo-img { filter: brightness(0) invert(1); height: 40px; }
.foot-tagline {
  font-size: 13.5px;
  margin-top: 14px;
  color: rgba(255,255,255,0.55);
  max-width: 280px;
  line-height: 1.6;
}
.foot-col h4 {
  font-size: 12px;
  font-weight: 600;
  color: #fff;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 16px;
}
.foot-col a {
  display: block;
  font-size: 13.5px;
  color: rgba(255,255,255,0.55);
  text-decoration: none;
  padding: 5px 0;
  transition: color 0.2s;
}
.foot-col a:hover { color: var(--gold-light); }
.foot-bottom {
  max-width: 1280px; margin: 24px auto 0;
  display: flex; justify-content: space-between; align-items: center;
  font-size: 12px;
  color: rgba(255,255,255,0.4);
  flex-wrap: wrap; gap: 10px;
}

/* ─── Cards ─── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 26px;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.card:hover {
  transform: translateY(-4px);
  border-color: var(--green);
  box-shadow: 0 14px 32px rgba(15,61,46,0.10);
}

/* ─── Forms foundation ─── */
.form-group { margin-bottom: 18px; }
.form-label {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink-2);
  margin-bottom: 8px;
  letter-spacing: 0.2px;
}
.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: 12px 14px;
  font-size: 14.5px;
  font-family: inherit;
  color: var(--ink);
  background: var(--bg-card);
  border: 1.5px solid var(--border-2);
  border-radius: 10px;
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 4px rgba(15,61,46,0.08);
}
.form-textarea { resize: vertical; min-height: 100px; }
.form-helper { font-size: 12px; color: var(--muted); margin-top: 6px; }
.form-error { font-size: 12px; color: var(--danger); margin-top: 6px; }

/* ─── Container utility ─── */
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 48px;
}

/* ────────────────────────────────────────────────────────── */
/* PATH-PICKER MODAL (ADR-005) — appended 2026-05-31           */
/* ────────────────────────────────────────────────────────── */

.modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(10, 10, 10, 0);
  backdrop-filter: blur(0px);
  -webkit-backdrop-filter: blur(0px);
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease, backdrop-filter 0.22s ease, background 0.22s ease;
}
.modal-backdrop.is-open {
  background: rgba(10, 10, 10, 0.45);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  opacity: 1;
  pointer-events: auto;
}
.modal-card {
  background: var(--bg);
  border-radius: var(--radius-lg);
  max-width: 560px;
  width: 100%;
  padding: 36px 36px 28px;
  position: relative;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05), 0 24px 48px rgba(0,0,0,0.15);
  transform: scale(0.96) translateY(8px);
  opacity: 0;
  transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.22s ease;
}
.modal-backdrop.is-open .modal-card {
  transform: scale(1) translateY(0);
  opacity: 1;
}
.modal-close {
  position: absolute;
  top: 18px; right: 18px;
  width: 32px; height: 32px;
  border-radius: 50%;
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: 20px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.15s;
  line-height: 1;
}
.modal-close:hover { background: var(--bg-soft); color: var(--ink); }
.modal-eyebrow {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 8px;
}
.modal-title {
  font-family: 'Inter Tight', sans-serif;
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.7px;
  line-height: 1.2;
  margin-bottom: 8px;
}
.modal-title em {
  font-family: 'Fraunces', serif;
  font-style: italic;
  font-weight: 400;
  color: var(--green);
}
.modal-sub {
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 28px;
}
.path-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 20px;
}
.path-card {
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 20px 20px;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: relative;
  overflow: hidden;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
.path-card::before {
  content: '';
  position: absolute;
  top: 0; right: 0;
  width: 0; height: 0;
  border-style: solid;
  border-width: 0 32px 32px 0;
  border-color: transparent var(--gold) transparent transparent;
  opacity: 0;
  transition: opacity 0.25s;
}
.path-card:hover::before { opacity: 1; }
.path-card:hover {
  transform: translateY(-3px);
  border-color: var(--green);
  box-shadow: 0 12px 28px rgba(15,61,46,0.10);
}
.path-card:active { transform: translateY(-1px) scale(0.99); }
.path-icon {
  width: 44px; height: 44px;
  background: var(--green-bg);
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.25s;
}
.path-card:hover .path-icon {
  background: var(--green);
  transform: scale(1.06) rotate(-5deg);
}
.path-icon svg {
  width: 22px; height: 22px;
  stroke: var(--green);
  transition: stroke 0.25s;
}
.path-card:hover .path-icon svg { stroke: var(--gold-light); }
.path-title { font-size: 16px; font-weight: 600; letter-spacing: -0.3px; }
.path-desc { font-size: 13px; color: var(--muted); line-height: 1.5; flex: 1; }
.path-meta {
  display: flex; align-items: center; justify-content: space-between;
  padding-top: 10px;
  border-top: 1px dashed var(--border-2);
}
.path-time {
  font-size: 11px;
  font-weight: 600;
  color: var(--gold);
  background: var(--gold-bg);
  padding: 3px 9px;
  border-radius: 100px;
  letter-spacing: 0.4px;
}
.path-arrow {
  font-size: 14px;
  color: var(--muted);
  transition: all 0.2s;
}
.path-card:hover .path-arrow { color: var(--green); transform: translateX(3px); }
.modal-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  margin-top: 8px;
}
.modal-footer-text { font-size: 12.5px; color: var(--muted); }
.modal-footer-link {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--green);
  text-decoration: none;
  transition: color 0.2s;
}
.modal-footer-link:hover { color: var(--gold-2); }

/* Body scroll lock when modal is open */
body.modal-open { overflow: hidden; }

/* Service cards that trigger modal */
.svc-card[data-modal-trigger] { cursor: pointer; }

/* ─── Accessibility ─── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ─── Responsive (shared) ─── */
@media (max-width: 880px) {
  nav.topnav { padding: 14px 20px; }
  .nav-menu { display: none; }
  .nav-menu.is-open {
    display: flex;
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    padding: 16px 20px;
    gap: 4px;
  }
  .nav-menu.is-open a { padding: 12px 14px; }
  .nav-mobile-toggle { display: block; }
  /* Smart sign-in inside mobile menu: full-width row, inline dropdown */
  .nav-login { flex-wrap: wrap; width: 100%; }
  .nav-login-btn, .nav-login-direct { width: 100%; justify-content: center; }
  .nav-login-menu {
    position: static;
    width: 100%; min-width: 0;
    box-shadow: none;
    border: 1px solid var(--border);
    margin-top: 6px;
  }
  .container { padding: 0 20px; }
  footer.site-footer { padding: 40px 20px 20px; }
  .foot-grid { grid-template-columns: 1fr 1fr; gap: 28px; }
  .section-head { gap: 16px; }
  .ticker-track { gap: 36px; animation-duration: 28s; }
}

/* Modal — mobile becomes bottom sheet */
@media (max-width: 600px) {
  .modal-backdrop { padding: 0; align-items: flex-end; }
  .modal-card {
    border-radius: 24px 24px 0 0;
    max-width: 100%;
    padding: 28px 22px 22px;
    transform: translateY(40px);
  }
  .modal-backdrop.is-open .modal-card { transform: translateY(0); }
  .path-grid { grid-template-columns: 1fr; gap: 10px; }
  .modal-title { font-size: 20px; }
}

@media (max-width: 480px) {
  .foot-grid { grid-template-columns: 1fr; }
}