@font-face {
  font-family: "ATRIA Display";
  src: url("/assets/fonts/cormorant-garamond-600-latin.woff2") format("woff2");
  font-style: normal;
  font-weight: 600;
  font-display: swap;
}

/* Give the English long-form copy a more editorial, readable voice. */
html[lang="en"] .article p {
  font-family: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  letter-spacing: 0.002em;
  text-align: justify;
  text-align-last: left;
  text-justify: inter-word;
  hyphens: auto;
  -webkit-hyphens: auto;
}

/* Keep project entry points available after the opening scene scrolls away. */
.nav {
  position: fixed;
  pointer-events: none;
}

.nav__inner {
  position: relative;
}

.nav__brand {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-6px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
}

.nav__quicklinks {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-6px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
}

.nav--scrolled .nav__brand {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}

.nav--scrolled .nav__quicklinks {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}

.nav__quicklink {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid rgba(19, 38, 68, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--ink-600);
  font-size: 12px;
  font-weight: 650;
  text-decoration: none;
  transition: border-color 0.18s ease, background 0.18s ease, color 0.18s ease;
}

.nav__quicklink:not(.is-placeholder):hover {
  border-color: var(--brand-600);
  background: #fff;
  color: var(--brand-600);
}

.nav__quicklink.is-placeholder {
  cursor: default;
  opacity: 0.58;
}

.nav__language {
  flex: 0 0 auto;
  margin-left: 12px;
  min-width: 104px;
  min-height: 38px;
  padding: 3px;
  border-color: rgba(24, 88, 224, 0.38);
  background: rgba(255, 255, 255, 0.94);
  color: var(--ink-600);
  box-shadow: 0 6px 20px rgba(23, 70, 125, 0.16);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  cursor: pointer;
  font-family: "ATRIA Display", "Bodoni 72", Didot, "Bodoni MT", Georgia, serif;
  transform: translateY(-6px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease,
    border-color 0.18s ease, background 0.18s ease, color 0.18s ease;
}

.nav__quicklink.nav__language:hover {
  border-color: var(--brand-600);
  background: #fff;
  color: var(--ink-600);
  box-shadow: 0 8px 24px rgba(23, 70, 125, 0.22);
}

.nav__language-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  width: 100%;
  gap: 2px;
}

