/* matthemmerling.com
   One page: hero with the contact form, reviews, a closing call to action,
   and CPF Mortgage's licensing footer. Colours are CPF Mortgage's own
   (teal #043845, mint #cef4d6, sky #a8e4f0). */

@font-face {
  font-family: "Inter";
  src: url("../fonts/inter-latin-opsz-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --teal: #043845;
  --teal-hover: #075063;
  --teal-deep: #02262f;
  --ink: #062f39;
  --text: #34494f;
  --muted: #5d7075;
  --line: #e1e7e4;
  --line-strong: #cbd6d2;
  --page: #f6f5f0;
  --card: #ffffff;
  --mint: #cef4d6;
  --sky: #a8e4f0;
  --danger: #b3261e;

  --radius-xl: 32px;
  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-sm: 12px;
  --shadow-card: 0 1px 2px rgb(4 56 69 / 0.05), 0 28px 64px -32px rgb(4 56 69 / 0.38);

  --font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --wrap: 1200px;
  --gutter: clamp(20px, 4vw, 40px);
  --header-h: 76px;
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
}

body {
  margin: 0;
  background: var(--page);
  color: var(--text);
  font: 400 17px/1.6 var(--font);
  font-feature-settings: "cv11", "ss03";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

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

img {
  height: auto;
}

a {
  color: inherit;
  text-underline-offset: 3px;
}

h1,
h2 {
  margin: 0;
  color: var(--ink);
  font-weight: 760;
  letter-spacing: -0.028em;
  line-height: 1.03;
  text-wrap: balance;
}

p {
  margin: 0;
}

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

[hidden] {
  display: none !important;
}

.wrap {
  width: min(100% - 2 * var(--gutter), var(--wrap));
  margin-inline: auto;
}

.skip {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 50;
  padding: 10px 16px;
  border-radius: 10px;
  background: var(--teal);
  color: #fff;
  font-weight: 600;
  text-decoration: none;
}

.skip:focus {
  top: 12px;
}

/* ---------- Buttons ---------- */

.btn {
  --btn-bg: var(--teal);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 22px;
  border: 0;
  border-radius: 14px;
  background: var(--btn-bg);
  color: #fff;
  font: 650 16px/1.1 var(--font);
  letter-spacing: -0.01em;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.14), 0 14px 26px -16px rgb(4 56 69 / 0.95);
  transition: background-color 0.2s, color 0.2s, box-shadow 0.2s, transform 0.12s;
}

.btn:hover {
  --btn-bg: var(--teal-hover);
}

.btn:active {
  transform: translateY(1px);
}

.btn:focus-visible {
  outline: 3px solid var(--sky);
  outline-offset: 3px;
}

.btn svg {
  width: 18px;
  height: 18px;
  flex: none;
  transition: transform 0.2s;
}

.btn:hover svg {
  transform: translateX(3px);
}

.btn--lg {
  min-height: 58px;
  padding: 0 26px;
  border-radius: 16px;
  font-size: 17px;
}

.btn--sm {
  min-height: 42px;
  padding: 0 16px;
  border-radius: 12px;
  font-size: 15px;
}

.btn--block {
  width: 100%;
}

.btn--light {
  --btn-bg: #fff;
  color: var(--ink);
  box-shadow: 0 14px 30px -18px rgb(0 0 0 / 0.6);
}

.btn--light:hover {
  --btn-bg: var(--mint);
}

.btn--outline {
  --btn-bg: transparent;
  color: #fff;
  box-shadow: inset 0 0 0 1.5px rgb(255 255 255 / 0.38);
}

.btn--outline:hover {
  --btn-bg: rgb(255 255 255 / 0.08);
  box-shadow: inset 0 0 0 1.5px #fff;
}

.btn[aria-busy="true"] {
  cursor: progress;
  opacity: 0.8;
}

.btn[aria-busy="true"] svg {
  display: none;
}

/* ---------- Header ---------- */

.top {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgb(246 245 240 / 0.84);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s, background-color 0.25s;
}

.top.is-stuck {
  background: rgb(246 245 240 / 0.94);
  border-bottom-color: var(--line);
}

.top__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: var(--header-h);
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
  text-decoration: none;
}

