/* ==========================================================================
   REVERON EMPIRE — Inner pages on the REVERON ROUTE SYSTEM
   (services.php · coverage.php · quote.php · contact.php)

   Shares route.css with the homepage. Each page opens with a route hero
   (ORIGIN node on the highway), runs the spine through its sections and
   ends at a DESTINATION: the closing CTA, or the submit button on forms.
   Mobile-first; desktop composition from 1024px.
   ========================================================================== */

/* ==========================================================================
   Route hero (inner pages)
   ========================================================================== */
.hero--page { --hero-fs: 13vw; --hero-fs-big: 11vw; }
.hero--page .hero__title .line { white-space: normal; }
.hero--page .hero__title .line:nth-child(2) { padding-left: 0; }
.hero--page .hero__title .line--accent.is-fitted { white-space: nowrap; }
.hero--page .hero__eyebrow .breadcrumbs { margin-bottom: 0.6rem; }
.hero--page .hero__eyebrow > span { color: var(--re-steel); }

/* ==========================================================================
   SERVICES — the service manifest
   ========================================================================== */
.svc { padding-block: clamp(5rem, 3rem + 6vw, 9rem); }
.svc .notice { margin-bottom: var(--space-7); }
.svc__head { margin-bottom: var(--space-8); }
.svc__title { font-size: clamp(2.6rem, 0.8rem + 7vw, 8rem); font-weight: 800; line-height: 0.86; letter-spacing: -0.055em; text-transform: uppercase; }
.svc__title .line--accent { color: var(--re-blue); }
.svc__index { display: none; }

.svc-item {
  position: relative;
  display: grid;
  gap: var(--space-6);
  padding-block: var(--space-8);
  border-top: 1px solid var(--section-border);
  scroll-margin-top: calc(var(--header-h) + 1.5rem);
}
.svc-item__num { font-family: var(--font-display); font-size: var(--fs-sm); font-weight: 700; letter-spacing: 0.06em; color: var(--re-blue); }
.svc-item__num span { color: var(--section-muted); }
.svc-item__title {
  margin-top: var(--space-4);
  /* Sized for the longest single words (TRANSPORTATION / ESPECIALIZADA). */
  font-size: clamp(2rem, 1rem + 2.6vw, 3.6rem);
  font-weight: 800;
  line-height: 0.92;
  letter-spacing: -0.045em;
  text-transform: uppercase;
}
.svc-item__short { max-width: 36rem; margin-top: var(--space-5); font-family: var(--font-display); font-size: var(--fs-lg); font-weight: 600; line-height: 1.35; letter-spacing: -0.015em; }
.svc-item__long { max-width: 36rem; margin-top: var(--space-4); color: var(--section-muted); }
.svc-item__features { max-width: 36rem; margin-block: var(--space-6); border-top: 1px solid var(--section-border); }
.svc-item__features li {
  display: flex;
  gap: 1rem;
  padding-block: 0.75rem;
  border-bottom: 1px solid var(--section-border);
  font-size: var(--fs-sm);
  font-weight: 500;
}
.svc-item__features li span { font-family: var(--font-display); font-size: var(--fs-xs); font-weight: 700; color: var(--re-blue); }

.svc-visual {
  position: relative;
  display: grid;
  grid-template-rows: auto 1fr auto;
  min-height: 300px;
  padding: 1.5rem;
  overflow: hidden;
  border-radius: var(--radius-card);
}
.svc-visual__meta { display: flex; justify-content: space-between; font-size: 0.62rem; font-weight: 600; letter-spacing: 0.22em; text-transform: uppercase; color: var(--re-steel); }
.svc-visual__meta span:last-child { color: var(--re-white); }
.svc-visual .route-diagram { position: relative; left: auto; top: auto; align-self: center; width: 100%; }
.svc-visual.is-active .route-diagram__path { stroke-dashoffset: 0; }
.svc-visual.is-active .route-diagram__path--dashed { opacity: 1; }
.svc-visual.is-active .route-diagram__node { opacity: 1; transform: none; }
.svc-visual__icon .icon { width: 28px; height: 28px; color: var(--re-signal-blue); }

/* ==========================================================================
   COVERAGE — network page + the 50-state index
   ========================================================================== */
.network--page .network__headline { margin-top: 0; font-size: clamp(2.4rem, 1rem + 3vw, 4.2rem); }