.nav__language-option {
  display: grid;
  place-items: center;
  min-height: 28px;
  padding-inline: 8px;
  border-radius: 999px;
  color: var(--ink-500);
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  transition: color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.nav__language-option.is-active {
  background: var(--brand-600);
  color: #fff;
  box-shadow: 0 3px 9px rgba(24, 88, 224, 0.28);
}

.nav--scrolled .nav__language {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}

.nav__language:focus-visible {
  outline: 2px solid var(--brand-600);
  outline-offset: 3px;
}

/* Scroll-driven particle story: logo, cloud, reading margins, and finale. */
.hero {
  height: 180vh;
}

.hero__bg {
  transform: none;
}

.hero__inner {
  z-index: 6;
  transform: translateY(calc((1 - var(--p1)) * 12vh)) scale(calc(1 + 0.035 * var(--p1)));
}

.hero__title-stack {
  display: grid;
  place-items: center;
  width: 100%;
}

.hero__title-stack > .hero__title {
  grid-area: 1 / 1;
  will-change: opacity, transform;
}

.hero__title--origin,
.hero__title--welcome,
.particle-story__finale-title {
  font-family: "ATRIA Display", "Bodoni 72", Didot, "Bodoni MT", Georgia, serif;
  font-weight: 600;
  font-style: normal;
  font-kerning: normal;
  letter-spacing: 0.005em;
}

.nav__brand,
.nav__quicklink,
.hero__platform,
.theme__en {
  font-family: "ATRIA Display", "Bodoni 72", Didot, "Bodoni MT", Georgia, serif;
  font-weight: 600;
  font-style: normal;
  font-kerning: normal;
}

.nav__brand {
  font-size: 18px;
  letter-spacing: 0.018em;
}

.nav__quicklink,
.hero__platform {
  letter-spacing: 0.012em;
}

.sidenav__item a {
  font-family: "ATRIA Display", "Bodoni 72", Didot, "Bodoni MT", Georgia, serif;
  font-weight: 600;
  font-style: normal;
  font-kerning: normal;
}

.sidenav__item:not(.is-sub) a {
  font-size: 14.5px;
  letter-spacing: 0.025em;
}

.theme__en {
  font-size: 17px;
  letter-spacing: 0.14em;
}

.atria-wordmark {
  white-space: nowrap;
}

.atria-preview {
  display: inline-block;
  margin-left: 0.22em;
}

.atria-hyphen {
  display: inline-block;
  width: 0.28em;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 0.72em;
  font-weight: 400;
  font-style: normal;
  line-height: 1;
  text-align: center;
  vertical-align: 0.08em;
}

.hero__title--origin {
  position: relative;
  opacity: clamp(0, calc(1 - var(--p1) * 3.1), 1);
  transform: translateY(calc(var(--p1) * -18px));
}

.hero__title--origin > .atria-reflection,
.particle-story__finale-title > .atria-reflection {
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  width: max-content;
  color: rgba(18, 50, 92, 0.18);
  white-space: nowrap;
  pointer-events: none;
  transform: translateX(-50%) scaleY(-1) skewX(-9deg);
  transform-origin: center;
  -webkit-mask-image: linear-gradient(to top, rgba(0, 0, 0, 0.95) 0%, transparent 78%);
  mask-image: linear-gradient(to top, rgba(0, 0, 0, 0.95) 0%, transparent 78%);
}

.atria-reflection .atria-hyphen {
  transform: skewX(9deg);
}

.hero__title--welcome {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: center;
  column-gap: 0.18em;
  row-gap: 0.02em;
  max-width: 1100px;
  font-size: clamp(38px, 6.2vw, 78px);
  letter-spacing: -0.012em;
  opacity: clamp(0, calc((var(--p1) - 0.26) * 2.4), 1);
  transform: translateY(calc((1 - var(--p1)) * 22px));
}

.hero__welcome-prefix,
.hero__welcome-brand {
  white-space: nowrap;
}

.hero__welcome-brand {
  display: inline-flex;
  align-items: center;
}

.hero__welcome-logo {
  display: inline-block;
  flex: 0 0 auto;
  width: 0.7em;
  height: 0.66em;
  margin-right: 0.16em;
  background: transparent url("/assets/atria-logo.png?v=20260909") center / contain no-repeat;
  transform: translateY(0.015em);
}

.hero__cue {
  z-index: 6;
}

.particle-story-webgl {
  position: fixed;
  inset: 0;
  z-index: 4;
  display: block;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  transition: opacity 0.18s linear;
}

.particle-story-webgl canvas {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
}

.particle-story-webgl[data-stage="reading"] {
  will-change: auto;
}

.particle-story-webgl::before {
  content: "";
  position: absolute;
  z-index: 0;
  left: 50%;
  top: 31.4%;
  width: min(36.3vh, 78vw);
  aspect-ratio: 640 / 602;
  transform: translate(-50%, -50%) translateY(14px);
  background: transparent url("/assets/atria-logo.png?v=20260909") center / contain no-repeat;
  filter: blur(12px);
  opacity: 0;
  transition: opacity 0.18s linear;
}

.particle-story-webgl[data-stage="logo"]::before {
  opacity: 0.2;
}

#overview .read,
#cases {
  position: relative;
  z-index: 6;
}

.particle-story__finale {
  position: relative;
  z-index: auto;
  height: 100vh;
  min-height: 620px;
  overflow: hidden;
  background: #fff;
}

.particle-story__finale-title {
  position: absolute;
  z-index: 6;
  top: 62%;
  left: 50%;
  margin: 0;
  color: var(--ink-900);
  font-size: clamp(42px, 6.8vw, 82px);
  font-weight: 600;
  line-height: 1.03;
  letter-spacing: 0.005em;
  white-space: nowrap;
  transform: translate(-50%, -50%);
}

/* Use the official ATRIA mark in the post-scroll brand bar. */
.nav__logo {
  flex: 0 0 auto;
  width: 28px;
  height: 26px;
  border-radius: 0;
  background: transparent url("/assets/atria-logo.png?v=20260909") center / contain no-repeat;
}

/* Only the active tab is mounted; a stable loading surface prevents white flashes. */
.case__panels {
  display: grid;
}