.brand__name {
  color: var(--ink);
  font-size: 19px;
  font-weight: 760;
  letter-spacing: -0.03em;
  white-space: nowrap;
}

.brand__rule {
  width: 1px;
  height: 22px;
  background: var(--line-strong);
}

.brand__cpf {
  width: 116px;
}

.top__actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.top__phone {
  padding: 10px 12px;
  border-radius: 10px;
  color: var(--ink);
  font-size: 15.5px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 0.2s;
}

.top__phone:hover {
  background: rgb(4 56 69 / 0.06);
}

.top__call {
  display: none;
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  isolation: isolate;
  overflow: clip;
  padding: clamp(12px, 2.4vw, 28px) 0 clamp(64px, 8vw, 112px);
}

.hero::before {
  content: "";
  position: absolute;
  z-index: -1;
  top: -260px;
  right: -12%;
  width: min(90vw, 1100px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgb(206 244 214 / 0.85), rgb(206 244 214 / 0));
  pointer-events: none;
}

.hero__grid {
  display: grid;
  grid-template-areas:
    "photo"
    "copy"
    "form";
  gap: 28px;
}

.hero__copy {
  grid-area: copy;
}

.hero__photo {
  grid-area: photo;
}

.hero__form {
  grid-area: form;
}

.hero h1 {
  font-size: clamp(2.4rem, 1rem + 3.4vw, 3.7rem);
}

.hero h1 span {
  display: block;
}

.lede {
  max-width: 34em;
  margin-top: 18px;
  color: var(--text);
  font-size: clamp(1.06rem, 0.98rem + 0.35vw, 1.24rem);
  line-height: 1.55;
}

/* Two stats, each numeral framed by a laurel (the idea behind the wheat
   sprays around CPF's awards), with the label beside it. The laurel is an SVG
   mask, so it takes its colour from the stylesheet. */
.proof {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px clamp(28px, 3.4vw, 48px);
  margin-top: 26px;
}

.proof__item {
  display: flex;
  align-items: center;
  gap: 12px;
}

.proof__badge {
  display: inline-flex;
  flex: none;
  align-items: center;
  gap: 1px;
  color: var(--teal);
}

.laurel {
  width: 22px;
  height: 46px;
  background: currentColor;
  -webkit-mask: url("../img/laurel.svg") center / contain no-repeat;
  mask: url("../img/laurel.svg") center / contain no-repeat;
}

.laurel--r {
  scale: -1 1;
}

.proof__num {
  min-width: 1.15em;
  color: var(--ink);
  font-size: 31px;
  font-weight: 780;
  letter-spacing: -0.045em;
  line-height: 1;
  text-align: center;
}

.proof__label {
  max-width: 13.5em;
  color: var(--ink);
  font-size: 14.5px;
  font-weight: 600;
  line-height: 1.35;
  text-wrap: balance;
}

/* The portrait sits on a teal panel; the cutout's transparent background shows
   the panel through, so the panel can change shape at each width. The wrapper
   carries the floating quote, which hangs off the panel's edge. */
.hero__photo {
  position: relative;
}

