/* Agent-Endpoint — patch-bay world.
   Measured layout from the approved comp: custom properties are % of the frame.
   .rail and .band are full-frame layers (children resolve % against the frame),
   their visible strips are ::before bands. */
:root {
  --r-wordmark-x: 2.73%;
  --r-wordmark-cap: 80px; --r-wordmark-font: 152px;
  --r-nav-links-x: 74.47%; --r-nav-links-y: 2.65%;
  --r-nav-links-cap: 20px; --r-nav-links-font: 29px;
  --r-headline-x: 30.01%; --r-headline-y: 19.68%; --r-headline-w: 39.99%; --r-headline-h: 34.72%;
  --r-headline-cap: 154px; --r-headline-font: 208px;
  --r-tag-leer-correo-x: 12.36%; --r-tag-leer-correo-y: 79.99%; --r-tag-leer-correo-w: 17.19%; --r-tag-leer-correo-h: 9.47%;
  --r-tag-gestionar-archivos-x: 31.71%; --r-tag-gestionar-archivos-y: 79.99%; --r-tag-gestionar-archivos-w: 18.29%; --r-tag-gestionar-archivos-h: 9.85%;
  --r-tag-editar-documentos-x: 52.56%; --r-tag-editar-documentos-y: 79.99%; --r-tag-editar-documentos-w: 14.7%; --r-tag-editar-documentos-h: 9.85%;
  --r-tag-calendarios-x: 72.8%; --r-tag-calendarios-y: 79.99%; --r-tag-calendarios-w: 7.21%; --r-tag-calendarios-h: 9.85%;
  /* world palette sampled from the comp */
  --ink-cream: #d3c6b4;
  --ink-word: #5e5142;
  --ink-sub: #ccc0b0;
  --ink-nav: #6f6f6f;
  --ground: #25221f;
  --band-ground: #1e1e1d;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { background: var(--ground); color: var(--ink-cream); }
body { font-family: 'Poppins', system-ui, sans-serif; }
::selection { background: #d3c6b4; color: #25221f; }
a:focus-visible { outline: 3px solid var(--ink-cream); outline-offset: 4px; }

/* contain-fit: 100% (never 100vw — vw includes the scrollbar) + aspect-ratio;
   the inline script then shrinks width further so stage + caption fit the viewport height */
.stage-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  margin: 0 auto;
  overflow: hidden;
}
.stage {
  position: absolute; left: 0; top: 0;
  width: 2816px;
  height: 1584px;
  overflow: hidden;
  background: var(--ground);
  transform: scale(var(--stage-s, 0.4545));
  transform-origin: 0 0;
}

/* --- top rail: full-frame layer, strip via ::before (children % resolve to frame) --- */
.rail { position: absolute; inset: 0; pointer-events: none; }
.rail::before {
  content: "";
  position: absolute; left: 0; top: 0; width: 100%; height: 10%;
  background-color: #4a443d;
  /* gradient FIRST = top layer, plate underneath */
  background-image:
    linear-gradient(90deg, rgba(0,0,0,0) 66%, rgba(10,7,4,.82) 74%, rgba(6,4,2,.9) 100%),
    url("plates/top-rail.png?v=2160");
  background-repeat: no-repeat, repeat;
  background-position: 0 0, 609px 0;
  /* natural plate size (mirror-tiled 2x2 crop): top row = the original crop at 1:1 */
  background-size: 100% 100%, 2160px 316px;
}
/* wordmark: same format as the legal pages (.legal-rail .wordmark),
   sizes divided by --stage-s so it renders at true screen px inside the scaled frame */
.wordmark {
  position: absolute;
  left: calc(clamp(20px, 4vw, 56px) / var(--stage-s, 0.4545));
  top: 0; height: 10%;
  display: flex; align-items: center;
  font-family: 'Saira Extra Condensed', sans-serif;
  font-weight: 800;
  font-size: calc(34px / var(--stage-s, 0.4545));
  letter-spacing: .04em;
  color: #b39a83;
  text-shadow: 0 -1px 0 rgba(0,0,0,.55), 0 1px 0 rgba(255,255,255,.18);
  pointer-events: auto;
}
.nav {
  position: absolute;
  left: var(--r-nav-links-x); top: var(--r-nav-links-y);
  display: flex; gap: 92px;
  white-space: nowrap;
  pointer-events: auto;
}
.nav a {
  font-family: 'Barlow Semi Condensed', 'Poppins', sans-serif;
  font-size: var(--r-nav-links-font);
  font-weight: 400;
  letter-spacing: 0.9px;
  line-height: 1;
  color: var(--ink-nav);
  text-decoration: none;
}
.nav a:hover { text-decoration: underline; text-underline-offset: 6px; text-decoration-thickness: 2px; }

/* --- hero plate --- */
.hero-panel {
  position: absolute; left: 0; top: 10%;
  width: 100%; height: 60%;
}
.hero-panel img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* --- hero text: justified stencil block, tracking per line (measured off the comp) --- */
.headline {
  position: absolute;
  left: var(--r-headline-x); top: var(--r-headline-y);
  width: var(--r-headline-w); height: var(--r-headline-h);
  font-family: 'Allerta Stencil', 'Aladin', cursive;
  font-weight: 400;
  font-size: var(--r-headline-font);
  line-height: 0.9;
  text-align: center;
  text-transform: uppercase;
  color: var(--ink-sub);
  text-shadow: none;
}
.headline .ln { display: block; white-space: nowrap; transform-origin: center; }
.headline .ln1 { letter-spacing: -9.9px; text-indent: -9.9px; transform: translateX(-22px); }
.headline .ln2 { letter-spacing: -12.4px; text-indent: -12.4px; transform: translateX(-28px); }
.headline .ln3 { letter-spacing: -9.4px; text-indent: -9.4px; transform: translateX(53px); }
.subline {
  position: absolute;
  left: 28.9%; top: 56.4%;
  width: 40%;
  text-align: center;
  font-size: 45px;
  font-weight: 400;
  letter-spacing: 0.005em;
  line-height: 1.1;
  color: var(--ink-sub);
  text-shadow: 0 2px 5px rgba(0, 0, 0, .65);
}

/* --- bottom band: full-frame layer, strip via ::before --- */
.band { position: absolute; inset: 0; pointer-events: none; }
.band::before {
  content: "";
  position: absolute; left: 0; top: 70%; width: 100%; height: 30%;
  background-color: var(--band-ground);
  background-image: url("plates/tag-ground.png");
  background-repeat: repeat-x;
  background-position: 0 0;
  background-size: 2816px 316px;
}

/* --- permission tags (engraved chips) --- */
.tag {
  position: absolute;
  pointer-events: auto;
  display: flex; align-items: center; justify-content: center;
  text-align: center;
  font-weight: 500;
  font-size: 36px;
  line-height: 1.06;
  letter-spacing: 0.03em;
  color: #2e2a24;
  text-shadow: 0 1px 0 rgba(255, 255, 255, .3);
  background:
    url("chip-speckle.png") 0 0 / 180px 180px repeat,
    linear-gradient(180deg, #a7998d 0%, #9b8e82 50%, #8b7e75 100%);
  border: 1px solid #2a251f;
  border-radius: 14px;
  box-shadow:
    0 6px 14px rgba(0, 0, 0, .55),
    inset 0 1px 0 rgba(255, 255, 255, .32),
    inset 0 -3px 8px rgba(0, 0, 0, .28);
}
.tag::before {
  content: "";
  position: absolute; inset: 0;
  border-radius: inherit;
  background:
    radial-gradient(circle 14px at 17px 17px, #2c2823 0 64%, rgba(255, 255, 255, .2) 65% 74%, transparent 75%),
    radial-gradient(circle 14px at calc(100% - 17px) 17px, #2c2823 0 64%, rgba(255, 255, 255, .2) 65% 74%, transparent 75%),
    radial-gradient(circle 14px at 17px calc(100% - 17px), #2c2823 0 64%, rgba(255, 255, 255, .2) 65% 74%, transparent 75%),
    radial-gradient(circle 14px at calc(100% - 17px) calc(100% - 17px), #2c2823 0 64%, rgba(255, 255, 255, .2) 65% 74%, transparent 75%);
  pointer-events: none;
}
.tag-leer-correo { font-size: 37.5px; padding-right: 14px; }
.tag-leer-correo {
  left: 12.64%; top: 80.49%;
  width: 14.56%; height: 8.46%;
}
.tag-gestionar-archivos { font-size: 36.5px; padding-right: 12px; }
.tag-gestionar-archivos {
  left: 32.74%; top: 80.43%;
  width: 14.7%; height: 8.65%;
}
.tag-editar-documentos { font-size: 35.5px; padding-left: 12px; border-radius: 16px; }
.tag-editar-documentos {
  left: 52.91%; top: 80.49%;
  width: 13.78%; height: 8.46%;
  background:
    url("chip-speckle.png") 0 0 / 180px 180px repeat,
    linear-gradient(180deg, #988f86 0%, #918981 50%, #877e79 100%);
}
.tag-calendarios { font-size: 31px; padding-left: 28px; }
.tag-calendarios {
  left: 73.15%; top: 80.49%;
  width: 9.94%; height: 8.27%;
  background:
    url("chip-speckle.png") 0 0 / 180px 180px repeat,
    linear-gradient(180deg, #988f8a 0%, #8f8984 50%, #7c7773 100%);
}

/* --- verbatim caption under the hero (the text Google reads) --- */
.caption {
  max-width: 78ch;
  margin: 0 auto;
  padding: 40px 24px 72px;
  text-align: center;
}
.caption p {
  font-size: 15px;
  line-height: 1.7;
  color: #b5aea4;
}
.caption strong { color: #d3c6b4; font-weight: 600; }
.caption-links { margin-top: 18px; }
.caption a {
  color: #e0b070;
  text-decoration: underline;
  text-underline-offset: 4px;
}
