/* =========================================================
   La evolución del internet  ·  versión 2
   Cada época se ve como se veía el internet en su tiempo.
   ========================================================= */

:root {
  --f-head: "Bricolage Grotesque", "Trebuchet MS", system-ui, sans-serif;
  --f-body: "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-mono: "IBM Plex Mono", ui-monospace, Menlo, Consolas, monospace;
  --f-crt: "VT323", "IBM Plex Mono", monospace;

  --amber: #FFB000;
  --amber-soft: #FFD27A;
  --crt: #120B02;
  --rail-w: 76px;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--crt);
  color: #fff;
  font-family: var(--f-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  font-optical-sizing: auto;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; }
button, input, select { font: inherit; }
:focus-visible { outline: 3px solid currentColor; outline-offset: 3px; }
::selection { background: var(--amber); color: var(--crt); }
.era ::selection { background: var(--accent); color: var(--sel, #fff); }

.sr-only {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip {
  position: absolute; left: -999px; top: 0; z-index: 100;
  background: #fff; color: #000; padding: .6rem 1rem;
}
.skip:focus { left: 0; }

/* ---------- Riel de años ---------- */
.rail {
  position: fixed; z-index: 60; display: flex;
  font-family: var(--f-mono); font-size: .8rem;
}
.rail a {
  position: relative; text-decoration: none; color: inherit;
  padding: .5rem .75rem; white-space: nowrap;
}
.rail a::before { content: ""; position: absolute; background: currentColor; opacity: .45; }

@media (min-width: 1024px) {
  body { padding-left: var(--rail-w); }
  .rail {
    left: 0; top: 0; bottom: 0; width: var(--rail-w);
    flex-direction: column; justify-content: center; align-items: flex-start;
    color: #fff; mix-blend-mode: difference;
  }
  .rail a { padding-left: 1.9rem; }
  .rail a::before {
    left: .5rem; top: 50%; width: .6rem; height: 2px;
    transition: width .25s, opacity .25s;
  }
  .rail a[aria-current="true"]::before { width: 1.1rem; opacity: 1; }
  .rail a[aria-current="true"] { font-weight: 500; }
}
@media (max-width: 1023.98px) {
  body { padding-bottom: 3rem; }
  .rail {
    left: 0; right: 0; bottom: 0; overflow-x: auto; scrollbar-width: none;
    background: rgba(18, 11, 2, .95); color: var(--amber-soft);
    border-top: 1px solid rgba(255, 176, 0, .35); padding: 0 .5rem;
  }
  .rail::-webkit-scrollbar { display: none; }
  .rail a { padding: .8rem .8rem; }
  .rail a::before {
    left: .8rem; right: .8rem; bottom: .3rem; height: 2px;
    transform: scaleX(0); transform-origin: left; transition: transform .25s;
  }
  .rail a[aria-current="true"]::before { transform: scaleX(1); opacity: 1; }
}

/* ---------- Portada: la "LO" de 1969 ---------- */
.hero {
  position: relative; isolation: isolate; overflow: hidden;
  min-height: 100vh; min-height: 100svh;
  display: flex; align-items: center;
  padding: 5rem clamp(1.25rem, 5vw, 4rem);
  background: var(--crt); color: var(--amber);
}
.hero__bg {
  position: absolute; top: 0; right: 0; bottom: 0; width: 100%; z-index: -3;
  background: url("../images/hero.jpg") 30% center / cover no-repeat;
  opacity: .3;
}
@media (min-width: 900px) {
  .hero__bg {
    width: 60%; opacity: .95; background-position: 28% center;
    -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 40%);
    mask-image: linear-gradient(90deg, transparent 0, #000 40%);
  }
}
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -2;
  background:
    radial-gradient(ellipse at 25% 45%, rgba(255, 176, 0, .14), transparent 60%),
    linear-gradient(180deg, rgba(18, 11, 2, .15), transparent 30%, var(--crt) 99%);
}
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: repeating-linear-gradient(0deg, rgba(0, 0, 0, .2) 0 1px, transparent 1px 3px);
}
.hero__inner { width: 100%; max-width: 44rem; }

.hero__log {
  max-width: 36rem; margin: 0 0 1rem;
  font-family: var(--f-mono); font-size: clamp(.88rem, 1.5vw, 1rem); line-height: 1.55;
  color: var(--amber-soft);
}
.hero__type {
  display: flex; align-items: flex-end; margin: 0;
  font-family: var(--f-crt); font-size: clamp(6rem, 19vw, 13rem); line-height: .85;
  text-shadow: 0 0 .12em rgba(255, 176, 0, .7), 0 0 .5em rgba(255, 176, 0, .3);
}
.caret {
  display: inline-block; width: .42em; height: .72em; margin-left: .06em;
  background: currentColor; animation: blink 1s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

.hero__status {
  max-width: 34rem; margin: 1.25rem 0 2rem; min-height: 4.5rem;
  font-family: var(--f-mono); font-size: clamp(.92rem, 1.5vw, 1.02rem); line-height: 1.55;
}
.hero__status p { margin: 0 0 .4rem; transition: opacity .5s; }

.hero__title { transition: opacity .9s, transform .9s; }
.hero__title h1 {
  max-width: 9.5em; margin: 0 0 1.1rem; color: #FFE7B3; text-wrap: balance;
  font-family: var(--f-head); font-weight: 800; font-variation-settings: "wdth" 80;
  letter-spacing: -.015em; font-size: clamp(2.7rem, 7vw, 5.6rem); line-height: .95;
}
.hero__title p { max-width: 30rem; margin: 0 0 1.75rem; font-size: 1.15rem; color: #F1DDB0; text-wrap: pretty; }

.hero__title .hero__by {
  margin: 1.75rem 0 0; font-family: var(--f-mono); font-size: .85rem; color: var(--amber-soft); opacity: .85;
}

/* Estado "escribiendo" (solo con JavaScript activo) */
.js .hero--typing #typed:not(.is-typing) { visibility: hidden; }
.js .hero--typing .hero__status p { opacity: 0; }
.js .hero--typing .hero__status p.is-on { opacity: 1; }
.js .hero--typing .hero__title { opacity: 0; transform: translateY(10px); pointer-events: none; }

.btn-amber {
  display: inline-block; padding: .85rem 1.4rem; border-radius: 4px;
  background: var(--amber); color: var(--crt); font-weight: 700; text-decoration: none;
  transition: background .2s, box-shadow .2s;
}
.btn-amber:hover { background: #FFC53D; box-shadow: 0 0 24px rgba(255, 176, 0, .5); }

/* ---------- Cifras ---------- */
.stats {
  background: var(--crt); color: #F1DDB0;
  padding: clamp(3rem, 8vw, 7rem) clamp(1.25rem, 5vw, 4rem);
}
.stats__text {
  max-width: 22em; margin: 0 0 1.5rem;
  font-family: var(--f-head); font-weight: 600; text-wrap: pretty;
  font-size: clamp(1.6rem, 3.6vw, 3rem); line-height: 1.2; letter-spacing: -.01em;
}
.stats__text b {
  font-family: var(--f-crt); font-weight: 400; color: var(--amber);
  font-size: 1.35em; line-height: 1; font-variant-numeric: tabular-nums;
  text-shadow: 0 0 .4em rgba(255, 176, 0, .45);
}
.stats__note { margin: 0; font-family: var(--f-mono); font-size: .8rem; opacity: .7; }

/* ---------- Base de cada época ---------- */
.era {
  position: relative;
  padding: clamp(4.5rem, 10vw, 9rem) clamp(1.25rem, 5vw, 4rem);
  background: var(--bg); color: var(--fg); font-family: var(--era-font);
}
.era__inner {
  position: relative; max-width: 74rem; margin: 0 auto;
  display: grid; gap: clamp(2rem, 5vw, 4.5rem); align-items: center;
}
@media (min-width: 900px) {
  .era__inner { grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr); }
  .era--flip .era__fig { order: -1; }
}
.era__text { max-width: 37rem; }
.era__text p { margin: 0 0 1rem; text-wrap: pretty; }
.era h2 { margin: 0 0 1.1rem; font-family: var(--era-head); text-wrap: balance; }
.era__year { margin: 0 0 .5rem; line-height: 1; }

.era__fig { margin: 0; }
.era__fig figcaption { max-width: 32rem; margin-top: .8rem; font-size: .85rem; line-height: 1.5; opacity: .85; }
.frame {
  position: relative; aspect-ratio: 1024 / 559; overflow: hidden;
  background: var(--frame-bg, linear-gradient(135deg, var(--accent), var(--bg)));
}
.frame img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.is-missing img { display: none; }

/* ---------- 1969: terminal ámbar ---------- */
.era--1969 {
  --bg: #120B02; --fg: #F1DDB0; --accent: #FFB000; --line: rgba(255, 176, 0, .4); --sel: #120B02;
  --era-font: var(--f-mono); --era-head: var(--f-crt);
  --frame-bg: radial-gradient(circle at 50% 50%, #3a2300, #120B02);
  border-top: 1px solid var(--line);
}
.era--1969::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: repeating-linear-gradient(0deg, rgba(0, 0, 0, .14) 0 1px, transparent 1px 3px);
}
.era--1969 h2 {
  font-weight: 400; font-size: clamp(2.4rem, 5vw, 3.8rem); line-height: 1;
  color: var(--accent); text-shadow: 0 0 .35em rgba(255, 176, 0, .4);
}
.era--1969 .era__year {
  font-family: var(--f-crt); font-size: clamp(4.5rem, 11vw, 8rem); line-height: .8;
  color: var(--accent); margin-bottom: 1rem;
  text-shadow: 0 0 .3em rgba(255, 176, 0, .35);
}
.era--1969 .frame { border: 1px solid var(--line); box-shadow: 0 0 50px rgba(255, 176, 0, .15); }
.era--1969 .frame img { filter: sepia(.6) saturate(1.25) contrast(1.05) brightness(.95); }
.era--1969 .frame::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(ellipse at center, transparent 55%, rgba(18, 11, 2, .6));
}

.nodes {
  display: grid; gap: 1rem; margin-top: 1.5rem; padding: 1rem;
  border: 1px solid var(--line); background: rgba(255, 176, 0, .03);
}
@media (min-width: 560px) { .nodes { grid-template-columns: minmax(0, 1fr) minmax(0, .9fr); align-items: center; } }
.nodes__svg { width: 100%; height: auto; }
.link { stroke: var(--line); stroke-width: 2; }
.link--first { stroke: var(--accent); stroke-dasharray: 6 6; animation: dash 1s linear infinite; }
@keyframes dash { to { stroke-dashoffset: -12; } }
.node { cursor: pointer; }
.node circle { fill: var(--bg); stroke: var(--accent); stroke-width: 2.5; transition: fill .2s; }
.node text { fill: var(--fg); font-family: var(--f-mono); font-size: 15px; }
.node:hover circle, .node.is-on circle { fill: var(--accent); }
.node:focus-visible { outline: none; }
.node:focus-visible circle { stroke-width: 6; }
.nodes__out { margin: 0; min-height: 7.5rem; font-size: .95rem; line-height: 1.55; }
.nodes__out strong {
  display: block; margin-bottom: .3rem;
  font-family: var(--f-crt); font-weight: 400; font-size: 1.55rem; line-height: 1.1; color: var(--accent);
}

/* ---------- 1971–1983: papel continuo verde ---------- */
.era--1971 {
  --bg: #DCEAD3; --fg: #1B2A19; --accent: #2F6B2A; --line: rgba(27, 42, 25, .4);
  --era-font: "Courier Prime", "IBM Plex Mono", monospace;
  --era-head: "Courier Prime", "IBM Plex Mono", monospace;
  --frame-bg: linear-gradient(#EAF3E4, #CFE2C5);
  background-image: repeating-linear-gradient(0deg, #E9F3E3 0 1.75rem, #D2E4C8 1.75rem 3.5rem);
  padding-inline: clamp(3.4rem, 7vw, 6rem);
}
.era--1971::before, .era--1971::after {
  content: ""; position: absolute; top: 0; bottom: 0; width: 30px;
  background:
    radial-gradient(circle, rgba(27, 42, 25, .4) 5px, transparent 6px) center 0 / 30px 34px repeat-y,
    #EEF6E9;
}
.era--1971::before { left: 0; border-right: 1px dashed var(--line); }
.era--1971::after { right: 0; border-left: 1px dashed var(--line); }
.era--1971 .era__text { font-size: 1.05rem; }
.era--1971 h2 {
  font-weight: 700; font-size: clamp(1.9rem, 4vw, 3rem); line-height: 1.1;
  padding-bottom: .5rem; border-bottom: 4px double var(--fg);
}
.era--1971 .era__year {
  display: inline-block; padding: .2rem .7rem; margin-bottom: 1rem;
  background: var(--fg); color: #DCEAD3; font-weight: 700; font-size: 1rem;
}
.era--1971 .era__fig { position: relative; }
.era--1971 .era__fig::before {
  content: ""; position: absolute; z-index: 2; top: -13px; left: 50%;
  width: 7rem; height: 1.8rem; transform: translateX(-50%) rotate(2deg);
  background: rgba(255, 236, 150, .82); box-shadow: 0 1px 3px rgba(0, 0, 0, .25);
}
.era--1971 .frame {
  border: 10px solid #fff; box-shadow: 0 8px 22px rgba(27, 42, 25, .3);
  transform: rotate(-1.2deg);
}

.mail { margin: 1.25rem 0; padding: 1rem; background: #fff; border: 1px dashed var(--fg); }
.mail__row { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: .6rem; align-items: end; }
.mail label { display: grid; gap: .25rem; font-size: .9rem; }
.mail input {
  width: 100%; padding: .55rem .7rem; border: 1px solid var(--fg);
  background: #FBFEF9; color: var(--fg); font-family: inherit;
}
.mail__at { font-size: 2rem; font-weight: 700; line-height: 1.4; }
.era__text .mail__result { margin: .9rem 0 0; }
.mail output { display: inline-block; font-size: 1.3rem; font-weight: 700; word-break: break-all; }

/* ---------- 1991: navegador sin estilos ---------- */
.era--1991 {
  --bg: #fff; --fg: #000; --accent: #0000EE; --line: #000;
  --era-font: "Tinos", "Times New Roman", Times, serif; --era-head: "Tinos", "Times New Roman", Times, serif;
  --frame-bg: #c0c0c0;
}
.era--1991 .era__text { font-size: 1.2rem; line-height: 1.4; }
.era--1991 h2 { font-size: 2.2rem; font-weight: 700; line-height: 1.15; margin: .6rem 0; }
.era--1991 a { color: #0000EE; }
.era--1991 a:visited { color: #551A8B; }
.era--1991 ul { margin: 0 0 1rem; padding-left: 2rem; }
.era--1991 li { margin-bottom: .4rem; }
.era--1991 hr { border: 0; border-top: 1px solid #808080; border-bottom: 1px solid #fff; margin: 1.2rem 0; }
.era--1991 .frame { border: 2px solid #000; }
.era--1991 .frame img { filter: saturate(.85) contrast(1.03); }
.era__text .url {
  margin: 0 0 1rem; padding: .25rem .6rem; background: #eee; border: 2px inset #ccc;
  font-family: "Courier New", monospace; font-size: .9rem; word-break: break-all;
}

/* ---------- 1995: ventanas con relieve ---------- */
.era--1995 {
  --bg: #008080; --fg: #000; --accent: #000080; --line: #808080;
  --era-font: Tahoma, "Noto Sans", Verdana, "Segoe UI", Arial, sans-serif;
  --era-head: Tahoma, "Noto Sans", Verdana, Arial, sans-serif;
  --frame-bg: repeating-conic-gradient(#d9d9d9 0 25%, #fff 0 50%) 0 0 / 20px 20px;
}
.era--1995 .era__text { max-width: none; }
.era--1995 figcaption { color: #fff; opacity: 1; }
.win {
  padding: 3px; background: #C0C0C0; color: #000;
  border: 2px solid; border-color: #fff #404040 #404040 #fff;
  box-shadow: inset -1px -1px #808080, inset 1px 1px #dfdfdf, 6px 6px 0 rgba(0, 0, 0, .3);
}
.win__bar {
  display: flex; align-items: center; justify-content: space-between; gap: .5rem;
  padding: 3px 4px; background: linear-gradient(90deg, #000080, #1084D0);
  color: #fff; font-weight: 700; font-size: .9rem;
}
.win__btns { display: flex; gap: 2px; }
.win__btn {
  display: grid; place-items: center; width: 22px; height: 20px; padding: 0;
  background: #C0C0C0; color: #000; font-size: 12px; line-height: 1;
  border: 2px solid; border-color: #fff #404040 #404040 #fff;
}
button.win__btn { cursor: pointer; }
.win__body { padding: 1rem 1.1rem 1.2rem; }
.win__body[hidden] { display: none; }
.era--1995 h2 { margin: 0 0 .75rem; font-size: 1.6rem; line-height: 1.2; }
.sunken {
  padding: 3px; background: #fff; color: #000;
  border: 2px solid; border-color: #808080 #fff #fff #808080;
}
.era--1995 .frame { background: var(--frame-bg); }
.bevel-btn {
  padding: .45rem 1rem; background: #C0C0C0; color: #000; cursor: pointer;
  border: 2px solid; border-color: #fff #404040 #404040 #fff;
  box-shadow: inset -1px -1px #808080;
}
.bevel-btn:active { border-color: #404040 #fff #fff #404040; }
.bevel-btn:disabled { color: #808080; cursor: default; }
.dl { display: grid; gap: .6rem; margin-top: .5rem; }
.dl select { width: 100%; padding: .4rem; }
.dl__bar { height: 24px; }
.dl__fill { width: 0; height: 100%; background: repeating-linear-gradient(90deg, #000080 0 10px, transparent 10px 12px); }
.era__text .dl p { margin: 0; font-size: .95rem; }

/* ---------- 2000: la burbuja ---------- */
.era--2000 {
  --bg: #F4F5F7; --fg: #0F1115; --accent: #D90429; --line: #C9CDD4; --blue: #1D4ED8;
  --era-font: var(--f-body); --era-head: var(--f-head);
  --frame-bg: linear-gradient(160deg, #cfd8e6, #7d8aa0);
}
.era--2000 h2 {
  font-weight: 800; font-variation-settings: "wdth" 85;
  font-size: clamp(2.1rem, 4.8vw, 3.6rem); line-height: 1; letter-spacing: -.02em;
}
.era--2000 .era__year {
  font-family: var(--f-head); font-weight: 800; font-variation-settings: "wdth" 75; letter-spacing: -.03em;
  font-size: clamp(5rem, 13vw, 10rem); line-height: .8; color: var(--accent); margin-bottom: 1rem;
}
.era--2000 .frame { border: 1px solid var(--line); box-shadow: 12px 12px 0 var(--accent); }
.era--2000 .frame img { filter: contrast(1.05) saturate(.9); }
.era--2000 .era__fig { margin-right: 12px; }
.chart { margin-top: 1.5rem; padding: 1rem 1rem .75rem; background: #fff; border: 1px solid var(--line); }
.era__text .chart__title { margin: 0 0 .5rem; font-size: .95rem; font-weight: 600; }
.chart svg { width: 100%; height: auto; overflow: visible; }
.chart__grid { stroke: #E3E6EB; stroke-width: 1; }
.chart__lbl { fill: #5B6270; font: 11px var(--f-mono); }
.chart__lbl--strong { fill: var(--fg); font-weight: 500; font-size: 12px; }
.chart__line { fill: none; stroke-width: 3; stroke-linejoin: round; stroke-linecap: round; }
.chart__line--up { stroke: var(--blue); }
.chart__line--down { stroke: var(--accent); }
.chart__pt { fill: #fff; stroke: var(--blue); stroke-width: 2.5; cursor: pointer; transition: r .15s; }
.chart__pt--down { stroke: var(--accent); }
.chart__pt:hover, .chart__pt:focus { r: 7; outline: none; }
.chart__pt:focus-visible { stroke-width: 5; }
.era__text .chart__out { min-height: 1.6rem; margin: .3rem 0 0; font-family: var(--f-mono); font-size: .9rem; }
.era__text .chart__note { margin: .4rem 0 0; font-size: .8rem; color: #5B6270; }

/* ---------- 2004: Web 2.0 brillante ---------- */
.era--2004 {
  --bg: #E8F4FF; --fg: #12324F; --accent: #2B7BD6; --line: #B7D6F2;
  --era-font: "Nunito", "Trebuchet MS", Verdana, sans-serif;
  --era-head: "Nunito", "Trebuchet MS", Verdana, sans-serif;
  --frame-bg: linear-gradient(#9ED2FF, #2B7BD6);
  background-image: linear-gradient(180deg, #BFE1FF 0, #E8F4FF 38%, #FFFFFF 100%);
}
.era--2004 .era__text { font-size: 1.08rem; }
.era--2004 h2 { font-size: clamp(2rem, 4.2vw, 3.1rem); line-height: 1.08; font-weight: 800; color: #0F4C97; text-shadow: 0 1px 0 #fff; }
.era--2004 .era__year {
  display: inline-block; margin-bottom: 1rem; padding: .25rem .9rem; transform: rotate(-3deg);
  background: linear-gradient(#8EDB5A, #4FA824); color: #fff; font-weight: 800; font-size: .95rem;
  border: 1px solid #3B861B; border-radius: 999px; text-shadow: 0 -1px 0 rgba(0, 0, 0, .3);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .6), 0 2px 3px rgba(0, 0, 0, .25);
}
.era--2004 .frame {
  border: 6px solid #fff; border-radius: 18px;
  box-shadow: 0 10px 26px rgba(15, 76, 151, .3);
}
.cards { display: grid; gap: .9rem; margin-top: 1.25rem; }
.site {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: .9rem; align-items: center;
  padding: .8rem 1rem; background: linear-gradient(#fff, #F0F7FF);
  border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 2px 6px rgba(15, 76, 151, .12);
}
.site__yr { min-width: 3.2rem; font-family: var(--era-head); font-weight: 800; font-size: 1.4rem; color: var(--accent); }
.site h3 { margin: 0; font-size: 1.02rem; font-weight: 800; }
.site p { margin: 0; font-size: .88rem; line-height: 1.45; }
.like {
  padding: .5rem .95rem; cursor: pointer; white-space: nowrap;
  background: linear-gradient(#5FB0FF 0, #2B7BD6 50%, #1D62B5 51%, #3A8EE6 100%);
  border: 1px solid #1A5AA6; border-radius: 10px; color: #fff; font-weight: 800; font-size: .88rem;
  text-shadow: 0 -1px 0 rgba(0, 0, 0, .35);
  box-shadow: 0 2px 4px rgba(0, 0, 0, .3), inset 0 1px 0 rgba(255, 255, 255, .6);
}
.like[aria-pressed="true"] {
  background: linear-gradient(#FFB347, #F28C00 50%, #D97700 51%, #FFA033);
  border-color: #B86400;
}
@media (max-width: 520px) {
  .site { grid-template-columns: auto minmax(0, 1fr); }
  .like { grid-column: 1 / -1; justify-self: start; }
}

/* ---------- 2007: teléfono plano ---------- */
.era--2007 {
  --bg: #F2F2F7; --fg: #1C1C1E; --accent: #0A5FD0; --line: #D1D1D6;
  --era-font: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --era-head: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --frame-bg: linear-gradient(160deg, #E5E5EA, #C7C7CC);
}
.era--2007 h2 { font-weight: 700; font-size: clamp(2rem, 4.5vw, 3.3rem); line-height: 1.05; letter-spacing: -.03em; }
.era--2007 .era__year { font-weight: 600; font-size: 1rem; color: var(--accent); }
.era--2007 .frame { border-radius: 28px; box-shadow: 0 14px 36px rgba(0, 0, 0, .14); }
.phone-row { display: flex; flex-wrap: wrap; gap: 1.5rem 2.25rem; align-items: center; margin-top: 1.75rem; }
.era__text .phone-row__hint { margin: 0 0 .6rem; font-weight: 600; }
.tabs { display: flex; flex-wrap: wrap; gap: .5rem; }
@media (min-width: 560px) {
  .phone-row { flex-wrap: nowrap; }
  .tabs { flex-direction: column; align-items: stretch; }
  .tab { min-width: 6.5rem; text-align: left; }
}
.tab {
  padding: .6rem 1.2rem; background: #fff; color: var(--fg); cursor: pointer;
  border: 1px solid var(--line); border-radius: 999px; font-weight: 600;
}
.tab[aria-selected="true"] { background: var(--accent); border-color: var(--accent); color: #fff; }
.phone {
  flex: none; display: flex; flex-direction: column; overflow: hidden;
  width: min(100%, 16.5rem); aspect-ratio: 9 / 18; background: #fff;
  border: 10px solid #1C1C1E; border-radius: 42px; box-shadow: 0 18px 40px rgba(0, 0, 0, .2);
}
.phone__notch { width: 34%; height: 18px; margin: 0 auto; background: #1C1C1E; border-radius: 0 0 12px 12px; }
.phone__screen {
  flex: 1; display: grid; align-content: center; justify-items: center; gap: .6rem;
  padding: 1.2rem; text-align: center; background: linear-gradient(#fff, #EAF2FF);
}
.phone__screen p { margin: 0; }
.phone__yr { font-size: 3rem; font-weight: 700; letter-spacing: -.04em; line-height: 1; }
.phone__icon {
  display: grid; place-items: center; width: 84px; height: 84px; border-radius: 20px;
  background: var(--ic, #0A5FD0); color: #fff; font-size: 2.4rem; font-weight: 700; transition: background .3s;
}
.phone__name { font-weight: 700; font-size: 1.1rem; line-height: 1.25; }
.phone__text { font-size: .9rem; color: #3A3A3C; line-height: 1.4; }

/* ---------- 2022: conversación ---------- */
.era--2022 {
  --bg: #EEF0F7; --fg: #1B1F3B; --accent: #4B3FE0; --line: #D5D9EA;
  --era-font: var(--f-body); --era-head: var(--f-head);
  --frame-bg: linear-gradient(135deg, #C7C2FF, #EEF0F7);
}
.era--2022 h2 {
  font-weight: 800; font-variation-settings: "wdth" 88;
  font-size: clamp(2.1rem, 4.9vw, 3.7rem); line-height: 1; letter-spacing: -.025em;
}
.era--2022 .era__year { font-weight: 600; color: var(--accent); }
.era--2022 .frame { border-radius: 24px; box-shadow: 0 22px 54px rgba(75, 63, 224, .2); }
.chat {
  margin-top: 1.5rem; padding: 1rem; background: #fff;
  border: 1px solid var(--line); border-radius: 20px; box-shadow: 0 8px 24px rgba(27, 31, 59, .08);
}
.chat__log { display: grid; gap: .6rem; align-content: start; min-height: 6.5rem; max-height: 22rem; margin-bottom: .8rem; overflow: auto; }
.era__text .chat__empty { margin: 0; color: #575C7A; font-size: .95rem; }
.msg { max-width: 92%; margin: 0; padding: .6rem .9rem; border-radius: 16px; font-size: .98rem; }
.era__text .msg { margin: 0; }
.msg--me { justify-self: end; background: var(--accent); color: #fff; border-bottom-right-radius: 4px; }
.msg--bot { justify-self: start; background: #EEF0F7; border-bottom-left-radius: 4px; }
.chips { display: flex; flex-wrap: wrap; gap: .5rem; }
.chip {
  padding: .5rem .9rem; background: #fff; color: var(--accent); cursor: pointer;
  border: 1px solid var(--accent); border-radius: 999px; font-weight: 500;
}
.chip:hover:not(:disabled) { background: var(--accent); color: #fff; }
.chip:disabled { opacity: .5; cursor: default; }
.era__text .chat__note { margin: .8rem 0 0; font-size: .8rem; color: #575C7A; }

/* ---------- Cierre: de vuelta a la terminal ---------- */
.foot {
  position: relative; overflow: hidden; color: #F1DDB0; background: var(--crt);
  padding: clamp(4rem, 9vw, 7rem) clamp(1.25rem, 5vw, 4rem) clamp(3rem, 6vw, 5rem);
  border-top: 1px solid rgba(255, 176, 0, .35);
}
.foot::before {
  content: ""; position: absolute; left: -10%; bottom: -35%; width: 60%; aspect-ratio: 1; pointer-events: none;
  background: radial-gradient(circle, rgba(255, 176, 0, .14), transparent 65%);
}
.foot__inner { position: relative; max-width: 64rem; }
.foot h2 {
  max-width: 11em; margin: 0 0 1.25rem; text-wrap: balance;
  font-family: var(--f-crt); font-weight: 400; color: var(--amber);
  font-size: clamp(3rem, 8.5vw, 6.5rem); line-height: .9;
  text-shadow: 0 0 .3em rgba(255, 176, 0, .4);
}
.foot__caret {
  display: inline-block; width: .4em; height: .7em; margin-left: .12em;
  background: currentColor; animation: blink 1s steps(1) infinite;
}
.foot__lead { max-width: 32rem; margin: 0 0 1.75rem; font-size: 1.15rem; }
.foot .btn-amber { color: var(--crt); }
.foot__cols {
  display: grid; gap: 2rem; margin-top: 3.5rem; padding-top: 2rem;
  border-top: 1px solid rgba(255, 176, 0, .25); font-size: .95rem;
}
@media (min-width: 720px) { .foot__cols { grid-template-columns: 1.2fr 1fr; } }
.foot h3 { margin: 0 0 .6rem; font-family: var(--f-mono); font-weight: 500; font-size: .95rem; color: var(--amber-soft); }
.foot ul { margin: 0; padding-left: 1.1rem; }
.foot li { margin-bottom: .4rem; }
.foot a { color: var(--amber-soft); }
.foot p { margin-top: 0; }
.foot .foot__by { margin-bottom: .75rem; font-size: 1.05rem; }
.foot__by strong { color: var(--amber); font-weight: 600; }

/* ---------- Movimiento reducido ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
