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

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

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

:root {
  --blue: #243f9f;
  --blue-dark: #172b73;
  --cyan: #0797b7;
  --cyan-dark: #047998;
  --ink: #17202f;
  --text: #384356;
  --muted: #657184;
  --line: #dfe5ed;
  --mist: #f4f7fa;
  --white: #ffffff;
  --max-width: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  background: var(--white);
  color: var(--ink);
  font-family: "Lato", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.7;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
}

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

::selection {
  background: rgb(7 151 183 / 22%);
  color: var(--blue-dark);
}

:focus-visible {
  outline: 3px solid rgb(7 151 183 / 48%);
  outline-offset: 4px;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 12px;
  left: 12px;
  padding: 10px 16px;
  border-radius: 4px;
  background: var(--blue-dark);
  color: var(--white);
  font-weight: 700;
  text-decoration: none;
  transform: translateY(-150%);
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  position: relative;
  z-index: 10;
  border-bottom: 1px solid var(--line);
  background: var(--white);
}

.site-header::after {
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 2px;
  background: linear-gradient(
    90deg,
    var(--blue) 0%,
    var(--blue) 54%,
    var(--cyan) 54%,
    var(--cyan) 100%
  );
  content: "";
  opacity: 0.09;
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(calc(100% - 48px), var(--max-width));
  min-height: 112px;
  margin: 0 auto;
  gap: 40px;
}

.brand {
  width: min(320px, 55vw);
  text-decoration: none;
}

.brand img {
  width: 100%;
  height: auto;
}

.header-contact {
  color: var(--blue);
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.35;
  text-align: right;
  text-decoration: none;
}

.header-contact span {
  display: block;
  margin-bottom: 2px;
  color: var(--muted);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.header-contact:hover {
  color: var(--cyan-dark);
}

.home-main {
  overflow: hidden;
}

.farewell {
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(330px, 0.82fr);
  grid-template-areas:
    "intro portrait"
    "letter portrait";
  align-items: start;
  width: min(calc(100% - 48px), var(--max-width));
  margin: 0 auto;
  padding: clamp(72px, 7vw, 104px) 0 clamp(72px, 8vw, 112px);
  column-gap: clamp(48px, 7vw, 92px);
}

.farewell__intro {
  grid-area: intro;
}

.eyebrow {
  margin: 0 0 18px;
  color: var(--cyan-dark);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  line-height: 1.4;
  text-transform: uppercase;
}

h1 {
  max-width: 720px;
  margin: 0;
  color: var(--blue-dark);
  font-size: clamp(2.7rem, 5.2vw, 4.8rem);
  font-weight: 300;
  letter-spacing: -0.04em;
  line-height: 1.03;
}

.date-line {
  display: flex;
  align-items: center;
  margin: 30px 0 38px;
  gap: 14px;
  color: var(--blue);
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0.035em;
  line-height: 1.4;
  text-transform: uppercase;
}

.date-line span {
  flex: 0 0 auto;
  width: 36px;
  height: 2px;
  background: var(--cyan);
}

.letter {
  grid-area: letter;
  max-width: 690px;
  color: var(--text);
  font-size: clamp(1rem, 1.35vw, 1.08rem);
}

.letter > p {
  margin: 0 0 1.25em;
}

.signature {
  margin-top: 35px;
  color: var(--ink);
}

.signature p {
  margin: 0 0 22px;
}

.signature strong {
  color: var(--blue);
  font-size: 1.08em;
}

.farewell__portrait {
  position: sticky;
  grid-area: portrait;
  top: 28px;
  align-self: start;
}

.portrait-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 0.86;
  overflow: hidden;
  border: 1px solid rgb(36 63 159 / 8%);
  border-radius: 48% 48% 10px 10px;
  background:
    radial-gradient(
      circle at 50% 29%,
      rgb(255 255 255 / 96%) 0 17%,
      transparent 43%
    ),
    linear-gradient(155deg, #edf3f8 0%, #dce8ef 63%, #c9dde7 100%);
}

.portrait-frame__halo {
  position: absolute;
  top: 8%;
  left: 9%;
  width: 82%;
  aspect-ratio: 1;
  border: 1px solid rgb(36 63 159 / 9%);
  border-radius: 50%;
}

.portrait-frame img {
  position: absolute;
  z-index: 1;
  bottom: -2%;
  left: -10%;
  width: 120%;
  height: auto;
  max-width: none;
  filter: saturate(0.92) contrast(1.01);
}

.portrait-frame__line {
  position: absolute;
  z-index: 2;
  right: 8%;
  bottom: 8%;
  width: 62px;
  height: 2px;
  background: var(--cyan);
}

.contact-band {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(calc(100% - 48px), var(--max-width));
  min-height: 154px;
  margin: 0 auto 76px;
  padding: 34px clamp(30px, 5vw, 64px);
  overflow: hidden;
  background: linear-gradient(115deg, var(--cyan) 0%, var(--cyan-dark) 100%);
  color: var(--white);
}

.contact-band::before {
  position: absolute;
  top: -70%;
  right: 13%;
  width: 280px;
  aspect-ratio: 1;
  border: 1px solid rgb(255 255 255 / 16%);
  border-radius: 50%;
  content: "";
}

.contact-band p {
  margin: 0 0 2px;
  font-size: 0.77rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  line-height: 1.45;
  text-transform: uppercase;
}

.contact-band a {
  position: relative;
  z-index: 1;
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  font-weight: 300;
  letter-spacing: -0.025em;
  line-height: 1.2;
  text-decoration-thickness: 1px;
  text-underline-offset: 7px;
}

.contact-band > span {
  position: relative;
  z-index: 1;
  color: rgb(255 255 255 / 20%);
  font-size: 6rem;
  font-weight: 300;
  line-height: 1;
}

.site-footer {
  border-top: 1px solid var(--line);
  background: var(--mist);
}

.site-footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(calc(100% - 48px), var(--max-width));
  min-height: 112px;
  margin: 0 auto;
  gap: 32px;
  color: var(--muted);
  font-size: 0.82rem;
}

