/* azizlaw.pk, dark prestige. Tokens and rules: see DESIGN.md. */

:root {
  --ink: #1A1F28;
  --surface: #222936;
  --ivory: #E4E1D9;
  --ivory-soft: #A8ADB6;
  --gold: #D2B67E;
  --line: #343C4A;
  --cream: 236, 230, 216;
  --serif: "Bodoni Moda", Didot, Georgia, serif;
  --sans: "Mulish", system-ui, sans-serif;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--ink); color: var(--ivory); font: 300 1.0625rem/1.75 var(--sans); }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--ivory); text-underline-offset: .22em; text-decoration-color: var(--gold); text-decoration-thickness: 1px; }
a:focus-visible, button:focus-visible, input:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
.skip { position: absolute; left: -999px; top: 1rem; }
.skip:focus { left: 1rem; background: var(--surface); padding: .5rem 1rem; z-index: 10; }
.wrap { width: min(100% - 2.5rem, 70rem); margin-inline: auto; }
.ph { color: var(--ivory-soft); font-style: italic; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* header */
.site-header { border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .75rem 2rem; padding-block: 1.4rem; }
.wordmark { display: inline-block; line-height: 0; text-decoration: none; }
.wordmark img { display: block; width: auto; height: 3.5rem; }
.site-footer .wordmark img { height: 3rem; }
.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .4rem 1.75rem; font-size: .88rem; }
.site-nav a { position: relative; color: var(--ivory-soft); text-decoration: none; white-space: nowrap; transition: color .3s ease; }
.site-nav a::after { content: ""; position: absolute; left: 50%; right: 50%; bottom: -5px; height: 1px; background: var(--gold); transition: left .4s ease, right .4s ease; }
.site-nav a:hover, .site-nav a[aria-current] { color: var(--ivory); }
.site-nav a:hover::after, .site-nav a[aria-current]::after { left: 0; right: 0; }

/* hero, lit by one soft cream glow */
.hero { padding-block: 5rem; position: relative; isolation: isolate; }
.hero::before { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(ellipse 70% 85% at 60% 42%, rgba(var(--cream), .075) 0%, rgba(var(--cream), .045) 30%, rgba(var(--cream), .015) 60%, rgba(var(--cream), 0) 80%); }
.hero .wrap { display: grid; gap: 3rem; align-items: center; }
.frame { position: relative; width: min(100%, 21rem); padding: .9rem; justify-self: center; }
.frame::before, .frame::after { content: ""; position: absolute; width: 100%; height: 100%; border: 0 solid var(--gold); pointer-events: none; }
.frame::before { top: 0; left: 0; border-top-width: 1px; border-right-width: 1px; }
.frame::after { bottom: 0; right: 0; border-bottom-width: 1px; border-left-width: 1px; }
.portrait { aspect-ratio: 4 / 5; background: var(--surface); display: grid; place-items: center; color: var(--ivory-soft); font-size: .85rem; }
img.portrait { display: block; width: 100%; height: auto; object-fit: cover; }
.hero h1 { font-family: var(--serif); font-weight: 400; font-size: clamp(3rem, 7.5vw, 5.6rem); line-height: 1.02; margin: 0 0 1.75rem; letter-spacing: -.01em; }
.rule { width: 4rem; height: 1px; background: linear-gradient(90deg, var(--gold) 55%, transparent); border: 0; margin: 0 0 1.75rem; transform-origin: left; }
.titles { list-style: none; margin: 0 0 1.25rem; padding: 0; font-size: 1.1rem; }
.quiet { color: var(--ivory-soft); margin: 0; max-width: 32rem; }
@media (min-width: 52rem) { .hero .wrap { grid-template-columns: 21rem 1fr; gap: 5.5rem; } }

