/* Redesign motion, bilingual typography, language switcher, and v0.0.236 editorial polish */
html[lang="en"] {
  --serif: "Iowan Old Style", Georgia, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
}
html[lang="en"] h1,
html[lang="en"] h2 {
  letter-spacing: -0.025em;
  line-height: 1.16;
}
html[lang="en"] h3 {
  letter-spacing: -0.015em;
  line-height: 1.35;
}
html[lang="en"] .brand-hero h1 {
  font-family: "Iowan Old Style", Georgia, "Times New Roman", serif;
  font-size: clamp(40px, 3.85vw, 58px);
  line-height: 1.24;
  letter-spacing: -0.015em;
}
html[lang="en"] .download-arrival h2 {
  font-family: "Iowan Old Style", Georgia, "Times New Roman", serif;
  font-size: clamp(46px, 5vw, 76px);
  line-height: 1.18;
  letter-spacing: -0.01em;
}

/* Header language switcher */
.site-nav .lang-switch {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 28px;
  padding: 0 10px;
  margin-left: 4px;
  border: 1px solid currentColor;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  opacity: 0.86;
  transition: opacity 180ms ease, background-color 180ms ease, color 180ms ease, border-color 180ms ease;
}
.site-nav .lang-switch:hover,
.site-nav .lang-switch:focus-visible {
  opacity: 1;
  border-color: var(--gold);
  background: var(--gold);
  color: #1c1b18;
}
.home-page .site-header:not(.is-scrolled) .lang-switch {
  border-color: rgba(232, 196, 145, 0.45);
  color: #e8c491;
}
.home-page .site-header:not(.is-scrolled) .lang-switch:hover,
.home-page .site-header:not(.is-scrolled) .lang-switch:focus-visible {
  background: #e8c491;
  color: #140f15;
  border-color: #e8c491;
}

/* Top reading progress gold hairline */
.reading-progress {
  position: fixed;
  top: 76px;
  left: 0;
  width: 100%;
  height: 2px;
  z-index: 79;
  pointer-events: none;
  opacity: 0;
  transition: opacity 260ms ease;
}
.reading-progress.is-visible {
  opacity: 1;
}
.reading-progress-fill {
  display: block;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, var(--gold), var(--orange));
  transform-origin: 0 50%;
  transform: scaleX(0);
  will-change: transform;
}

