/* =========================================================
   J & J ASSOCIATES — DESIGN TOKENS
   Palette: Ink Navy (authority) + Brass/Gold (heritage, notary
   seal) + Warm Paper (approachability) + Deep Tile Red (a nod
   to the red-tiled colonial court roofs of Thalassery).
   Type: Fraunces (display serif, legal-heritage character)
         + Source Sans 3 (clean, highly legible body/UI face)
   Signature motif: a vertical "case timeline" rule with
   circular nodes — echoes both a docket/case-diary and the
   1793→2025 court history — reused across dividers & the
   Thalassery Legacy page.
   ========================================================= */
:root{
  --ink:        #10202f;
  --ink-2:      #16324a;
  --paper:      #faf7f0;
  --paper-2:    #f1ead9;
  --brass:      #b3873e;
  --brass-lt:   #d9b876;
  --tile:       #8c3a2b;
  --text:       #23313d;
  --text-soft:  #5b6b78;
  --line:       #e2d9c4;
  --white:      #ffffff;

  --font-display: 'Fraunces', 'Georgia', serif;
  --font-body:    'Source Sans 3', 'Segoe UI', sans-serif;

  --radius: 4px;
  --shadow-soft: 0 10px 30px -12px rgba(16,32,47,0.25);
  --shadow-card: 0 4px 18px rgba(16,32,47,0.08);
  --max: 1180px;
}

*,*::before,*::after{ box-sizing:border-box; }
html{ scroll-behavior:smooth; }
body{
  margin:0;
  font-family:var(--font-body);
  color:var(--text);
  background:var(--paper);
  line-height:1.65;
  -webkit-font-smoothing:antialiased;
}
img{ max-width:100%; display:block; }
a{ color:inherit; text-decoration:none; }
h1,h2,h3,h4{ font-family:var(--font-display); color:var(--ink); margin:0 0 .5em; font-weight:600; line-height:1.15; }
p{ margin:0 0 1em; }
ul{ margin:0; padding:0; list-style:none; }
.wrap{ max-width:var(--max); margin:0 auto; padding:0 24px; }
:focus-visible{ outline:3px solid var(--brass); outline-offset:2px; }
@media (prefers-reduced-motion: reduce){ *{ animation-duration:.001ms !important; transition-duration:.001ms !important; scroll-behavior:auto !important; } }

.hide-sm{ display:inline-flex; }
@media (max-width:820px){ .hide-sm{ display:none !important; } }