.states { padding-block: clamp(4rem, 2rem + 5vw, 8rem) clamp(6rem, 4rem + 7vw, 11rem); }
.states__head { display: grid; gap: var(--space-6); align-items: end; margin-bottom: var(--space-8); }
.states__title { font-size: clamp(2.4rem, 1rem + 4.6vw, 5.8rem); font-weight: 800; line-height: 0.88; letter-spacing: -0.05em; text-transform: uppercase; }
.states__title .line--accent { color: var(--re-blue); }
.states__lead { max-width: 30rem; margin-top: var(--space-5); color: var(--section-muted); font-size: var(--fs-md); }
.states__count { display: flex; align-items: flex-end; gap: 0.75rem; font-size: var(--fs-xs); font-weight: 600; letter-spacing: var(--tracking-label); text-transform: uppercase; color: var(--section-muted); }
.states__count span { font-family: var(--font-display); font-size: clamp(5rem, 2rem + 10vw, 12rem); font-weight: 800; line-height: 0.76; letter-spacing: -0.07em; color: var(--section-text); }

.states__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 1px solid var(--section-border); }
.state {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: baseline;
  column-gap: 0.6rem;
  min-width: 0;
  padding: 0.9rem 0.25rem 0.9rem 0;
  border-bottom: 1px solid var(--section-border);
}
.state__num { grid-column: 1 / -1; font-size: 0.58rem; font-weight: 600; letter-spacing: 0.12em; color: var(--section-muted); }
.state abbr { font-family: var(--font-display); font-size: clamp(1.5rem, 1rem + 1.4vw, 2.3rem); font-weight: 800; letter-spacing: -0.03em; color: var(--re-blue); transition: color 500ms var(--ease-out); }
.state__name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: var(--fs-sm); color: var(--section-muted); }
/* Filled progressively by animations.js as the route passes */
.states__grid.is-scrubbing .state:not(.is-on) abbr { color: var(--section-border-strong); }

/* ==========================================================================
   QUOTE + CONTACT — the form is the final stretch of the route
   ========================================================================== */
.route-form { padding-block: clamp(5rem, 3rem + 6vw, 9rem); }
.route-form__grid { display: grid; gap: var(--space-8); }
.route-form__title {
  font-size: clamp(2.2rem, 1rem + 3.6vw, 4.4rem);
  font-weight: 800;
  line-height: 0.9;
  letter-spacing: -0.045em;
  text-transform: uppercase;
}
.route-form__title:focus { outline: none; }
.route-form__note { margin-top: 0.75rem; font-size: var(--fs-sm); color: var(--section-muted); }
.route-form .re-form { gap: var(--space-8); }
.route-form .re-form__group legend span { font-family: var(--font-display); font-size: var(--fs-sm); }
.route-form .notice { margin-top: var(--space-6); }

/* Shipment stage: ORIGIN ──── DESTINATION */
.legs { display: grid; gap: var(--space-5); margin-bottom: var(--space-5); }
.leg__label {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: var(--space-4);
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--section-muted);
}
.leg__node { width: 10px; height: 10px; border: 1.5px solid var(--re-blue); border-radius: 50%; }
.leg--destination .leg__node { background: var(--re-blue); }
.legs__link { position: relative; display: block; width: 1.5px; height: 2.5rem; margin-left: 4px; background: var(--section-border-strong); overflow: hidden; }
.legs__link span {
  position: absolute;
  left: 0;
  top: -30%;
  width: 100%;
  height: 30%;
  background: var(--re-blue);
  animation: re-leg-flow 2.4s var(--ease-in-out) infinite;
}
@keyframes re-leg-flow { to { top: 100%; } }