/* Editorial reveal & chapter hairline sweep */
.section-head .eyebrow {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.section-head .eyebrow::after {
  content: "";
  display: inline-block;
  width: 36px;
  height: 1px;
  background: var(--gold);
  transform-origin: 0 50%;
  transform: scaleX(0);
  transition: transform 620ms cubic-bezier(0.22, 1, 0.36, 1) 120ms;
}
.section-head.is-visible .eyebrow::after,
.section-head.in-view .eyebrow::after,
html.no-js .section-head .eyebrow::after {
  transform: scaleX(1);
}

.screen-link {
  overflow: hidden;
  border-radius: 6px;
  border: 1px solid rgba(28, 27, 24, 0.12);
  box-shadow: 0 22px 48px rgba(20, 15, 21, 0.12);
  transition: transform 320ms cubic-bezier(0.22, 1, 0.36, 1), box-shadow 320ms ease, border-color 240ms ease;
}
.section.ink .screen-link {
  border-color: rgba(232, 196, 145, 0.18);
  box-shadow: 0 24px 56px rgba(0, 0, 0, 0.42);
}
.screen-link img {
  transition: transform 520ms cubic-bezier(0.22, 1, 0.36, 1);
}
.screen-link:hover,
.screen-link:focus-visible {
  transform: translateY(-3px);
  border-color: var(--gold);
}
.screen-link:hover img {
  transform: scale(1.015);
}

/* Scene stage cross-fade transition */
.scene-panel {
  transition: opacity 280ms ease, transform 320ms cubic-bezier(0.22, 1, 0.36, 1);
}
.scene-panel[hidden] {
  opacity: 0;
  transform: translateY(8px) scale(0.992);
}
.scene-indicator {
  height: 2px;
  background: linear-gradient(90deg, var(--gold), var(--orange));
  transition: transform 300ms cubic-bezier(0.22, 1, 0.36, 1), width 300ms cubic-bezier(0.22, 1, 0.36, 1);
}

/* Upgraded 4-sheet Output Fan (pure CSS + WAAPI, light and crisp) */
.output-fan-4 {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}
.output-fan-4 .output-sheet {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 224px;
  padding: 20px 18px 18px;
  background: #fbf9f4;
  border: 1px solid var(--line);
  border-radius: 6px;
  box-shadow: 0 10px 26px rgba(28, 27, 24, 0.06);
  transition: transform 320ms cubic-bezier(0.22, 1, 0.36, 1), box-shadow 320ms ease, border-color 220ms ease, opacity 260ms ease;
}
.output-fan-4:hover .output-sheet:not(:hover) {
  opacity: 0.78;
}
.output-fan-4 .output-sheet:hover,
.output-fan-4 .output-sheet:focus-visible {
  opacity: 1;
  transform: translateY(-8px);
  border-color: var(--gold);
  box-shadow: 0 22px 44px rgba(28, 27, 24, 0.14);
}
.output-fan-4 .output-sheet small {
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--gold-text);
  font-weight: 600;
}
.output-fan-4 .output-sheet h3 {
  margin: 8px 0 6px;
  font-size: 20px;
}
.output-fan-4 .output-sheet p {
  font-size: 13px;
  line-height: 1.65;
  color: var(--muted);
  margin-bottom: 16px;
}
.output-fan-4 .sheet-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  font-size: 12px;
  font-weight: 600;
  color: var(--ink);
}
.output-fan-4 .output-sheet:hover .sheet-footer b {
  transform: translate(2px, -2px);
}
.output-fan-4 .sheet-footer b {
  display: inline-block;
  transition: transform 220ms ease;
}

/* Canvas trail animated connections */
.canvas-map .canvas-connections path {
  stroke-dasharray: 1200;
  stroke-dashoffset: 0;
  transition: stroke 260ms ease, stroke-width 260ms ease, opacity 260ms ease;
}
.canvas-map.is-node-hovered .canvas-connections path {
  stroke: var(--gold-light);
  stroke-width: 2;
  opacity: 0.92;
}
.canvas-map .canvas-node {
  transition: transform 260ms cubic-bezier(0.22, 1, 0.36, 1), border-color 220ms ease, background-color 220ms ease;
}
.canvas-map .canvas-node:hover,
.canvas-map .canvas-node:focus-visible {
  transform: translateY(-5px);
  border-color: var(--gold-light);
}

/* Desktop & Local control chapter (Ch.06) */
.desktop-pillars {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  margin-top: 32px;
}
.desktop-pillar {
  padding: 22px 22px 24px;
  border: 1px solid rgba(232, 196, 145, 0.2);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.03);
  transition: border-color 220ms ease, transform 260ms cubic-bezier(0.22, 1, 0.36, 1);
}
.desktop-pillar:hover {
  border-color: rgba(232, 196, 145, 0.55);
  transform: translateY(-3px);
}
.desktop-pillar small {
  display: block;
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--gold-light);
  margin-bottom: 8px;
}
.desktop-pillar h3 {
  font-size: 20px;
  color: var(--paper);
  margin-bottom: 8px;
}
.desktop-pillar p {
  font-size: 13.5px;
  line-height: 1.75;
  color: rgba(243, 240, 232, 0.74);
}

/* Feature catalog editorial refresh (cleaner cards, filter bar) */
.catalog-filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin: 24px 0 36px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}
.catalog-search {
  min-width: 240px;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fbf9f4;
  color: var(--ink);
  font-size: 13px;
}
.catalog-search:focus {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}
.feature-tile {
  border-radius: 6px;
  box-shadow: 0 2px 10px rgba(28, 27, 24, 0.04);
  transition: transform 260ms cubic-bezier(0.22, 1, 0.36, 1), border-color 220ms ease, box-shadow 260ms ease;
}
.feature-tile:hover,
.feature-tile:focus-visible {
  transform: translateY(-4px);
  border-color: var(--gold);
  box-shadow: 0 14px 32px rgba(28, 27, 24, 0.09);
}