/* ---------- Buttons ---------- */
.btn{
  display:inline-flex; align-items:center; gap:8px;
  padding:13px 26px; border-radius:var(--radius);
  font-weight:600; font-size:.95rem; letter-spacing:.2px;
  border:1px solid transparent; cursor:pointer; transition:.2s ease;
}
.btn--gold{ background:var(--brass); color:var(--white); }
.btn--gold:hover{ background:#9c7434; }
.btn--outline{ background:transparent; border-color:rgba(255,255,255,.5); color:var(--white); }
.btn--outline:hover{ background:rgba(255,255,255,.12); }
.btn--ink{ background:var(--ink); color:var(--white); }
.btn--ink:hover{ background:var(--ink-2); }
.btn--block{ width:100%; justify-content:center; }

/* ---------- Topbar ---------- */
.topbar{ background:var(--ink); color:#cfd9e0; font-size:.82rem; }
@media (max-width:600px){ .topbar{ display:none; } }
.topbar__inner{ display:flex; justify-content:space-between; align-items:center; padding:8px 24px; gap:16px; }
.topbar__contact{ display:flex; gap:20px; }
.topbar__contact a:hover{ color:var(--brass-lt); }

/* ---------- Header / Nav ---------- */
.site-header{ background:var(--paper); border-bottom:1px solid var(--line); position:sticky; top:0; z-index:50; }
.site-header__inner{ display:flex; align-items:center; gap:24px; padding:14px 24px; }
.brand{ display:flex; align-items:center; gap:12px; margin-right:auto; }
.brand__mark{
  width:46px; height:46px; border-radius:50%; background:var(--ink);
  color:var(--brass-lt); font-family:var(--font-display); font-weight:700;
  display:flex; align-items:center; justify-content:center; font-size:1rem;
  border:2px solid var(--brass);
}
.brand__text{ display:flex; flex-direction:column; line-height:1.2; }
.brand__name{ font-family:var(--font-display); font-weight:700; font-size:1.15rem; color:var(--ink); }
.brand__sub{ font-size:.72rem; letter-spacing:1.5px; text-transform:uppercase; color:var(--brass); }
.nav{ display:flex; gap:28px; }
.nav a{ font-weight:600; font-size:.93rem; color:var(--text); position:relative; padding:6px 0; }
.nav a:hover, .nav a.active{ color:var(--brass); }
.nav-toggle{ display:none; flex-direction:column; gap:5px; background:none; border:0; cursor:pointer; padding:8px; }
.nav-toggle span{ width:24px; height:2px; background:var(--ink); display:block; }

.nav__mobile-head{ display:none; }
@media (max-width: 900px){
  .nav{
    position:fixed; inset:0 0 0 auto; width:78%; max-width:320px; height:100vh;
    background:var(--ink); flex-direction:column; padding:24px 30px 40px; gap:22px;
    transform:translateX(100%); transition:transform .3s ease; z-index:60;
    overflow-y:auto;
  }
  .nav.open{ transform:translateX(0); }
  .nav a{ color:#e7ecef; font-size:1.05rem; }
  .nav a:hover, .nav a.active{ color:var(--brass-lt); }
  .nav-toggle{ display:flex; }
  .nav__mobile-head{ display:flex; justify-content:flex-end; margin-bottom:20px; }
  .nav-close{
    background:none; border:1px solid rgba(255,255,255,.25); border-radius:50%;
    color:#fff; font-size:1.6rem; line-height:1; width:40px; height:40px;
    display:flex; align-items:center; justify-content:center; cursor:pointer;
  }
  .nav-close:hover{ border-color:var(--brass-lt); color:var(--brass-lt); }
}
@media (max-width:900px) and (max-height:480px){
  /* short/landscape phones: tighten spacing so the menu never needs its own scroll to see Close */
  .nav{ padding-top:16px; gap:14px; }
}

/* ---------- Hero ---------- */
.hero{
  position:relative; color:var(--white); overflow:hidden;
  background:linear-gradient(160deg, var(--ink) 0%, var(--ink-2) 55%, #1c3b55 100%);
}
.hero::after{
  content:''; position:absolute; inset:0;
  background:radial-gradient(circle at 78% 30%, rgba(179,135,62,.28), transparent 55%);
  pointer-events:none;
}
.hero__inner{ position:relative; padding:96px 24px 90px; display:grid; grid-template-columns:1.15fr .85fr; gap:48px; align-items:center; }
.hero__eyebrow{ text-transform:uppercase; letter-spacing:3px; font-size:.78rem; color:var(--brass-lt); font-weight:700; margin-bottom:18px; display:flex; align-items:center; gap:10px; }
.hero__eyebrow::before{ content:''; width:34px; height:1px; background:var(--brass-lt); }
.hero h1{ color:var(--white); font-size:clamp(2.1rem, 4vw, 3.4rem); margin-bottom:.4em; }
.hero h1 em{ font-style:italic; color:var(--brass-lt); }
.hero__lead{ font-size:1.12rem; color:#d6dee4; max-width:52ch; margin-bottom:2em; }
.hero__cta{ display:flex; gap:16px; flex-wrap:wrap; margin-bottom:40px; }
.hero__stats{ display:flex; gap:36px; flex-wrap:wrap; border-top:1px solid rgba(255,255,255,.18); padding-top:26px; }
.hero__stat b{ font-family:var(--font-display); font-size:1.7rem; color:var(--brass-lt); display:block; }
.hero__stat span{ font-size:.82rem; color:#b9c4cc; }
.hero__art{ position:relative; }
.hero__art img{ border-radius:6px; box-shadow:var(--shadow-soft); border:6px solid rgba(255,255,255,.08); }
.hero__badge{
  position:absolute; bottom:-22px; left:-22px; background:var(--paper); color:var(--ink);
  padding:16px 20px; border-radius:6px; box-shadow:var(--shadow-soft); max-width:230px;
  border-left:4px solid var(--brass);
}
.hero__badge b{ display:block; font-family:var(--font-display); color:var(--ink); font-size:.95rem; }
.hero__badge span{ font-size:.8rem; color:var(--text-soft); }

@media (max-width:900px){
  .hero__inner{ grid-template-columns:1fr; padding:56px 20px 70px; }
  .hero__art{ order:-1; }
  .hero__badge{ position:static; margin-top:16px; max-width:none; }
}

/* ---------- Section basics ---------- */
.section{ padding:88px 0; }
.section--tight{ padding:60px 0; }
.section--paper2{ background:var(--paper-2); }
.section--ink{ background:var(--ink); color:#000000; }
.section--ink h2{ color:var(--white); }
.section-head{ max-width:680px; margin-bottom:48px; }
.eyebrow{ text-transform:uppercase; letter-spacing:3px; font-size:.76rem; font-weight:700; color:var(--brass); display:flex; align-items:center; gap:10px; margin-bottom:14px; }
.eyebrow::before{ content:''; width:30px; height:1px; background:var(--brass); }
.section-head h2{ font-size:clamp(1.7rem,3vw,2.3rem); }
.section-head p{ color:var(--text-soft); font-size:1.05rem; }
.section--ink .section-head p{ color:#b9c4cc; }

/* ---------- About ---------- */
.about{ display:grid; grid-template-columns:.9fr 1.1fr; gap:56px; align-items:start; }
.about__figure{ position:relative; }
.about__figure img{ border-radius:6px; box-shadow:var(--shadow-card); }
.about__quote{
  margin-top:-40px; margin-left:24px; background:var(--white); border-left:4px solid var(--brass);
  padding:20px 22px; box-shadow:var(--shadow-card); border-radius:4px; font-family:var(--font-display);
  font-style:italic; color:var(--ink); position:relative; max-width:340px;
}
.about__body p{ color:var(--text); }
.about__list{ display:grid; gap:14px; margin-top:22px; }
.about__list li{ display:flex; gap:12px; align-items:flex-start; }
.about__list .tick{ color:var(--brass); font-weight:700; margin-top:2px; }
@media (max-width:900px){ .about{ grid-template-columns:1fr; } .about__quote{ margin-left:0; margin-top:20px; } }

/* ---------- Practice areas (eye-catchy cards) ---------- */
.practice-grid{ display:grid; grid-template-columns:repeat(4,1fr); gap:22px; }
.practice-card{
  background:var(--white); border:1px solid var(--line); border-radius:8px; padding:30px 24px;
  box-shadow:var(--shadow-card); transition:.25s ease; position:relative; overflow:hidden;
}
.practice-card::before{
  content:''; position:absolute; top:0; left:0; width:100%; height:4px; background:var(--brass);
  transform:scaleX(0); transform-origin:left; transition:.3s ease;
}
.practice-card:hover{ transform:translateY(-6px); box-shadow:var(--shadow-soft); }
.practice-card:hover::before{ transform:scaleX(1); }
.practice-card__icon{
  width:52px; height:52px; border-radius:50%; background:var(--paper-2); color:var(--ink);
  display:flex; align-items:center; justify-content:center; font-size:1.4rem; margin-bottom:18px; border:1px solid var(--line);
}
.practice-card h3{ font-size:1.08rem; margin-bottom:8px; }
.practice-card p{ font-size:.92rem; color:var(--text-soft); margin:0; }
@media (max-width:980px){ .practice-grid{ grid-template-columns:repeat(2,1fr); } }
@media (max-width:560px){ .practice-grid{ grid-template-columns:1fr; } }
.team-grid{ grid-template-columns:repeat(3,1fr); }
@media (max-width:820px){ .team-grid{ grid-template-columns:1fr; } }

/* ---------- Locations strip ---------- */
.locations{ display:flex; flex-wrap:wrap; gap:12px; margin-top:30px; }
.location-chip{
  display:flex; align-items:center; gap:8px; background:var(--white); border:1px solid var(--line);
  padding:10px 18px; border-radius:999px; font-size:.9rem; font-weight:600; color:var(--ink);
}
.location-chip b{ color:var(--brass); }

/* ---------- Advocates preview / cards ---------- */
.people-grid{ display:grid; grid-template-columns:repeat(2,1fr); gap:34px; }
.person-card{ background:var(--white); border-radius:10px; overflow:hidden; box-shadow:var(--shadow-card); border:1px solid var(--line); }
.person-card__top{ background:var(--ink); color:var(--white); padding:26px 26px 60px; position:relative; }
.person-card__avatar{
  width:78px; height:78px; border-radius:50%; background:var(--paper-2); color:var(--ink); font-family:var(--font-display);
  font-weight:700; font-size:1.5rem; display:flex; align-items:center; justify-content:center; border:3px solid var(--brass);
  position:absolute; bottom:-30px; left:26px;
}
.person-card__role{ color:var(--brass-lt); font-size:.82rem; text-transform:uppercase; letter-spacing:1.5px; font-weight:700; }
.person-card__name{ font-family:var(--font-display); font-size:1.35rem; margin-top:6px; }
.person-card__body{ padding:44px 26px 28px; }
.person-card__tags{ display:flex; flex-wrap:wrap; gap:8px; margin:16px 0 0; }
.person-card__tags span{ background:var(--paper-2); border:1px solid var(--line); font-size:.78rem; padding:5px 12px; border-radius:999px; color:var(--ink); font-weight:600; }
@media (max-width:820px){ .people-grid{ grid-template-columns:1fr; } }

/* ---------- Timeline signature motif ---------- */
.timeline{ position:relative; padding-left:34px; }
.timeline::before{ content:''; position:absolute; left:9px; top:6px; bottom:6px; width:2px; background:linear-gradient(var(--brass), var(--line)); }
.timeline-item{ position:relative; padding-bottom:34px; }
.timeline-item:last-child{ padding-bottom:0; }
.timeline-item::before{
  content:''; position:absolute; left:-34px; top:2px; width:20px; height:20px; border-radius:50%;
  background:var(--paper); border:3px solid var(--brass);
}
.timeline-item__year{ font-family:var(--font-display); font-weight:700; color:var(--brass); font-size:1.15rem; }
.timeline-item h4{ margin:4px 0 6px; font-size:1.1rem; }
.timeline-item p{ color:var(--text-soft); margin:0; font-size:.95rem; }
.section--ink .timeline-item p{ color:#b9c4cc; }
.section--ink .timeline-item::before{ background:var(--ink); }

/* ---------- Legacy teaser card (index) ---------- */
.legacy-teaser{ display:grid; grid-template-columns:1fr 1fr; gap:0; border-radius:10px; overflow:hidden; box-shadow:var(--shadow-soft); }
.legacy-teaser__img{ position:relative; min-height:340px; background-size:cover; background-position:center; }
.legacy-teaser__body{ background:var(--ink); color:#dbe3e8; padding:48px; display:flex; flex-direction:column; justify-content:center; }
.legacy-teaser__body .eyebrow{ color:var(--brass-lt); }
.legacy-teaser__body .eyebrow::before{ background:var(--brass-lt); }
.legacy-teaser__body h2{ color:var(--white); }
@media (max-width:900px){ .legacy-teaser{ grid-template-columns:1fr; } .legacy-teaser__img{ min-height:220px; } }

/* ---------- Gallery ---------- */
.gallery{ display:grid; grid-template-columns:repeat(4,1fr); gap:16px; }
.gallery a{ display:block; border-radius:8px; overflow:hidden; box-shadow:var(--shadow-card); }
.gallery img{ height:100%; width:100%; object-fit:cover; aspect-ratio:4/3; transition:.3s ease; }
.gallery a:hover img{ transform:scale(1.06); }
@media (max-width:820px){ .gallery{ grid-template-columns:repeat(2,1fr); } }

/* ---------- CTA band ---------- */
.cta-band{ background:linear-gradient(120deg, var(--ink), var(--ink-2)); color:var(--white); border-radius:12px; padding:52px; display:flex; justify-content:space-between; align-items:center; gap:24px; flex-wrap:wrap; }
.cta-band h2{ color:var(--white); margin-bottom:6px; }
.cta-band p{ color:#c6d1d8; margin:0; }
@media (max-width:700px){ .cta-band{ text-align:center; justify-content:center; } }

/* ---------- Contact page ---------- */
.contact-grid{ display:grid; grid-template-columns:1fr 1fr; gap:48px; }
.contact-card{ background:var(--white); border:1px solid var(--line); border-radius:10px; padding:30px; box-shadow:var(--shadow-card); margin-bottom:18px; }
.contact-card h3{ font-size:1.05rem; }
.contact-card a{ color:var(--brass); font-weight:600; }
.form-field{ margin-bottom:18px; }
.form-field label{ display:block; font-weight:600; font-size:.9rem; margin-bottom:6px; color:var(--ink); }
.form-field input, .form-field textarea, .form-field select{
  width:100%; padding:12px 14px; border:1px solid var(--line); border-radius:6px; font-family:var(--font-body);
  font-size:.95rem; background:var(--white); color:var(--text);
}
.form-field textarea{ min-height:130px; resize:vertical; }
.map-embed{ border-radius:10px; overflow:hidden; box-shadow:var(--shadow-card); border:1px solid var(--line); }
@media (max-width:900px){ .contact-grid{ grid-template-columns:1fr; } }

/* ---------- Footer ---------- */
.site-footer{ background:var(--ink); color:#aebac2; padding:64px 0 0; }
.footer__grid{ display:grid; grid-template-columns:1.4fr 1fr 1fr 1fr; gap:36px; padding-bottom:44px; border-bottom:1px solid rgba(255,255,255,.1); }
.footer__col h4{ color:var(--brass-lt); font-family:var(--font-body); font-size:.85rem; text-transform:uppercase; letter-spacing:1.5px; margin-bottom:16px; }
.footer__list li{ margin-bottom:10px; font-size:.9rem; }
.footer__list a:hover{ color:var(--brass-lt); }
.brand--footer .brand__name{ color:var(--white); }
.footer__about{ font-size:.88rem; margin-top:14px; color:#9aa8b1; }
.footer__bottom{ display:flex; justify-content:space-between; gap:16px; flex-wrap:wrap; padding:22px 24px 26px; font-size:.8rem; color:#8492a0; }
.footer__disclaimer{ max-width:520px; }
.footer__dot{ padding:0 3px; opacity:.55; }
.footer__dot:hover{ opacity:1; }
@media (max-width:900px){ .footer__grid{ grid-template-columns:1fr 1fr; } }
@media (max-width:560px){ .footer__grid{ grid-template-columns:1fr; } }

/* ---------- Page hero (inner pages) ---------- */
.page-hero{ background:linear-gradient(160deg, var(--ink), var(--ink-2)); color:var(--white); padding:70px 0; text-align:center; }
.page-hero h1{ color:var(--white); font-size:clamp(1.9rem,3.4vw,2.7rem); }
.page-hero p{ color:#c6d1d8; max-width:60ch; margin:0 auto; }
.breadcrumbs{ font-size:.82rem; color:var(--brass-lt); margin-bottom:14px; }
.breadcrumbs a{ color:#c6d1d8; }
.breadcrumbs a:hover{ color:var(--white); }

/* ---------- Advocate full bio ---------- */
.bio{ display:grid; grid-template-columns:.75fr 1.25fr; gap:44px; align-items:start; margin-bottom:70px; }
.bio:nth-child(even){ direction:rtl; }
.bio:nth-child(even) > *{ direction:ltr; }
.bio__card{ background:var(--white); border:1px solid var(--line); border-radius:10px; padding:34px; text-align:center; box-shadow:var(--shadow-card); position:sticky; top:100px; }
.bio__avatar{ width:110px; height:110px; border-radius:50%; margin:0 auto 18px; background:var(--paper-2); border:3px solid var(--brass); display:flex; align-items:center; justify-content:center; font-family:var(--font-display); font-size:2rem; color:var(--ink); }
.bio__card h3{ font-size:1.25rem; margin-bottom:4px; }
.bio__card .role{ color:var(--brass); font-weight:700; font-size:.85rem; text-transform:uppercase; letter-spacing:1px; margin-bottom:16px; display:block; }
.bio__stats{ display:flex; justify-content:center; gap:22px; padding-top:16px; border-top:1px solid var(--line); margin-top:16px; }
.bio__stats b{ display:block; font-family:var(--font-display); color:var(--ink); font-size:1.3rem; }
.bio__stats span{ font-size:.75rem; color:var(--text-soft); }
.bio__body h4{ font-size:1rem; text-transform:uppercase; letter-spacing:1px; color:var(--brass); margin-top:26px; }
@media (max-width:860px){ .bio, .bio:nth-child(even){ grid-template-columns:1fr; direction:ltr; } .bio__card{ position:static; } }

.form-status{ font-size:.9rem; padding:10px 14px; border-radius:6px; margin-top:4px; }
.form-status--ok{ background:#e6f3e9; color:#1e6b3a; border:1px solid #b9dcc3; }
.form-status--err{ background:#fbe9e7; color:#8c3a2b; border:1px solid #f0c6bd; }

/* ---------- Utility ---------- */
.center{ text-align:center; }
.mt-lg{ margin-top:48px; }