/* Live route summary (echoes the visitor's own entries; nothing invented) */
.route-summary { display: grid; gap: var(--space-5); padding: clamp(1.25rem, 3vw, 2rem); border-radius: var(--radius-card); }
.route-summary__title { font-size: 0.62rem; font-weight: 600; letter-spacing: 0.22em; text-transform: uppercase; color: var(--re-steel); }
.route-summary__route { display: grid; gap: var(--space-4); }
.route-summary__end { display: grid; gap: 0.3rem; min-width: 0; }
.route-summary__end span { font-size: 0.62rem; font-weight: 600; letter-spacing: 0.2em; text-transform: uppercase; color: var(--re-steel); }
.route-summary__end strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: var(--font-display);
  font-size: clamp(1.3rem, 1rem + 1.2vw, 2rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  text-transform: uppercase;
  color: var(--re-white);
}
.route-summary [data-preview].is-empty { color: rgba(140, 163, 199, 0.55); }
.route-summary__line { position: relative; display: block; height: 1.5px; background: var(--color-border-dark-strong); overflow: hidden; }
.route-summary__line span { position: absolute; inset: 0; background: var(--re-signal-blue); transform: scaleX(0); transform-origin: left; transition: transform 900ms var(--ease-out); }
.route-summary.has-origin .route-summary__line span { transform: scaleX(0.5); }
.route-summary.is-complete .route-summary__line span { transform: scaleX(1); }
.route-summary__meta { display: flex; flex-wrap: wrap; gap: 0.5rem var(--space-6); padding-top: var(--space-4); border-top: 1px solid var(--color-border-dark); font-size: 0.66rem; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: var(--re-steel); }
.route-summary__meta strong { color: var(--re-white); font-weight: 600; }

/* Arrival: submit is the destination */
.route-form .re-form__actions { display: grid; gap: var(--space-5); }
.route-form .destination__arrival { margin-top: 0; }
.theme-light .destination__line { background: var(--section-border-strong); }
.theme-light .destination__line span { background: var(--re-blue); }
.theme-light .destination__node { border-color: var(--re-blue); }
.theme-light .destination__node > span { background: var(--re-blue); }
.theme-light .destination__node em { color: var(--section-muted); }
.theme-light .is-arrived .destination__node { background: rgba(18, 104, 243, 0.12); box-shadow: 0 0 0 8px rgba(18, 104, 243, 0.08); }
.theme-light .is-arrived .destination__node em { color: var(--section-text); }

/* Aside: what happens next, as a short route */
.route-form__aside { display: grid; gap: var(--space-5); align-content: start; }
.route-card { padding: clamp(1.5rem, 3vw, 2.25rem); border-radius: var(--radius-card); }
.route-card--line { border: 1px solid var(--section-border); background: var(--section-surface); }
.route-card__title { margin-bottom: var(--space-5); font-size: var(--fs-md); font-weight: 700; letter-spacing: 0.01em; text-transform: uppercase; }
.route-steps { position: relative; display: grid; gap: var(--space-5); padding-left: 1.75rem; }
.route-steps::before { content: ""; position: absolute; left: 5px; top: 0.4rem; bottom: 0.4rem; width: 1px; background: var(--color-border-dark-strong); }
.route-steps li { position: relative; }
.route-steps li::before {
  content: "";
  position: absolute;
  left: calc(-1.75rem + 1px);
  top: 0.3rem;
  width: 9px;
  height: 9px;
  border: 1.5px solid var(--re-signal-blue);
  border-radius: 50%;
  background: var(--re-graphite);
}
.route-steps li:last-child::before { background: var(--re-signal-blue); }
.route-steps__num { display: block; font-family: var(--font-display); font-size: var(--fs-xs); font-weight: 700; color: var(--re-signal-blue); }
.route-steps h3 { margin-top: 0.2rem; font-family: var(--font-body); font-size: var(--fs-sm); font-weight: 600; line-height: 1.4; }
.route-steps p { margin-top: 0.25rem; font-size: var(--fs-sm); color: var(--re-steel); }
.route-card--line .contact-list .icon { color: var(--re-blue); }
.route-card--line .contact-list a:hover { color: var(--re-blue); }

/* Contact directory */
.directory { display: grid; align-content: start; }
.directory__list { border-top: 1px solid var(--section-border); }
.directory__row { display: grid; gap: 0.35rem; padding-block: var(--space-5); border-bottom: 1px solid var(--section-border); }
.directory__row dt,
.directory__label { font-size: 0.66rem; font-weight: 600; letter-spacing: 0.2em; text-transform: uppercase; color: var(--section-muted); }
.directory__row dd {
  margin: 0;
  overflow-wrap: anywhere;
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 1rem + 1.4vw, 2.2rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
}
.directory__row dd a { text-decoration: none; }
.directory__row dd a:hover { color: var(--re-blue); }
.directory__row dd .pending { font-size: 0.45em; vertical-align: middle; }
.directory__row--quote { gap: 0.6rem; justify-items: start; }
.directory__text { max-width: 26rem; color: var(--section-muted); font-size: var(--fs-sm); }
.directory__note { margin-top: var(--space-5); font-size: var(--fs-sm); color: var(--section-muted); }