.photo {
  position: relative;
  isolation: isolate;
  margin: 0;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: var(--radius-xl);
  background:
    radial-gradient(60% 52% at 50% 30%, rgb(168 228 240 / 0.34), rgb(168 228 240 / 0) 70%),
    radial-gradient(120% 90% at 50% 0%, #0d6274 0%, #064454 46%, #032b35 100%);
  box-shadow: 0 40px 80px -48px rgb(2 38 47 / 0.75);
}

/* CPF's guilloche net, the line pattern from its social graphics, fading out
   behind Matt so it frames him instead of crowding him. */
.photo::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: url("../img/net-mint.svg") 0 0 / 160px 24px repeat;
  -webkit-mask-image: radial-gradient(70% 60% at 50% 42%, transparent 30%, #000 100%);
  mask-image: radial-gradient(70% 60% at 50% 42%, transparent 30%, #000 100%);
  opacity: 0.75;
}

.photo::before {
  content: "";
  position: absolute;
  z-index: -1;
  left: 50%;
  top: 6%;
  width: 82%;
  aspect-ratio: 1;
  translate: -50% 0;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgb(6 68 84 / 0.9), rgb(6 68 84 / 0) 100%);
  box-shadow:
    inset 0 0 0 1px rgb(206 244 214 / 0.16),
    0 0 0 56px rgb(206 244 214 / 0.035),
    0 0 0 112px rgb(206 244 214 / 0.025);
}

/* Full width so the cropped shoulders always meet the panel's edges. On a phone
   the panel is square and shows head to chest; on desktop it is taller and the
   photo sits on the bottom edge with room above. */
.photo img {
  position: absolute;
  top: 5%;
  left: 0;
  width: 100%;
}

.photo-tag {
  position: absolute;
  z-index: 1;
  left: 14px;
  right: 14px;
  bottom: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 10px 11px 14px;
  border-radius: 16px;
  background: rgb(255 255 255 / 0.94);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  box-shadow: 0 12px 28px -14px rgb(2 38 47 / 0.6);
  line-height: 1.3;
}

.photo-tag__id {
  min-width: 0;
}

.photo-tag strong {
  display: block;
  color: var(--ink);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.photo-tag__id > span {
  display: block;
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
}

.photo-tag__id strong + span {
  margin-top: 2px;
}

/* ---------- Social links ---------- */

.socials {
  display: flex;
  align-items: center;
  gap: 6px;
}

.socials a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--ink);
  text-decoration: none;
  transition: background-color 0.2s, color 0.2s, box-shadow 0.2s;
}

.socials svg {
  width: 18px;
  height: 18px;
  flex: none;
  fill: currentColor;
}

.socials--tag a,
.socials--foot a {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: rgb(4 56 69 / 0.06);
}

.socials--tag a:hover,
.socials--foot a:hover {
  background: var(--teal);
  color: #fff;
}

.socials a:focus-visible {
  outline: 3px solid var(--sky);
  outline-offset: 2px;
}

.socials--pill {
  gap: 8px;
  margin-top: 4px;
}

.socials--pill a {
  flex: 1;
  min-height: 46px;
  padding: 0 16px;
  border-radius: 14px;
  background: rgb(255 255 255 / 0.08);
  color: rgb(255 255 255 / 0.88);
  font-size: 15px;
  font-weight: 600;
}

.socials--pill a:hover {
  background: rgb(255 255 255 / 0.16);
  color: #fff;
}

/* A review pinned to the portrait, so proof sits next to the form. Shown only
   where the panel is wide enough for it to sit on his shoulder, not his face. */
.photo-quote {
  display: none;
  margin: 0;
}

@media (min-width: 1200px) {
  .photo-quote {
    display: block;
  }
}

/* ---------- Form ---------- */

.form-card {
  position: relative;
  padding: clamp(22px, 2.6vw, 30px);
  border-radius: var(--radius-lg);
  background: var(--card);
  box-shadow: var(--shadow-card), 0 0 0 1px rgb(4 56 69 / 0.05);
}

.form-card__title {
  font-size: 1.45rem;
  letter-spacing: -0.03em;
  line-height: 1.2;
}

.fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 14px;
  margin-top: 18px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 7px;
  min-width: 0;
}

.field--full {
  grid-column: 1 / -1;
}

.field__label {
  color: var(--ink);
  font-size: 14.5px;
  font-weight: 600;
}

.field__label em {
  margin-left: 4px;
  color: var(--muted);
  font-style: normal;
  font-weight: 500;
}

.field input,
.field textarea {
  width: 100%;
  padding: 13px 15px;
  border: 0;
  border-radius: 12px;
  background: #f9faf9;
  box-shadow: inset 0 0 0 1px var(--line-strong);
  color: var(--ink);
  font: inherit;
  font-size: 16px;
  line-height: 1.4;
  appearance: none;
  transition: box-shadow 0.15s, background-color 0.15s;
}

.field input {
  height: 52px;
}

.field textarea {
  min-height: 84px;
  resize: vertical;
}

.field input::placeholder,
.field textarea::placeholder {
  color: #8b9a9e;
}