/* Revision demo strike & highlight */
.revision-demo[data-step="1"] [data-revision-before],
.revision-demo[data-step="2"] [data-revision-before] {
  text-decoration: line-through;
  text-decoration-color: rgba(241, 120, 61, 0.7);
  opacity: 0.62;
}
.revision-demo [data-revision-after] {
  border-left: 2px solid var(--gold-light);
  padding-left: 12px;
  margin-top: 8px;
}

/* 6-Step Cinematic 3D Dark Stage Carousel (Plan A) */
.wf-cinema {
  position: relative;
  overflow: hidden;
  background: radial-gradient(ellipse 80% 60% at 50% 0%, #1d151d 0%, #140f15 58%, #100c11 100%);
  color: var(--paper);
  padding: 96px 0 76px;
  border-top: 1px solid rgba(232, 196, 145, 0.14);
  border-bottom: 1px solid rgba(232, 196, 145, 0.16);
}
.wf-cinema-glow {
  position: absolute;
  inset: -12% 0 auto 0;
  height: 115%;
  pointer-events: none;
  background:
    radial-gradient(ellipse 56% 42% at 50% 52%, rgba(232, 196, 145, 0.17), rgba(241, 120, 61, 0.06) 45%, transparent 72%),
    radial-gradient(circle at 20% 25%, rgba(196, 86, 108, 0.08), transparent 44%);
  transition: transform 900ms cubic-bezier(0.22, 1, 0.36, 1), opacity 600ms ease;
}
.wf-cinema-inner {
  position: relative;
  z-index: 2;
}
.wf-cinema-head {
  text-align: center;
  max-width: 820px;
  margin: 0 auto 28px;
}
.wf-cinema-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 14px;
  border-radius: 999px;
  border: 1px solid rgba(232, 196, 145, 0.28);
  background: rgba(232, 196, 145, 0.07);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: #e8c491;
}
.wf-cinema-head h2 {
  margin-top: 14px;
  font-size: clamp(32px, 3.2vw, 48px);
  color: var(--paper);
  letter-spacing: -0.02em;
}
.wf-caption-stage {
  margin-top: 14px;
  min-height: 62px;
}
.wf-caption-item {
  animation: wf-caption-in 380ms cubic-bezier(0.22, 1, 0.36, 1);
}
@keyframes wf-caption-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}
.wf-caption-desc {
  font-size: 14.5px;
  line-height: 1.7;
  color: rgba(243, 240, 232, 0.78);
}
.wf-caption-desc strong {
  color: #e8c491;
  font-weight: 600;
}
.wf-caption-actions {
  display: inline-flex;
  align-items: center;
  gap: 20px;
  margin-top: 10px;
  font-size: 12.5px;
  font-weight: 600;
}
.wf-caption-actions a {
  color: #e8c491;
  border-bottom: 1px solid rgba(232, 196, 145, 0.35);
  padding-bottom: 2px;
  transition: color 180ms ease, border-color 180ms ease;
}
.wf-caption-actions a:hover,
.wf-caption-actions a:focus-visible {
  color: #fff;
  border-color: #f79767;
}