/* ==========================================================================
   ≥ 600px
   ========================================================================== */
@media (min-width: 600px) {
  .states__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .route-summary__route { grid-template-columns: minmax(0, 1fr) minmax(3rem, 0.6fr) minmax(0, 1fr); align-items: end; }
  .route-summary__line { margin-bottom: 0.9rem; }
  .route-summary__end--dest { text-align: right; }
}

/* ==========================================================================
   Desktop composition (≥ 1024px)
   ========================================================================== */
@media (min-width: 1024px) {
  .hero--page { --hero-fs: min(7.6vw, 13vh); --hero-fs-big: min(8.6vw, 16vh); min-height: 88vh; min-height: 88svh; }

  /* Services */
  .svc__grid { display: grid; grid-template-columns: 15rem minmax(0, 1fr); gap: clamp(3rem, 5vw, 6rem); }
  .svc__index { display: block; position: sticky; top: calc(var(--header-h) + 2.5rem); align-self: start; }
  .svc__index ol { position: relative; display: grid; padding-left: 1.5rem; }
  .svc__index ol::before { content: ""; position: absolute; left: 4px; top: 0.9rem; bottom: 0.9rem; width: 1px; background: var(--section-border-strong); }
  .svc__index a {
    position: relative;
    display: flex;
    gap: 0.75rem;
    padding-block: 0.55rem;
    font-size: var(--fs-sm);
    font-weight: 500;
    text-decoration: none;
    color: var(--section-muted);
    transition: color var(--dur-micro) ease;
  }
  .svc__index a::before {
    content: "";
    position: absolute;
    left: calc(-1.5rem);
    top: 50%;
    width: 9px;
    height: 9px;
    margin-top: -4.5px;
    border: 1.5px solid var(--section-border-strong);
    border-radius: 50%;
    background: var(--section-bg);
    transition: border-color var(--dur-ui) ease, background-color var(--dur-ui) ease;
  }
  .svc__index a span { font-family: var(--font-display); font-size: var(--fs-xs); font-weight: 700; color: var(--section-border-strong); }
  .svc__index a:hover,
  .svc__index a.is-active { color: var(--section-text); }
  .svc__index a.is-active::before { border-color: var(--re-blue); background: var(--re-blue); }
  .svc__index a.is-active span { color: var(--re-blue); }
  .svc-item:first-child { border-top: 0; padding-top: 0; }
  .svc-visual { max-width: 30rem; }

  /* Coverage */
  .network--page .network__grid { grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); }
  .states__head { grid-template-columns: minmax(0, 1fr) auto; }
  .states__grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }

  /* Forms */
  .route-form__grid { grid-template-columns: minmax(0, 1fr) minmax(0, 22rem); gap: clamp(3rem, 6vw, 6rem); align-items: start; }
  .route-form__aside { position: sticky; top: calc(var(--header-h) + 2.5rem); }
  .route-form--contact .route-form__grid { grid-template-columns: minmax(0, 1fr) minmax(0, 24rem); }
  .route-form--contact .directory { position: sticky; top: calc(var(--header-h) + 2.5rem); }
  .legs { grid-template-columns: minmax(0, 1fr) 3rem minmax(0, 1fr); align-items: start; }
  .leg .re-form__grid { grid-template-columns: minmax(0, 1fr); }
  .legs__link { width: 100%; height: 1.5px; margin: 0.35rem 0 0; }
  .legs__link span { top: 0; left: -30%; width: 30%; height: 100%; animation-name: re-leg-flow-x; }
  @keyframes re-leg-flow-x { to { left: 100%; } }
}

/* ≥ 1280px: service text and its route profile side by side */
@media (min-width: 1280px) {
  .svc-item { grid-template-columns: minmax(0, 1fr) minmax(0, 20rem); gap: clamp(2rem, 4vw, 4rem); align-items: start; }
  .svc-visual { position: sticky; top: calc(var(--header-h) + 2.5rem); max-width: none; aspect-ratio: 4 / 5; min-height: 0; }
}
