@font-face {
  font-family: "Source Sans 3";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/SourceSans3-Regular.woff2") format("woff2");
}

@font-face {
  font-family: "Source Sans 3";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../fonts/SourceSans3-SemiBold.woff2") format("woff2");
}

@font-face {
  font-family: "Source Sans 3";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../fonts/SourceSans3-Bold.woff2") format("woff2");
}

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

:root {
  color-scheme: light;
  --background: #f4f7f8;
  --surface: #ffffff;
  --border: #d5dee2;
  --heading: #173843;
  --text: #344f5a;
  --muted: #637b84;
  --primary: #1e4d5c;
  --primary-hover: #173c48;
  --secondary: #e7eef0;
  --secondary-hover: #d9e4e7;
  --focus: #1ba3b7;
  --shadow: 0 24px 70px rgba(23, 56, 67, 0.12);
}

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

html {
  min-width: 320px;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at 8% 12%, rgba(27, 163, 183, 0.08), transparent 30rem),
    var(--background);
  color: var(--text);
  font-family: "Source Sans 3", "Segoe UI", Arial, sans-serif;
  line-height: 1.5;
}

button,
a {
  font: inherit;
}

.error-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  min-height: 100svh;
  padding: 24px;
}

.error-card {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(360px, 1.08fr);
  align-items: center;
  gap: clamp(32px, 5vw, 72px);
  width: min(100%, 1080px);
  padding: clamp(32px, 5vw, 64px);
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 24px;
  box-shadow: var(--shadow);
}

.brand-logo {
  display: block;
  width: 120px;
  height: auto;
  margin-bottom: clamp(36px, 6vw, 64px);
}

.error-code {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1 {
  max-width: 520px;
  margin: 0 0 16px;
  color: var(--heading);
  font-family: "Oswald", "Arial Narrow", sans-serif;
  font-size: clamp(2.35rem, 5vw, 3.5rem);
  font-weight: 500;
  line-height: 1.08;
  text-wrap: balance;
}

.error-description {
  max-width: 500px;
  margin: 0 0 34px;
  color: var(--muted);
  font-size: clamp(1rem, 1.8vw, 1.16rem);
}

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

.button {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  padding: 11px 18px;
  border: 1px solid transparent;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 600;
  line-height: 1.25;
  text-align: center;
  text-decoration: none;
  transition: background-color 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button:focus-visible {
  outline: 3px solid rgba(27, 163, 183, 0.35);
  outline-offset: 3px;
}

.button-primary {
  background: var(--primary);
  color: #ffffff;
}

.button-primary:hover {
  background: var(--primary-hover);
}

.button-secondary {
  background: var(--secondary);
  border-color: var(--border);
  color: var(--primary);
}

.button-secondary:hover {
  background: var(--secondary-hover);
}

.error-illustration {
  position: relative;
  display: grid;
  place-items: center;
  min-width: 0;
}

.error-illustration::before {
  position: absolute;
  width: 80%;
  aspect-ratio: 1;
  background: rgba(27, 163, 183, 0.07);
  border-radius: 50%;
  content: "";
}

.error-illustration img {
  position: relative;
  display: block;
  width: 100%;
  height: auto;
  border-radius: 18px;
}

@media (max-width: 820px) {
  .error-card {
    grid-template-columns: minmax(0, 1fr);
    width: min(100%, 620px);
  }

  .error-illustration {
    order: -1;
    width: min(100%, 460px);
    margin-inline: auto;
  }

  .brand-logo {
    margin-bottom: 32px;
  }
}

@media (max-width: 520px) {
  .error-page {
    align-items: stretch;
    padding: 0;
  }

  .error-card {
    align-content: center;
    gap: 28px;
    min-height: 100vh;
    min-height: 100svh;
    padding: 28px 20px;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .error-actions,
  .button {
    width: 100%;
  }

  .error-illustration {
    width: min(84%, 330px);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}

@media print {
  body,
  .error-page {
    background: #ffffff;
  }

  .error-card {
    border: 0;
    box-shadow: none;
  }

  .error-actions {
    display: none;
  }
}
