:root {
  --ink: #f2f0ea;
  --muted: #9b9b97;
  --graphite: #111214;
  --panel: #191b1e;
  --line: rgba(242, 240, 234, 0.16);
  --signal: #e4382c;
  --cyan: #63d8d3;
  --font-geist-sans: Arial, Helvetica, sans-serif;
  --font-geist-mono: "Courier New", Courier, monospace;
  --font-logo: 'Geist', 'Inter', sans-serif;
  --text-sm: 0.875rem;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background: var(--graphite);
  overflow-x: hidden;
}

body {
  margin: 0;
  background: var(--graphite);
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
  overflow-x: hidden;
}

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

button,
a {
  -webkit-tap-highlight-color: transparent;
}

::selection {
  background: var(--signal);
  color: white;
}

.site-header {
  position: fixed;
  z-index: 30;
  top: 0;
  left: 0;
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  padding: 22px 4vw;
  border-bottom: 1px solid rgba(242, 240, 234, 0.12);
  background: rgba(17, 18, 20, 0.83);
  backdrop-filter: blur(18px);
}

.site-logo {
  font-family: var(--font-logo);
  font-size: var(--text-sm);
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: lowercase;
  color: #b9b9b5;
  transition: color 180ms ease;
}

.site-logo:hover,
.site-logo:focus-visible {
  color: var(--signal);
}

.nav-logo {
  font-family: inherit;
  font-size: inherit;
  font-weight: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  color: inherit;
}

nav {
  display: flex;
  gap: clamp(18px, 3vw, 44px);
  color: #b9b9b5;
  font-family: var(--font-geist-mono), monospace;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

nav a,
footer a,
.text-link {
  transition: color 180ms ease;
}

nav a:hover,
nav a:focus-visible,
footer a:hover,
.text-link:hover {
  color: white;
}

nav a.active {
  color: var(--cyan);
}

nav a.active:hover {
  color: var(--cyan);
  opacity: 0.9;
}

.nav-ensayo-icon {
  display: none;
}

.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  overflow: hidden;
  padding: 98px 4vw 40px;
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(circle at 75% 42%, rgba(99, 216, 211, 0.08), transparent 22%),
    linear-gradient(135deg, #17191c 0%, #0e0f11 65%);
}

.hero-grid {
  position: absolute;
  inset: 0;
  opacity: 0.22;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.12) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.12) 1px, transparent 1px);
  background-size: 82px 82px;
  mask-image: linear-gradient(90deg, transparent, black 45%, black);
}

.hero-copy {
  position: relative;
  z-index: 3;
  max-width: min(65vw, 1200px);
}

.hero-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}

.hero-brand-acronym {
  font-family: var(--font-geist-mono), monospace;
  font-size: 12px;
  font-weight: 700;
  color: #f1f2ee;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  padding: 3px 8px;
  border-radius: 4px;
  letter-spacing: 0.08em;
}

.hero-brand-name {
  font-family: var(--font-geist-mono), monospace;
  font-size: 12px;
  color: #a8a9a3;
  letter-spacing: 0.03em;
}

