/* RISE-inspired landing page */

/*
 * Fonts are subsetted WOFF2 files generated by scripts/convert-fonts.sh from
 * the TTF originals in the same directory. Keep the TTF files as the source:
 * rerun the script if the site starts using characters outside the subset.
 */
@font-face {
  font-family: "Lato";
  src: url("/assets/fonts/Lato-Reg.woff2") format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

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

@font-face {
  font-family: "Code Pro";
  src: url("/assets/fonts/CodePro-Bold.woff2") format("woff2");
  font-style: normal;
  font-weight: 700;
  font-display: swap;
}

:root {
  --rise-black: #040606;
  --rise-text: #000000;
  --rise-dark: #222222;
  --rise-teal: #009ba5;
  --rise-teal-dark: #007b83;
  --rise-pink: #e83c63;
  --rise-rose: #fde8df;
  --rise-yellow: #ffe500;
  --rise-sand: #f2d6a2;
  --rise-green-pale: #ebf5f0;
  --rise-peach-pale: #fde8df;
  --rise-aqua-pale: #bfe4e3;
  --rise-green-medium: #a8d5c0;
  --rise-peach-medium: #f3b9a2;
  --rise-cream-medium: #f4dda0;
  --rise-yellow-pale: #fff6c6;
  --rise-cream: #fff7dd;
  --rise-navy: #0e4d64;
  --rise-navy-deep: #082f3e;
  --rise-purple: #472d55;
  --rise-orange: #fbae40;

  --surface: #ffffff;
  --background: var(--rise-green-pale);
  --text: var(--rise-text);
  --muted: #4f5d61;
  --border: #c9d9d9;

  --max-width: 1120px;
  --page-width: 1280px;
  --page-shadow: 0 0 0 1px rgb(255 255 255 / 8%), 0 0 48px rgb(4 6 6 / 38%);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  color: var(--text);
  background: var(--rise-navy-deep);
  font-family: "Lato", Arial, sans-serif;
}

body {
  position: relative;
  min-height: 100vh;
  margin: 0;
  display: flex;
  flex-direction: column;
  background: var(--rise-navy-deep);
}

/*
 * Fixed decorative ring.
 *
 * It belongs to the viewport rather than to the header, so it stays in the
 * upper-right corner while the foreground page scrolls.
 */
/*
body::before {
  content: "";
  position: fixed;
  z-index: 0;
  top: -7rem;
  right: -5rem;
  width: 24rem;
  height: 24rem;
  border: 5rem solid rgb(0 155 165 / 30%);
  border-radius: 50%;
  pointer-events: none;
}
*/

/*
 * Centered scrolling foreground page.
 *
 * The side margins let the fixed conveyor backdrop show through. Each margin
 * is 12.5% of the viewport on wide screens and shrinks linearly to zero
 * between 960px and 480px, so there is no jump at a breakpoint:
 *
 *   margin = clamp(0, (100% - 480px) / 4, 12.5%)
 *
 * (Both expressions equal 120px at 960px, so the curve is continuous.)
 * assets/conveyor.js reads the resulting margins and keeps the conveyor's
 * vertical stretches centred in them.
 */
.site-header,
main,
.site-footer {
  position: relative;
  z-index: 1;
  width: min(
    var(--page-width),
    calc(100% - 2 * clamp(0px, (100% - 480px) / 4, 12.5%))
  );
  margin-inline: auto;
  box-shadow: var(--page-shadow);
  border-right: 1px solid rgb(255 255 255 / 12%);
  border-left: 1px solid rgb(255 255 255 / 12%);
}

.container {
  width: min(calc(100% - 2rem), var(--max-width));
  margin-inline: auto;
}

/* Header */

.site-header {
  color: #ffffff;
  background: var(--rise-navy);
  border-top: 4px solid var(--rise-teal);
  border-bottom: 16px solid var(--rise-pink);
  padding: 4.75rem 0 4.25rem;
}

/*
 * Disable the original header-attached ring. The ring now belongs to
 * body::before.
 */
.site-header::after {
  content: none;
}

.site-header .container {
  position: relative;
  z-index: 1;
}

.eyebrow {
  margin: 0 0 0.75rem;
  color: var(--rise-yellow-pale);
  font-family: "Lato", Arial, sans-serif;
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  font-family: "Code Pro", "Lato", Arial, sans-serif;
  font-weight: 700;
  line-height: 1.08;
}

h1 {
  max-width: 800px;
  margin: 0;
  color: #ffffff;
  font-size: clamp(2.4rem, 7vw, 4.25rem);
  letter-spacing: 0.01em;
}

.intro {
  max-width: 650px;
  margin: 1.25rem 0 0;
  color: #ffffff;
  font-size: 1.15rem;
  line-height: 1.6;
}

/* Main content */

main {
  flex: 1;
  padding: 0;
  background: #ffffff;
}

h2 {
  margin: 0 0 1.5rem;
  color: var(--rise-black);
  font-size: 1.8rem;
}

.app-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  gap: 1.5rem;
}