.case__panel {
  grid-area: 1 / 1;
  min-width: 0;
}

.case__panel.is-active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* Skip layout/paint work for long-form cases until they approach the viewport. */
.case {
  content-visibility: auto;
  contain-intrinsic-block-size: auto 860px;
}

.demo-suspended {
  display: grid;
  place-items: center;
  width: 100%;
  min-height: 240px;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius);
  background:
    radial-gradient(circle at 50% 42%, rgba(49, 100, 173, 0.08), transparent 42%),
    linear-gradient(145deg, rgba(247, 250, 254, 0.88), rgba(238, 244, 251, 0.72));
}

.demo-suspended {
  visibility: hidden;
}

.demo-poster {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 0;
  margin: 0;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: inherit;
  background: #fff;
  cursor: pointer;
}

.demo-poster img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  user-select: none;
  -webkit-user-drag: none;
}

.demo-poster:focus-visible {
  outline: 2px solid rgba(31, 79, 146, 0.72);
  outline-offset: -3px;
}

.demo-poster--loading {
  position: absolute;
  inset: 0;
  z-index: 2;
  cursor: default;
  pointer-events: none;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.figure--embed,
.embed,
.demo-fullscreen-host--scaled {
  position: relative;
}

.demo-frame-skeleton {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: linear-gradient(110deg, #eef3f9 22%, #f8fafd 40%, #eef3f9 58%);
  background-size: 230% 100%;
  color: rgba(39, 67, 103, 0.54);
  font: 650 13px/1.4 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  animation: atria-demo-loading 1.35s ease-in-out infinite;
  transition: opacity 0.2s ease, visibility 0.2s ease;
  pointer-events: none;
}

.is-loaded .demo-frame-skeleton,
.is-loaded .demo-poster--loading {
  opacity: 0;
  visibility: hidden;
  animation: none;
}

.is-loading .case__frame,
.is-loading .embed__frame {
  opacity: 0;
}

.is-loaded .case__frame,
.is-loaded .embed__frame {
  opacity: 1;
  transition: opacity 0.2s ease;
}

@keyframes atria-demo-loading {
  0% { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}

/* Reserved for the forthcoming Benchmark figure; replace @benchmark in CONTENT.md. */
.benchmark-placeholder {
  width: min(1180px, calc(100% - 40px));
  min-height: clamp(320px, 48vw, 640px);
  margin: 44px auto 0;
  border: 1px dashed rgba(36, 56, 88, 0.2);
  border-radius: 22px;
  background: rgba(246, 249, 253, 0.58);
}

.theme__figure {
  margin-top: 44px;
}

/* The evaluation overview is a dense 16:9 chart, so retain the wide reserved area. */
.theme__figure:has(.case__image[src*="/cases/result.jpeg"]) {
  width: min(1180px, calc(100vw - 48px));
}

/* ML Coding is a complete self-contained figure, not a nested scroll surface. */
.figure--embed:has(.case__frame[src*="/cases/ml-coding.html"]) {
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  overflow: hidden;
}

.case__frame[src*="/cases/ml-coding.html"] {
  overflow: hidden;
  scrollbar-width: none;
}

/* Presentation and Productivity own their video + horizontal document rail layouts. */
.figure--embed:has(.case__frame[src*="/cases/presentation-showcase.html"]),
.figure--embed:has(.case__frame[src*="/cases/productivity-showcase.html"]) {
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  overflow: hidden;
}

.case__frame[src*="/cases/presentation-showcase.html"],
.case__frame[src*="/cases/productivity-showcase.html"] {
  overflow: hidden;
  scrollbar-width: none;
}

/* Keep every demo description centered beneath its media surface. */
.case__figure .figure__cap,
.theme__figure .figure__cap {
  width: 100%;
  padding-inline: 8px;
  text-align: center;
}

/* Use one outer-corner curve for every demo surface. */
.figure--media,
.figure--embed,
.embed {
  border-radius: var(--radius);
  overflow: hidden;
}

.figure--media > .case__video,
.figure--media > .case__image,
.figure--embed > .case__frame,
.embed > .embed__frame {
  border-radius: 0;
}

/* A consistent fullscreen affordance for every interactive HTML demo. */
.demo-fullscreen-host {
  position: relative;
  isolation: isolate;
}

.demo-fullscreen-host--scaled {
  overflow: hidden;
  border-radius: var(--radius);
}

.demo-fullscreen {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 12;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.64);
  border-radius: 50%;
  background: rgba(12, 25, 43, 0.68);
  color: #fff;
  box-shadow:
    0 8px 24px rgba(5, 14, 28, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(14px) saturate(1.25);
  -webkit-backdrop-filter: blur(14px) saturate(1.25);
  cursor: pointer;
  opacity: 0.86;
  transition: opacity 0.18s ease, transform 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.demo-fullscreen svg {
  display: block;
  width: 20px;
  height: 20px;
}

.demo-fullscreen:hover,
.demo-fullscreen:focus-visible {
  opacity: 1;
  transform: scale(1.045);
  background: rgba(16, 55, 101, 0.9);
  box-shadow:
    0 10px 28px rgba(5, 14, 28, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.26);
}

.demo-fullscreen:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.9);
  outline-offset: -4px;
}

.demo-fullscreen-host:fullscreen {
  width: 100vw !important;
  height: 100vh !important;
  border: 0;
  border-radius: 0;
  background: #05080d;
}

.demo-fullscreen-host:fullscreen > .case__frame {
  width: 100% !important;
  height: 100% !important;
}

.demo-fullscreen-host--scaled:fullscreen {
  display: grid;
  place-items: center;
}

.demo-fullscreen-host--scaled:fullscreen > .embed {
  width: min(100vw, 177.778vh);
  height: min(100vh, 56.25vw);
  aspect-ratio: 16 / 9 !important;
  border-radius: 0;
}

.demo-fullscreen-host:fullscreen > .demo-fullscreen {
  display: none;
}

@media (hover: none) {
  .demo-fullscreen { opacity: 1; }
}

@media (max-width: 720px) {
  .demo-fullscreen {
    top: 10px;
    right: 10px;
    width: 36px;
    height: 36px;
  }

  .demo-fullscreen svg {
    width: 18px;
    height: 18px;
  }
}

/* Entry points shown with the post-scroll hero actions. */
.hero__start-label {
  cursor: default;
}

.hero__platforms {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.hero__platform {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid rgba(19, 38, 68, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.68);
  color: var(--ink-800);
  font-size: 13px;
  font-weight: 650;
  text-decoration: none;
  transition: border-color 0.18s ease, background 0.18s ease, color 0.18s ease;
}

.hero__platform:not(.is-placeholder):hover {
  border-color: var(--brand-600);
  color: var(--brand-600);
  background: rgba(255, 255, 255, 0.92);
}

.hero__platform.is-placeholder {
  cursor: default;
  opacity: 0.58;
}

@media (max-width: 720px) {
  .nav__inner {
    min-height: 60px;
    height: auto;
    padding-block: 10px;
  }

  .nav__language {
    margin-left: 8px;
    min-width: 92px;
  }

  .hero__inner {
    transform: translateY(calc((1 - var(--p1)) * 10vh)) scale(calc(1 + 0.025 * var(--p1)));
  }

  .hero__title--welcome {
    font-size: clamp(34px, 10.5vw, 54px);
  }

  .particle-story__finale {
    min-height: 520px;
  }

  .nav__quicklinks {
    display: none;
  }

  .nav__quicklink {
    min-height: 32px;
    padding-inline: 9px;
    font-size: 11px;
  }

  .hero__actions {
    gap: 14px;
  }

  .hero__platforms {
    width: 100%;
  }

  .hero__platform {
    min-height: 38px;
    padding-inline: 13px;
    font-size: 12px;
  }
}
/* ML Coding trace detail card is portaled into the main document so it can
   escape the demo iframe and its rounded clipping boundary. */
.atria-trace-portal {
  --run-color: #4b76b8;
  position: fixed !important;
  z-index: 2147483000;
  width: min(372px, calc(100vw - 28px));
  padding: 16px;
  border: 1px solid color-mix(in srgb, var(--run-color) 24%, #d7deea);
  border-radius: 17px;
  background: rgba(255,255,255,.975);
  color: #15233b;
  box-shadow: 0 22px 64px rgba(29,48,79,.18), inset 3px 0 0 color-mix(in srgb, var(--run-color) 72%, white);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  pointer-events: none;
  opacity: 0;
  transform: none !important;
  transition: opacity .13s ease;
  font-family: Inter, "Noto Sans SC", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
.atria-trace-portal.visible { opacity: 1; animation: atria-trace-tooltip-in .16s ease both; }
.atria-trace-portal.failure {
  background: rgba(251,252,254,.98);
  box-shadow: 0 16px 44px rgba(29,48,79,.11), inset 3px 0 0 rgba(125,139,159,.35);
}
.atria-trace-portal .tip-top,
.atria-trace-portal .tip-identity,
.atria-trace-portal .tip-meta { display: flex; align-items: center; }
.atria-trace-portal .tip-top { justify-content: space-between; gap: 12px; }
.atria-trace-portal .tip-identity { gap: 7px; min-width: 0; }
.atria-trace-portal .tip-swatch { width: 9px; height: 9px; border-radius: 50%; background: var(--run-color); flex: none; }
.atria-trace-portal .tip-model { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #3f4e65; font-size: 11px; font-weight: 800; letter-spacing: .035em; }
.atria-trace-portal .tip-ours { padding: 2px 6px; border-radius: 999px; background: var(--run-color); color: #fff; font-size: 8px; font-style: normal; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; }
.atria-trace-portal .tip-status { flex: none; padding: 4px 7px; border-radius: 999px; color: #08714a; background: #ecf8f2; font-size: 8px; font-weight: 850; letter-spacing: .06em; }
.atria-trace-portal .tip-status.failure { color: #93636a; background: #f7f1f2; }
.atria-trace-portal .tip-category { margin-top: 13px; color: var(--run-color); font-size: 9px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.atria-trace-portal .tip-title { margin: 5px 0 0; font-size: 16px; line-height: 1.35; letter-spacing: -.015em; }
.atria-trace-portal .tip-detail { margin: 6px 0 0; color: #657388; font-size: 11.5px; line-height: 1.6; }
.atria-trace-portal .tip-score { display: flex; align-items: end; justify-content: space-between; margin-top: 12px; padding: 9px 11px; border-radius: 11px; background: linear-gradient(125deg, color-mix(in srgb, var(--run-color) 8%, white), #f5f7fb); }
.atria-trace-portal .tip-score span { color: #778499; font-size: 9px; font-weight: 700; letter-spacing: .04em; }
.atria-trace-portal .tip-score strong { color: var(--run-color); font-size: 19px; line-height: 1; font-variant-numeric: tabular-nums; }
.atria-trace-portal .tip-metrics { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 6px; margin-top: 8px; }
.atria-trace-portal .tip-metric { min-width: 0; padding: 8px 9px; border: 1px solid rgba(29,48,79,.075); border-radius: 9px; background: #f8fafc; }
.atria-trace-portal .tip-metric span,
.atria-trace-portal .tip-metric b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.atria-trace-portal .tip-metric span { color: #8994a5; font-size: 8.5px; }
.atria-trace-portal .tip-metric b { margin-top: 3px; color: #34435a; font-size: 10.5px; font-variant-numeric: tabular-nums; }
.atria-trace-portal .tip-evidence { margin-top: 9px; padding: 8px 9px; border-left: 2px solid color-mix(in srgb, var(--run-color) 36%, white); background: #f8fafc; }
.atria-trace-portal .tip-evidence span,
.atria-trace-portal .tip-evidence code { display: block; }
.atria-trace-portal .tip-evidence span { color: #929cac; font-size: 7.5px; font-weight: 800; letter-spacing: .09em; }
.atria-trace-portal .tip-evidence code { margin-top: 3px; color: #5e6b7e; font: 9px/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; overflow-wrap: anywhere; }
.atria-trace-portal .tip-meta { flex-wrap: wrap; gap: 5px 11px; margin-top: 10px; padding-top: 9px; border-top: 1px solid rgba(29,48,79,.08); color: #8b96a7; font-size: 8.8px; font-variant-numeric: tabular-nums; }
@keyframes atria-trace-tooltip-in { from { opacity: 0; scale: .98; } to { opacity: 1; scale: 1; } }