.eyebrow,
.section-index,
.micro-label,
.quote-kicker {
  margin: 0 0 28px;
  color: var(--cyan);
  font-family: var(--font-geist-mono), monospace;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.hero h1 {
  max-width: 1100px;
  margin: 0;
  font-size: clamp(3.8rem, 7.2vw, 8.2rem);
  font-weight: 650;
  letter-spacing: -0.07em;
  line-height: 0.86;
}

.hero h1 span {
  display: block;
  color: #777974;
}

.hero-intro {
  max-width: 610px;
  margin: 28px 0 0;
  color: #c7c7c2;
  font-size: clamp(1rem, 1.45vw, 1.3rem);
  line-height: 1.6;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 30px;
  margin-top: 28px;
}

.button {
  display: inline-flex;
  min-height: 50px;
  align-items: center;
  justify-content: space-between;
  gap: 34px;
  padding: 0 20px;
  border: 0;
  border-radius: 0;
  font-family: var(--font-geist-mono), monospace;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.button-primary {
  background: var(--signal);
  color: white;
  transition: background 180ms ease, transform 180ms ease;
}

.button-primary:hover {
  background: #ff493b;
  transform: translateY(-2px);
}

.text-link {
  padding-bottom: 5px;
  border-bottom: 1px solid #555;
  color: #bdbdb8;
  font-family: var(--font-geist-mono), monospace;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-artwork {
  position: absolute;
  z-index: 2;
  right: 2vw;
  top: 50%;
  transform: translateY(-42%);
  width: min(38vw, 460px);
  min-height: 280px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-object {
  position: relative;
  z-index: 2;
  width: 82%;
  aspect-ratio: 1.4;
  transform: perspective(900px) rotateX(58deg) rotateZ(-30deg);
}

.object-label {
  position: absolute;
  top: -48px;
  right: 0;
  color: var(--cyan);
  font-family: var(--font-geist-mono), monospace;
  font-size: 10px;
  letter-spacing: 0.16em;
}

.amr-top {
  position: absolute;
  z-index: 3;
  top: 6%;
  left: 10%;
  display: flex;
  width: 80%;
  height: 60%;
  align-items: center;
  justify-content: center;
  gap: 9%;
  border: 1px solid #6c6f70;
  background: linear-gradient(135deg, #4a4e50, #24272a);
  box-shadow: inset 0 0 40px rgba(255, 255, 255, 0.05);
}

.amr-top span {
  width: 9%;
  aspect-ratio: 1;
  border: 1px solid var(--cyan);
  border-radius: 50%;
  box-shadow: 0 0 15px rgba(99, 216, 211, 0.38);
}

.amr-body {
  position: absolute;
  z-index: 2;
  top: 28%;
  left: 2%;
  width: 96%;
  height: 60%;
  border: 1px solid #4f5254;
  background: #202225;
  box-shadow: -20px 25px 40px rgba(0, 0, 0, 0.5);
}

.sensor {
  position: absolute;
  bottom: 12%;
  width: 5%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--signal);
  box-shadow: 0 0 20px var(--signal);
}

.sensor-left { left: 13%; }
.sensor-right { right: 13%; }

.amr-shadow {
  position: absolute;
  z-index: 0;
  inset: 28% -25% -30%;
  background: radial-gradient(ellipse, rgba(0, 0, 0, 0.7), transparent 68%);
}

.route {
  position: absolute;
  z-index: 1;
  border-top: 1px solid rgba(99, 216, 211, 0.45);
  transform-origin: left;
}

.route::after {
  position: absolute;
  top: -3px;
  right: 0;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 12px var(--cyan);
  content: "";
}

.route-a {
  top: 57%;
  right: 8%;
  width: 122%;
  transform: rotate(-21deg);
}

.route-b {
  bottom: 12%;
  left: -2%;
  width: 85%;
  transform: rotate(11deg);
}

.hero-caption {
  position: absolute;
  right: 4vw;
  bottom: 34px;
  max-width: 360px;
  margin: 0;
  color: #858681;
  font-family: var(--font-geist-mono), monospace;
  font-size: 10px;
  line-height: 1.6;
  text-align: right;
  text-transform: uppercase;
}

.section {
  padding: clamp(70px, 6.5vw, 100px) 4vw;
  border-bottom: 1px solid var(--line);
}

.manifesto {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) 4fr;
  gap: 6vw;
  background: #e9e6df;
  color: #17181a;
}

.manifesto .section-index,
.manifesto .quote-kicker {
  color: #b22b22;
}

.manifesto-content blockquote {
  margin: 0;
  font-size: clamp(3rem, 6.2vw, 7.3rem);
  font-weight: 640;
  letter-spacing: -0.065em;
  line-height: 0.95;
}

.quote-source {
  margin: 20px 0 32px;
  color: #74736e;
  font-family: var(--font-geist-mono), monospace;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.manifesto-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8vw;
  border-top: 1px solid rgba(23, 24, 26, 0.25);
  padding-top: 24px;
}

.manifesto-grid p {
  margin: 0;
  color: #555650;
  font-size: 17px;
  line-height: 1.75;
}

.manifesto-grid .lead {
  color: #1b1c1e;
  font-size: clamp(1.3rem, 2.1vw, 2rem);
  line-height: 1.35;
}

.shift {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 6vw;
  background: #141517;
}

.shift-before,
.shift-after {
  display: flex;
  flex-direction: column;
}

.shift h2 {
  max-width: 580px;
  margin: 0 0 60px;
  font-size: clamp(2rem, 3.4vw, 4rem);
  font-weight: 700;
  letter-spacing: -0.05em;
  line-height: 1;
}

.shift-before {
  color: #878884;
}

.shift-after h2 {
  color: white;
}

.shift-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--signal);
}

.shift-arrow svg {
  width: 65px;
  height: 18px;
  display: block;
}

.strain-chart {
  display: grid;
  gap: 15px;
  margin-top: auto;
}

.chart-row {
  display: grid;
  grid-template-columns: 110px 1fr;
  align-items: center;
  gap: 16px;
  color: #777874;
  font-family: var(--font-geist-mono), monospace;
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.chart-row i {
  display: block;
  width: var(--value);
  height: 5px;
  background: currentColor;
}

.shift-after .chart-row {
  color: var(--cyan);
}

.system {
  background: #0c0d0f;
}

.system-intro {
  max-width: 900px;
  margin-left: 17%;
}

.system-intro h2,
.applications-heading h2,
.visibility h2,
.ensayo h2,
.closing h2 {
  margin: 0;
  font-size: clamp(3.2rem, 6.2vw, 7.6rem);
  font-weight: 700;
  letter-spacing: -0.065em;
  line-height: 0.92;
}

.applications-heading > p,
.ensayo-panel > p {
  max-width: 620px;
  margin: 34px 0 0;
  color: #a9aaa6;
  font-size: 18px;
  line-height: 1.7;
}

.system-intro > p:last-child {
  max-width: 860px;
  margin: 34px 0 0;
  color: #a9aaa6;
  font-size: 18px;
  line-height: 1.7;
}

.boundary-map {
  position: relative;
  width: 100%;
  max-width: 1100px;
  height: auto;
  min-height: 520px;
  margin: 48px auto 0;
  border: 1px solid var(--line);
  background:
    radial-gradient(circle at 50% 50%, rgba(228, 56, 44, 0.08), transparent 45%),
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: auto, 40px 40px, 40px 40px;
  overflow: hidden;
}

.boundary-map svg {
  display: block;
  width: 100%;
  height: auto;
  max-height: 580px;
}

/* Radar Rings & Grid Lines */
.radar-circle {
  fill: none;
  stroke: var(--cyan);
  stroke-width: 1.8;
}

.opacity-10 { opacity: 0.28; }
.opacity-20 { opacity: 0.45; }

.radar-orbit {
  stroke: var(--signal);
  stroke-width: 2.2;
  stroke-dasharray: 6 6;
  opacity: 0.75;
  filter: drop-shadow(0 0 8px rgba(228, 56, 44, 0.5));
  animation: radarRotate 80s linear infinite;
  transform-origin: 450px 260px;
}

@keyframes radarRotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.radar-axis {
  stroke: rgba(242, 240, 234, 0.18);
  stroke-width: 1.2;
  stroke-dasharray: 3 4;
}

/* Outer Triangle & Vectors */
.triangle-dialogue {
  fill: none;
  stroke: var(--cyan);
  stroke-width: 1.5;
  stroke-dasharray: 6 6;
  opacity: 0.65;
}

.spoke-vector {
  stroke: var(--cyan);
  stroke-width: 1.5;
  opacity: 0.75;
}

/* Pulse animation along vectors */
.vector-pulse {
  fill: var(--cyan);
  filter: drop-shadow(0 0 6px var(--cyan));
}

/* Central Node (Robot - 3D Industrial Sphere) */
.core-sphere-3d {
  filter: drop-shadow(0 12px 20px rgba(0, 0, 0, 0.75));
}

.core-label-title {
  fill: #ffffff;
  font-family: var(--font-geist-sans), Arial, sans-serif;
  font-size: 16px;
  font-weight: 850;
  letter-spacing: 0.14em;
  text-anchor: middle;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.95));
}