.field input:hover,
.field textarea:hover {
  box-shadow: inset 0 0 0 1px #9fb3ae;
}

.field input:focus,
.field textarea:focus {
  outline: none;
  background: #fff;
  box-shadow: inset 0 0 0 1.5px var(--teal), 0 0 0 4px rgb(206 244 214 / 0.95);
}

.field[data-invalid] input {
  background: #fff;
  box-shadow: inset 0 0 0 1.5px var(--danger), 0 0 0 4px rgb(179 38 30 / 0.1);
}

.field__error {
  color: var(--danger);
  font-size: 13.5px;
  font-weight: 500;
  line-height: 1.35;
}

.hp,
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.hp {
  left: -10000px;
}

.note {
  margin-top: 12px;
}

.note summary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 2px;
  border-radius: 8px;
  color: var(--ink);
  font-size: 14.5px;
  font-weight: 600;
  list-style: none;
  cursor: pointer;
}

.note summary::-webkit-details-marker {
  display: none;
}

.note summary em {
  color: var(--muted);
  font-style: normal;
  font-weight: 500;
}

.note summary:focus-visible {
  outline: 3px solid var(--sky);
  outline-offset: 2px;
}

.note__plus {
  position: relative;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1.5px var(--line-strong);
  transition: transform 0.2s, box-shadow 0.2s;
}

.note__plus::before,
.note__plus::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 8px;
  height: 1.5px;
  border-radius: 1px;
  background: var(--ink);
  translate: -50% -50%;
}

.note__plus::after {
  rotate: 90deg;
  transition: opacity 0.2s;
}

.note summary:hover .note__plus {
  box-shadow: inset 0 0 0 1.5px var(--teal);
}

.note[open] .note__plus::after {
  opacity: 0;
}

.note .field {
  margin-top: 8px;
}

.lead-form .btn {
  margin-top: 18px;
}

.notice {
  display: none;
  scroll-margin-top: 50vh;
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 12px;
  background: #fdeceb;
  color: #7c1d16;
  font-size: 14.5px;
  font-weight: 500;
  line-height: 1.45;
}

.notice:target,
.notice.is-visible {
  display: block;
}

.consent {
  margin-top: 12px;
  color: #5c6c70;
  font-size: 12px;
  line-height: 1.5;
  text-align: center;
  text-wrap: pretty;
}

/* Sent state. JavaScript adds .is-sent; without it, contact.php redirects to
   #sent and :target shows the same panel. */
.sent {
  display: none;
  padding: clamp(6px, 1vw, 12px) 0;
  scroll-margin-top: 40px;
}

.sent:focus {
  outline: none;
}

.form-card.is-sent .sent,
.sent:target {
  display: block;
}

.form-card.is-sent .lead-form,
.form-card:has(.sent:target) .lead-form {
  display: none;
}

.sent__avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  box-shadow: 0 0 0 4px #fff, 0 0 0 5px var(--line);
}

.sent__title {
  margin-top: 22px;
  font-size: clamp(1.6rem, 1.2rem + 1.2vw, 2.05rem);
  letter-spacing: -0.028em;
  line-height: 1.1;
}

.sent p {
  max-width: 30em;
  margin-top: 12px;
  font-size: 1.05rem;
}

.sent a {
  color: var(--ink);
  font-weight: 650;
}

.sent .sent__copy {
  color: var(--muted);
  font-size: 0.95rem;
}

/* ---------- Reviews ---------- */

.reviews {
  padding: clamp(72px, 9vw, 128px) 0 clamp(40px, 6vw, 72px);
  background: #fff;
}

.reviews__head {
  display: grid;
  gap: 36px;
}

.reviews__intro {
  max-width: 780px;
}

.awards {
  margin: 0;
}

.awards__row {
  display: flex;
  align-items: center;
  gap: clamp(6px, 1vw, 12px);
}

.awards img {
  width: auto;
  height: clamp(64px, 7vw, 92px);
  filter: drop-shadow(0 10px 14px rgb(2 38 47 / 0.18));
}

.awards figcaption {
  margin-top: 12px;
  color: var(--muted);
  font-size: 13.5px;
  font-weight: 500;
}

