@font-face {
  font-family: "Outfit";
  src: url("./fonts/Outfit-ExtraBold.ttf") format("truetype");
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Manrope";
  src: url("./fonts/Manrope-Variable.woff2") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light;
  --white: #ffffff;
  --paper: #f3f0ec;
  --copper: #ad5938;
  --copper-dark: #87442b;
  --ink: #292d30;
  --muted: #616468;
  --line: #dedbd6;
  font-family: "Manrope", Arial, sans-serif;
  font-size: 100%;
  color: var(--ink);
  background: var(--white);
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 280px; }
a { color: inherit; text-underline-offset: 0.25em; }
button, a { -webkit-tap-highlight-color: transparent; }
a:focus-visible {
  outline: 3px solid var(--copper-dark);
  outline-offset: 6px;
  border-radius: 3px;
}

.page {
  width: calc(100% - clamp(40px, 8vw, 240px));
  height: 100svh;
  min-height: 100svh;
  margin-inline: auto;
  display: grid;
  grid-template-rows: auto 1fr auto;
}

.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  padding-block: max(12px, 2.8svh);
}

/* Display the original black logo from the supplied overview without redrawing it.
   Source window: x=75, y=112, width=1134, height=187 in a 1422×1106 image. */
.brand {
  position: relative;
  display: block;
  flex: 0 0 auto;
  width: clamp(230px, 21vw, 560px);
  max-width: 48%;
  aspect-ratio: 1134 / 187;
  overflow: hidden;
  text-decoration: none;
}
.brand-image {
  position: absolute;
  display: block;
  width: 125.396825%;
  max-width: none;
  height: auto;
  left: -6.613757%;
  top: -59.893048%;
}

.header-note { font-size: max(0.875rem, min(1.1vw, 2svh)); line-height: 1.6; color: var(--muted); }

.main {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  grid-template-rows: minmax(min-content, 1fr);
  align-items: center;
  gap: max(24px, 4vw);
  padding-block: max(12px, 2svh);
}

.copy { min-width: 0; }
.eyebrow {
  display: inline-flex;
  gap: 12px;
  align-items: center;
  margin: 0 0 max(12px, 2.4svh);
  font-size: max(0.9375rem, min(1.2vw, 2.2svh));
  font-weight: 600;
}
.eyebrow::before {
  content: "";
  width: 1.7em;
  height: 0.18em;
  flex: none;
  background: var(--copper);
}

h1 {
  margin: 0;
  font-family: "Outfit", Arial, sans-serif;
  font-size: max(2rem, min(6.4vw, 12svh));
  line-height: 1.06;
  font-weight: 800;
  letter-spacing: -0.038em;
  text-wrap: balance;
}

.description {
  max-width: 39ch;
  margin: max(14px, 2.6svh) 0 0;
  color: var(--muted);
  font-size: max(1.0625rem, min(1.5vw, 2.8svh));
  line-height: 1.65;
  text-wrap: pretty;
}

.closing {
  margin: max(12px, 2.4svh) 0 0;
  font-size: max(1rem, min(1.3vw, 2.5svh));
  line-height: 1.7;
  font-weight: 600;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  margin-top: max(16px, 3svh);
  padding: 0.85em 1.6em;
  border-radius: 6px;
  background: var(--copper);
  color: var(--white);
  font-size: max(0.9375rem, min(1.2vw, 2.2svh));
  line-height: 1.6;
  font-weight: 700;
  text-decoration: none;
  transition: background-color 140ms ease;
}
.button:hover { background: var(--copper-dark); }

.visual {
  position: relative;
  min-width: 0;
  min-height: 0;
  height: 100%;
  margin: 0;
  padding: max(16px, min(2.2vw, 3svh));
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: var(--paper);
  border-radius: 8px;
  container-type: size;
}

.code {
  flex: 1;
  display: grid;
  place-items: center;
  min-height: 0;
  margin: 0;
  font-family: "Outfit", Arial, sans-serif;
  font-size: clamp(7rem, 17vw, 17rem);
  font-size: min(51cqw, 60cqh);
  line-height: 0.9;
  font-weight: 800;
  letter-spacing: 0;
  text-align: center;
  color: var(--copper);
}

.visual-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 20px;
  flex: none;
  padding-top: max(10px, 2svh);
  border-top: 1px solid #c6bdb3;
  font-size: max(0.8125rem, min(1vw, 1.9svh));
  line-height: 1.65;
  color: var(--muted);
}
.visual-label strong { color: var(--ink); font-weight: 600; }

.footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px 32px;
  padding-block: max(12px, 2svh);
  border-top: 1px solid var(--line);
  font-size: max(0.8125rem, min(1vw, 1.9svh));
  line-height: 1.7;
  color: var(--muted);
}
.footer p { margin: 0; }
.footer span { color: var(--ink); }

@media (max-width: 900px) {
  .page { width: calc(100% - 48px); }
  .main { gap: 24px; }
  .description { font-size: 1rem; }
  .visual-label { display: block; }
  .visual-label span { display: block; margin-top: 4px; }
}

@media (max-width: 650px) {
  .page { width: calc(100% - 40px); }
  .header { padding-block: clamp(12px, 2svh, 20px); gap: 16px; }
  .brand { width: 190px; }
  .header-note { max-width: 15ch; font-size: 0.8125rem; text-align: right; }
  .main {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto auto;
    align-content: center;
    gap: clamp(12px, 2.5svh, 24px);
    padding-block: clamp(8px, 1.8svh, 16px);
  }
  .copy { max-width: 100%; }
  .eyebrow { margin-bottom: 12px; font-size: 0.875rem; }
  h1 { font-size: clamp(1.875rem, min(8vw, 6svh), 2.75rem); }
  .description { margin-top: 14px; line-height: 1.5; }
  .closing { margin-top: 12px; line-height: 1.5; }
  .button { margin-top: 16px; min-height: 46px; padding-block: 10px; }
  .visual {
    height: auto;
    max-height: none;
    padding: clamp(12px, 2svh, 20px) 16px;
    flex-direction: row;
    align-items: center;
    gap: 16px;
    container-type: normal;
  }
  .code { flex: none; font-size: clamp(3rem, min(23vw, 14svh), 7rem); }
  .visual-label {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    padding: 0 0 0 16px;
    border-top: none;
    border-left: 1px solid #c6bdb3;
    font-size: 0.75rem;
  }
  .visual-label span { margin-top: 0; }
  .footer {
    align-items: flex-start;
    flex-direction: column;
    gap: 3px;
    padding-block: 12px;
    font-size: 0.75rem;
    line-height: 1.5;
  }
}

/* On taller phones, use the available height for a larger title and 404 panel. */
@media (max-width: 650px) and (min-height: 700px) {
  .main { grid-template-rows: auto minmax(0, 1fr); align-content: stretch; }
  h1 { font-size: min(10.8vw, 6.5svh); }
  .visual {
    height: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    container-type: size;
  }
  .code { flex: 1; font-size: min(51cqw, 60cqh); }
  .visual-label {
    flex: none;
    flex-direction: row;
    align-items: center;
    padding: 12px 0 0;
    border-left: none;
    border-top: 1px solid #c6bdb3;
  }
}

/* Short landscape screens retain two columns to keep the entire page in view. */
@media (max-height: 500px) and (min-width: 500px) {
  .page { width: calc(100% - 40px); }
  .header { padding-block: 8px; }
  .brand { width: 180px; }
  .header-note { max-width: none; }
  .main {
    grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
    grid-template-rows: minmax(min-content, 1fr);
    align-content: stretch;
    gap: 20px;
    padding-block: 10px;
  }
  .eyebrow { margin-bottom: 8px; font-size: 0.8125rem; }
  h1 { font-size: clamp(1.625rem, 7.5svh, 2.25rem); }
  .description { margin-top: 10px; font-size: 1rem; line-height: 1.4; }
  .closing { margin-top: 10px; font-size: 0.875rem; line-height: 1.5; }
  .button { margin-top: 12px; min-height: 44px; padding-block: 8px; }
  .visual {
    height: 100%;
    max-height: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 16px;
    container-type: size;
  }
  .code { flex: 1; font-size: min(51cqw, 60cqh); }
  .visual-label {
    flex: none;
    display: block;
    padding: 10px 0 0;
    border-left: none;
    border-top: 1px solid #c6bdb3;
    font-size: 0.75rem;
  }
  .visual-label span { display: block; margin-top: 2px; }
  .footer { flex-direction: row; gap: 12px; padding-block: 8px; font-size: 0.75rem; line-height: 1.5; }
}

@media (max-height: 350px) and (min-width: 500px) {
  .closing { display: none; }
  .main { padding-block: 6px; }
}

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