/* ==========================================================================
   The Fredericton Legal Advice Clinic Inc.
   Design language: "Civic Ledger" — deep ink-navy base, warm muted-gold
   accent, Lora serif headings + Source Sans 3 body, ruled dividers,
   left ink rail, calm institutional grid. Authored from scratch.
   ========================================================================== */

:root {
  --ink:        #16263c;   /* deep navy base               */
  --ink-2:      #20354f;   /* lighter navy (hover panels)  */
  --ink-deep:   #0f1c2e;   /* darkest navy (footer/rail)   */
  --ink-line:   #2b3f59;   /* hairline on dark             */
  --gold:       #c8a657;   /* warm muted gold accent       */
  --gold-deep:  #a8863c;   /* gold hover / text-on-light   */
  --burgundy:   #7a2233;   /* secondary accent             */
  --paper:      #f7f4ed;   /* warm paper background        */
  --paper-2:    #efe9dc;   /* slightly deeper panel        */
  --card:       #ffffff;
  --text:       #283241;   /* body text on light           */
  --text-soft:  #5a6675;   /* muted body                   */
  --rule:       #d8cfbd;   /* ledger rule on paper         */
  --rule-soft:  #e7e0d1;
  --focus:      #f0b429;
  --measure:    40rem;
  --serif:      "Lora", Georgia, "Times New Roman", serif;
  --sans:       "Source Sans 3", "Helvetica Neue", Arial, sans-serif;
  --shadow:     0 1px 0 rgba(22,38,60,.04), 0 14px 34px -18px rgba(22,38,60,.28);
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--paper);
  /* faint vertical ledger tint */
  background-image: linear-gradient(180deg, #fbf9f4 0%, var(--paper) 38%);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { font-family: var(--serif); color: var(--ink); line-height: 1.18; font-weight: 600; letter-spacing: -.01em; }
h1 { font-size: clamp(2rem, 1.4rem + 2.6vw, 3.05rem); margin: 0 0 .35em; font-weight: 700; }
h2 { font-size: clamp(1.4rem, 1.15rem + 1vw, 1.85rem); margin: 2em 0 .55em; }
h3 { font-size: 1.25rem; margin: 1.6em 0 .4em; }
h4 { font-size: 1.05rem; margin: 1.4em 0 .3em; text-transform: uppercase; letter-spacing: .07em; font-family: var(--sans); font-weight: 700; color: var(--text-soft); }

p, ul, ol, dl { max-width: var(--measure); }
p { margin: 0 0 1.05em; }
.measure-wide p, .measure-wide ul, .measure-wide ol { max-width: 52rem; }

a { color: var(--burgundy); text-decoration: underline; text-underline-offset: 2px; text-decoration-thickness: 1px; }
a:hover { color: var(--gold-deep); }
a:focus-visible, button:focus-visible, input:focus-visible, summary:focus-visible {
  outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 2px;
}

strong { font-weight: 700; color: var(--ink); }

.container { width: 100%; max-width: 1140px; margin-inline: auto; padding-inline: clamp(1.1rem, 4vw, 2.6rem); }

/* skip link */
.skip { position: absolute; left: -999px; top: 0; background: var(--ink); color: #fff; padding: .7rem 1rem; z-index: 100; border-radius: 0 0 6px 0; }
.skip:focus { left: 0; }

/* eyebrow / kicker */
.kicker { font-family: var(--sans); font-size: .72rem; font-weight: 700; letter-spacing: .19em; text-transform: uppercase; color: var(--gold-deep); margin: 0 0 1rem; display: flex; align-items: center; gap: .7rem; }
.kicker::before { content: ""; width: 26px; height: 2px; background: var(--gold); display: inline-block; }

/* ==========================================================================
   HEADER
   ========================================================================== */
.site-top { background: var(--ink-deep); color: #cdd6e2; font-size: .82rem; }
.site-top .container { display: flex; flex-wrap: wrap; gap: .4rem 1.4rem; align-items: center; justify-content: space-between; padding-block: .45rem; }
.site-top a { color: #e7c97a; text-decoration: none; }
.site-top a:hover { color: #fff; text-decoration: underline; }
.site-top .bilingual-flag { letter-spacing: .04em; }

.masthead { background: var(--ink); color: #fff; border-bottom: 3px solid var(--gold); position: relative; }
.masthead::after { content:""; position:absolute; left:0; right:0; bottom:-3px; height:3px; background: linear-gradient(90deg, var(--gold) 0%, var(--burgundy) 70%, var(--ink) 100%); }
.masthead .container { display: flex; align-items: center; gap: 1.1rem; padding-block: 1.15rem; }

.brand { display: flex; align-items: center; gap: .95rem; text-decoration: none; color: #fff; }
.brand:hover { color: #fff; }
.brand .mark { flex: 0 0 auto; width: 52px; height: 52px; }
.brand-names { display: flex; flex-direction: column; line-height: 1.1; }
.brand-en { font-family: var(--serif); font-weight: 700; font-size: 1.28rem; letter-spacing: -.01em; }
.brand-fr { font-family: var(--sans); font-size: .82rem; color: #b9c6d6; font-style: italic; margin-top: .12rem; }

/* nav */
.mainnav { margin-left: auto; }
.nav-toggle, .nav-toggle-label { display: none; }
.mainnav ul { list-style: none; display: flex; gap: .15rem; margin: 0; padding: 0; max-width: none; }
.mainnav a { color: #d7dfea; text-decoration: none; font-weight: 600; font-size: .94rem; padding: .55rem .7rem; border-radius: 4px; display: inline-block; position: relative; }
.mainnav a:hover { color: #fff; background: rgba(255,255,255,.06); }
.mainnav a[aria-current="page"] { color: #fff; }
.mainnav a[aria-current="page"]::after { content:""; position:absolute; left:.7rem; right:.7rem; bottom:.18rem; height:2px; background: var(--gold); }

/* ==========================================================================
   HERO (home) — asymmetric, ink panel + paper info card, no centered hero
   ========================================================================== */
.hero { background: var(--ink); color: #eef2f7; position: relative; overflow: hidden; }
.hero::before {
  content:""; position:absolute; inset:0; pointer-events:none;
  background:
    radial-gradient(120% 90% at 88% -10%, rgba(200,166,87,.16), transparent 55%),
    repeating-linear-gradient(0deg, rgba(255,255,255,.025) 0 1px, transparent 1px 38px);
}
.hero .container { position: relative; display: grid; grid-template-columns: 1.55fr 1fr; gap: clamp(1.5rem,4vw,3.4rem); align-items: stretch; padding-block: clamp(2.6rem, 5vw, 4.6rem); }
.hero h1 { color: #fff; }
.hero .kicker { color: #e7c97a; }
.hero-lead { font-size: clamp(1.1rem,1rem + .5vw,1.32rem); color: #d4ddea; max-width: 34rem; font-family: var(--serif); font-style: italic; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 1.6rem; }

/* clinic info card sits inside hero */
.clinic-card { background: var(--paper); color: var(--text); border-radius: 10px; padding: 1.5rem 1.6rem; box-shadow: 0 24px 50px -22px rgba(0,0,0,.55); align-self: center; border-top: 4px solid var(--gold); }
.clinic-card h2 { margin: 0 0 .2rem; font-size: 1.2rem; }
.clinic-card .when { font-family: var(--serif); font-weight: 700; color: var(--ink); font-size: 1.05rem; }
.clinic-card dl { margin: .9rem 0 0; display: grid; gap: .6rem; }
.clinic-card dt { font-size: .68rem; letter-spacing: .14em; text-transform: uppercase; color: var(--gold-deep); font-weight: 700; }
.clinic-card dd { margin: .1rem 0 0; }
.clinic-card .note { margin: 1rem 0 0; font-size: .9rem; color: var(--text-soft); border-top: 1px solid var(--rule); padding-top: .8rem; }

/* ==========================================================================
   BUTTONS
   ========================================================================== */
.btn { display: inline-flex; align-items: center; gap: .5rem; font-family: var(--sans); font-weight: 700; font-size: .95rem; text-decoration: none; padding: .72rem 1.25rem; border-radius: 6px; border: 2px solid var(--gold); background: var(--gold); color: var(--ink-deep); transition: transform .15s ease, background .15s ease, color .15s ease; }
.btn:hover { background: #d8b96b; color: var(--ink-deep); transform: translateY(-1px); }
.btn.ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,.5); }
.btn.ghost:hover { background: rgba(255,255,255,.1); color: #fff; border-color: #fff; }
.btn.dark { background: var(--ink); color: #fff; border-color: var(--ink); }
.btn.dark:hover { background: var(--ink-2); color: #fff; }
.btn .arrow { transition: transform .15s ease; }
.btn:hover .arrow { transform: translateX(3px); }

/* ==========================================================================
   PAGE LAYOUT (inner pages)
   ========================================================================== */
.page-head { background: var(--ink); color: #fff; position: relative; }
.page-head::after { content:""; position:absolute; left:0; right:0; bottom:0; height:3px; background: linear-gradient(90deg, var(--gold), var(--burgundy) 80%); }
.page-head .container { padding-block: clamp(2rem,4vw,3.2rem); }
.page-head h1 { color: #fff; }
.page-head .lead { color: #cfd9e6; font-size: 1.18rem; max-width: 46rem; font-family: var(--serif); font-style: italic; margin: 0; }

.breadcrumb { background: var(--paper-2); border-bottom: 1px solid var(--rule); font-size: .85rem; }
.breadcrumb ol { list-style: none; display: flex; flex-wrap: wrap; gap: .4rem; margin: 0; padding: .6rem 0; max-width: none; }
.breadcrumb li::after { content: "›"; margin-left: .45rem; color: var(--text-soft); }
.breadcrumb li:last-child::after { content: ""; }
.breadcrumb a { color: var(--burgundy); text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb [aria-current="page"] { color: var(--text-soft); }

main { display: block; }
.layout { display: grid; grid-template-columns: 15rem 1fr; gap: clamp(1.6rem, 4vw, 3.4rem); padding-block: clamp(2rem, 4vw, 3.4rem); align-items: start; }
.layout.solo { grid-template-columns: 1fr; max-width: 52rem; }

/* side nav (in-section) */
.sidenav { position: sticky; top: 1.2rem; }
.sidenav h2 { font-family: var(--sans); font-size: .72rem; letter-spacing: .16em; text-transform: uppercase; color: var(--gold-deep); margin: 0 0 .7rem; }
.sidenav ul { list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--rule); }
.sidenav a { display: block; text-decoration: none; color: var(--text-soft); font-weight: 600; font-size: .94rem; padding: .42rem .9rem; margin-left: -2px; border-left: 2px solid transparent; }
.sidenav a:hover { color: var(--ink); border-left-color: var(--gold); }
.sidenav a[aria-current="page"] { color: var(--ink); border-left-color: var(--gold); background: var(--paper-2); }

.content { min-width: 0; }
.content > :first-child { margin-top: 0; }
.content h2 { padding-bottom: .35rem; border-bottom: 1px solid var(--rule); }

/* prose lists */
.content ul, .content ol { padding-left: 1.2rem; }
.content li { margin: .35em 0; }

/* lead paragraph */
.lead-p { font-size: 1.22rem; font-family: var(--serif); color: var(--ink); line-height: 1.5; }

/* ==========================================================================
   COMPONENTS
   ========================================================================== */
/* callout / aside */
.callout { background: var(--card); border: 1px solid var(--rule); border-left: 4px solid var(--gold); border-radius: 0 8px 8px 0; padding: 1.2rem 1.4rem; margin: 1.8rem 0; box-shadow: var(--shadow); }
.callout.warn { border-left-color: var(--burgundy); }
.callout h2, .callout h3 { margin-top: 0; border: 0; }
.callout :last-child { margin-bottom: 0; }

/* feature grid (home "what we do" / structure) */
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem,1fr)); gap: 1.1rem; max-width: none; list-style: none; padding: 0; margin: 1.5rem 0; }
.feature { background: var(--card); border: 1px solid var(--rule-soft); border-radius: 9px; padding: 1.3rem 1.35rem; box-shadow: var(--shadow); position: relative; }
.feature .num { font-family: var(--serif); font-size: .9rem; color: var(--gold-deep); font-weight: 700; letter-spacing: .1em; }
.feature h3 { margin: .35rem 0 .4rem; font-size: 1.18rem; }
.feature p { margin: 0; color: var(--text-soft); font-size: .98rem; }
.feature .ic { width: 34px; height: 34px; color: var(--ink); margin-bottom: .5rem; }

/* steps (how a visit works) */
.steps { counter-reset: step; list-style: none; padding: 0; margin: 1.5rem 0; display: grid; gap: 1rem; max-width: none; }
.steps li { position: relative; padding: 1.1rem 1.3rem 1.1rem 4rem; background: var(--card); border: 1px solid var(--rule-soft); border-radius: 9px; box-shadow: var(--shadow); }
.steps li::before { counter-increment: step; content: counter(step); position: absolute; left: 1rem; top: 1.05rem; width: 2.1rem; height: 2.1rem; border-radius: 50%; background: var(--ink); color: var(--gold); font-family: var(--serif); font-weight: 700; display: grid; place-items: center; font-size: 1.05rem; }
.steps li strong { display: block; color: var(--ink); font-size: 1.06rem; margin-bottom: .15rem; }
.steps li p { margin: 0; color: var(--text-soft); }

/* location cards */
.locations { display: grid; grid-template-columns: repeat(auto-fit, minmax(16rem,1fr)); gap: 1.1rem; max-width: none; margin: 1.4rem 0; }
.loc { background: var(--card); border: 1px solid var(--rule-soft); border-top: 4px solid var(--ink); border-radius: 8px; padding: 1.3rem 1.4rem; box-shadow: var(--shadow); }
.loc .tag { font-size: .68rem; letter-spacing: .15em; text-transform: uppercase; font-weight: 700; color: var(--gold-deep); }
.loc h3 { margin: .35rem 0 .5rem; }
.loc address { font-style: normal; color: var(--text-soft); line-height: 1.5; }
.loc .ic { width: 26px; height: 26px; color: var(--burgundy); }

/* partners grid */
.partners { display: grid; grid-template-columns: repeat(auto-fill, minmax(15rem,1fr)); gap: .8rem; max-width: none; list-style: none; padding: 0; margin: 1.5rem 0; }
.partners li { background: var(--card); border: 1px solid var(--rule-soft); border-radius: 8px; padding: 1rem 1.1rem; display: flex; gap: .8rem; align-items: flex-start; }
.partners li::before { content: ""; flex: 0 0 auto; width: 8px; height: 8px; margin-top: .55rem; border-radius: 2px; background: var(--gold); transform: rotate(45deg); }
.partners strong { display: block; }

/* news index */
.news-list { list-style: none; padding: 0; margin: 1.5rem 0 0; max-width: none; display: grid; gap: 0; }
.news-item { border-top: 1px solid var(--rule); padding: 1.4rem 0; display: grid; grid-template-columns: 9rem 1fr; gap: 1.4rem; }
.news-item:last-child { border-bottom: 1px solid var(--rule); }
.news-item time { font-size: .8rem; letter-spacing: .07em; text-transform: uppercase; color: var(--gold-deep); font-weight: 700; padding-top: .35rem; }
.news-item h3 { margin: 0 0 .3rem; font-size: 1.3rem; }
.news-item h3 a { color: var(--ink); text-decoration: none; }
.news-item h3 a:hover { color: var(--burgundy); }
.news-item p { margin: 0; color: var(--text-soft); }
.news-item .more { display: inline-block; margin-top: .5rem; font-weight: 700; font-size: .9rem; text-decoration: none; color: var(--burgundy); }
.news-item .more:hover { text-decoration: underline; }

/* article meta */
.article-meta { color: var(--text-soft); font-size: .9rem; letter-spacing: .04em; margin: 0 0 1.4rem; }
.article-meta time { color: var(--gold-deep); font-weight: 700; text-transform: uppercase; letter-spacing: .08em; }

/* contact panel */
.contact-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(16rem,1fr)); gap: 1.1rem; max-width: none; margin: 1.4rem 0; }
.email-row { display: grid; gap: .8rem; max-width: none; }
.email-card { background: var(--card); border: 1px solid var(--rule-soft); border-radius: 8px; padding: 1.1rem 1.3rem; }
.email-card .label { font-size: .7rem; letter-spacing: .14em; text-transform: uppercase; color: var(--gold-deep); font-weight: 700; }
.email-card a { font-size: 1.08rem; font-weight: 600; }

/* definition rows (privacy/terms aside) */
.note-line { font-size: .92rem; color: var(--text-soft); }

/* tables-of-facts */
.factrow { display: grid; grid-template-columns: auto 1fr; gap: .3rem 1.1rem; max-width: none; margin: 1.2rem 0; }
.factrow dt { font-weight: 700; color: var(--ink); }
.factrow dd { margin: 0; color: var(--text-soft); }

/* ==========================================================================
   FOOTER
   ========================================================================== */
.site-foot { background: var(--ink-deep); color: #c2cddb; margin-top: 3rem; }
.foot-main { border-top: 3px solid var(--gold); }
.foot-main .container { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 2rem; padding-block: 2.6rem; }
.foot-main h2 { color: #fff; font-size: 1.05rem; margin: 0 0 .8rem; }
.foot-brand .mark { width: 40px; height: 40px; }
.foot-brand .brand-en { color: #fff; font-size: 1.1rem; }
.foot-brand .brand-fr { color: #93a3b6; }
.foot-brand p { color: #93a3b6; font-size: .92rem; margin-top: .9rem; max-width: 26rem; }
.foot-main ul { list-style: none; margin: 0; padding: 0; }
.foot-main li { margin: .35rem 0; }
.foot-main a { color: #cdd6e2; text-decoration: none; font-size: .95rem; }
.foot-main a:hover { color: var(--gold); }
.foot-bottom { border-top: 1px solid var(--ink-line); }
.foot-bottom .container { display: flex; flex-wrap: wrap; gap: .5rem 1.4rem; justify-content: space-between; align-items: center; padding-block: 1.1rem; font-size: .82rem; color: #8b9bb0; }
.foot-bottom .org { color: #aebccd; }
.foot-bottom .fr { font-style: italic; }

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 860px) {
  .hero .container { grid-template-columns: 1fr; }
  .layout { grid-template-columns: 1fr; }
  .sidenav { position: static; }
  .sidenav ul { display: flex; flex-wrap: wrap; border-left: 0; gap: .3rem; }
  .sidenav a { border: 1px solid var(--rule); border-radius: 20px; margin: 0; padding: .35rem .85rem; }
  .sidenav a[aria-current="page"] { border-color: var(--gold); }
  .foot-main .container { grid-template-columns: 1fr 1fr; }
  .news-item { grid-template-columns: 1fr; gap: .4rem; }

  /* mobile nav (checkbox) */
  .mainnav { margin-left: auto; position: relative; }
  .nav-toggle-label { display: inline-flex; align-items: center; gap: .5rem; cursor: pointer; color: #fff; font-weight: 700; font-size: .9rem; padding: .5rem .7rem; border: 1px solid rgba(255,255,255,.35); border-radius: 6px; }
  .nav-toggle-label .bars { display: block; width: 18px; height: 2px; background: #fff; position: relative; }
  .nav-toggle-label .bars::before, .nav-toggle-label .bars::after { content:""; position:absolute; left:0; width:18px; height:2px; background:#fff; }
  .nav-toggle-label .bars::before { top: -6px; } .nav-toggle-label .bars::after { top: 6px; }
  .mainnav ul { position: absolute; right: 0; top: calc(100% + .6rem); flex-direction: column; background: var(--ink-deep); border: 1px solid var(--ink-line); border-radius: 8px; padding: .5rem; min-width: 14rem; box-shadow: 0 20px 40px -16px rgba(0,0,0,.6); display: none; z-index: 50; }
  .mainnav a { display: block; padding: .6rem .8rem; }
  .mainnav a[aria-current="page"]::after { display: none; }
  .nav-toggle:checked ~ ul { display: flex; }
}
@media (max-width: 560px) {
  .foot-main .container { grid-template-columns: 1fr; }
  .brand-fr { display: none; }
  body { font-size: 1rem; }
}
