/* ==========================================================================
   REVERON EMPIRE — Components
   Mobile-first. Desktop layouts live in responsive.css.
   ========================================================================== */

/* ---------- Buttons ---------- */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  min-height: 52px;
  padding: 0.9rem 1.5rem;
  border: 1px solid transparent;
  border-radius: var(--radius-btn);
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  line-height: 1.2;
  text-transform: uppercase;
  text-decoration: none;
  overflow: hidden;
  isolation: isolate;
  transition: background-color var(--dur-micro) ease, border-color var(--dur-micro) ease, color var(--dur-micro) ease, box-shadow var(--dur-ui) var(--ease-out);
}
.btn__icon { width: 18px; height: 18px; flex-shrink: 0; transition: transform var(--dur-ui) var(--ease-out); }
.btn:hover .btn__icon { transform: translateX(4px); }

.btn--primary { background: var(--re-blue); color: #FFFFFF; box-shadow: var(--shadow-blue); }
.btn--primary::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(100deg, transparent 20%, rgba(255, 255, 255, 0.22) 50%, transparent 80%);
  transform: translateX(-120%);
  transition: transform 700ms var(--ease-out);
}
.btn--primary:hover { background: var(--re-blue-deep); }
.btn--primary:hover::before { transform: translateX(120%); }

.btn--secondary { border-color: var(--section-border-strong, var(--color-border-dark-strong)); color: var(--section-text, var(--re-white)); background: transparent; }
.btn--secondary:hover { border-color: var(--section-text, var(--re-white)); }

.btn--sm { min-height: 42px; padding: 0.6rem 1.1rem; font-size: 0.72rem; }
.btn--lg { min-height: 58px; padding: 1rem 2rem; }
.btn[aria-busy="true"] { opacity: 0.7; pointer-events: none; }

/* Arrow link */
.arrow-link {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--section-accent, var(--re-blue));
}
.arrow-link__icon { width: 16px; height: 16px; transition: transform var(--dur-ui) var(--ease-out); }
.arrow-link:hover .arrow-link__icon { transform: translateX(5px); }
.arrow-link span { background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat; transition: background-size var(--dur-ui) var(--ease-out); }
.arrow-link:hover span { background-size: 100% 1px; }

/* Decorative route lines (inner page heroes) */
.route-lines { position: absolute; inset: 0; width: 100%; height: 100%; }
.route-lines__edge { fill: none; stroke: rgba(140, 163, 199, 0.14); stroke-width: 1; }
.route-lines__lane { fill: none; stroke: rgba(56, 160, 255, 0.45); stroke-width: 1.5; stroke-dasharray: 10 14; }

/* ==========================================================================
   Nationwide map (home network, coverage page, about pillar)
   ========================================================================== */
.us-map { position: relative; width: 100%; height: auto; overflow: visible; }
.map-band { fill: none; stroke: var(--re-steel); stroke-opacity: 0.42; stroke-width: 4; stroke-linecap: round; }
.us-map__lit { fill: none; stroke: var(--re-white); stroke-opacity: 0.85; stroke-width: 4.6; stroke-linecap: round; }
.us-map__arcs path { fill: none; stroke: var(--re-signal-blue); stroke-width: 1; stroke-opacity: 0.7; stroke-dasharray: 1; stroke-dashoffset: 0; }
.map-node__dot { fill: var(--re-signal-blue); }
.map-node__ring { fill: none; stroke: var(--re-signal-blue); stroke-opacity: 0.35; stroke-width: 1; }
.us-map__inset text { fill: var(--re-steel); font-family: var(--font-body); font-size: 13px; font-weight: 600; letter-spacing: 0.15em; }