/* Application cards */

.app-card {
  position: relative;
  display: block;
  overflow: hidden;
  color: inherit;
  text-decoration: none;
  background: var(--surface);
  border: 1px solid var(--border);
  border-top: 8px solid var(--rise-teal);
  box-shadow: 0 4px 14px rgb(14 77 100 / 8%);
  transition:
    transform 150ms ease,
    box-shadow 150ms ease,
    border-color 150ms ease;
}

.app-card:hover {
  transform: translateY(-4px);
  border-top-color: var(--rise-pink);
  box-shadow: 0 12px 28px rgb(14 77 100 / 16%);
}

.app-card:focus-visible {
  outline: 4px solid var(--rise-cream);
  outline-offset: 4px;
}

.app-card__content {
  padding: 1.6rem;
}

.app-card h3 {
  margin: 1.1rem 0 0.65rem;
  color: var(--rise-navy);
  font-size: 1.4rem;
}

.app-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.status {
  display: inline-block;
  border-left: 4px solid;
  padding: 0.35rem 0.65rem;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.status--checking {
  color: var(--rise-dark);
  background: var(--rise-cream);
  border-left-color: var(--rise-orange);
}

.status--available {
  color: var(--rise-navy);
  background: var(--rise-green-pale);
  border-left-color: var(--rise-teal);
}

.status--unavailable {
  color: var(--rise-purple);
  background: var(--rise-peach-pale);
  border-left-color: var(--rise-pink);
}

/* Shown when JavaScript is disabled and health checks cannot run. */
.status--unknown {
  color: var(--muted);
  background: #f1f4f4;
  border-left-color: var(--border);
}

.open-link {
  display: inline-block;
  margin-top: 1.1rem;
  color: var(--rise-teal-dark);
  font-weight: 700;
  transition: color 150ms ease;
}

.app-card:hover .open-link {
  color: var(--rise-pink);
}

/* Footer */

.site-footer {
  color: #ffffff;
  background: var(--rise-navy);
  border-bottom: 12px solid var(--rise-teal);
  padding: 1.5rem 0;
  font-size: 0.9rem;
}

.site-footer p {
  margin: 0;
}

/* =========================================================
   DIGIPROD initiative page
   ========================================================= */

.content-section {
  padding-block: 4.5rem;
  background: #ffffff;
}

.content-section--tinted {
  background: var(--rise-green-pale);
}

.content-section--cream {
  background: var(--rise-cream);
}

.section-heading {
  max-width: 760px;
  margin-bottom: 2rem;
}

.section-heading h2 {
  margin-bottom: 0.8rem;
  font-size: clamp(1.8rem, 4vw, 2.5rem);
}

.section-heading > p:last-child {
  margin: 0;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.65;
}

.section-label {
  margin: 0 0 0.6rem;
  color: var(--rise-teal-dark);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.section-label--light {
  color: var(--rise-cream);
}

.prose {
  max-width: 780px;
}

.prose p {
  margin: 0 0 1rem;
  color: var(--rise-dark);
  font-size: 1.08rem;
  line-height: 1.7;
}

.app-card--featured {
  border-top-color: var(--rise-pink);
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.info-card {
  padding: 1.6rem;
  background: var(--rise-green-pale);
  border-bottom: 8px solid var(--rise-teal);
}

.info-card:nth-child(2) {
  background: var(--rise-peach-pale);
  border-bottom-color: var(--rise-pink);
}

.info-card:nth-child(3) {
  background: var(--rise-cream);
  border-bottom-color: var(--rise-orange);
}

.info-card__number {
  display: block;
  margin-bottom: 1.5rem;
  color: var(--rise-teal-dark);
  font-family: "Code Pro", "Lato", Arial, sans-serif;
  font-size: 0.85rem;
  font-weight: 700;
}

.info-card h3 {
  margin: 0 0 0.75rem;
  color: var(--rise-navy);
  font-size: 1.3rem;
}

.info-card p {
  margin: 0;
  color: var(--rise-dark);
  line-height: 1.6;
}

.project-list {
  display: grid;
  gap: 1rem;
}

.project-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  padding: 1.5rem;
  background: #ffffff;
  border-left: 8px solid var(--rise-teal);
}

.project-card:nth-child(even) {
  border-left-color: var(--rise-pink);
}

.project-card h3 {
  margin: 0.5rem 0;
  color: var(--rise-navy);
  font-size: 1.3rem;
}

.project-card p {
  max-width: 720px;
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.project-card__type {
  color: var(--rise-teal-dark);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.project-card > a {
  flex: 0 0 auto;
  color: var(--rise-teal-dark);
  font-weight: 700;
  text-decoration: none;
}

.project-card > a:hover {
  color: var(--rise-pink);
  text-decoration: underline;
}

.partner-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-top: 2rem;
}

.partner-placeholder {
  display: grid;
  min-height: 120px;
  place-items: center;
  color: var(--muted);
  background: var(--rise-green-pale);
  border: 1px dashed var(--rise-teal);
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
}

.contact-section {
  color: #ffffff;
  background: var(--rise-purple);
  border-top: 12px solid var(--rise-pink);
  padding-block: 4rem;
}

.contact-section__layout {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 3rem;
}

.contact-section h2 {
  margin: 0 0 1rem;
  color: #ffffff;
  font-size: clamp(1.8rem, 4vw, 2.5rem);
}

.contact-section p {
  max-width: 700px;
  line-height: 1.6;
}

.contact-details {
  border-left: 2px solid rgb(255 255 255 / 35%);
  padding-left: 2rem;
}

.contact-details a {
  color: #ffffff;
}

.contact-details a:hover {
  color: var(--rise-sand);
}

.footer-layout {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.footer-layout nav {
  display: flex;
  gap: 1.5rem;
}

.footer-layout a {
  color: #ffffff;
  font-weight: 700;
  text-decoration: none;
}

.footer-layout a:hover {
  color: var(--rise-sand);
  text-decoration: underline;
}

/* Language switcher */

.language-switcher {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 0.25rem;
  margin-bottom: 2.5rem;
  font-size: 0.85rem;
  font-weight: 700;
}

.language-switcher a,
.language-switcher__current {
  padding: 0.5rem 0.75rem;
  border: 1px solid rgb(255 255 255 / 55%);
}

.language-switcher a {
  color: #ffffff;
  text-decoration: none;
}

.language-switcher a:hover {
  color: #ffffff;
  background: var(--rise-teal);
  border-color: var(--rise-teal);
}

.language-switcher a:focus-visible {
  outline: 3px solid var(--rise-cream);
  outline-offset: 3px;
}

.language-switcher__current {
  color: var(--rise-navy);
  background: var(--rise-cream);
  border-color: var(--rise-cream);
}

/* Responsive adjustments */

@media (max-width: 900px) {
  body::before {
    top: -5rem;
    right: -6rem;
    width: 19rem;
    height: 19rem;
    border-width: 3.75rem;
    opacity: 0.7;
  }

  .site-header,
  main,
  .site-footer {
    box-shadow: none;
  }
}

@media (max-width: 800px) {
  .info-grid {
    grid-template-columns: 1fr;
  }

  .partner-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .contact-section__layout {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .contact-details {
    border-top: 2px solid rgb(255 255 255 / 35%);
    border-left: 0;
    padding-top: 1.5rem;
    padding-left: 0;
  }
}

@media (max-width: 640px) {
  .site-header {
    padding: 3.5rem 0 3rem;
  }

  .app-card__content {
    padding: 1.35rem;
  }
}

@media (max-width: 600px) {
  .content-section {
    padding-block: 3.25rem;
  }

  .project-card {
    align-items: flex-start;
    flex-direction: column;
    gap: 1rem;
  }

  .partner-grid {
    grid-template-columns: 1fr;
  }

  .footer-layout {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  .app-card,
  .open-link {
    transition: none;
  }

  .app-card:hover {
    transform: none;
  }
}

/* Demo portal */

.demo-main {
  flex: 1;
  padding: 3.25rem clamp(2rem, 5vw, 5rem) 5rem;
  background: var(--rise-green-pale);
}

.demo-main > .container {
  width: min(100%, var(--max-width));
}

.demo-main .app-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.demo-main .app-card {
  min-height: 250px;
}

.demo-main .app-card__content {
  height: 100%;
  display: flex;
  flex-direction: column;
}

.demo-main .open-link {
  margin-top: auto;
  padding-top: 1.25rem;
}

@media (max-width: 700px) {
  .demo-main {
    padding: 2.5rem 1rem 4rem;
  }

  .demo-main .app-grid {
    grid-template-columns: 1fr;
  }
}

.eyebrow a {
  color: inherit;
  text-decoration: none;
}

.eyebrow a:hover {
  text-decoration: underline;
  text-underline-offset: 0.25em;
}

.eyebrow a:focus-visible {
  outline: 3px solid var(--rise-cream);
  outline-offset: 4px;
}
/* =========================================================
   Decorative zigzag conveyor
   ========================================================= */

/*
 * The conveyor is behind the page panels. The panels use slightly
 * translucent backgrounds so the conveyor remains faintly visible without
 * being drawn directly over text and controls.
 */
.factory-path {
  position: fixed;
  z-index: 0;
  inset: 0;
  display: block;
  overflow: hidden;
  opacity: 0.42;
  pointer-events: none;
  /*
   * Performance hints; they don't change how anything looks.
   * - contain: strict tells the browser that nothing inside can affect the
   *   rest of the page, so the animation doesn't trigger page-wide layout
   *   or repaint. Safe here because the size comes from inset: 0, not from
   *   the contents.
   * - will-change: transform puts the conveyor on its own compositor layer,
   *   so scrolling doesn't repaint it and the 0.42 opacity is applied
   *   cheaply when layers are combined.
   */
  contain: strict;
  will-change: transform;
}

.factory-path__drawing {
  position: absolute;
  inset: 0;
  display: block;
  /* Match the fixed container exactly (100vw would include the scrollbar). */
  width: 100%;
  height: 100%;
}

/*
 * The moving layer (slats and products) gets its own compositor layer, so
 * its per-frame repaints don't also repaint the static rail and belt below
 * it. The container's opacity still applies to both layers as a group, so
 * the result looks the same as a single SVG.
 */
.factory-path__drawing--moving {
  will-change: transform;
}

.factory-path__rail,
.factory-path__belt,
.factory-path__ticks {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.factory-path__rail {
  stroke: rgb(14 77 100 / 32%);
  stroke-width: 48px;
}

.factory-path__belt {
  stroke: rgb(191 228 227 / 44%);
  stroke-width: 28px;
}

/*
 * The belt stays solid, and a separate "ticks" layer draws short
 * cross-stripes (like conveyor slats). A dash is 3 units along the path
 * and spans the full 28px stroke width across it, so each dash renders as
 * a stripe perpendicular to the track direction. The offset advances 1200
 * pathLength units in 240s (5 units/s), exactly the products' speed
 * (1200 units / 240s).
 */
@keyframes factory-path-ticks-crawl {
  from {
    stroke-dashoffset: 0;
  }

  to {
    stroke-dashoffset: -1200;
  }
}

.factory-path__ticks,
.conveyor-bend__ticks {
  stroke: rgb(14 77 100 / 42%);
  stroke-width: 28px;
  stroke-linecap: butt;
  stroke-dasharray: 4 4;
  animation: factory-path-ticks-crawl 240s linear infinite;
}

.conveyor-bend__ticks {
  fill: none;
}

/*
 * Cheap-to-animate conveyor, built by conveyor.js when the browser supports
 * CSS motion paths. It replaces the animated SVG layer and looks the same.
 * All pieces are positioned in px by the script.
 */

/* Bends: small SVGs that each show one bend of the dashed stroke. Only these
   small areas are repainted per frame. */
.conveyor-bend {
  position: absolute;
  overflow: hidden;
  contain: strict;
  will-change: transform;
}

/* Straight runs: a clipped strip, rotated to point along the direction of
   travel, around its start point. */
.conveyor-slats {
  position: absolute;
  overflow: hidden;
  contain: strict;
  transform-origin: 0 50%;
}

/*
 * Stripes that match the dash pattern (--p = one 4-on/4-off period in px).
 * They slide by one period every 1.6s, which equals the dash crawl speed
 * (8 of 1200 pathLength units per 1.6s = 1200 units per 240s). Only the
 * transform changes, so the GPU moves the layer and nothing is repainted.
 * --t0 sets the phase so the stripes continue the pattern from the bends.
 */
@keyframes conveyor-slats-crawl {
  from {
    transform: translateX(calc(var(--t0) - 2 * var(--p)));
  }

  to {
    transform: translateX(calc(var(--t0) - var(--p)));
  }
}

.conveyor-slats__stripes {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: calc(100% + 2 * var(--p));
  background: repeating-linear-gradient(
    to right,
    rgb(14 77 100 / 42%) 0 calc(var(--p) / 2),
    transparent calc(var(--p) / 2) var(--p)
  );
  /* Static position (when the animation is off) keeps the right phase. */
  transform: translateX(calc(var(--t0) - 2 * var(--p)));
  will-change: transform;
  animation: conveyor-slats-crawl 1.6s linear infinite;
}

/*
 * Products: small SVGs moved along the route with CSS offset-path instead of
 * SMIL <animateMotion>. Each is its own layer, so moving it doesn't repaint
 * anything. Duration and delay are copied from the SVG version by the script.
 * left/top 0 makes the route's coordinates relative to the container.
 */
@keyframes conveyor-product-move {
  from {
    offset-distance: 0%;
  }

  to {
    offset-distance: 100%;
  }
}

.conveyor-product {
  position: absolute;
  top: 0;
  left: 0;
  width: calc(60px * var(--conveyor-scale, 1));
  height: calc(60px * var(--conveyor-scale, 1));
  overflow: visible;
  offset-path: var(--conveyor-route);
  /* Centre the product on the route, as <animateMotion> did. */
  offset-anchor: 50% 50%;
  transform-origin: 50% 50%;
  offset-rotate: auto;
  will-change: transform;
  animation: conveyor-product-move 240s linear infinite;
}

/*
 * Firefox can spend substantial CPU rasterizing the animated full-viewport
 * SVG. This only affects the SVG fallback, which is used without JavaScript:
 * conveyor.js replaces it with the cheap pieces further down, which animate
 * in Firefox too. Users can also opt out via prefers-reduced-motion below.
 */
@-moz-document url-prefix() {
  .factory-path__ticks {
    animation: none;
  }

  .factory-path__drawing--moving .svg-product {
    visibility: hidden;
  }
}

/* The conveyor is not useful on narrow phone screens; keep it static there. */
@media (max-width: 640px) {
  .factory-path__ticks,
  .conveyor-bend__ticks,
  .conveyor-slats__stripes,
  .conveyor-product {
    animation: none;
  }

  .svg-product,
  .conveyor-product {
    visibility: hidden;
  }
}

/*
 * Respect the user's reduced-motion preference: freeze the crawl and show
 * the slats as a static pattern.
 */
@media (prefers-reduced-motion: reduce) {
  .factory-path__ticks,
  .conveyor-bend__ticks,
  .conveyor-slats__stripes,
  .conveyor-product {
    animation: none;
  }
}

.svg-product {
  color: var(--rise-cream-medium);
  fill: currentColor;
  stroke: var(--rise-navy-deep);
  /* Scaled stroke: the SVG is ~2x the design width on large screens,
     so use ~half the previous pixel width in user units. */
  stroke-width: 1.4;
  stroke-linejoin: round;
  stroke-linecap: round;
}

.svg-product--green {
  color: var(--rise-green-pale);
}

.svg-product--red {
  color: var(--rise-peach-pale);
}

.svg-product--yellow {
  color: var(--rise-cream);
}

.svg-product__detail {
  fill: none;
  stroke: var(--rise-navy-deep);
  stroke-width: 1.2;
}

/*
 * Foreground panels remain above the conveyor.
 *
 * Their backgrounds are almost opaque. This allows only a faint impression
 * of the conveyor to show through while retaining text readability.
 */
.site-header {
  background: rgb(14 77 100 / 96%);
}

main {
  background: rgb(255 255 255 / 96%);
}

.content-section {
  background: rgb(255 255 255 / 96%);
}

.content-section--tinted {
  background: rgb(235 245 240 / 96%);
}

.content-section--cream {
  background: rgb(255 247 221 / 96%);
}

.demo-main {
  background: rgb(235 245 240 / 96%);
}

.contact-section {
  background: rgb(71 45 85 / 96%);
}

.site-footer {
  background: rgb(14 77 100 / 96%);
}

/*
 * Respect reduced-motion preferences. The conveyor remains visible as a
 * static background, while its moving products are hidden.
 */
@media (prefers-reduced-motion: reduce) {
  .svg-product,
  .conveyor-product {
    visibility: hidden;
  }
}

/* =========================================================
   404 page
   ========================================================= */

.error-page {
  min-height: 100vh;
}

.error-main {
  position: relative;
  z-index: 1;
  width: min(calc(100% - 2rem), var(--page-width));
  min-height: 100vh;
  margin-inline: auto;
  padding: clamp(2rem, 8vh, 6rem) 1rem;
  display: grid;
  place-items: center;
  background: rgb(14 77 100 / 94%);
  box-shadow: var(--page-shadow);
  border-top: 4px solid var(--rise-teal);
  border-right: 1px solid rgb(255 255 255 / 12%);
  border-bottom: 16px solid var(--rise-pink);
  border-left: 1px solid rgb(255 255 255 / 12%);
}

.error-card {
  position: relative;
  z-index: 1;
  width: min(100%, 720px);
  padding: clamp(2rem, 6vw, 4.5rem);
  color: var(--rise-text);
  background: var(--rise-cream);
  border-top: 10px solid var(--rise-pink);
  box-shadow: 0 18px 50px rgb(4 6 6 / 28%);
}

.error-code {
  margin: 0 0 1rem;
  color: var(--rise-teal-dark);
  font-family: "Roboto Mono", monospace;
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.16em;
}

.error-card h1 {
  max-width: 640px;
  margin: 0 0 1.25rem;
  color: var(--rise-navy);
  font-size: clamp(2.25rem, 7vw, 4.25rem);
  line-height: 1.05;
}

.error-message {
  max-width: 580px;
  margin: 0;
  color: var(--rise-dark);
  font-size: 1.1rem;
  line-height: 1.65;
}

.home-button {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 2rem;
  padding: 0.85rem 1.2rem;
  color: #ffffff;
  background: var(--rise-teal-dark);
  border: 2px solid var(--rise-teal-dark);
  font-weight: 700;
  text-decoration: none;
  transition:
    color 150ms ease,
    background 150ms ease,
    transform 150ms ease;
}

.home-button:hover {
  color: var(--rise-navy);
  background: var(--rise-aqua-pale);
  border-color: var(--rise-aqua-pale);
  transform: translateY(-2px);
}

.home-button:focus-visible {
  outline: 4px solid var(--rise-pink);
  outline-offset: 4px;
}

@media (max-width: 640px) {
  .error-main {
    width: 100%;
    padding: 1rem;
  }

  .error-card {
    padding: 2rem 1.5rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .home-button {
    transition: none;
  }

  .home-button:hover {
    transform: none;
  }
}