/* sections */
section { padding-block: 5rem; }
.head { text-align: center; margin-bottom: 3.25rem; }
h2 { font-family: var(--serif); font-weight: 400; font-size: clamp(2rem, 4vw, 2.75rem); margin: 0; line-height: 1.15; }
.head::after { content: ""; display: block; width: 3rem; height: 1px; background: linear-gradient(90deg, transparent, var(--gold) 30%, var(--gold) 70%, transparent); margin: 1.25rem auto 0; transition: transform 1.1s var(--ease) .25s; }
.head p { max-width: 36rem; margin: 1.5rem auto 0; color: var(--ivory-soft); }
.prose { max-width: 38rem; margin-inline: auto; font-size: 1.08rem; }
.prose p { margin: 0 0 1.3em; }
.prose h2 { font-size: 1.6rem; margin: 2.5rem 0 1rem; }
.band { background: linear-gradient(to bottom, var(--ink), var(--surface) 4rem, var(--surface) calc(100% - 4rem), var(--ink)); }
#contact { position: relative; isolation: isolate; }
#contact::before { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(ellipse 60% 70% at 50% 100%, rgba(var(--cream), .05) 0%, rgba(var(--cream), .025) 40%, rgba(var(--cream), 0) 75%); }
.more { text-align: center; margin: 2.75rem 0 0; }

/* grid cells: practice areas and selected judgments */
.cells { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr; border-top: 1px solid var(--line); }
.cells li { position: relative; padding: 1.75rem 1.5rem; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; transition: background-color .4s ease; }
.cells li::before { content: ""; position: absolute; top: -1px; left: 50%; right: 50%; height: 1px; background: var(--gold); transition: left .5s var(--ease), right .5s var(--ease); }
.cells li:hover { background: var(--surface); }
.cells li:hover::before { left: 0; right: 0; }
.cells h3, .cells .cite { font-family: var(--serif); font-weight: 400; font-size: 1.35rem; line-height: 1.2; margin: 0 0 .5rem; transition: color .35s ease; }
.cells p { margin: 0; }
.practice li { text-align: center; }
.practice p { font-size: .95rem; }
.practice li:hover h3 { color: var(--gold); }
.cases .cite { color: var(--gold); }
.cases .court { margin-top: auto; padding-top: .75rem; color: var(--ivory-soft); font-size: .88rem; }
@media (min-width: 44rem) { .practice { grid-template-columns: 1fr 1fr; } .practice li:nth-child(odd) { border-right: 1px solid var(--line); } }
@media (min-width: 64rem) {
  .cells { grid-template-columns: repeat(3, 1fr); }
  .practice li:nth-child(odd) { border-right: 0; }
  .cells li:not(:nth-child(3n)) { border-right: 1px solid var(--line); }
}

/* timeline */
.timeline { list-style: none; margin: 0 auto; padding: 0; max-width: 44rem; }
.timeline li { display: grid; grid-template-columns: 7rem 1fr; gap: 1.5rem; padding-block: 1.25rem; border-top: 1px solid var(--line); }
.timeline .yrs { color: var(--gold); font-size: .9rem; padding-top: .25rem; }
.timeline strong { font-family: var(--serif); font-weight: 400; font-size: 1.2rem; display: block; line-height: 1.35; }
.timeline span:not(.yrs) { color: var(--ivory-soft); }

/* two-column lists */
.two { display: grid; gap: 3rem; max-width: 52rem; margin-inline: auto; }
.two h3 { font-family: var(--serif); font-weight: 400; font-size: 1.3rem; margin: 0 0 1rem; color: var(--gold); }
.two ul { list-style: none; margin: 0; padding: 0; }
.two li { padding-block: .6rem; border-bottom: 1px solid var(--line); }
.two li span { display: block; color: var(--ivory-soft); font-size: .92rem; }
@media (min-width: 44rem) { .two { grid-template-columns: 1fr 1fr; gap: 4rem; } }

/* strips that link to other pages */
.strip { border-block: 1px solid var(--line); text-align: center; }
.strip + .strip { border-top: 0; }
.strip p { max-width: 32rem; margin: 0 auto 2rem; }
.button { display: inline-block; border: 1px solid var(--gold); padding: .85rem 1.9rem; text-decoration: none; font-size: .95rem; transition: background-color .35s ease, color .35s ease; }
.button:hover { background: var(--gold); color: var(--ink); }

