/* TOPTAN 2000 landing — page shell (aluminum default). */

html {
  color-scheme: light;
  scroll-behavior: smooth;
}

body {
  margin: 0;
}

:focus:not(:focus-visible) {
  outline: none;
}

::selection {
  background: color-mix(in srgb, var(--accent) 35%, var(--surface-window));
  color: var(--ink);
}

.ty-gallery-section {
  padding: var(--space-6) 0;
  border-bottom: 1px solid var(--line);
}

.ty-gallery-section__label {
  margin: 0 0 var(--space-4);
  font: 500 10px/12px var(--font-mono);
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--ink-muted);
}

@media (min-width: 1280px) {
  .ty-container,
  .ty-nav__inner,
  .ty-hero__inner {
    padding-left: var(--space-6);
    padding-right: var(--space-6);
  }
}

@media (max-width: 375px) {
  .ty-hero__title {
    letter-spacing: -1px;
  }

  .ty-hero__actions {
    flex-direction: column;
    align-items: stretch;
  }

  .ty-hero__actions .ty-btn--hero {
    width: 100%;
    min-width: 0;
  }

  .ty-btn--lg {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .ty-matrix.is-active i.on {
    animation: none !important;
  }
}

/* ---------- L02 index — verbatim copy (no forced uppercase) ---------- */
.ty-landing {
  overflow-x: clip;
}

.ty-landing .ty-nav__lockup {
  display: block;
  height: 28px;
  width: auto;
}

.ty-landing .ty-hero__visual img {
  display: block;
  max-width: min(240px, 100%);
  height: auto;
}

.ty-landing a:not([class]) {
  color: var(--accent-text);
}

.ty-landing a:not([class]):hover {
  color: var(--ink);
}

.ty-landing .ty-hero__title,
.ty-landing .ty-sechead__title,
.ty-landing .ty-faq summary {
  text-transform: none;
  letter-spacing: -0.02em;
}

.ty-landing .ty-hero__title {
  font-weight: 800;
  font-size: clamp(36px, 8vw, 72px);
  line-height: 1.05;
}

.ty-landing .ty-hero__note a,
.ty-landing .ty-price__note a,
.ty-landing .ty-faq a {
  color: var(--accent-text);
}

.ty-landing .ty-hero__note {
  text-transform: none;
  letter-spacing: 0;
  font: 400 13px/18px var(--font-sans);
  max-width: 52ch;
}

.ty-landing .ty-price__note {
  margin: var(--space-4) 0 0;
  font: 400 13px/18px var(--font-sans);
  color: var(--ink-muted);
  max-width: 52ch;
}

.ty-landing .ty-quote {
  max-width: 640px;
  margin: 0 auto;
}

.ty-landing .ty-quote blockquote {
  margin: 0;
  font: 400 20px/28px var(--font-sans);
  color: var(--ink);
}

.ty-landing .ty-quote cite {
  display: block;
  margin-top: var(--space-5);
  font: 500 12px/16px var(--font-mono);
  color: var(--ink-muted);
  font-style: normal;
}

/* Tools + demo compare */
.ty-tools__layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: var(--space-8);
  align-items: start;
}

@media (max-width: 900px) {
  .ty-tools__layout {
    grid-template-columns: minmax(0, 1fr);
  }
}

.ty-cart__section {
  grid-column: 1 / -1;
  list-style: none;
  margin: var(--space-3) 0 var(--space-1);
  padding: 0 var(--space-2);
}

.ty-cart__section:first-child {
  margin-top: 0;
}

.ty-cart__section .ty-label {
  color: var(--screen-muted);
}

.compare {
  position: sticky;
  top: calc(var(--size-nav) + 12px);
  display: flex;
  flex-direction: column;
  align-items: center;
  max-height: calc(100dvh - 120px);
  min-width: 0;
}

@media (max-width: 900px) {
  .compare {
    position: static;
    max-height: none;
  }
}

.compare-frame {
  --pos: 50%;
  position: relative;
  margin: 0 auto;
  width: min(100%, 420px, calc((100dvh - 210px) * 9 / 16));
  aspect-ratio: 9 / 16;
  border-radius: var(--radius-md);
  box-shadow: var(--window);
  overflow: hidden;
  background: var(--screen-bg);
  touch-action: none;
  user-select: none;
}

.compare-after,
.compare-before,
.compare-after-img,
.compare-before-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}

.compare-before-clip,
.compare-before-img-clip {
  position: absolute;
  inset: 0;
  clip-path: inset(0 calc(100% - var(--pos)) 0 0);
  pointer-events: none;
}

