:root {
  --bg: #e7e6e3;
  --fg: #111111;
  --accent: #f05a3a;

  --page-x: clamp(1.5rem, 3vw, 3rem);
  --grid-gap: clamp(0.75rem, 1.4vw, 1.5rem);
  --header-height: clamp(7.25rem, 14svh, 9.5rem);
  --footer-height: clamp(4.75rem, 8.5svh, 6rem);

  --logo-width: clamp(6rem, 8vw, 9rem);
  --email-size: clamp(3rem, 6.35vw, 7rem);
  --body-size: clamp(0.9rem, 1.1vw, 1.25rem);
  --micro-size: clamp(0.7rem, 0.75vw, 0.85rem);

  --interaction-duration: 560ms;
  --interaction-easing: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html {
  min-width: 20rem;
  color: var(--fg);
  background: var(--bg);
}

body {
  min-width: 20rem;
  min-height: 100svh;
  margin: 0;
  color: var(--fg);
  background: var(--bg);
  font-family: "Inter Tight", "Helvetica Neue", Arial, sans-serif;
  line-height: 1.15;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a {
  color: inherit;
}

a:focus-visible {
  outline: 0.125rem solid var(--accent);
  outline-offset: 0.35rem;
}

h1,
p {
  margin: 0;
}

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

::selection {
  color: var(--bg);
  background: var(--fg);
}

.page-shell {
  display: grid;
  grid-template-rows: var(--header-height) minmax(0, 1fr) var(--footer-height);
  width: 100%;
  height: 100svh;
  min-height: 100svh;
  padding-inline: var(--page-x);
}

.site-header,
.intro,
.site-footer {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--grid-gap);
}

.site-header {
  align-items: start;
  padding-top: clamp(1.5rem, 3.6svh, 2.75rem);
}

.brand {
  grid-column: 1 / 3;
  width: var(--logo-width);
  line-height: 0;
}

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

.language-nav {
  display: flex;
  grid-column: 10 / -1;
  justify-self: end;
  align-items: baseline;
  gap: clamp(0.85rem, 1.35vw, 1.5rem);
  padding-top: 0.05rem;
  font-size: var(--micro-size);
  font-weight: 500;
  letter-spacing: 0.02em;
  line-height: 1;
  text-transform: uppercase;
}

.language-nav a {
  position: relative;
  padding-bottom: 0.35rem;
  text-decoration: none;
  transition: color 180ms ease;
}

.language-nav a::after {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 0.125rem;
  background: var(--accent);
  content: "";
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 220ms ease;
}

.language-nav a[aria-current="page"] {
  font-weight: 600;
}

.language-nav a[aria-current="page"]::after,
.language-nav a:hover::after {
  transform: scaleX(1);
}

.contact-card {
  display: grid;
  grid-template-rows: repeat(12, minmax(0, 1fr));
  min-height: 0;
}

.intro {
  grid-row: 3 / 5;
  align-self: end;
  width: 100%;
}

.intro__place,
.intro__fields {
  padding-top: 0.12rem;
  font-size: var(--micro-size);
  font-weight: 500;
  letter-spacing: 0.01em;
  line-height: 1.05;
  text-transform: uppercase;
}

.intro__place {
  grid-column: 1 / 3;
}

.intro__description {
  grid-column: 4 / 8;
  max-width: 28ch;
  font-size: var(--body-size);
  font-weight: 400;
  letter-spacing: -0.025em;
  line-height: 1.15;
  text-wrap: pretty;
}

.intro__fields {
  grid-column: 9 / -1;
}

.email-hero {
  display: flex;
  grid-row: 7 / 11;
  align-items: center;
  min-width: 0;
}

.email-hero h1 {
  min-width: 0;
  font: inherit;
}

.email-link {
  display: inline-flex;
  flex-direction: column;
  max-width: 100%;
  text-decoration: none;
}

.email-link__text {
  display: block;
  font-size: var(--email-size);
  font-weight: 500;
  letter-spacing: -0.052em;
  line-height: 0.88;
  white-space: nowrap;
}

.email-link__underline {
  position: relative;
  display: block;
  width: 100%;
  height: clamp(0.8rem, 1.15vw, 1.25rem);
  margin-top: clamp(0.65rem, 1.15vw, 1.15rem);
}

.email-link__underline span {
  position: absolute;
  right: 0;
  left: 0;
  height: clamp(0.125rem, 0.18vw, 0.2rem);
  background: var(--fg);
  transform: translate(0, var(--thread-y));
  transform-origin: left;
  transition: transform var(--interaction-duration) var(--interaction-easing);
}

.email-link__underline span:nth-child(1) {
  --thread-y: 0;
}

.email-link__underline span:nth-child(2) {
  --thread-y: clamp(0.125rem, 0.18vw, 0.2rem);
}

.email-link__underline span:nth-child(3) {
  --thread-y: clamp(0.25rem, 0.36vw, 0.4rem);
}

.email-link:hover .email-link__underline span:nth-child(1),
.email-link:focus-visible .email-link__underline span:nth-child(1) {
  transform: translate(0, 0);
}

.email-link:hover .email-link__underline span:nth-child(2),
.email-link:focus-visible .email-link__underline span:nth-child(2) {
  transform: translate(0.3rem, clamp(0.25rem, 0.31vw, 0.35rem));
}

.email-link:hover .email-link__underline span:nth-child(3),
.email-link:focus-visible .email-link__underline span:nth-child(3) {
  transform: translate(0.55rem, clamp(0.5rem, 0.62vw, 0.7rem));
}

.site-footer {
  align-items: end;
  padding-bottom: clamp(1.5rem, 3.1svh, 2.5rem);
  font-size: var(--micro-size);
  font-weight: 500;
  letter-spacing: 0.01em;
  line-height: 1;
  text-transform: uppercase;
}

.site-footer__brand {
  grid-column: 1 / 4;
}

.site-footer__social {
  grid-column: 7 / 9;
  justify-self: start;
  text-decoration-line: underline;
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.3em;
  transition: color 180ms ease;
}

.site-footer__social:hover {
  color: var(--accent);
}

.site-footer__place {
  grid-column: 11 / -1;
  justify-self: end;
}

@media (min-width: 48.0625rem) and (max-height: 43.75rem) {
  :root {
    --header-height: 6rem;
    --footer-height: 4.25rem;
    --email-size: clamp(3rem, 5.95vw, 5.75rem);
  }

  .site-header {
    padding-top: 1.4rem;
  }

  .site-footer {
    padding-bottom: 1.35rem;
  }
}

@media (max-width: 48rem) {
  :root {
    --page-x: clamp(1.25rem, 6.15vw, 1.75rem);
    --logo-width: clamp(5.75rem, 27vw, 7rem);
    --micro-size: 0.72rem;
    --body-size: clamp(1rem, 4.5vw, 1.15rem);
    --email-size: clamp(2rem, 9.75vw, 2.75rem);
  }

  .page-shell {
    display: flex;
    flex-direction: column;
    min-height: 100svh;
    height: auto;
    padding-inline: var(--page-x);
  }

  .site-header {
    flex: 0 0 auto;
    min-height: 6.5rem;
    padding-top: 1.35rem;
  }

  .brand {
    grid-column: 1 / 6;
  }

  .language-nav {
    grid-column: 7 / -1;
    gap: clamp(0.75rem, 4vw, 1.1rem);
  }

  .contact-card {
    display: block;
    min-height: 0;
    padding-top: clamp(3.75rem, 10svh, 5.5rem);
  }

  .intro {
    row-gap: 0;
  }

  .intro__place {
    grid-column: 1 / 5;
  }

  .intro__fields {
    grid-column: 6 / -1;
    justify-self: end;
    max-width: 18ch;
    text-align: right;
  }

  .intro__description {
    grid-column: 1 / 11;
    max-width: 29ch;
    margin-top: clamp(2.25rem, 7svh, 3.75rem);
  }

  .email-hero {
    display: block;
    margin-top: clamp(3.75rem, 10svh, 5.75rem);
  }

  .email-link {
    width: 100%;
  }

  .email-link__text {
    line-height: 0.92;
    white-space: normal;
  }

  .email-link__local,
  .email-link__domain {
    display: block;
  }

  .email-link__domain {
    overflow-wrap: anywhere;
  }

  .email-link__underline {
    margin-top: 0.8rem;
  }

  .site-footer {
    flex: 0 0 auto;
    row-gap: 1rem;
    margin-top: auto;
    padding-top: clamp(5rem, 14svh, 7rem);
    padding-bottom: 1.5rem;
  }

  .site-footer__brand {
    grid-column: 1 / 7;
  }

  .site-footer__social {
    grid-column: 8 / -1;
    justify-self: end;
  }

  .site-footer__place {
    grid-column: 1 / 7;
    grid-row: 2;
    justify-self: start;
  }
}

@media (prefers-reduced-motion: reduce) {
  .language-nav a::after,
  .email-link__underline span,
  .site-footer__social {
    transition-duration: 0.01ms;
  }

  .email-link:hover .email-link__underline span,
  .email-link:focus-visible .email-link__underline span {
    transform: translate(0, var(--thread-y));
  }
}
