/* Steve Keall, Barrister — sitewide styles
   FortyEight Shortland Barristers, Auckland
   ------------------------------------------------------------------ */

:root {
  /* Brand blue — the title colour from the chambers letterhead */
  --blue: #215e99;
  --blue-dark: #1b4c7d;
  --blue-darker: #163d64;
  --blue-pale: #c5dcf0;

  /* Neutrals */
  --ink: #1a1a1a;
  --muted: #5a5a5a;
  --rule: #e2e2e2;
  --paper: #ffffff;

  /* Type */
  --serif: Georgia, "Times New Roman", Times, serif;
  --sans: Calibri, Carlito, Candara, "Segoe UI", -apple-system, sans-serif;
  --track-label: 0.14em;
  --track-wide: 0.34em;

  /* Layout */
  --column: 1008px;
  --gutter: 24px;
  --section-y: 96px;
  --radius: 4px;
}

/* Carlito is metric-compatible with Calibri and open source (OFL). Readers
   with Calibri installed see Calibri; everyone else sees Carlito at
   identical widths, so line breaks never shift. Self-hosted from
   static/fonts/ (see static/fonts/carlito-OFL.txt for the licence). */
@font-face {
  font-family: "Carlito";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/carlito-400.woff2") format("woff2");
}

@font-face {
  font-family: "Carlito";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../fonts/carlito-700.woff2") format("woff2");
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--serif);
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--blue);
  transition: color 120ms cubic-bezier(0.2, 0, 0.2, 1);
}

a:hover {
  color: var(--blue-dark);
  text-underline-offset: 3px;
}

:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}

img {
  display: block;
  max-width: 100%;
}

blockquote {
  margin: 1.5rem 0;
  padding-left: 1rem;
  border-left: 3px solid var(--rule);
  color: var(--muted);
  font-style: italic;
}

blockquote footer {
  margin-top: 0.5rem;
  font-size: 0.85em;
  font-style: normal;
  color: var(--muted);
}

.container {
  max-width: var(--column);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

main {
  min-height: 60vh;
}

/* Masthead ------------------------------------------------------------- */

.masthead {
  padding-top: 40px;
}

.masthead-inner {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 32px;
  flex-wrap: wrap;
}

.chambers {
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: var(--track-label);
  text-transform: uppercase;
  color: var(--blue);
}

.site-nav {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}

.site-nav a {
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: var(--track-label);
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
}

.site-nav a:hover {
  color: var(--blue);
}

.contact-line {
  margin-top: 8px;
  font-size: 13px;
  color: var(--muted);
}

.hairline {
  border: 0;
  border-top: 1px solid var(--rule);
  margin: 24px 0 0;
}

/* Hero (homepage) -------------------------------------------------------- */

.hero {
  padding-top: 96px;
  padding-bottom: var(--section-y);
}

.lockup {
  display: flex;
  align-items: center;
  gap: 28px;
}

.lockup-name {
  font-size: 64px;
  line-height: 1.02;
  letter-spacing: -0.012em;
  color: var(--blue);
}

.lockup-role {
  font-family: var(--sans);
  font-size: 15px;
  text-transform: uppercase;
  letter-spacing: var(--track-wide);
  color: var(--muted);
  margin-top: 14px;
}

.lede {
  font-size: 25px;
  line-height: 1.5;
  margin: 64px 0 0;
  max-width: 44ch;
  text-wrap: pretty;
}

.button {
  display: inline-block;
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: var(--track-label);
  line-height: 1.2;
  color: var(--paper);
  background: var(--blue);
  padding: 12px 24px;
  border-radius: var(--radius);
  text-decoration: none;
  margin-top: 48px;
  transition: background-color 120ms cubic-bezier(0.2, 0, 0.2, 1);
}

.button:hover {
  background: var(--blue-dark);
  color: var(--paper);
}

.button:active {
  background: var(--blue-darker);
}

/* Sections --------------------------------------------------------------- */

.page {
  padding-top: var(--section-y);
  padding-bottom: var(--section-y);
}

.section {
  padding-top: var(--section-y);
  padding-bottom: var(--section-y);
}

.eyebrow {
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: var(--track-label);
  color: var(--muted);
  margin: 0;
}

.mark {
  border: 0;
  height: 2px;
  width: 48px;
  background: var(--blue);
  margin: 16px 0 32px;
}

/* Contact ------------------------------------------------------------------ */

.contact {
  padding-bottom: 160px;
}

.contact h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 32px;
  line-height: 1.14;
  letter-spacing: -0.012em;
  color: var(--blue);
  margin: 0;
  max-width: 28ch;
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 40px;
  margin-top: 56px;
  max-width: 900px;
}

.contact-grid .eyebrow + * {
  margin-top: 8px;
}

.contact-note {
  font-size: 15px;
  color: var(--muted);
  margin-top: 4px;
}

/* Blog: post list / post body ---------------------------------------------- */

.post-meta {
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 0;
}

.post-list {
  list-style: none;
  padding: 0;
}

.post-list-item {
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--rule);
}

.post-list-item h2 {
  margin: 0.25rem 0;
}

.post-list-item a {
  color: var(--blue);
  text-decoration: none;
}

.post-list-item a:hover {
  text-decoration: underline;
}

/* Footer -------------------------------------------------------------------- */

.site-footer {
  background: var(--blue);
  padding-top: 48px;
  padding-bottom: 48px;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 32px;
  flex-wrap: wrap;
}

.footer-lockup {
  display: flex;
  align-items: center;
  gap: 16px;
}

.footer-name {
  font-size: 20px;
  color: var(--paper);
  line-height: 1;
}

.footer-role {
  font-family: var(--sans);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: var(--track-wide);
  color: var(--blue-pale);
  margin-top: 6px;
}

.footer-contact {
  font-size: 13px;
  color: var(--blue-pale);
  text-align: right;
}

.footer-bottom {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
}

.footer-bottom p {
  margin: 0;
  font-size: 13px;
  color: var(--blue-pale);
}

/* Small screens --------------------------------------------------------------- */

@media (max-width: 720px) {
  :root {
    --section-y: 56px;
  }

  .masthead-inner {
    align-items: flex-start;
  }

  .site-nav {
    gap: 16px;
  }

  .hero {
    padding-top: 56px;
  }

  .lockup {
    gap: 18px;
  }

  .lockup img {
    width: 64px;
    height: 64px;
  }

  .lockup-name {
    font-size: 40px;
  }

  .lede {
    font-size: 20px;
    margin-top: 40px;
  }

  .contact {
    padding-bottom: 72px;
  }

  .footer-inner,
  .footer-contact {
    text-align: left;
  }
}