@media (min-width: 1000px) {
  .reviews__head {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
  }

  .awards figcaption {
    text-align: right;
  }
}

.reviews__head h2 {
  font-size: clamp(2.1rem, 1.25rem + 3vw, 3.5rem);
}

.reviews__head p {
  max-width: 36em;
  margin-top: 18px;
  font-size: clamp(1.04rem, 0.98rem + 0.3vw, 1.2rem);
}

.reviews__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: clamp(36px, 5vw, 60px);
}

.reviews__grid:focus-visible {
  outline: 3px solid var(--sky);
  outline-offset: 6px;
  border-radius: var(--radius-lg);
}

.review {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 28px;
  margin: 0;
  padding: clamp(24px, 2.4vw, 32px);
  border-radius: var(--radius-lg);
  background: var(--page);
}

.review blockquote {
  margin: 0;
}

@media (hover: hover) {
  .review {
    transition: transform 0.25s cubic-bezier(0.2, 0.7, 0.2, 1), box-shadow 0.25s;
  }

  .review:hover {
    transform: translateY(-3px);
    box-shadow: 0 22px 44px -28px rgb(4 56 69 / 0.45);
  }
}

.review blockquote p {
  color: var(--ink);
  font-size: 1.06rem;
  font-weight: 450;
  line-height: 1.58;
  text-wrap: pretty;
}

.review figcaption {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 12px;
}

.review__avatar {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  flex: none;
  border-radius: 50%;
  background: #fff;
  box-shadow: inset 0 0 0 1px var(--line);
  color: var(--teal);
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.review__who {
  display: flex;
  flex: 1;
  min-width: 0;
  flex-direction: column;
  gap: 1px;
  line-height: 1.35;
}

.review__name {
  color: var(--ink);
  font-size: 15.5px;
  font-weight: 700;
}

.review__meta {
  color: var(--muted);
  font-size: 14px;
}

.review__link {
  align-self: flex-start;
  margin-top: 4px;
  color: var(--muted);
  white-space: nowrap;
  font-size: 14px;
  font-weight: 500;
  text-decoration-color: rgb(93 112 117 / 0.4);
  transition: color 0.2s, text-decoration-color 0.2s;
}

.review__link:hover {
  color: var(--ink);
  text-decoration-color: currentColor;
}

.review--feature {
  grid-column: span 2;
  background:
    radial-gradient(90% 120% at 100% 0%, rgb(168 228 240 / 0.16), rgb(168 228 240 / 0) 60%),
    var(--teal);
}

.review--feature blockquote p {
  color: #fff;
  font-size: clamp(1.3rem, 0.95rem + 1.25vw, 1.95rem);
  font-weight: 520;
  letter-spacing: -0.022em;
  line-height: 1.34;
}

.review--feature .review__name {
  color: #fff;
}

.review--feature .review__avatar {
  background: rgb(255 255 255 / 0.1);
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.18);
  color: #fff;
}

.review--feature .review__meta,
.review--feature .review__link {
  color: rgb(255 255 255 / 0.72);
}

.review--feature .review__link {
  text-decoration-color: rgb(255 255 255 / 0.35);
}

.review--feature .review__link:hover {
  color: #fff;
}

.reviews__all {
  display: inline-block;
  margin-top: 28px;
  color: var(--ink);
  font-size: 15.5px;
  font-weight: 600;
  text-decoration-color: rgb(6 47 57 / 0.35);
}

.reviews__all:hover {
  text-decoration-color: currentColor;
}

/* ---------- Closing ---------- */

.closing {
  padding: clamp(32px, 5vw, 56px) 0 clamp(72px, 9vw, 120px);
  background: #fff;
}