/* Media slot (photo or abstract placeholder) */
.media-slot {
  position: relative;
  aspect-ratio: var(--ratio, 4 / 5);
  border-radius: var(--radius-card);
  overflow: hidden;
  background: var(--re-surface);
}
.media-slot img,
.media-slot__art { width: 100%; height: 100%; object-fit: cover; }
.media-slot__road path { fill: none; stroke: rgba(140, 163, 199, 0.45); stroke-width: 1.5; }
.media-slot__road .media-slot__lane { stroke: rgba(56, 160, 255, 0.85); stroke-width: 2; stroke-dasharray: 12 16; }
.media-slot__horizon { stroke: rgba(56, 160, 255, 0.6); stroke-width: 1; }
.media-slot__dev {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  right: 0.75rem;
  padding: 0.45rem 0.6rem;
  border: 1px dashed var(--color-warning);
  border-radius: var(--radius-xs);
  background: rgba(11, 13, 16, 0.8);
  color: var(--color-warning);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.66rem;
  line-height: 1.45;
}

/* ==========================================================================
   ABOUT page
   ========================================================================== */
.statement__text {
  max-width: 62rem;
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 1rem + 3vw, 3.6rem);
  font-weight: 600;
  line-height: 1.14;
  letter-spacing: -0.03em;
}
.pillars { padding-bottom: var(--section-pad); }
.pillar { display: grid; gap: var(--space-7); align-items: center; padding-block: clamp(4rem, 3rem + 4vw, 7rem); border-top: 1px solid var(--section-border); }
.pillar__num { font-family: var(--font-display); font-size: var(--fs-sm); font-weight: 700; letter-spacing: 0.08em; color: var(--re-blue); }
.pillar__num span { color: var(--section-muted); }
.pillar__title { margin-top: var(--space-4); font-size: clamp(2.25rem, 1.3rem + 3.6vw, 4.5rem); font-weight: 800; line-height: 0.92; letter-spacing: -0.04em; text-transform: uppercase; }
.pillar__copy { margin-top: var(--space-5); max-width: 32rem; font-size: var(--fs-md); color: var(--section-muted); }
.pillar__map { padding: clamp(1.25rem, 4vw, 3rem); border-radius: var(--radius-card); }
.pillar__type {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(3.25rem, 1.6rem + 6.6vw, 8.5rem);
  line-height: 0.86;
  letter-spacing: -0.055em;
  text-transform: uppercase;
}
.pillar__type .line:not(.line--accent) .line__inner { color: var(--section-border); }

/* ==========================================================================
   Forms
   ========================================================================== */
.re-form { display: grid; gap: var(--space-7); margin-top: var(--space-6); }
.re-form__group { min-width: 0; padding: 0; border: 0; }
.re-form__group legend {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  width: 100%;
  margin-bottom: var(--space-5);
  padding: 0;
  font-family: var(--font-display);
  font-size: var(--fs-md);
  font-weight: 700;
  letter-spacing: 0.01em;
  text-transform: uppercase;
}
.re-form__group legend span { font-size: var(--fs-xs); color: var(--re-blue); letter-spacing: 0.08em; }
.re-form__group legend::after { content: ""; flex: 1; height: 1px; background: var(--section-border); }
.re-form__grid { display: grid; gap: var(--space-5); }

