/* =========================================================
   Kate Weston Legal Practitioners — Brand Stylesheet
   Palette: Navy #282561, Dark Gold #D9B436, Medium Gold #F4D47A,
            Light Gold #F4E6C1, Cream #F9F3E6, White #FFFFFF
   Typeface: Crimson Pro (digital fallback for Minion Pro)
   ========================================================= */

:root {
  --navy: #282561;
  --navy-dark: #1c1a48;
  --gold: #D9B436;
  --gold-medium: #F4D47A;
  --gold-light: #F4E6C1;
  --cream: #F9F3E6;
  --white: #FFFFFF;
  --black: #111111;
  --grey-50: #f7f6f2;
  --grey-100: #ece9df;
  --grey-300: #c7c2b6;
  --grey-600: #6b6760;
  --grey-800: #2d2b25;

  --serif: 'Crimson Pro', 'Minion Pro', 'Georgia', 'Times New Roman', serif;
  --sans: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;

  --radius-sm: 4px;
  --radius: 6px;
  --radius-lg: 12px;

  --shadow-sm: 0 1px 2px rgba(40, 37, 97, 0.06);
  --shadow: 0 6px 24px rgba(40, 37, 97, 0.08);
  --shadow-lg: 0 18px 50px rgba(40, 37, 97, 0.12);

  --container: 1200px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--serif);
  font-size: 17px;
  line-height: 1.6;
  color: var(--black);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--navy); text-decoration: none; transition: color .15s ease; }
a:hover { color: var(--gold); }

/* ---------- Typography ---------- */
h1, h2, h3, h4, h5 {
  font-family: var(--serif);
  color: var(--navy);
  font-weight: 700;
  line-height: 1.2;
  margin: 0 0 .6em;
  letter-spacing: 0.2px;
}
h1 { font-size: clamp(2rem, 4vw, 3.4rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.4rem); }
h3 { font-size: 1.25rem; }
.eyebrow {
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 600;
  margin-bottom: 14px;
  display: inline-block;
}
.lede { font-size: 1.15rem; color: var(--grey-800); }

/* ---------- Layout ---------- */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 28px;
}
section { padding: 88px 0; }
section.tight { padding: 56px 0; }

.section-heading {
  position: relative;
  padding-left: 18px;
  margin-bottom: 14px;
}
.section-heading::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  bottom: 8px;
  width: 4px;
  background: var(--gold);
  border-radius: 2px;
}

/* ---------- Header / Nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--navy);
  border-bottom: 3px solid var(--gold);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 78px;
  gap: 24px;
}
.nav .brand img { height: 48px; width: auto; }
.nav ul {
  list-style: none;
  display: flex;
  gap: 28px;
  margin: 0; padding: 0;
}
.nav a {
  color: var(--white);
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.5px;
  position: relative;
  padding: 6px 0;
}
.nav a:hover, .nav a.active { color: var(--gold-medium); }
.nav a.active::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -4px;
  height: 2px; background: var(--gold);
}
.nav-toggle {
  display: none;
  background: transparent;
  border: 0;
  color: var(--white);
  font-size: 26px;
  cursor: pointer;
}

@media (max-width: 860px) {
  .nav-toggle { display: block; }
  .nav ul {
    position: absolute;
    top: 78px;
    left: 0; right: 0;
    background: var(--navy-dark);
    flex-direction: column;
    padding: 16px 28px;
    gap: 16px;
    border-top: 1px solid rgba(255,255,255,0.08);
    transform: translateY(-110%);
    transition: transform .25s ease;
  }
  .nav ul.open { transform: translateY(0); }
}

/* ---------- Hero ---------- */
.hero {
  background:
    linear-gradient(120deg, rgba(40,37,97,0.96), rgba(40,37,97,0.85)),
    url('../assets/pillar-pattern.svg') right center / 320px repeat-y;
  background-color: var(--navy);
  color: var(--white);
  padding: 120px 0 110px;
}
.hero .eyebrow { color: var(--gold-medium); }
.hero h1 { color: var(--white); max-width: 18ch; }
.hero p { color: rgba(255,255,255,0.86); max-width: 56ch; font-size: 1.2rem; }
.hero .cta-row { display: flex; gap: 14px; margin-top: 28px; flex-wrap: wrap; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  font-family: var(--sans);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  padding: 14px 28px;
  border-radius: var(--radius);
  border: 2px solid transparent;
  cursor: pointer;
  transition: all .18s ease;
  line-height: 1;
}
.btn-primary {
  background: var(--gold);
  color: var(--navy);
  border-color: var(--gold);
}
.btn-primary:hover { background: var(--gold-medium); border-color: var(--gold-medium); color: var(--navy); }
.btn-ghost {
  background: transparent;
  color: var(--white);
  border-color: rgba(255,255,255,0.6);
}
.btn-ghost:hover { background: var(--white); color: var(--navy); }
.btn-secondary {
  background: var(--navy);
  color: var(--white);
  border-color: var(--navy);
}
.btn-secondary:hover { background: var(--navy-dark); border-color: var(--navy-dark); color: var(--white); }
.btn-sm { padding: 10px 18px; font-size: 12px; }
.btn-danger { background: #b53a32; border-color: #b53a32; color: #fff; }
.btn-danger:hover { background: #962b25; }

/* ---------- Cards / Grids ---------- */
.grid {
  display: grid;
  gap: 24px;
}
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 980px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .grid-3, .grid-4 { grid-template-columns: 1fr; } }

.card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-sm);
  border-top: 4px solid var(--gold);
  transition: transform .2s ease, box-shadow .2s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.card h3 { color: var(--navy); margin-bottom: 8px; }