.core-label-sub {
  fill: #ffffff;
  font-family: var(--font-geist-mono), monospace;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  opacity: 0.98;
  text-anchor: middle;
  filter: drop-shadow(0 1.5px 2px rgba(0, 0, 0, 0.95));
}

/* Outer Orbital Nodes */
.node-target-bg {
  fill: #0c0f12;
  stroke: var(--cyan);
  stroke-width: 1.8;
}

.node-target-dot {
  fill: var(--cyan);
}

/* Clean Orbital Node Labels (Without Rectangle Cards) */
.clean-node-title {
  fill: #ffffff;
  font-family: var(--font-geist-sans), Arial, sans-serif;
  font-size: 15px;
  font-weight: 750;
  letter-spacing: 0.14em;
  text-anchor: middle;
}

.clean-node-triad {
  fill: var(--cyan);
  font-family: var(--font-geist-mono), monospace;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-anchor: middle;
}

.triad-desktop {
  display: block;
}

.triad-mobile {
  display: none;
}

.layers {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  max-width: 1100px;
  margin: 32px auto 0;
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.layers article {
  min-height: 180px;
  padding: 24px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.layers article > span {
  color: var(--signal);
  font-family: var(--font-geist-mono), monospace;
  font-size: 11px;
}

.layers h3 {
  margin: 20px 0 12px;
  font-size: 24px;
  font-weight: 700;
}

.layers p {
  margin: 0;
  color: #92938f;
  line-height: 1.7;
}

.applications {
  background: #d9d5cc;
  color: #151618;
}

.applications .section-index {
  color: #b12d25;
}

.applications-heading {
  display: grid;
  grid-template-columns: 2fr 1fr;
  align-items: end;
  gap: 8vw;
}

.applications-heading > p {
  color: #5f605b;
}

.application-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-top: 92px;
}

.application-card {
  overflow: hidden;
  background: #17191b;
  color: var(--ink);
}

.card-visual {
  position: relative;
  height: 330px;
  overflow: hidden;
  background:
    linear-gradient(rgba(255, 255, 255, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.06) 1px, transparent 1px),
    linear-gradient(145deg, #292d30, #111315);
  background-size: 52px 52px, 52px 52px, auto;
}

.card-kind {
  position: absolute;
  top: 24px;
  left: 24px;
  color: var(--cyan);
  font-family: var(--font-geist-mono), monospace;
  font-size: 10px;
  letter-spacing: 0.14em;
}

.machine {
  position: absolute;
  z-index: 2;
  background: #4b5052;
  box-shadow: 0 30px 45px rgba(0, 0, 0, 0.5);
}

.machine-1 {
  right: 17%;
  bottom: 20%;
  width: 42%;
  height: 28%;
  border-top: 4px solid #808588;
  transform: skewY(-8deg);
}

.machine-1::after {
  position: absolute;
  right: 8%;
  bottom: 12%;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--signal);
  box-shadow: 0 0 16px var(--signal);
  content: "";
}

.machine-2 {
  right: 27%;
  bottom: 8%;
  width: 24px;
  height: 58%;
  transform: rotate(20deg);
  transform-origin: bottom;
}

.machine-2::before,
.machine-2::after {
  position: absolute;
  width: 24px;
  height: 76%;
  background: #656a6c;
  content: "";
  transform-origin: bottom;
}

.machine-2::before {
  top: -61%;
  transform: rotate(-55deg);
}

.machine-2::after {
  top: -114%;
  left: -47px;
  transform: rotate(58deg);
}

.movement-line {
  position: absolute;
  height: 1px;
  background: rgba(99, 216, 211, 0.65);
}

.line-one {
  right: 0;
  bottom: 28%;
  width: 80%;
  transform: rotate(-14deg);
}

.line-two {
  right: 8%;
  bottom: 16%;
  width: 42%;
  transform: rotate(8deg);
}

.card-copy {
  padding: 34px;
}

.card-copy h3 {
  margin: 0 0 12px;
  font-size: clamp(2rem, 3vw, 3.5rem);
  font-weight: 700;
  letter-spacing: -0.045em;
}

.card-copy > p:not(.micro-label) {
  min-height: 60px;
  margin: 0;
  color: #a5a6a2;
  line-height: 1.7;
}

.card-tech-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 16px;
  padding: 4px 10px;
  border-radius: 4px;
  font-family: var(--font-geist-mono), monospace;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #f1f2ee;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  text-decoration: none;
  transition: all 180ms ease;
  width: fit-content;
}