/* 3D Perspective Coverflow Viewport */
.wf-3d-viewport {
  position: relative;
  height: clamp(390px, 40vw, 560px);
  margin: 12px auto 26px;
  perspective: 1850px;
  perspective-origin: 50% 48%;
  user-select: none;
  touch-action: pan-y;
}
.wf-3d-track {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
}
.wf-slide {
  position: absolute;
  top: 50%;
  left: 50%;
  width: min(820px, 66vw);
  transform-style: preserve-3d;
  transition:
    transform 760ms cubic-bezier(0.22, 1, 0.36, 1),
    opacity 620ms ease,
    filter 620ms ease;
  will-change: transform, opacity;
}
.wf-slide[data-offset="0"] {
  z-index: 30;
  opacity: 1;
  filter: brightness(1);
  transform: translate3d(-50%, -50%, 0) rotateY(0deg) scale(1);
}
.wf-slide[data-offset="-1"] {
  z-index: 20;
  opacity: 0.56;
  filter: brightness(0.66) saturate(0.85);
  transform: translate3d(calc(-50% - 46%), -50%, -185px) rotateY(22deg) scale(0.82);
  cursor: pointer;
}
.wf-slide[data-offset="1"] {
  z-index: 20;
  opacity: 0.56;
  filter: brightness(0.66) saturate(0.85);
  transform: translate3d(calc(-50% + 46%), -50%, -185px) rotateY(-22deg) scale(0.82);
  cursor: pointer;
}
.wf-slide[data-offset="-1"]:hover,
.wf-slide[data-offset="1"]:hover {
  opacity: 0.82;
  filter: brightness(0.86);
}
.wf-slide[data-offset="-2"] {
  z-index: 10;
  opacity: 0.14;
  filter: brightness(0.45);
  transform: translate3d(calc(-50% - 76%), -50%, -350px) rotateY(32deg) scale(0.66);
  pointer-events: none;
}
.wf-slide[data-offset="2"] {
  z-index: 10;
  opacity: 0.14;
  filter: brightness(0.45);
  transform: translate3d(calc(-50% + 76%), -50%, -350px) rotateY(-32deg) scale(0.66);
  pointer-events: none;
}
.wf-slide[data-offset="3"] {
  z-index: 1;
  opacity: 0;
  transform: translate3d(-50%, -50%, -440px) scale(0.56);
  pointer-events: none;
}

/* Illuminated Glass Window Frame + 3D Pointer Tilt + Gold Sheen */
.wf-window {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  background: #17141a;
  border: 1px solid rgba(232, 196, 145, 0.22);
  box-shadow:
    0 34px 80px rgba(0, 0, 0, 0.65),
    0 0 0 1px rgba(255, 255, 255, 0.04) inset;
  transform: rotateX(var(--tilt-x, 0deg)) rotateY(var(--tilt-y, 0deg));
  transition: transform 240ms cubic-bezier(0.22, 1, 0.36, 1), border-color 280ms ease, box-shadow 360ms ease;
}
.wf-slide[data-offset="0"] .wf-window {
  border-color: rgba(232, 196, 145, 0.42);
  box-shadow:
    0 38px 90px rgba(0, 0, 0, 0.72),
    0 0 56px rgba(232, 196, 145, 0.14),
    0 1px 0 rgba(255, 240, 210, 0.18) inset;
}
.wf-window-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  height: 36px;
  padding: 0 14px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02));
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}
.wf-dots {
  display: inline-flex;
  gap: 6px;
}
.wf-dots i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(232, 196, 145, 0.28);
}
.wf-slide[data-offset="0"] .wf-dots i:first-child {
  background: #f79767;
}
.wf-window-title {
  font-size: 11.5px;
  color: rgba(243, 240, 232, 0.72);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.wf-window-badge {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #e8c491;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(232, 196, 145, 0.12);
  border: 1px solid rgba(232, 196, 145, 0.25);
  white-space: nowrap;
}
.wf-window-media {
  display: block;
  position: relative;
  aspect-ratio: 16 / 10;
  background: #0f0d12;
}
.wf-window-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.wf-sheen {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 50%), rgba(232, 196, 145, 0.16), transparent 60%);
  transition: opacity 280ms ease;
}
.wf-slide[data-offset="0"] .wf-window:hover .wf-sheen {
  opacity: 1;
}