.closing__card {
  display: grid;
  gap: 32px;
  align-items: center;
  padding: clamp(32px, 5.5vw, 72px);
  overflow: hidden;
  border-radius: var(--radius-xl);
  position: relative;
  isolation: isolate;
  background:
    radial-gradient(70% 120% at 100% 100%, rgb(206 244 214 / 0.16), rgb(206 244 214 / 0) 62%),
    radial-gradient(120% 140% at 0% 0%, #0b5868 0%, #043845 46%, #022a33 100%);
}

.closing__card::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: url("../img/net-mint.svg") 0 0 / 160px 24px repeat;
  -webkit-mask-image: linear-gradient(100deg, transparent 35%, #000 100%);
  mask-image: linear-gradient(100deg, transparent 35%, #000 100%);
  opacity: 0.7;
}

.closing h2 {
  color: #fff;
  font-size: clamp(2.1rem, 1.3rem + 2.8vw, 3.4rem);
}

.closing__copy p {
  max-width: 32em;
  margin-top: 16px;
  color: rgb(255 255 255 / 0.8);
  font-size: clamp(1.04rem, 0.98rem + 0.3vw, 1.2rem);
}

.closing__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

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

.foot {
  padding: clamp(44px, 6vw, 64px) 0 48px;
  background: var(--page);
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.6;
}

.foot a {
  color: var(--ink);
  text-decoration-color: rgb(6 47 57 / 0.3);
}

.foot a:hover {
  text-decoration-color: currentColor;
}

.foot__top {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 28px 48px;
}

.foot__id img {
  width: 128px;
}

.foot__id p {
  margin-top: 16px;
}

.foot__links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 20px;
  max-width: 520px;
  font-weight: 500;
}

.foot__links a {
  text-decoration: none;
}

.foot__links a:hover {
  text-decoration: underline;
}

.socials--foot {
  align-self: flex-start;
}

.foot__legal {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  margin-top: 32px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
  font-size: 12.5px;
}

.foot__legal img {
  flex: none;
  width: 48px;
  opacity: 0.78;
}

.foot__legal p + p {
  margin-top: 10px;
}

/* ---------- Motion ---------- */

@media (prefers-reduced-motion: no-preference) {
  .rise {
    animation: rise 0.6s cubic-bezier(0.2, 0.7, 0.2, 1) both;
  }

  .rise--2 {
    animation-delay: 0.06s;
  }

  .rise--3 {
    animation-delay: 0.12s;
  }

  .rise--4 {
    animation-delay: 0.16s;
  }

  .photo img {
    animation: photo-in 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) 0.05s both;
  }

  .photo-quote {
    animation: quote-in 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) 0.55s both;
  }

  @keyframes quote-in {
    from {
      opacity: 0;
      transform: translate(-10px, 10px);
    }
  }

  .form-card.is-sent .sent {
    animation: rise 0.5s cubic-bezier(0.2, 0.7, 0.2, 1) both;
  }

  @keyframes rise {
    from {
      opacity: 0;
      transform: translateY(14px);
    }
  }

  @keyframes photo-in {
    from {
      opacity: 0;
      transform: translateY(18px) scale(1.015);
    }
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

/* ---------- Layout by width ---------- */

@media (min-width: 1000px) {
  .hero__grid {
    grid-template-columns: minmax(0, 1.12fr) minmax(0, 0.88fr);
    grid-template-rows: auto 1fr;
    grid-template-areas:
      "copy photo"
      "form photo";
    gap: 28px clamp(44px, 5vw, 80px);
    align-items: start;
  }

  .hero__copy {
    padding-top: clamp(12px, 2vw, 32px);
  }

  .hero__photo {
    position: sticky;
    top: calc(var(--header-h) + 20px);
    align-self: start;
  }

  .photo {
    aspect-ratio: 11 / 15;
  }

  .photo img {
    top: auto;
    bottom: 0;
  }

  .photo-tag {
    left: 18px;
    right: 18px;
    bottom: 18px;
    padding: 12px 12px 13px 16px;
  }

  .photo-quote {
    position: absolute;
    z-index: 2;
    left: clamp(-60px, -3.6vw, -40px);
    bottom: 110px;
    width: min(240px, 50%);
    padding: 18px 20px 16px;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 1px 2px rgb(4 56 69 / 0.06), 0 24px 48px -20px rgb(2 38 47 / 0.45);
  }

  .photo-quote p {
    color: var(--ink);
    font-size: 15px;
    font-weight: 550;
    letter-spacing: -0.01em;
    line-height: 1.45;
  }

  .photo-quote footer {
    margin-top: 10px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 500;
  }

  .closing__card {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 48px;
  }

  .closing__actions {
    flex-direction: column;
    align-items: stretch;
  }
}

@media (min-width: 640px) and (max-width: 999px) {
  .hero__grid {
    grid-template-columns: minmax(0, 0.82fr) minmax(0, 1.18fr);
    grid-template-areas:
      "photo copy"
      "form form";
    gap: 32px clamp(24px, 4vw, 40px);
    align-items: center;
  }

  .photo {
    aspect-ratio: 11 / 15;
  }

  .photo img {
    top: auto;
    bottom: 0;
  }

  .photo-tag__id > span {
    font-size: 12px;
  }
}

@media (min-width: 761px) and (max-width: 999px) {
  .reviews__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .review--feature {
    grid-column: 1 / -1;
  }
}

@media (max-width: 760px) {
  :root {
    --header-h: 64px;
  }

  .brand__rule,
  .brand__cpf,
  .top__phone,
  .top__cta {
    display: none;
  }

  .top__call {
    display: inline-flex;
  }

  .brand__name {
    font-size: 18px;
  }

  /* Reviews become a swipeable row so the page stays short on a phone. */
  .reviews__grid {
    display: flex;
    gap: 12px;
    margin-inline: calc(-1 * var(--gutter));
    padding: 4px var(--gutter) 16px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: var(--gutter);
    scrollbar-width: none;
    overscroll-behavior-x: contain;
  }

  .reviews__grid::-webkit-scrollbar {
    display: none;
  }

  .review {
    flex: 0 0 86%;
    scroll-snap-align: start;
  }

  .review--feature {
    grid-column: auto;
  }

  .review--feature blockquote p {
    font-size: 1.18rem;
    line-height: 1.42;
  }

  .closing__actions .btn {
    width: 100%;
  }
}

@media (max-width: 520px) {
  .proof {
    gap: 14px;
  }

  .proof__num {
    font-size: 26px;
  }

  .laurel {
    width: 20px;
    height: 42px;
  }

  .wide {
    display: none;
  }

  .fields {
    grid-template-columns: 1fr;
  }

  .foot__legal {
    flex-direction: column;
  }
}

/* ---------- About Matt ---------- */

/* A tile grid of who Matt is outside work: how long he's been in the area,
   pole vaulting, the gym, the beach and his own words. The photo tiles are
   pictures only; the map tile and the quote carry the words. */
.life {
  padding: clamp(56px, 7vw, 96px) 0 clamp(16px, 3vw, 40px);
  background: #fff;
}

.bento {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-template-areas:
    "map vault vault gym"
    "map beach quote quote";
  grid-auto-rows: minmax(300px, auto);
  gap: 16px;
}

.bento:focus-visible {
  outline: 3px solid var(--sky);
  outline-offset: 6px;
  border-radius: var(--radius-lg);
}

.tile {
  position: relative;
  isolation: isolate;
  min-width: 0;
  margin: 0;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: var(--page);
}

.tile--map {
  grid-area: map;
  display: flex;
  flex-direction: column;
  background: #eef3f0;
}

.tile--vault {
  grid-area: vault;
}

.tile--gym {
  grid-area: gym;
}

.tile--beach {
  grid-area: beach;
}

.tile--quote {
  grid-area: quote;
}

.tile--photo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.tile--vault img {
  object-position: 74% 45%;
}

.tile--gym img {
  object-position: 30% 60%;
}

@media (hover: hover) {
  .tile--photo:hover img {
    transform: scale(1.04);
  }
}

/* The map tile: how long he's been here, over the route from where he started. */
.tile__stat {
  margin: 0;
  padding: clamp(22px, 2.4vw, 30px) clamp(22px, 2.4vw, 30px) 0;
}

.tile__num {
  display: block;
  color: var(--teal);
  font-size: clamp(2.6rem, 1.7rem + 2.2vw, 3.5rem);
  font-weight: 780;
  letter-spacing: -0.045em;
  line-height: 1;
}

.tile__unit {
  display: block;
  margin-top: 8px;
  color: var(--ink);
  font-size: 1.12rem;
  font-weight: 650;
  letter-spacing: -0.015em;
  line-height: 1.25;
  text-wrap: balance;
}

/* The map fills the rest of the tile. The image and the route overlay crop
   the same way (cover / slice), so the dots and pins stay on their towns. */
.map {
  position: relative;
  flex: 1;
  min-height: 300px;
  margin-top: 8px;
}

.map img,
.map__route {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.map img {
  object-fit: cover;
}

.map__line {
  fill: none;
  stroke: var(--teal);
  stroke-width: 2.4;
  stroke-dasharray: 2 7;
  stroke-linecap: round;
}

.map__reveal {
  fill: none;
  stroke: #fff;
  stroke-width: 10;
  stroke-dasharray: 1;
  stroke-dashoffset: 0;
}

.map__dot {
  fill: var(--teal);
  stroke: #fff;
  stroke-width: 3;
}

.map__pin rect {
  fill: #fff;
  filter: drop-shadow(0 4px 8px rgb(2 38 47 / 0.22));
}

.map__pin text {
  fill: var(--ink);
  font-size: 12.5px;
  font-weight: 650;
  text-anchor: middle;
}

/* The quote is Matt's own, from his six-year anniversary post. */
.tile--quote {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: clamp(24px, 2.6vw, 34px);
  background:
    radial-gradient(80% 120% at 100% 0%, rgb(168 228 240 / 0.16), rgb(168 228 240 / 0) 60%),
    var(--teal);
}

.tile--quote::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: url("../img/net-mint.svg") 0 0 / 160px 24px repeat;
  -webkit-mask-image: linear-gradient(200deg, #000 0%, transparent 55%);
  mask-image: linear-gradient(200deg, #000 0%, transparent 55%);
  opacity: 0.8;
}

.tile--quote blockquote {
  margin: 0;
}

.tile--quote p {
  margin: 0;
  color: #fff;
  font-size: clamp(1.35rem, 0.95rem + 1.2vw, 1.85rem);
  font-weight: 560;
  letter-spacing: -0.022em;
  line-height: 1.3;
  text-wrap: pretty;
}

.tile--quote figcaption {
  margin-top: 20px;
  color: rgb(255 255 255 / 0.72);
  font-size: 14px;
  font-weight: 500;
}

/* The route draws itself once the tile scrolls in. Without JavaScript, or
   with reduced motion, it is simply already drawn. */
@media (prefers-reduced-motion: no-preference) {
  .js-reveal .tile--map .map__reveal {
    stroke-dashoffset: 1;
  }

  .js-reveal .tile--map.is-in .map__reveal {
    transition: stroke-dashoffset 1.8s cubic-bezier(0.45, 0, 0.2, 1) 0.2s;
    stroke-dashoffset: 0;
  }

  .js-reveal .tile--map .map__dot--to,
  .js-reveal .tile--map .map__pin--to {
    opacity: 0;
  }

  .js-reveal .tile--map.is-in .map__dot--to,
  .js-reveal .tile--map.is-in .map__pin--to {
    opacity: 1;
    transition: opacity 0.4s ease 1.8s;
  }
}

@media (min-width: 640px) and (max-width: 1199px) {
  .bento {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-areas:
      "map vault"
      "map gym"
      "beach quote";
    grid-auto-rows: minmax(320px, auto);
  }
}

/* Phones: a swipeable row, like the reviews, so the page stays short. The map
   keeps its own proportions here so nothing is cropped off the top. */
@media (max-width: 639px) {
  .bento {
    display: flex;
    gap: 12px;
    margin-inline: calc(-1 * var(--gutter));
    padding: 4px var(--gutter) 16px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: var(--gutter);
    scrollbar-width: none;
    overscroll-behavior-x: contain;
  }

  .bento::-webkit-scrollbar {
    display: none;
  }

  .tile {
    flex: 0 0 84%;
    min-height: 420px;
    scroll-snap-align: start;
  }

  .map {
    flex: none;
    aspect-ratio: 400 / 448.7;
    min-height: 0;
  }
}