.card p { color: var(--grey-800); margin: 0 0 12px; }
.card ul { padding-left: 18px; color: var(--grey-800); margin: 0; }
.card ul li { margin-bottom: 4px; }

/* ---------- Practice areas ---------- */
.pa-card .pa-tag {
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 700;
}

/* ---------- Team ---------- */
.team-grid { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 1100px) { .team-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 800px)  { .team-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px)  { .team-grid { grid-template-columns: 1fr; } }

.member-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 0;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border-top: 4px solid var(--gold);
  transition: transform .2s ease, box-shadow .2s ease;
  display: flex; flex-direction: column;
}
.member-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.member-avatar {
  background: var(--navy);
  color: var(--gold);
  font-family: var(--serif);
  font-weight: 700;
  font-size: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 160px;
  border-bottom: 3px solid var(--gold);
  position: relative;
}
.member-avatar::before {
  content: "";
  position: absolute; inset: 0;
  background: url('../assets/pillar-pattern.svg') center / 200px repeat;
  opacity: 0.15;
  pointer-events: none;
}
.member-initials {
  position: relative; z-index: 1;
  font-family: var(--serif); font-weight: 700; font-size: 56px; color: var(--gold);
}
.member-avatar img {
  position: absolute; inset: 0; z-index: 2;
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
}
.member-avatar.has-photo { height: 240px; background: var(--cream); }
.member-body { padding: 22px 24px 26px; flex: 1; display: flex; flex-direction: column; }
.member-body h3 { margin: 0 0 4px; font-size: 1.4rem; }
.member-title {
  font-family: var(--sans);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--gold);
  font-weight: 600;
  margin-bottom: 12px;
}
.member-bio { color: var(--grey-800); font-size: 0.98rem; flex: 1; }
.member-tags { margin-top: 14px; display: flex; flex-wrap: wrap; gap: 6px; }
.tag {
  font-family: var(--sans);
  font-size: 11px;
  background: var(--cream);
  color: var(--navy);
  padding: 4px 10px;
  border-radius: 99px;
  border: 1px solid var(--gold-light);
}
.member-meta {
  font-family: var(--sans);
  font-size: 12px;
  color: var(--grey-600);
  margin-top: 14px;
}