/* contact */
.contact { display: grid; gap: 3rem; }
address { font-style: normal; font-family: var(--serif); font-size: 1.35rem; line-height: 1.6; margin-bottom: 1.75rem; }
.details { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: .5rem 1.5rem; }
.details dt { color: var(--gold); font-size: .9rem; padding-top: .1rem; }
.details dd { margin: 0; }
.map { min-height: 19rem; background: var(--surface); border: 1px solid var(--line); }
.map iframe { display: block; width: 100%; height: 100%; min-height: 19rem; border: 0; filter: grayscale(1) invert(.9) hue-rotate(180deg) brightness(.85) contrast(.9); }
@media (min-width: 52rem) { .contact { grid-template-columns: 1fr 1.4fr; gap: 5rem; } }

/* inner page heading */
.page-head { padding-block: 4.5rem 3.5rem; text-align: center; }
.page-head h1 { font-family: var(--serif); font-weight: 400; font-size: clamp(2.5rem, 6vw, 4.25rem); line-height: 1.05; margin: 0; letter-spacing: -.01em; }
.page-head { position: relative; isolation: isolate; }
.page-head::before { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(ellipse 55% 90% at 50% 35%, rgba(var(--cream), .06) 0%, rgba(var(--cream), .03) 35%, rgba(var(--cream), 0) 75%); }
.page-head h1::after { content: ""; display: block; width: 3rem; height: 1px; background: linear-gradient(90deg, transparent, var(--gold) 30%, var(--gold) 70%, transparent); margin: 1.5rem auto 0; }
.page-head p { max-width: 36rem; margin: 1.5rem auto 0; color: var(--ivory-soft); }
.page-head + section { padding-top: 1rem; }