.site-footer p {
  margin: 0;
}

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

.site-footer a {
  text-decoration: none;
}

.site-footer a:hover,
.site-footer a[aria-current="page"] {
  color: var(--blue);
  text-decoration: underline;
  text-underline-offset: 4px;
}

.legal-main {
  width: min(calc(100% - 48px), 960px);
  min-height: calc(100vh - 225px);
  margin: 0 auto;
  padding: clamp(72px, 9vw, 120px) 0 clamp(90px, 10vw, 138px);
}

.legal-hero {
  padding-bottom: 44px;
  border-bottom: 1px solid var(--line);
}

.legal-hero h1 {
  font-size: clamp(2.6rem, 5vw, 4.6rem);
}

.legal-hero > p:last-child:not(.eyebrow) {
  max-width: 720px;
  margin: 28px 0 0;
  color: var(--muted);
  font-size: 1.08rem;
}

.legal-content {
  max-width: 760px;
  padding-top: 50px;
  color: #3c4759;
}

.legal-content section + section {
  margin-top: 45px;
}

.legal-content h2 {
  margin: 0 0 12px;
  color: var(--blue-dark);
  font-size: 1.35rem;
  line-height: 1.3;
}

.legal-content h3 {
  margin: 30px 0 8px;
  color: var(--ink);
  font-size: 1.03rem;
}

.legal-content p {
  margin: 0 0 15px;
}

.legal-content address {
  font-style: normal;
}

.legal-content a {
  color: var(--blue);
  font-weight: 700;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

@media (max-width: 900px) {
  .farewell {
    grid-template-columns: 1fr;
    grid-template-areas:
      "intro"
      "portrait"
      "letter";
    row-gap: 0;
  }

  .farewell__portrait {
    position: relative;
    top: auto;
    width: min(100%, 510px);
    margin: 4px auto 48px;
  }
}

@media (max-width: 640px) {
  body {
    font-size: 16px;
  }

  .site-header__inner {
    align-items: flex-start;
    flex-direction: column;
    width: min(calc(100% - 36px), var(--max-width));
    min-height: auto;
    padding: 24px 0;
    gap: 18px;
  }

  .brand {
    width: min(285px, 80vw);
  }

  .header-contact {
    text-align: left;
  }

  .farewell {
    width: min(calc(100% - 48px), var(--max-width));
    padding-top: 62px;
  }

  h1 {
    font-size: clamp(2.55rem, 12vw, 4rem);
  }

  .date-line {
    align-items: flex-start;
    margin: 27px 0 34px;
  }

  .date-line span {
    margin-top: 9px;
  }

  .farewell__portrait {
    margin-top: 0;
  }

  .contact-band {
    width: 100%;
    min-height: 170px;
    margin: 0;
    padding: 34px 24px;
  }

  .contact-band a {
    font-size: clamp(1.55rem, 7.6vw, 2.25rem);
  }

  .contact-band > span {
    display: none;
  }

  .site-footer__inner {
    align-items: flex-start;
    flex-direction: column;
    width: min(calc(100% - 36px), var(--max-width));
    padding: 32px 0;
    gap: 18px;
  }

  .site-footer nav {
    gap: 14px 24px;
  }

  .legal-main {
    width: min(calc(100% - 48px), 960px);
    padding-top: 64px;
  }
}

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