/* ---------- Stats / strip ---------- */
.strip {
  background: var(--cream);
  padding: 56px 0;
  border-top: 1px solid var(--gold-light);
  border-bottom: 1px solid var(--gold-light);
}
.stats { display: grid; grid-template-columns: repeat(4,1fr); gap: 24px; text-align: center; }
.stat .num { font-family: var(--serif); font-size: 2.6rem; color: var(--navy); font-weight: 700; }
.stat .lbl { font-family: var(--sans); font-size: 13px; letter-spacing: 1.5px; text-transform: uppercase; color: var(--gold); font-weight: 600; }
@media (max-width: 700px) { .stats { grid-template-columns: repeat(2,1fr); } }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--navy);
  color: rgba(255,255,255,0.78);
  padding: 60px 0 28px;
  border-top: 4px solid var(--gold);
  font-family: var(--sans);
  font-size: 14px;
}
.site-footer h4 { color: var(--white); font-family: var(--serif); font-size: 1.15rem; margin-bottom: 14px; }
.site-footer a { color: rgba(255,255,255,0.78); }
.site-footer a:hover { color: var(--gold-medium); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px; }
@media (max-width: 800px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-bottom {
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid rgba(255,255,255,0.12);
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px;
  font-size: 13px; color: rgba(255,255,255,0.6);
}

/* ---------- Forms ---------- */
.form { display: grid; gap: 16px; max-width: 640px; }
.form label {
  display: block;
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 6px;
}
.form input,
.form select,
.form textarea {
  width: 100%;
  padding: 12px 14px;
  font-family: var(--serif);
  font-size: 16px;
  color: var(--black);
  background: var(--white);
  border: 1.5px solid var(--grey-100);
  border-radius: var(--radius);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.form input:focus,
.form select:focus,
.form textarea:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(217,180,54,0.18);
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 600px) { .form-row { grid-template-columns: 1fr; } }
.form-note { font-size: 13px; color: var(--grey-600); font-family: var(--sans); }

/* ---------- Page header ---------- */
.page-header {
  background: var(--navy);
  color: var(--white);
  padding: 84px 0 70px;
  position: relative;
  overflow: hidden;
}
.page-header::after {
  content: "";
  position: absolute;
  inset: 0;
  background: url('../assets/pillar-pattern.svg') right top / 240px repeat-y;
  opacity: 0.5;
  pointer-events: none;
}
.page-header h1 { color: var(--white); position: relative; z-index: 1; }
.page-header p  { color: rgba(255,255,255,0.85); max-width: 56ch; position: relative; z-index: 1; font-size: 1.15rem; }

/* ---------- Utility ---------- */
.center { text-align: center; }
.muted  { color: var(--grey-600); }
.divider { height: 4px; width: 60px; background: var(--gold); margin: 16px 0 24px; border-radius: 2px; }
.divider.center { margin-left: auto; margin-right: auto; }

/* ---------- Admin specific ---------- */
.admin-shell { background: var(--cream); min-height: 100vh; }
.admin-bar {
  background: var(--navy);
  color: var(--white);
  padding: 14px 0;
  border-bottom: 3px solid var(--gold);
}
.admin-bar .container { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.admin-bar h1 { color: var(--white); font-size: 1.2rem; margin: 0; }
.admin-bar .pill {
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  background: var(--gold);
  color: var(--navy);
  padding: 4px 10px;
  border-radius: 99px;
  font-weight: 700;
}
.admin-grid {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 28px;
  padding: 28px 0;
}
@media (max-width: 900px) { .admin-grid { grid-template-columns: 1fr; } }

.admin-list {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 18px;
  border-top: 4px solid var(--gold);
  box-shadow: var(--shadow-sm);
  max-height: 78vh;
  overflow-y: auto;
}
.admin-list .row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 12px;
  border-radius: var(--radius);
  cursor: pointer;
  border: 1.5px solid transparent;
  transition: background .12s ease, border-color .12s ease;
}
.admin-list .row:hover { background: var(--cream); }
.admin-list .row.active { border-color: var(--gold); background: var(--cream); }
.admin-list .row strong { color: var(--navy); font-family: var(--serif); }
.admin-list .row small { font-family: var(--sans); color: var(--grey-600); display: block; }

.admin-edit {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 28px;
  border-top: 4px solid var(--gold);
  box-shadow: var(--shadow-sm);
}
.admin-edit h2 { margin-top: 0; }
.admin-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.toolbar {
  display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 14px;
  align-items: center; justify-content: space-between;
}
.toolbar input[type="search"] {
  padding: 10px 12px;
  border: 1.5px solid var(--grey-100);
  border-radius: var(--radius);
  font-family: var(--serif);
  width: 100%;
  max-width: 220px;
}

.notice {
  background: var(--gold-light);
  color: var(--navy);
  padding: 12px 14px;
  border-radius: var(--radius);
  font-family: var(--sans);
  font-size: 13px;
  margin-bottom: 16px;
  border-left: 4px solid var(--gold);
}

.login-card {
  max-width: 460px;
  margin: 80px auto;
  background: var(--white);
  border-radius: var(--radius-lg);
  border-top: 6px solid var(--gold);
  box-shadow: var(--shadow);
  padding: 40px;
  text-align: center;
}
.login-card .brand { margin-bottom: 18px; }
.login-card .brand img { height: 56px; margin: 0 auto; }
.login-card .form { text-align: left; }

/* ---------- Animations ---------- */
.reveal { opacity: 0; transform: translateY(8px); transition: opacity .4s ease, transform .4s ease; }
.reveal.in { opacity: 1; transform: none; }