.card-tech-link:hover {
  color: #ffffff;
  background: rgba(99, 216, 211, 0.12);
  border-color: var(--cyan);
  transform: translateY(-1px);
}

.card-tech-link .tech-link-arrow {
  color: var(--cyan);
  font-size: 12px;
  line-height: 1;
  transition: transform 180ms ease;
}

.card-tech-link:hover .tech-link-arrow {
  transform: translate(2px, -2px);
}

.card-copy strong {
  display: block;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  color: white;
  font-size: 15px;
}

.visibility {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 9vw;
  background: var(--signal);
}

.visibility .section-index {
  color: rgba(255, 255, 255, 0.68);
}

.visibility-list {
  align-self: end;
  border-top: 1px solid rgba(255, 255, 255, 0.35);
}

.visibility-list div {
  display: grid;
  grid-template-columns: 50px 1fr;
  gap: 20px;
  padding: 24px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.35);
}

.visibility-list span {
  font-family: var(--font-geist-mono), monospace;
  font-size: 11px;
}

.visibility-list p {
  margin: 0;
  font-size: 17px;
  line-height: 1.55;
}

.ensayo {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 6vw;
  align-items: center;
  background: #0f1113;
}

.ensayo-panel h2 {
  max-width: 850px;
}

.ensayo-panel .button-primary {
  margin-top: 38px;
}