/* Floating Frosted-Glass Warm-Gold Light-Rail Dock */
.wf-dock-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.wf-dock {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(232, 196, 145, 0.22);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(14px);
}
.wf-dock-arrow,
.wf-dock-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 34px;
  min-width: 34px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid rgba(232, 196, 145, 0.22);
  background: rgba(255, 255, 255, 0.04);
  color: var(--paper);
  font-size: 12px;
  font-weight: 600;
  transition: background-color 180ms ease, border-color 180ms ease, color 180ms ease;
}
.wf-dock-arrow:hover,
.wf-dock-arrow:focus-visible,
.wf-dock-toggle:hover,
.wf-dock-toggle:focus-visible {
  background: #e8c491;
  border-color: #e8c491;
  color: #140f15;
}
.wf-dock-toggle {
  padding: 0 14px;
}
.wf-dock-nodes {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 4px;
}
.wf-dock-beam {
  position: absolute;
  left: 24px;
  right: 24px;
  bottom: 2px;
  height: 2px;
  background: rgba(232, 196, 145, 0.14);
  border-radius: 999px;
  overflow: hidden;
  pointer-events: none;
}
.wf-dock-beam b {
  display: block;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, #e8c491, #f79767);
  box-shadow: 0 0 12px rgba(247, 151, 103, 0.7);
  transform-origin: 0 50%;
  transform: scaleX(0);
  transition: transform 620ms cubic-bezier(0.22, 1, 0.36, 1);
}
.wf-node {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 36px;
  padding: 0 12px 2px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: transparent;
  color: rgba(243, 240, 232, 0.64);
  font-size: 12.5px;
  font-weight: 500;
  transition: color 200ms ease, background-color 200ms ease, border-color 200ms ease;
}
.wf-node i {
  font-style: normal;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: rgba(232, 196, 145, 0.62);
}
.wf-node:hover,
.wf-node:focus-visible {
  color: var(--paper);
  background: rgba(232, 196, 145, 0.09);
}
.wf-node.is-active {
  color: #140f15;
  background: linear-gradient(135deg, #f2d4a7, #e8c491);
  border-color: rgba(255, 255, 255, 0.25);
  font-weight: 700;
  box-shadow: 0 0 22px rgba(232, 196, 145, 0.35);
  overflow: hidden;
}
.wf-node.is-active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  background: linear-gradient(90deg, #b06a2e, #f1783d);
  transform-origin: 0 50%;
  transform: scaleX(0);
}
.wf-node.is-active.is-ticking::after {
  animation: wf-node-tick var(--wf-duration, 4800ms) linear forwards;
}
@keyframes wf-node-tick {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}
.wf-node.is-active i {
  color: #241b18;
}
.wf-dock-hint {
  font-size: 12px;
  color: rgba(243, 240, 232, 0.48);
  letter-spacing: 0.02em;
}
.wf-dock-hint [data-wf-counter] {
  color: #e8c491;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

@media (max-width: 1150px) {
  .wf-3d-viewport {
    height: clamp(440px, 54vw, 530px);
    margin-bottom: 32px;
  }
  .wf-slide {
    width: min(700px, 82vw);
  }
  .wf-slide[data-offset="-1"] {
    transform: translate3d(calc(-50% - 36%), -50%, -180px) rotateY(18deg) scale(0.8);
  }
  .wf-slide[data-offset="1"] {
    transform: translate3d(calc(-50% + 36%), -50%, -180px) rotateY(-18deg) scale(0.8);
  }
  .wf-dock {
    flex-wrap: wrap;
    justify-content: center;
    border-radius: 18px;
  }
  .wf-dock-beam {
    display: none;
  }
  .output-fan-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .desktop-pillars {
    grid-template-columns: 1fr;
  }
  .reading-progress {
    top: 64px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .wf-slide,
  .wf-window,
  .wf-dock-beam b,
  .wf-caption-item,
  .wf-cinema-glow {
    transition: none !important;
    animation: none !important;
  }
  .reading-progress,
  .section-head .eyebrow::after,
  .screen-link,
  .screen-link img,
  .scene-panel,
  .scene-indicator,
  .output-fan-4 .output-sheet,
  .canvas-map .canvas-node,
  .desktop-pillar,
  .feature-tile {
    transition: none !important;
    animation: none !important;
    transform: none !important;
  }
  .section-head .eyebrow::after {
    transform: scaleX(1) !important;
  }
}