.field { display: grid; gap: 0.5rem; align-content: start; min-width: 0; }
.field__label { font-size: var(--fs-sm); font-weight: 600; }
.field__req { margin-left: 2px; color: var(--re-blue); }
.field__opt { font-size: var(--fs-xs); font-weight: 400; color: var(--section-muted); }
.field input:not([type="checkbox"]),
.field select,
.field textarea {
  width: 100%;
  min-height: 52px;
  padding: 0.85rem 1rem;
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-btn);
  background: #FFFFFF;
  color: var(--color-text);
  font-size: 1rem;
  line-height: 1.4;
  transition: border-color var(--dur-micro) ease, box-shadow var(--dur-micro) ease;
}
.field input::placeholder,
.field textarea::placeholder { color: #7D8BA3; }
.field input:hover,
.field select:hover,
.field textarea:hover { border-color: #8EA2BF; }
.field input:focus,
.field select:focus,
.field textarea:focus { outline: none; border-color: var(--re-blue); box-shadow: 0 0 0 3px rgba(18, 104, 243, 0.2); }
.field textarea { min-height: 150px; resize: vertical; }
.field__select { position: relative; }
.field__select select { appearance: none; -webkit-appearance: none; padding-right: 2.75rem; }
.field__select::after {
  content: "";
  position: absolute;
  right: 1.1rem;
  top: 50%;
  width: 8px;
  height: 8px;
  border-right: 1.5px solid var(--color-text-muted);
  border-bottom: 1.5px solid var(--color-text-muted);
  transform: translateY(-70%) rotate(45deg);
  pointer-events: none;
}
.field.has-error input,
.field.has-error select,
.field.has-error textarea { border-color: var(--color-error); }
.field__hint { font-size: var(--fs-xs); color: var(--section-muted); }
.field__error { font-size: var(--fs-sm); font-weight: 500; color: #B42323; }
.field__check { display: flex; align-items: flex-start; gap: 0.75rem; }
.field__check input { width: 20px; height: 20px; margin-top: 0.15rem; flex-shrink: 0; accent-color: var(--re-blue); }
.field__check label { font-size: var(--fs-sm); }

.hp-field { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.re-form__actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-5); }
.re-form__privacy { max-width: 22rem; font-size: var(--fs-xs); color: var(--section-muted); }

.form-status {
  margin-top: var(--space-5);
  padding: 1rem 1.25rem;
  border: 1px solid var(--section-border);
  border-left-width: 3px;
  border-radius: var(--radius-btn);
  font-size: var(--fs-sm);
  font-weight: 500;
}
.form-status:focus { outline: none; }
.form-status--success { border-color: var(--color-success); background: var(--color-success-bg); color: #0E6B47; }
.form-status--dev,
.form-status--unavailable { border-color: var(--color-warning); background: var(--color-warning-bg); color: #6B4700; }
.form-status--invalid,
.form-status--error { border-color: var(--color-error); background: var(--color-error-bg); color: #9E1F1F; }

/* Notices */
.notice {
  padding: 0.9rem 1.1rem;
  border-left: 3px solid var(--re-blue);
  border-radius: 0 var(--radius-btn) var(--radius-btn) 0;
  background: var(--re-ice);
  font-size: var(--fs-sm);
  color: var(--color-text);
}
.notice--dev { border-left-color: var(--color-warning); background: var(--color-warning-bg); color: #6B4700; }

/* ==========================================================================
   404
   ========================================================================== */
.not-found { position: relative; display: flex; align-items: center; min-height: 100vh; min-height: 100svh; padding-block: calc(var(--header-h) + 3rem) 4rem; overflow: hidden; isolation: isolate; }
.not-found__code {
  position: absolute;
  right: var(--gutter);
  bottom: -0.15em;
  z-index: -1;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: var(--fs-mega);
  line-height: 1;
  letter-spacing: -0.06em;
  color: rgba(140, 163, 199, 0.06);
}

/* ==========================================================================
   REVERON ROUTE SYSTEM — shared pieces
   Route segments are injected by animations.js into [data-route] sections.
   ========================================================================== */
[data-route] { position: relative; }
[data-route] > .container { position: relative; z-index: 1; }
.route-seg {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 0;
  overflow: visible;
  pointer-events: none;
}
.route-seg path { fill: none; stroke-linecap: round; stroke-linejoin: round; }
.route-seg__base { stroke: var(--section-border-strong); stroke-width: 1; }
.route-seg__live,
.route-seg__branch { stroke: var(--section-accent); stroke-width: 1.5; stroke-dasharray: 1; stroke-dashoffset: 1; }
.route-seg__branch-base { stroke: var(--section-border); stroke-width: 1; }
.route-seg__branch.is-active { stroke-width: 2.5; }
.route-seg__node { fill: var(--section-bg); stroke: var(--section-border-strong); stroke-width: 1.5; transition: fill 400ms ease, stroke 400ms ease; }
.route-seg__node.is-on { fill: var(--section-accent); stroke: var(--section-accent); }

/* Section index — "02 / Introduction" */
.section-index {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  margin-bottom: var(--space-6);
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  color: var(--section-muted);
}
.section-index__num { font-family: var(--font-display); font-weight: 700; letter-spacing: 0.06em; color: var(--section-accent); }
.section-index__num::after { content: "/"; margin-left: 0.75rem; color: var(--section-border-strong); }

/* Telemetry — narrative label / value pairs, never metrics */
.telemetry {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem var(--space-6);
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  line-height: 1.3;
  text-transform: uppercase;
}
.telemetry > div { display: flex; gap: 0.5rem; }
.telemetry dt { color: var(--section-muted); }
.telemetry dt::after { content: " /"; }
.telemetry dd { margin: 0; color: var(--section-text); }
.telemetry--stack { flex-direction: column; }
.telemetry__live {
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 0.5rem;
  border-radius: 50%;
  background: var(--section-accent);
  vertical-align: 0.1em;
  animation: re-blink 2.4s ease-in-out infinite;
}

/* Line-by-line heading reveal (animated by animations.js) */
[data-line-reveal] .line { overflow: hidden; padding-bottom: 0.06em; margin-bottom: -0.06em; }

/* ==========================================================================
   DESTINATION — closing call to action on every page (end of the route)
   ========================================================================== */
.destination {
  position: relative;
  overflow: hidden;
  padding-block: clamp(6rem, 3rem + 10vw, 13rem) clamp(5rem, 3rem + 6vw, 9rem);
}
.destination__title {
  font-size: clamp(3.6rem, 0.8rem + 12vw, 14rem);
  font-weight: 800;
  line-height: 0.84;
  letter-spacing: -0.055em;
  text-transform: uppercase;
}
.destination__title .line--accent { color: var(--re-signal-blue); }
.destination__lead { margin-top: var(--space-6); max-width: 30rem; font-size: var(--fs-lg); line-height: 1.45; color: var(--re-steel); }
.destination__arrival {
  display: grid;
  grid-template-columns: minmax(2rem, 1fr) auto;
  align-items: center;
  gap: var(--space-6) var(--space-5);
  margin-top: clamp(3.5rem, 2rem + 5vw, 7rem);
}
.destination__arrival .btn { grid-column: 1 / -1; justify-self: start; }
.destination__line { position: relative; height: 1.5px; overflow: hidden; background: var(--color-border-dark-strong); }
.destination__line span { position: absolute; inset: 0; background: var(--re-signal-blue); transform-origin: left; }
.destination__node {
  position: relative;
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border: 1.5px solid var(--re-signal-blue);
  border-radius: 50%;
  transition: box-shadow 600ms var(--ease-out), background-color 600ms var(--ease-out);
}
.destination__node > span { width: 6px; height: 6px; border-radius: 50%; background: var(--re-signal-blue); }
.destination__node em {
  position: absolute;
  top: calc(100% + 0.8rem);
  right: -0.4rem;
  font-style: normal;
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--re-steel);
}
.is-arrived .destination__node { background: rgba(56, 160, 255, 0.16); box-shadow: 0 0 0 8px rgba(56, 160, 255, 0.1); }
.is-arrived .destination__node em { color: var(--re-white); }

/* Cursor-adjacent label (desktop pointer only; the system cursor is untouched) */
.cursor-label {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 300;
  padding: 0.45rem 0.7rem;
  border: 1px solid rgba(140, 163, 199, 0.3);
  border-radius: var(--radius-xs);
  background: var(--re-graphite);
  color: var(--re-white);
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity var(--dur-micro) ease;
}
.cursor-label.is-visible { opacity: 1; }
