/* Penmere site styles. No external requests. */

@font-face {
  font-family: "Public Sans";
  src: url("/assets/fonts/public-sans-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Public Sans";
  src: url("/assets/fonts/public-sans-latin-wght-italic.woff2") format("woff2");
  font-weight: 100 900;
  font-style: italic;
  font-display: swap;
}

:root {
  --navy: #002a64;
  --navy-deep: #001d46;
  --paper: #f7f8fa;
  --ink: #16202e;
  --slate: #4d5b70;
  --rule: #d6dbe3;
  --on-navy: #e8edf5;
  --on-navy-muted: #b9c5d8;

  --step-0: 1.0625rem;
  --step-1: 1.25rem;
  --step-2: 1.5625rem;
  --step-3: clamp(1.75rem, 1.2rem + 1.8vw, 2.4rem);
  --step-4: clamp(2.25rem, 1.3rem + 3.6vw, 4rem);

  --wrap: 72rem;
  --measure: 38rem;
  --gutter: clamp(1.25rem, 4vw, 3rem);
}

*,
*::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(--paper);
  color: var(--ink);
  font-family: "Public Sans", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: var(--step-0);
  line-height: 1.6;
  text-rendering: optimizeLegibility;
}

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

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.15;
  text-wrap: balance;
}

p {
  margin: 0;
  text-wrap: pretty;
}

a {
  color: var(--navy);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

a:hover {
  text-decoration-thickness: 2px;
}

:focus-visible {
  outline: 3px solid var(--navy);
  outline-offset: 3px;
}

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip-link {
  position: absolute;
  left: 0.75rem;
  top: -3rem;
  padding: 0.5rem 0.875rem;
  background: var(--navy);
  color: #fff;
  z-index: 10;
}

.skip-link:focus {
  top: 0.75rem;
}

/* Header */

.site-header {
  border-top: 6px solid var(--navy);
  border-bottom: 1px solid var(--rule);
  background: #fff;
}

.site-header .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 2rem;
  padding-block: 1.1rem;
}

.brand img {
  width: 9.5rem;
}

.site-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.75rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-nav a {
  color: var(--ink);
  font-weight: 500;
  text-decoration: none;
  padding-block: 0.25rem;
  border-bottom: 2px solid transparent;
}

.site-nav a:hover {
  border-bottom-color: var(--navy);
}

/* Hero */

.hero {
  padding-block: clamp(4rem, 10vw, 8rem) clamp(3.5rem, 8vw, 6.5rem);
  background: #fff;
  border-bottom: 1px solid var(--rule);
}

.hero h1 {
  max-width: 17ch;
  color: var(--navy);
  font-size: var(--step-4);
  font-weight: 750;
  letter-spacing: -0.025em;
  line-height: 1.04;
}

.hero .lede {
  max-width: var(--measure);
  margin-top: 1.75rem;
  color: var(--slate);
  font-size: var(--step-1);
  line-height: 1.55;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.875rem 1.5rem;
  align-items: center;
  margin-top: 2.5rem;
}

.button {
  display: inline-block;
  padding: 0.85rem 1.4rem;
  background: var(--navy);
  color: #fff;
  font-weight: 600;
  text-decoration: none;
  border: 2px solid var(--navy);
  border-radius: 2px;
}

.button:hover {
  background: var(--navy-deep);
  border-color: var(--navy-deep);
}

.text-link {
  font-weight: 600;
}

/* Generic section rhythm */

.section {
  padding-block: clamp(4rem, 9vw, 7rem);
}

.section h2 {
  color: var(--navy);
  font-size: var(--step-3);
  font-weight: 700;
  letter-spacing: -0.015em;
}

/* About */

.about-grid {
  display: grid;
  gap: 2rem 4rem;
}

@media (min-width: 52rem) {
  .about-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr);
  }
}

.about-grid h2 {
  max-width: 14ch;
}

.prose {
  max-width: var(--measure);
}

.prose p + p {
  margin-top: 1.15rem;
}

.prose p:first-child {
  font-size: var(--step-1);
  line-height: 1.5;
  color: var(--ink);
}

/* Services: the one bold block on the page */

.services {
  background: var(--navy);
  color: var(--on-navy);
}

.services h2 {
  color: #fff;
}

.services .intro {
  max-width: var(--measure);
  margin-top: 1rem;
  color: var(--on-navy-muted);
}

.service-list {
  display: grid;
  gap: 0;
  margin: 3rem 0 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid rgb(255 255 255 / 0.28);
}

.service-list li {
  display: grid;
  gap: 0.75rem 3rem;
  padding-block: 2rem;
  border-bottom: 1px solid rgb(255 255 255 / 0.28);
}

@media (min-width: 52rem) {
  .service-list li {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr);
    padding-block: 2.5rem;
  }
}

.service-list h3 {
  color: #fff;
  font-size: var(--step-2);
  font-weight: 650;
  letter-spacing: -0.01em;
  max-width: 18ch;
}

.service-list p {
  max-width: var(--measure);
  color: var(--on-navy);
}

/* Contact */

.contact .prose {
  margin-top: 1rem;
}

.contact-email {
  display: inline-block;
  margin-top: 2rem;
  font-size: var(--step-2);
  font-weight: 650;
  word-break: break-word;
}

.contact-meta {
  margin-top: 1.25rem;
  color: var(--slate);
}

/* Footer */

.site-footer {
  border-top: 1px solid var(--rule);
  background: #fff;
  color: var(--slate);
  font-size: 0.9375rem;
}

.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 2rem;
  padding-block: 2rem;
}

.site-footer img {
  width: 7rem;
}

.site-footer a {
  color: var(--slate);
}

/* 404 page */

.notfound {
  min-height: 55vh;
}

.notfound h1 {
  color: var(--navy);
  font-size: var(--step-4);
  font-weight: 750;
  letter-spacing: -0.025em;
}

.notfound p {
  max-width: var(--measure);
  margin-top: 1.25rem;
  color: var(--slate);
  font-size: var(--step-1);
}

@media print {
  .site-nav,
  .skip-link,
  .actions {
    display: none;
  }

  .services {
    background: none;
    color: var(--ink);
  }

  .services h2,
  .service-list h3,
  .service-list p {
    color: var(--ink);
  }
}

[hidden] {
  display: none !important;
}
