/* Showcase-only additions. Core homepage layout and typography live in frontend-home.css. */
.home-site {
  position: relative;
  isolation: isolate;
}
.home-site > .home-header,
.home-site > .home-main,
.home-site > .home-footer {
  position: relative;
  z-index: 1;
}
.formula-field {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  user-select: none;
}
.formula-fragment {
  position: absolute;
  left: var(--formula-x);
  top: var(--formula-y);
  opacity: .065;
  transform: rotate(var(--formula-angle)) scale(var(--formula-scale, 1));
  transform-origin: left center;
}
.formula-field math {
  color: #b8f78c;
  font-size: clamp(25px, 4vw, 58px);
  white-space: nowrap;
}
html {
  scroll-behavior: smooth;
  scroll-padding-top: 24px;
}
img {
  max-width: 100%;
}
.skip {
  position: absolute;
  left: 16px;
  top: -100px;
  padding: 12px;
  background: var(--home-accent);
  color: #20251c;
  z-index: 20;
}
.skip:focus {
  top: 12px;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}
.home-heading-ink {
  background-image: var(--art-image);
}
.home-hero-action a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 12px 18px;
  border: 1px solid #ffffff24;
  border-radius: 8px;
  background: rgb(32 37 30 / 75%);
  color: var(--home-accent);
  font-size: 13px;
}
.home-hero-action a:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}
.gallery-caption {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
  color: var(--home-muted);
  font-size: 11px;
}
.gallery-caption button {
  font-size: 11px;
  color: var(--home-accent);
  padding: 5px;
}
.filters {
  display: flex;
  gap: 24px;
  overflow: auto;
  border-bottom: 1px solid #ffffff20;
  margin: 28px 0;
}
.filters button {
  white-space: nowrap;
  padding: 12px 0;
  color: var(--home-muted);
  font-size: 13px;
  border-bottom: 2px solid transparent;
}
.filters button[aria-pressed="true"] {
  color: var(--home-accent);
  border-color: var(--home-accent);
}
.concept-section {
  overflow: clip;
  --terminal: #b8f78c;
  background-image: linear-gradient(#b8f78c05 1px, transparent 1px),
    linear-gradient(90deg, #b8f78c05 1px, transparent 1px);
  background-size: 36px 36px;
}
.collection-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  align-items: start;
  column-gap: 24px;
  row-gap: 60px;
  padding: 80px 0 30px;
}
.collection-card:nth-child(odd) {
  grid-column: 1 / 7;
}
.collection-card:nth-child(even) {
  grid-column: 7 / 13;
  margin-top: 130px;
}
.collection-card {
  position: relative;
  min-width: 0;
  padding: 16px;
  border: 1px solid #b8f78c26;
  background: #111710e8;
}
.collection-card .art-button {
  border-radius: 0;
  outline: 1px solid #b8f78c30;
}
.collection-card .image-label {
  border: 1px solid #b8f78c60;
  border-radius: 0;
  font: 11px ui-monospace, SFMono-Regular, Consolas, monospace;
  color: var(--terminal);
  background: #091009e8;
}
.study-readout,
.study-parameters,
.math-notes,
.math-disclaimer,
#art-note,
#art-title {
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
}
.study-readout {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin: 24px 0 12px;
  color: var(--terminal);
  font-size: 11px;
  letter-spacing: .06em;
}
.study-parameters {
  font-size: 9px;
  line-height: 1.8;
  color: #97ab91;
  margin-top: 18px;
}
.equation-stack {
  border-top: 1px solid #b8f78c26;
}
.art-frame {
  position: relative;
}
.equation-overlay {
  position: absolute;
  inset: 12% 6% 10%;
  overflow: hidden;
  border: 0;
  pointer-events: none;
  user-select: none;
  transform: rotate(-8deg);
  mix-blend-mode: soft-light;
}
.equation-overlay .layer-index {
  display: none;
}
.equation-overlay .layer-equation {
  display: block;
  border: 0;
  min-height: 0;
  margin-bottom: clamp(12px, 3vw, 42px);
}
.equation-overlay .equation-scroll {
  overflow: hidden;
  padding: 0;
}
.equation-overlay math {
  color: #fff;
  opacity: .3;
  font-size: clamp(20px, 2.6vw, 38px);
}
.collection-card:nth-child(even) .equation-overlay {
  transform: rotate(6deg);
}
.motion .collection-card .equation-stack {
  opacity: 0;
  transition: opacity .85s ease .12s;
}
.motion .collection-card .equation-stack.is-revealed,
.collection-card:focus-within .equation-stack {
  opacity: 1;
}
.layer-equation {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  min-height: 70px;
  border-bottom: 1px solid #b8f78c1a;
}
.layer-index {
  color: #82947c;
  font: 10px ui-monospace, SFMono-Regular, Consolas, monospace;
}
.equation-scroll {
  overflow-x: auto;
  scrollbar-width: thin;
  scrollbar-color: #7eaf69 #152013;
  padding: 12px 2px;
}
math {
  color: #d5fac4;
  font-size: clamp(15px, 1.6vw, 20px);
  text-align: left;
  margin: 0;
  width: max-content;
}
.math-disclaimer {
  max-width: 640px;
  color: #97ab91;
  font-size: 11px;
  line-height: 1.8;
  margin-top: 28px;
}
.math-notes {
  font-size: 11px;
  line-height: 1.8;
  margin: 24px 0;
}
.math-notes summary {
  cursor: pointer;
  color: #b8f78c;
}
.math-notes code {
  display: block;
  color: #b8f78c;
}
.dialog-copy {
  min-width: 0;
}
.motion .collection-card .art-frame {
  transition: none;
  transform: translate3d(var(--drift-x, 0px), var(--drift-y, 0px), 0)
    rotate(var(--drift-angle, 0deg)) scale(var(--drift-scale, 1));
  transform-origin: center;
}
.collection-card:focus-within .art-frame {
  transform: none;
}
.collection-card .card-meta {
  align-items: start;
  flex-direction: column;
}
.collection-card .card-meta h3 {
  font-size: clamp(26px, 3vw, 44px);
  letter-spacing: -.04em;
}
.collection-card .palette {
  margin-top: 8px;
  gap: 3px;
}
.collection-card .palette > span {
  flex: 1;
  width: auto;
  height: 16px;
}
.collection-card[hidden] {
  display: none;
}
.art-button {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  border-radius: 12px;
  overflow: hidden;
  background-size: 100% 100%;
  background-repeat: no-repeat;
}
.pattern-canvas {
  display: block;
  overflow: hidden;
  opacity: 1;
  transition: transform .6s, opacity 1.2s ease;
}
.home-hero-art,
.home-thumbnails button {
  background-size: cover;
  background-position: center;
}
.home-hero-art > img.is-active {
  animation: none;
}
.home-thumbnails img {
  transition: opacity 1.2s ease;
}
.is-loading-art {
  opacity: 0 !important;
  transition: none !important;
  animation: none !important;
}
.art-button img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  object-fit: cover;
}
.art-button:hover .pattern-canvas {
  transform: scale(1.025);
}
.image-label {
  position: absolute;
  left: 16px;
  bottom: 16px;
  background: #20251cd9;
  color: var(--home-accent);
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 11px;
}
.card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 18px;
}
.card-meta h3 {
  font-size: 23px;
  margin: 0;
}
.card-meta > span {
  color: var(--home-muted);
  font-size: 11px;
}
.collection-card > p {
  font-size: 13px;
  line-height: 1.75;
  color: var(--home-muted);
  max-width: 520px;
}
.palette {
  display: flex;
  gap: 4px;
}
.palette span {
  width: 22px;
  height: 7px;
  background: var(--swatch);
}
.wear-section {
  border-top: 1px solid #ffffff1a;
  padding: 70px 0;
}
.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 30px;
  margin-bottom: 35px;
}
.section-heading h2 {
  font-size: clamp(32px, 3.6vw, 52px);
  line-height: 1.15;
  margin: 0 0 16px;
}
.section-heading p {
  font-size: 14px;
  color: var(--home-muted);
  line-height: 1.7;
}
.eyebrow {
  color: var(--home-accent) !important;
  text-transform: uppercase;
  font-size: 11px !important;
  letter-spacing: 0.15em;
}
.select-label {
  display: block;
  color: var(--home-muted);
  font-size: 11px;
  margin-bottom: 8px;
}
select {
  border: 1px solid #ffffff30;
  border-radius: 6px;
  background: #262a23;
  color: inherit;
  padding: 10px;
  max-width: 100%;
}
.wear-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}
.wear-grid figure {
  margin: 0;
}
.garment-stage {
  background: #deded0;
  border-radius: 12px;
  overflow: hidden;
}
.garment-stage > img,
.garment-stage > svg {
  display: block;
  width: 100%;
  height: auto;
}
figcaption {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 15px;
  font-size: 11px;
  color: var(--home-muted);
}
.wear-caption {
  font-size: 11px;
  color: var(--home-muted);
  margin-top: 24px;
}
.wear-caption a {
  color: var(--home-accent);
  text-decoration: underline;
}
.home-document li {
  color: var(--home-muted);
  line-height: 1.85;
  margin-bottom: 12px;
}
dialog {
  width: min(1100px, 94vw);
  padding: 0;
  max-height: 90svh;
  overflow: auto;
  border: 1px solid #ffffff24;
  border-radius: 12px;
  background: #1b1d19;
  color: #f0f0e7;
}
dialog::backdrop {
  background: #090c0ade;
}
body:has(dialog[open]) {
  overflow: hidden;
}
.dialog-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
}
.dialog-grid > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.dialog-copy {
  padding: 50px 30px 30px;
}
.dialog-copy h2 {
  font-size: 36px;
  margin: 0 0 20px;
}
.dialog-copy p {
  line-height: 1.75;
  color: var(--home-muted);
}
.dialog-close {
  position: absolute;
  right: 12px;
  top: 12px;
  width: 36px;
  height: 36px;
  background: #c8ed9c;
  color: #20251c;
  border-radius: 50%;
  font-size: 24px;
}
.variant-buttons {
  display: flex;
  gap: 8px;
}
.variant-buttons button {
  padding: 10px;
  border: 1px solid #ffffff30;
  border-radius: 5px;
  font-size: 12px;
}
.variant-buttons button[aria-pressed="true"] {
  background: var(--home-accent);
  color: #20251c;
}
.small {
  font-size: 11px;
}
.switching {
  animation: home-reveal 0.4s;
}
@media (max-width: 720px) {
  .home-header nav > a:not(.home-nav-create) {
    display: inline;
  }
  .home-header nav > a[href="/#field-notes"] {
    display: none;
  }
  .home-header nav {
    font-size: 12px;
  }
  .collection-grid {
    grid-template-columns: 1fr;
    padding-top: 45px;
    gap: 80px;
  }
  .collection-card:nth-child(n) {
    grid-column: 1;
    margin-top: 0;
  }
  .collection-card:nth-child(even) {
    width: 100%;
  }
  .card-meta {
    align-items: start;
    flex-direction: column;
    gap: 8px;
  }
  .section-heading {
    display: block;
  }
  .wear-grid {
    grid-template-columns: 1fr;
  }
  .wear-grid figure {
    max-width: 420px;
    margin: auto;
    width: 100%;
  }
  .wear-section {
    padding: 45px 0;
  }
  .dialog-grid {
    grid-template-columns: 1fr;
  }
  .dialog-grid > img {
    max-height: 45svh;
  }
  .home-document h1 {
    overflow-wrap: anywhere;
  }
}
@media (prefers-reduced-motion: reduce) {
  .pattern-canvas,
  .home-thumbnails img {
    transition: none !important;
  }
  .collection-card .equation-stack {
    opacity: 1 !important;
    transition: none !important;
  }
  .collection-card .art-frame,
  .art-button:hover .pattern-canvas {
    transform: none !important;
    transition: none;
  }
  html {
    scroll-behavior: auto;
  }
}
