:root {
  color-scheme: light;
  --profile: #77abd9;
  --accent: #437faa;
  --white: #fffffe;
  --ink: #20253e;
  --body-font: Comfortaa, "Century Gothic", "Segoe UI", sans-serif;
  background: var(--profile);
  color: var(--white);
  font: 16px/1.45 var(--body-font);
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; }
body::before {
  content: "";
  position: fixed;
  z-index: -1;
  inset: -60px;
  background: url("assets/a17f8c7542fa07e0.webp") center 52% / cover no-repeat;
  filter: blur(52px) brightness(.86);
}
a { color: inherit; }
button, summary { font: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid #142d49; outline-offset: 3px; }
.profile {
  width: min(720px, calc(100% - 48px));
  margin: 72px auto 144px;
  padding: 80px;
  border-radius: 24px;
  background: var(--profile);
}
.hero { width: min(420px, 100%); height: 536px; position: relative; margin: 0 auto 16px; }
.portrait { position: absolute; inset: 0; overflow: hidden; border-radius: 16px 16px 0 0; }
.portrait img { display: block; width: 100%; height: calc(100% + 88px); object-fit: cover; object-position: center; }
.portrait::after { content: ""; position: absolute; inset: 0; background: linear-gradient(transparent 65%, var(--profile) 97%); }
.hero-content { position: absolute; inset: auto 0 8px; text-align: center; }
h1 { margin: 0; font: 400 48px/1.2 Allerta, "Segoe UI", sans-serif; letter-spacing: -.035em; }
.hero p { margin: 4px 0 13px; }
.socials {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.socials a {
  display: grid;
  place-items: center;
  flex: 0 0 32px;
  height: 32px;
  border-radius: 5px;
}
.socials img {
  display: block;
  width: 26px;
  height: 26px;
}
nav { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-bottom: 24px; }
nav a { display: grid; place-items: center; min-height: 48px; padding: 4px 2px; border-radius: 10px; text-decoration: none; text-transform: uppercase; font-size: .875rem; }
nav a:hover, nav a[aria-current="page"] { background: var(--accent); }
.cards { display: grid; gap: 16px; margin: 0; padding: 0; list-style: none; }
.card { position: relative; min-height: 65px; border-radius: 11px; color: var(--ink); background: var(--white); }
.card:hover { background: #f7fbff; }
.card a { min-height: inherit; display: grid; align-content: center; gap: 2px; padding: 9px 60px; text-align: center; text-decoration: none; border-radius: inherit; line-height: 1.24; overflow-wrap: anywhere; }
.card img { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); width: 45px; height: 45px; object-fit: cover; border-radius: 10px; }
.card small { font-size: .75rem; }
.home .card a { padding-left: 74px; text-align: left; }
.affiliate { margin: 22px 0 0; text-align: center; font-size: .875rem; }
.gear { margin: 0 0 18px; }
.gear:last-child { margin-bottom: 0; }
.gear h2 { margin: 0 0 10px; font: 600 1.25rem/1.3 var(--body-font); text-align: center; }
.gear > img { display: block; width: 100%; height: auto; border-radius: 10px; }
details { margin-top: 24px; }
summary { display: grid; place-items: center; position: relative; min-height: 52px; padding: 10px 40px; border-radius: 10px; background: var(--accent); font-size: 1.2rem; font-weight: 700; text-align: center; cursor: pointer; list-style: none; }
summary::-webkit-details-marker { display: none; }
summary::after { content: ""; position: absolute; right: 23px; width: 11px; height: 11px; border-right: 2px solid; border-bottom: 2px solid; transform: translateY(-3px) rotate(45deg); }
details[open] summary::after { transform: translateY(3px) rotate(225deg); }
details .cards { margin-top: 12px; }
.legal { text-align: center; overflow-wrap: anywhere; }
.legal h2 {
  margin: 0 0 12px;
  color: var(--white);
  font-size: 1.125rem;
}
.legal-box {
  padding: clamp(24px, 6vw, 36px);
  border-radius: 10px;
  background: #4581b2;
  color: #fff;
  font-size: 1.0625rem;
  line-height: 1.13;
}
.legal p { margin: 0 0 16px; }
.legal p:last-child { margin-bottom: 0; }
.legal a { color: inherit; text-decoration: none; }
.legal a:hover, .legal a:focus-visible { text-decoration: underline; }
.legal a[href^="mailto:"] { display: inline-block; }

@media (prefers-reduced-motion: no-preference) {
  #page > .cards > .card:first-child:not(:hover, :focus-within),
  #page:not(:has(details[open])) > .gear:first-child summary:not(:hover, :focus-visible),
  .gear:has(details[open]):not(.gear:has(details[open]) ~ .gear) details[open] .card:first-child:not(:hover, :focus-within),
  .legal a[href^="mailto:"]:not(:hover, :focus-visible) {
    animation: link-wiggle 4.5s ease-in-out infinite;
  }
}

@keyframes link-wiggle {
  0%, 20%, 34%, 100% { transform: none; }
  23% { transform: rotate(-1deg); }
  27% { transform: rotate(1deg); }
  31% { transform: rotate(-.45deg); }
}
@media (max-width: 767px) {
  body::before { display: none; }
  .profile { width: 100%; max-width: 600px; margin: 0 auto; padding: 0 20px 56px; border-radius: 0; }
  .hero { width: min(520px, calc(100% + 40px)); height: 440px; margin-left: auto; margin-right: auto; }
  .portrait { border-radius: 0; }
  .portrait img { height: calc(100% + 48px); }
}
@media (max-width: 450px) {
  .hero { margin-left: -20px; }
  nav { grid-template-columns: 1fr 1fr 1.45fr 1.1fr; gap: 3px; }
  nav a { font-size: clamp(.68rem, 2.9vw, .875rem); }
  .card a { padding-inline: 55px; }
  .card img { left: 9px; width: 39px; height: 39px; }
  .home .card a { padding-left: 61px; }
}

.contact-dialog {
  width: min(440px, calc(100% - 32px));
  max-height: calc(100% - 32px);
  padding: clamp(24px, 6vw, 36px);
  border: 0;
  border-radius: 22px;
  background: #f7fbff;
  color: #142d49;
  box-shadow: 0 18px 55px #142d4938;
}
.contact-dialog::backdrop { background: #142d4966; }
.contact-dialog h2 { margin: 0 36px 12px 0; font-size: 1.25rem; }
.contact-dialog p { margin: 0 0 18px; }
.contact-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: inherit;
  font: 24px/1 system-ui;
}
.contact-close:hover { background: #e5f0fa; }
.contact-address {
  display: block;
  padding: 12px 14px;
  border-radius: 12px;
  background: #e5f0fa;
  color: inherit;
  overflow-wrap: anywhere;
}