.ensayo-artwork {
  position: relative;
  width: 100%;
  max-width: 420px;
  min-height: 280px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ensayo-amr-object {
  position: relative;
  width: 100%;
  aspect-ratio: 1.4;
  transform: perspective(900px) rotateX(58deg) rotateZ(-30deg);
  transform-style: preserve-3d;
  transition: transform 600ms cubic-bezier(0.16, 1, 0.3, 1);
}

.ensayo-artwork:hover .ensayo-amr-object {
  transform: perspective(900px) rotateX(54deg) rotateZ(-26deg) translateY(-8px);
}

.ensayo-route {
  position: absolute;
  z-index: 0;
  border-top: 1px solid rgba(99, 216, 211, 0.45);
  pointer-events: none;
}

.route-ensayo-a {
  top: 12%;
  right: -8%;
  width: 65%;
  transform: rotate(-21deg);
}

.route-ensayo-b {
  bottom: 14%;
  left: -32%;
  width: 82%;
  transform: rotate(-21deg);
  opacity: 0.75;
}

.amr-top-grey {
  position: absolute;
  z-index: 3;
  top: 4%;
  left: 14%;
  display: flex;
  width: 80%;
  height: 60%;
  align-items: center;
  justify-content: flex-end;
  padding-right: 12%;
  gap: 10%;
  border: 1px solid #75797c;
  background: linear-gradient(135deg, #4d5256 0%, #282c2f 60%, #15181a 100%);
  box-shadow: inset 0 0 35px rgba(255, 255, 255, 0.12), 0 10px 22px rgba(0, 0, 0, 0.65), 0 0 15px rgba(99, 216, 211, 0.2);
  transform: translateZ(12px);
}

.amr-top-grey span {
  width: 9%;
  aspect-ratio: 1;
  border: 1px solid rgba(228, 56, 44, 0.55);
  border-radius: 50%;
  background: radial-gradient(circle, #b82e23 35%, #6a140d 100%);
  box-shadow: 0 0 8px rgba(184, 46, 35, 0.45), inset 0 0 2px rgba(0, 0, 0, 0.6);
}

.amr-body-red {
  position: absolute;
  z-index: 2;
  top: 28%;
  left: 2%;
  width: 96%;
  height: 60%;
  border: 1px solid #c8281c;
  background: linear-gradient(135deg, #a81a10 0%, #610a04 60%, #300301 100%);
  box-shadow: -20px 25px 45px rgba(0, 0, 0, 0.8), 0 0 35px rgba(228, 56, 44, 0.35);
}

.amr-body-red .sensor {
  background: #ffffff;
  box-shadow: 0 0 20px #ffffff, 0 0 10px var(--cyan);
}

.amr-shadow-red {
  position: absolute;
  z-index: 0;
  inset: 28% -25% -30%;
  background: radial-gradient(ellipse, rgba(228, 56, 44, 0.3) 0%, rgba(0, 0, 0, 0.85) 45%, transparent 70%);
}

.download-toast {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 1000;
  background: #111315;
  border: 1px solid var(--signal);
  padding: 16px 22px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.85);
  color: #ffffff;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 300ms ease, transform 300ms ease;
  pointer-events: none;
}

.download-toast.show {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.toast-content {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.toast-status {
  font-family: var(--font-geist-mono), monospace;
  font-size: 10px;
  letter-spacing: 0.16em;
  color: var(--signal);
}

.toast-content strong {
  font-size: 14px;
  color: #ffffff;
}

.toast-content p {
  margin: 0;
  font-size: 12px;
  color: #a0a29e;
}

.closing {
  min-height: 60svh;
  padding: clamp(70px, 6.5vw, 100px) 4vw;
  background:
    radial-gradient(circle at 75% 50%, rgba(99, 216, 211, 0.07), transparent 28%),
    #090a0c;
}

.closing > p:first-child {
  margin: 0 0 12px;
  color: #7e807c;
  font-size: clamp(2rem, 4vw, 4.5rem);
  font-weight: 700;
  letter-spacing: -0.05em;
}

.closing h2 {
  color: var(--cyan);
  font-size: clamp(5rem, 13vw, 15rem);
}

.closing-text {
  max-width: 690px;
  margin: 60px 0 0 auto;
  color: #b8b9b4;
  font-size: clamp(1.25rem, 2vw, 1.9rem);
  line-height: 1.5;
}

.footer-custom {
  position: relative;
  background: rgba(255, 255, 255, 0.025);
  border-top: 1px solid var(--line);
  padding: 22px 4vw 32px 4vw;
}

.footer-container {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.footer-top {
  display: flex;
  align-items: center;
}

.footer-quote {
  margin: 0;
  color: #d4d5d0;
  font-size: clamp(1rem, 1.4vw, 1.25rem);
  font-family: var(--font-geist-sans), sans-serif;
  line-height: 1.5;
}

.footer-middle {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-right: 60px; /* Dejar espacio para el botón de scroll */
}

.footer-brand {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}

.footer-subtitle {
  margin: 0;
  color: #858681;
  font-size: 13px;
  line-height: 1.4;
  font-family: var(--font-geist-mono), monospace;
  letter-spacing: 0.03em;
}

.footer-social {
  display: flex;
  align-items: center;
  gap: 12px;
}

.footer-social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.02);
  color: #bebfba;
  transition: all 180ms ease;
}

.footer-social-link:hover {
  color: var(--cyan);
  border-color: var(--cyan);
  background: rgba(99, 216, 211, 0.08);
  transform: translateY(-1px);
}

.footer-copyright {
  margin: 0;
  color: #727470;
  font-size: 12px;
  line-height: 1.4;
  font-family: var(--font-geist-mono), monospace;
}

/* Botón flotante para subir al inicio */
.scroll-top-btn {
  position: absolute;
  right: 18px;
  bottom: 30px;
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #121418;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 4px;
  color: #b9b9b5;
  cursor: pointer;
  transition: all 180ms ease;
  z-index: 10;
}

.scroll-top-btn:hover {
  color: #ffffff;
  border-color: var(--cyan);
  background: rgba(99, 216, 211, 0.12);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.scroll-top-btn:active {
  transform: translateY(0);
}

@media (max-width: 900px) {
  nav a:nth-child(2),
  nav a:nth-child(3) {
    display: none;
  }

  .hero {
    min-height: auto;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    padding: 105px 4vw 48px;
  }

  .hero-copy {
    max-width: 100%;
  }

  .hero-artwork {
    position: relative;
    inset: auto;
    transform: none;
    width: min(340px, 82vw);
    min-height: auto;
    margin: 36px auto 0;
    align-self: center;
  }

  .hero-object {
    position: relative;
    inset: auto;
    width: 80%;
    transform: perspective(700px) rotateX(52deg) rotateZ(-28deg);
  }

  .route-a {
    top: 48%;
    right: 4%;
    width: 122%;
  }

  .route-b {
    bottom: 12%;
    left: -8%;
    width: 95%;
  }

  .hero-caption {
    position: relative;
    right: auto;
    bottom: auto;
    max-width: 320px;
    margin: 20px auto 0;
    text-align: center;
  }

  .manifesto,
  .applications-heading,
  .visibility,
  .ensayo {
    grid-template-columns: 1fr;
  }

  .manifesto .section-index {
    margin-bottom: 0;
  }

  .system-intro {
    margin-left: 0;
  }

  .visibility-list {
    margin-top: 30px;
  }

  .ensayo-cover {
    width: min(520px, 86vw);
    min-height: 640px;
    margin: 30px auto 0;
  }

  footer {
    grid-template-columns: 1fr 1fr;
  }

  footer a {
    justify-self: end;
  }
}

@media (max-width: 640px) {
  .site-header {
    padding: 18px 20px;
  }

  .brand span:last-child {
    display: none;
  }

  nav {
    gap: 18px;
  }

  nav a {
    display: none;
  }

  nav a.nav-ensayo-link,
  nav a:last-child {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 100px;
    background: rgba(228, 56, 44, 0.12);
    border: 1px solid rgba(228, 56, 44, 0.42);
    color: #f1f2ee;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    transition: all 180ms ease;
  }

  nav a.nav-ensayo-link:hover,
  nav a.nav-ensayo-link:active {
    background: rgba(228, 56, 44, 0.28);
    border-color: rgba(228, 56, 44, 0.8);
    color: #ffffff;
  }

  nav a.nav-ensayo-link.active {
    background: rgba(99, 216, 211, 0.16);
    border-color: rgba(99, 216, 211, 0.62);
    color: var(--cyan);
  }

  nav a.nav-ensayo-link.active .nav-ensayo-icon {
    color: var(--cyan);
  }

  .nav-ensayo-icon {
    display: inline-block;
    width: 18px;
    height: 18px;
    color: var(--signal);
    flex-shrink: 0;
  }

  .hero {
    min-height: auto;
    padding: 96px 20px 36px;
  }

  .hero h1 {
    font-size: clamp(3rem, 16vw, 4.8rem);
  }

  .hero-intro {
    margin-top: 24px;
  }

  .hero-actions {
    align-items: flex-start;
    flex-direction: column;
  }

  .hero-artwork {
    width: min(280px, 85vw);
    margin: 28px auto 0;
  }

  .hero-caption {
    display: none;
  }

  .section {
    padding: 82px 20px;
  }

  .manifesto,
  .shift {
    display: block;
  }

  .manifesto-content blockquote {
    font-size: 3.25rem;
  }

  .quote-source {
    margin-bottom: 60px;
  }

  .manifesto-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .shift-arrow {
    justify-content: center;
    padding: 36px 0;
    transform: rotate(90deg);
  }

  .triad-desktop {
    display: none;
  }

  .triad-mobile {
    display: block;
  }

  .boundary-map {
    min-height: auto;
    margin-top: 24px;
    margin-bottom: 60px;
    border: none;
    background: transparent;
    overflow: visible;
    padding: 36px 0;
  }

  .boundary-map svg {
    display: block;
    width: 100%;
    height: auto;
    max-height: none;
    overflow: visible;
    transform: scale(1.52);
    transform-origin: 50% 42%;
  }

  .clean-node-title {
    font-size: 18px;
    font-weight: 900;
  }

  .clean-node-triad {
    font-size: 15px;
    font-weight: 700;
  }

  .layers {
    grid-template-columns: 1fr;
    margin-top: 20px;
  }

  .layers article {
    min-height: auto;
    padding: 16px 18px;
  }

  .layers h3 {
    margin: 8px 0 6px;
    font-size: 20px;
  }

  .layers p {
    font-size: 14px;
    line-height: 1.5;
  }

  .applications-heading h2,
  .system-intro h2,
  .visibility h2,
  .ensayo h2 {
    font-size: 3.3rem;
  }

  .application-grid {
    grid-template-columns: 1fr;
    margin-top: 60px;
  }

  .card-visual {
    height: 250px;
  }

  .card-copy > p:not(.micro-label) {
    min-height: 0;
  }

  .ensayo-cover {
    min-height: 500px;
    padding: 26px;
  }

  .closing {
    min-height: auto;
    padding: 110px 20px;
  }

  .closing > p:first-child {
    line-height: 1.12;
    margin-bottom: 24px;
  }

  .closing-text {
    margin-top: 44px;
  }

  .footer-custom {
    padding: 20px 20px 65px 20px;
  }

  .footer-middle {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
    padding-right: 0;
  }

  .scroll-top-btn {
    right: 18px;
    bottom: 20px;
  }
}

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

  * {
    transition-duration: 0.01ms !important;
  }
}

/* ==========================================
   MODAL DE CONTACTO
   ========================================== */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(8, 10, 14, 0.82);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 250ms ease, visibility 250ms ease;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal-container {
  background: #111419;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 10px;
  width: 100%;
  max-width: 500px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 28px 30px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
  transform: translateY(12px) scale(0.98);
  transition: transform 250ms ease;
}

.modal-overlay.active .modal-container {
  transform: translateY(0) scale(1);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.modal-header h3 {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 500;
  color: #f1f2ee;
  letter-spacing: -0.01em;
}

.close-button {
  background: transparent;
  border: none;
  color: #8a8c85;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  padding: 2px 6px;
  transition: color 150ms ease;
}

.close-button:hover {
  color: #f1f2ee;
}

.modal-context {
  margin: 0 0 22px 0;
  color: #92948e;
  font-size: 0.88rem;
  line-height: 1.5;
}

.php-email-form-modal {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-size: 0.78rem;
  font-family: var(--font-geist-mono), monospace;
  color: #bebfba;
  letter-spacing: 0.02em;
}

.form-group input,
.form-group textarea {
  width: 100%;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  padding: 10px 14px;
  color: #f1f2ee;
  font-size: 0.9rem;
  font-family: inherit;
  transition: border-color 150ms ease, background-color 150ms ease;
  outline: none;
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--cyan);
  background: rgba(99, 216, 211, 0.03);
}

.form-group textarea {
  resize: vertical;
  min-height: 85px;
}

.form-status .loading,
.form-status .error-message,
.form-status .sent-message {
  display: none;
  font-size: 0.85rem;
  border-radius: 6px;
  padding: 10px 14px;
  margin-bottom: 8px;
}

.form-status .loading {
  color: var(--cyan);
  background: rgba(99, 216, 211, 0.08);
  border: 1px solid rgba(99, 216, 211, 0.2);
}

.form-status .error-message {
  color: #ff6b6b;
  background: rgba(255, 107, 107, 0.08);
  border: 1px solid rgba(255, 107, 107, 0.2);
}

.form-status .sent-message {
  color: #72ec93;
  background: rgba(114, 236, 147, 0.08);
  border: 1px solid rgba(114, 236, 147, 0.2);
  font-family: var(--font-geist-mono), monospace;
  font-size: 0.82rem;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 6px;
}

.form-actions .btn-primary {
  background: var(--cyan);
  color: #0c0f12;
  font-weight: 600;
  font-size: 0.88rem;
  padding: 10px 20px;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  transition: all 180ms ease;
  font-family: var(--font-geist-mono), monospace;
}

.form-actions .btn-primary:hover {
  background: #7be1dc;
  transform: translateY(-1px);
}