.compare-label {
  position: absolute;
  top: var(--space-3);
  z-index: 2;
  font: 500 10px/12px var(--font-mono);
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--on-accent);
  background: var(--accent);
  padding: 4px 8px;
  border-radius: var(--radius-xs);
  pointer-events: none;
}

.compare-label-before {
  left: var(--space-3);
}

.compare-label-after {
  right: var(--space-3);
}

.compare-handle {
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--pos);
  width: 3px;
  margin-left: -1.5px;
  background: var(--accent);
  box-shadow: 0 0 0 2px var(--screen-bg);
  z-index: 3;
  cursor: ew-resize;
}

.compare-handle::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 28px;
  height: 28px;
  transform: translate(-50%, -50%);
  background: var(--accent);
  border-radius: var(--radius-full);
  box-shadow: var(--glow-accent);
}

.compare-handle:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 4px;
}

.compare-frame[hidden] {
  display: none;
}

.compare-caption {
  margin: var(--space-4) 0 0;
  text-align: center;
  font: 500 11px/16px var(--font-mono);
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.audio-deck {
  width: min(100%, 420px);
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.audio-deck[hidden],
.demo-soon[hidden] {
  display: none;
}

.demo-info[hidden] {
  display: none;
}

.demo-info {
  width: min(100%, 420px);
}

.demo-info-screen {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 180px;
  padding: var(--space-6) var(--space-5);
  text-align: left;
  border-radius: var(--radius-md);
  background: var(--screen-bg);
  box-shadow: var(--well);
  color: var(--screen-ink);
}

.demo-info-text {
  margin: 0;
  max-width: 36ch;
  font: 400 15px/24px var(--font-sans);
  color: var(--screen-ink);
}

.demo-soon {
  width: min(100%, 420px);
}

.demo-soon-screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-4);
  min-height: 180px;
  padding: var(--space-6) var(--space-5);
  text-align: center;
  border-radius: var(--radius-md);
  background: var(--screen-bg);
  box-shadow: var(--well);
  color: var(--screen-ink);
}

.demo-soon-notes {
  margin: 0;
  font-size: 32px;
  line-height: 1;
  letter-spacing: 0.18em;
  color: var(--amber);
}

.demo-soon-title {
  margin: 0;
  max-width: 16ch;
  font: 500 12px/18px var(--font-mono);
  text-transform: uppercase;
  color: var(--screen-ink);
}

.demo-soon-title::after {
  content: "▮";
  margin-left: 6px;
  color: var(--phosphor);
  animation: ty-blink calc(var(--dur-blink) * 2) var(--ease-step) infinite;
}

@media (prefers-reduced-motion: reduce) {
  .demo-soon-title::after {
    animation: none;
  }
}

.audio-screen {
  position: relative;
  border-radius: var(--radius-md);
  background: var(--screen-bg);
  box-shadow: var(--well);
  cursor: pointer;
  overflow: hidden;
}

.audio-screen:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 4px;
}

.audio-wave {
  display: block;
  width: 100%;
  height: 140px;
  image-rendering: pixelated;
}

.audio-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-3);
  font: 500 10px/12px var(--font-mono);
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.audio-deck.is-clean .audio-state {
  color: var(--accent-text);
}

.audio-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-4);
}

.noise-switch {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  cursor: pointer;
  user-select: none;
}

.noise-switch-label {
  font: 500 11px/16px var(--font-mono);
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--ink);
}

.noise-switch-input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}

.noise-switch-ui {
  position: relative;
  width: 44px;
  height: 24px;
  flex: none;
  border-radius: var(--radius-sm);
  background: var(--surface-well);
  box-shadow: var(--well);
}

.noise-switch-ui::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: var(--radius-xs);
  background: var(--surface-key);
  box-shadow: var(--key);
  transition: transform var(--dur-snap) var(--ease-mech);
}

.noise-switch-input:checked + .noise-switch-ui::after {
  transform: translateX(20px);
  background: var(--accent);
}

.noise-switch-input:focus-visible + .noise-switch-ui {
  outline: 2px solid var(--focus-ring);
  outline-offset: 2px;
}

.ty-faq {
  max-width: 720px;
}

.ty-faq details {
  border-radius: var(--radius-lg);
  background: var(--surface-key);
  box-shadow: var(--panel);
  padding: var(--space-4) var(--space-5);
  margin-bottom: var(--space-3);
}

.ty-faq details summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  font: 600 15px/22px var(--font-sans);
  color: var(--ink);
}

.ty-faq details summary::-webkit-details-marker {
  display: none;
}

.ty-faq details summary .plus {
  flex: none;
  width: 18px;
  height: 18px;
  position: relative;
  color: var(--accent-text);
}