/* team page */
.head-card { display: grid; gap: 2.5rem; align-items: center; max-width: 56rem; margin-inline: auto; }
.head-card .frame { width: min(100%, 17rem); }
.head-card h2 { font-size: clamp(2rem, 4vw, 2.6rem); margin-bottom: .75rem; }
.head-card .role { color: var(--gold); margin: 0 0 1rem; }
.head-card ul { list-style: none; padding: 0; margin: 0 0 1.5rem; }
@media (min-width: 52rem) { .head-card { grid-template-columns: 17rem 1fr; gap: 4rem; } }
.people { list-style: none; margin: 0; padding: 0; display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); }
.people li { background: var(--ink); padding: 2rem 1.75rem; }
.initials { width: 4.5rem; height: 4.5rem; border: 1px solid var(--gold); display: grid; place-items: center; font-family: var(--serif); font-size: 1.4rem; color: var(--gold); margin-bottom: 1.5rem; }
.people h3 { font-family: var(--serif); font-weight: 400; font-size: 1.35rem; margin: 0 0 .25rem; }
.people .role { margin: 0 0 .75rem; color: var(--gold); font-size: .95rem; }
.people p { margin: 0; }
@media (min-width: 44rem) { .people { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 64rem) { .people { grid-template-columns: repeat(3, 1fr); } }

/* legacy page: generations in order */
.generations { list-style: none; margin: 0 auto; padding: 0; max-width: 44rem; counter-reset: gen; }
.generations li { position: relative; padding: 0 0 3rem 4.5rem; counter-increment: gen; }
.generations li::before { content: counter(gen); position: absolute; left: 0; top: 0; width: 2.75rem; height: 2.75rem; border: 1px solid var(--gold); display: grid; place-items: center; font-family: var(--serif); color: var(--gold); }
.generations li::after { content: ""; position: absolute; left: 1.375rem; top: 3.25rem; bottom: .5rem; width: 1px; background: var(--line); }
.generations li:last-child::after { display: none; }
.generations h2 { font-size: 1.6rem; margin: .3rem 0 .4rem; }
.generations .role { color: var(--gold); margin: 0 0 .75rem; }
.generations p { margin: 0 0 .6rem; }

/* full list of judgments */
.filter { max-width: 44rem; margin: 0 auto 2.5rem; }
.filter label { display: block; color: var(--gold); font-size: .9rem; margin-bottom: .5rem; }
.filter input { width: 100%; background: var(--surface); color: var(--ivory); border: 1px solid var(--line); border-radius: 0; padding: .85rem 1rem; font: inherit; }
.filter input:focus-visible { border-color: var(--gold); }
.filter p { margin: .75rem 0 0; color: var(--ivory-soft); font-size: .9rem; }
.table-wrap { overflow-x: auto; }
.judgments { width: 100%; border-collapse: collapse; font-size: .98rem; }
.judgments caption { text-align: left; color: var(--ivory-soft); font-size: .9rem; padding-bottom: 1rem; }
.judgments th { text-align: left; font-weight: 400; color: var(--gold); font-size: .9rem; padding: .75rem 1rem .75rem 0; border-bottom: 1px solid var(--gold); }
.judgments td { padding: 1rem 1rem 1rem 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.judgments td:first-child { white-space: nowrap; font-family: var(--serif); color: var(--gold); }
.judgments td:last-child { color: var(--ivory-soft); }
.judgments small { display: block; color: var(--ivory-soft); font-size: .85rem; }
@media (max-width: 43.99rem) {
  .judgments thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .judgments tr { display: block; padding: 1.1rem 0; border-bottom: 1px solid var(--line); }
  .judgments td { display: block; padding: 0; border: 0; }
  .judgments td:first-child { margin-bottom: .3rem; }
  .judgments td:last-child { font-size: .88rem; margin-top: .3rem; }
}

/* 404 */
.notfound { min-height: 60vh; display: grid; place-items: center; text-align: center; }
.notfound p { color: var(--ivory-soft); max-width: 30rem; margin: 1.5rem auto 2.5rem; }

/* footer */
.site-footer { border-top: 1px solid var(--line); padding-block: 2.5rem; text-align: center; font-size: .85rem; color: var(--ivory-soft); }
.site-footer p { margin: .3rem 0; }
.site-footer .wordmark { display: flex; justify-content: center; margin-bottom: 1rem; }

/* motion: one entrance on the home page, reveals on scroll everywhere */
@media (prefers-reduced-motion: no-preference) {
  .js .hero .frame::before, .js .hero .frame::after { width: 0; height: 0; border-color: transparent; animation: trace 2s cubic-bezier(.6, 0, .2, 1) .2s forwards; }
  .js .hero .portrait { opacity: 0; animation: fade 1.4s ease .9s forwards; }
  .js .hero h1 { opacity: 0; letter-spacing: .09em; animation: name 1.8s var(--ease) .35s forwards; }
  .js .hero .rule { transform: scaleX(0); animation: draw 1s var(--ease) 1.2s forwards; }
  .js .hero .titles, .js .hero .quiet { opacity: 0; animation: fade 1s ease forwards; }
  .js .hero .titles { animation-delay: 1.4s; }
  .js .hero .quiet { animation-delay: 1.6s; }
  .js .rv { opacity: 0; transform: translateY(16px); transition: opacity 1s ease, transform 1s var(--ease); transition-delay: calc(var(--i, 0) * 100ms); }
  .js .rv.in { opacity: 1; transform: none; }
  .js .head.rv::after { transform: scaleX(0); }
  .js .head.rv.in::after { transform: scaleX(1); }
}
@keyframes trace {
  0% { width: 0; height: 0; border-color: transparent; }
  1% { width: 0; height: 0; border-color: var(--gold); }
  50% { width: 100%; height: 0; border-color: var(--gold); }
  100% { width: 100%; height: 100%; border-color: var(--gold); }
}
@keyframes fade { to { opacity: 1; } }
@keyframes name { to { opacity: 1; letter-spacing: -.01em; } }
@keyframes draw { to { transform: scaleX(1); } }