.ty-faq details summary .plus::before,
.ty-faq details summary .plus::after {
  content: "";
  position: absolute;
  background: currentColor;
}

.ty-faq details summary .plus::before {
  left: 0;
  right: 0;
  top: 8px;
  height: 2px;
}

.ty-faq details summary .plus::after {
  top: 0;
  bottom: 0;
  left: 8px;
  width: 2px;
  transition: transform 0.12s var(--ease-mech);
}

.ty-faq details[open] summary .plus::after {
  transform: scaleY(0);
}

.ty-faq details p {
  margin: var(--space-3) 0 0;
  font: 400 15px/24px var(--font-sans);
  color: var(--ink-muted);
  max-width: 52ch;
}

.ty-price__body {
  margin: var(--space-4) 0 0;
  font: 400 16px/26px var(--font-sans);
  color: var(--ink-muted);
  text-align: left;
}

.ty-price__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
  margin-top: var(--space-5);
  justify-content: flex-start;
}

.ty-pricing-grid {
  margin-top: var(--space-6);
}

.ty-pricing-grid__note {
  margin-top: var(--space-5);
  max-width: none;
}

@media (max-width: 720px) {
  .ty-landing .ty-pricing-grid {
    --cols: 1;
  }
}

.ty-footer__email {
  margin: 0;
  font: 400 14px/20px var(--font-sans);
}

.ty-footer__email a {
  color: var(--graphite-300);
  text-decoration: none;
}

.ty-footer__email a:hover {
  color: var(--graphite-100);
  text-decoration: underline;
}

.ty-footer__split {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--space-4);
  width: 100%;
}

/* ---------- L03 legal / download article ---------- */
.ty-legal-page .ty-band--legal {
  padding-block: var(--space-8) var(--space-12);
}

.ty-legal {
  max-width: 72ch;
  margin: 0 auto;
}

.ty-legal .ty-eyebrow {
  margin: 0 0 var(--space-3);
}

.ty-legal h1 {
  margin: 0 0 var(--space-3);
  font: 800 clamp(28px, 4.4vw, 44px) / 1.05 var(--font-display);
  letter-spacing: -0.5px;
  text-transform: uppercase;
  color: var(--ink);
  text-wrap: balance;
}

.ty-legal-meta {
  margin: 0 0 var(--space-6);
  font: 400 16px / 24px var(--font-sans);
  color: var(--ink-muted);
}

.ty-legal h2 {
  /* Sentence headings stay in sentence case (copy rule: upper case only for hardware labels). */
  margin: var(--space-8) 0 var(--space-3);
  font: 600 20px / 28px var(--font-sans);
  color: var(--ink);
}

.ty-legal h3 {
  margin: var(--space-5) 0 var(--space-2);
  font: 600 17px / 24px var(--font-sans);
  color: var(--ink);
}

.ty-legal p,
.ty-legal li {
  font: 400 18px / 28px var(--font-sans);
  color: var(--ink-muted);
}

.ty-legal p {
  margin: 0 0 var(--space-4);
}

.ty-legal ul {
  margin: 0 0 var(--space-4);
  padding-left: 1.25em;
}

.ty-legal li {
  margin-bottom: var(--space-2);
}

.ty-legal strong {
  color: var(--ink);
  font-weight: 600;
}

.ty-legal a:not([class]) {
  color: var(--accent-text);
}

.ty-legal table {
  width: 100%;
  margin: 0 0 var(--space-4);
  border-collapse: collapse;
  font: 400 16px / 24px var(--font-sans);
}

.ty-legal th,
.ty-legal td {
  padding: var(--space-2) var(--space-3);
  border: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.ty-legal th {
  font-weight: 600;
  color: var(--ink);
  background: var(--surface-well);
}

/* Focus on dark screens (cartridge menu, LED panels): the aluminum focus ring is dark and
   disappears on screen-bg, so use the accent there (≥ 3:1 on screen-bg). */
.ty-cart :focus-visible,
.ty-screen :focus-visible,
.ty-cart:focus-visible,
.ty-screen:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* The tool list has studio section headers; with the design system's column flow the headers
   stacked first and every tool landed under the last header. Flow rows in markup order. */
.ty-cart__grid:has(> .ty-cart__section) {
  grid-auto-flow: row;
  grid-template-columns: 1fr;
  grid-template-rows: none;
}

/* Hero band: the band and the hero both padded, leaving a 184px gap under the nav. */
.ty-landing .ty-band--hero {
  padding: 0;
}

.ty-landing .ty-band--hero .ty-hero {
  padding: 56px 0 96px;
}

@media (max-width: 760px) {
  .ty-landing .ty-band--hero .ty-hero {
    padding: 32px 0 64px;
  }
}
