/*
Theme Name: Tractive Through Line
Theme URI: https://tractiveweb.com
Author: Tractive Digital, LLC
Description: Custom one-page theme for Tractive Digital — "The Through Line": one continuous line from rail to circuit.
Version: 1.0.1
Requires PHP: 7.4
License: Proprietary
Text Domain: tractive
*/
  /*  THE THROUGH LINE — one line, from rail to circuit
      ink #0f2438 · brand #1a466b · steel #8da3b5 · paper #f2f5f7 · copper #c67f42
      This concept commits to the brand's own world (navy/paper) in both viewer themes. */
  :root {
    --ink: #0f2438;
    --ink-2: #0a1a2a;
    --brand: #1a466b;
    --steel: #8da3b5;
    --paper: #f2f5f7;
    --paper-2: #ffffff;
    --copper: #c67f42;
    --copper-deep: #a56430;
    --ok: #3aa981;
    --text-on-dark: #e9eef2;
    --text-dim-dark: #9fb2c2;
    --text-on-light: #1c2f40;
    --text-dim-light: #52677a;
  }
  html { scroll-behavior: smooth; }
  body {
    margin: 0;
    background: var(--ink);
    color: var(--text-on-dark);
    font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
  }
  .disp {
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .01em;
    line-height: 1.04;
    text-wrap: balance;
  }
  .eyebrow {
    display: inline-flex; align-items: center; gap: 12px;
    font-size: 12px; font-weight: 700; letter-spacing: .24em; text-transform: uppercase;
    color: var(--copper);
  }
  .eyebrow::before { content: ""; width: 36px; height: 2px; background: var(--copper); }
  .inner { max-width: 1100px; margin: 0 auto; padding-left: 28px; padding-right: 28px; }

  /* ---------- header ---------- */
  header {
    display: flex; align-items: center; justify-content: space-between; gap: 24px;
    padding: 26px 0 0;
  }
  .logo-lockup { color: var(--paper); width: clamp(180px, 22vw, 250px); flex-shrink: 0; }
  .logo-lockup svg { display: block; width: 100%; height: auto; }
  nav { display: flex; align-items: center; gap: clamp(16px, 3vw, 34px); }
  nav a {
    color: var(--text-dim-dark); text-decoration: none; font-size: 13px;
    letter-spacing: .14em; text-transform: uppercase; font-weight: 600;
  }
  nav a:hover, nav a:focus-visible { color: var(--paper); }
  .btn {
    display: inline-block; text-decoration: none; cursor: pointer;
    background: var(--copper); color: #14202d; font-weight: 700; font-size: 13px;
    letter-spacing: .12em; text-transform: uppercase;
    padding: 13px 26px; border-radius: 3px; border: none;
    transition: background .15s ease;
  }
  .btn:hover, .btn:focus-visible { background: #d68f52; }
  .btn.ghost {
    background: transparent; color: var(--copper);
    box-shadow: inset 0 0 0 2px var(--copper);
  }
  .btn.ghost:hover { background: #c67f4218; }
  @media (max-width: 720px) { nav a { display: none; } }

  /* ---------- hero ---------- */
  /* on landscape screens the hero fills the first viewport with the
     through-line pinned to the fold; portrait screens flow naturally */
  .hero-wrap { display: flex; flex-direction: column; }
  .hero-wrap .inner { width: 100%; box-sizing: border-box; }
  .hero { padding: clamp(36px, 6vh, 72px) 0 0; }
  .hero h1 {
    font-size: clamp(36px, 4.8vw, 66px);
    margin: 20px 0 22px; color: var(--paper);
  }
  .hero h1 .alt { color: var(--steel); }
  .hero .sub {
    font-size: clamp(16px, 1.6vw, 19px); color: var(--text-dim-dark);
    max-width: 54ch; margin: 0 0 32px;
  }
  .hero .cta-row { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: clamp(32px, 5vh, 56px); }

  /* the through line — desktop drawing, swapped for a taller crop on phones */
  .throughline { display: block; width: 100%; height: auto; margin-top: clamp(24px, 6vh, 72px); }
  .throughline-m { display: none; }
  @media (min-aspect-ratio: 4/3) {
    .hero-wrap { min-height: 100vh; min-height: 100svh; }
    .throughline { margin-top: auto; }
  }
  @media (max-width: 720px) {
    .throughline { display: none; }
    .throughline-m { display: block; width: 100%; height: auto; margin-top: 36px; }
  }
  .throughline-m .tl-rail { stroke-width: 5; }
  .throughline-m .tl-trace { stroke-width: 4; }
  .throughline-m .tl-node { stroke-width: 4; }
  .tl-trace {
    fill: none; stroke: var(--copper); stroke-width: 2.5;
    stroke-dasharray: 1; stroke-dashoffset: 1;
  }
  .tl-rail { fill: none; stroke: var(--steel); stroke-width: 3; }
  .tl-tie { fill: var(--steel); opacity: .85; }
  .tl-node { fill: var(--ink); stroke: var(--copper); stroke-width: 2.5; opacity: 0; }
  .tl-dot { fill: var(--copper); opacity: 0; }
  @media (prefers-reduced-motion: no-preference) {
    .tl-trace { animation: draw 1.6s cubic-bezier(.4, 0, .2, 1) forwards; }
    .tl-trace.t2 { animation-delay: .25s; }
    .tl-trace.t3 { animation-delay: .5s; }
    .tl-node, .tl-dot { animation: appear .5s ease forwards; animation-delay: 1.7s; }
    @keyframes draw { to { stroke-dashoffset: 0; } }
    @keyframes appear { to { opacity: 1; } }
  }
  @media (prefers-reduced-motion: reduce) {
    .tl-trace { stroke-dashoffset: 0; }
    .tl-node, .tl-dot { opacity: 1; }
  }

  /* ---------- light sections ---------- */
  .light { background: var(--paper); color: var(--text-on-light); }
  .light .section-head h2 { color: var(--ink); }

  section { padding: clamp(64px, 10vh, 110px) 0; }
  .section-head { margin-bottom: clamp(36px, 6vh, 56px); }
  .section-head h2 { font-size: clamp(26px, 3.6vw, 42px); margin: 16px 0 12px; }
  .section-head p { color: var(--text-dim-light); max-width: 62ch; margin: 0; font-size: 16.5px; }

  /* stations: services on the line */
  .stations { position: relative; display: grid; gap: 0; }
  .station {
    position: relative; display: grid; grid-template-columns: 56px 1fr;
    gap: 0 22px; padding: 30px 0 34px;
  }
  .station:not(:last-child)::before {
    content: ""; position: absolute; left: 27px; top: 58px; bottom: -28px;
    width: 2px; background: repeating-linear-gradient(180deg, var(--steel) 0 8px, transparent 8px 14px);
    opacity: .55;
  }
  .station .marker {
    width: 56px; height: 56px; border-radius: 50%;
    background: var(--paper-2); border: 2px solid var(--copper);
    display: grid; place-items: center;
    font-family: "Cascadia Code", Consolas, monospace;
    font-size: 15px; font-weight: 600; color: var(--copper-deep);
  }
  .station h3 {
    font-size: 21px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em;
    margin: 14px 0 8px; color: var(--ink);
  }
  .station p { margin: 0; color: var(--text-dim-light); max-width: 58ch; }
  .station .fine {
    margin-top: 10px; font-family: "Cascadia Code", Consolas, monospace;
    font-size: 12.5px; color: var(--copper-deep); letter-spacing: .02em;
  }

  /* two tracks: turnout */
  .turnout-svg { display: block; width: 100%; max-width: 760px; height: auto; margin: 0 auto 8px; }
  .tracks { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
  @media (max-width: 720px) { .tracks { grid-template-columns: 1fr; } }
  .track-card {
    background: var(--paper-2); border: 1px solid #dbe3e9; border-top: 3px solid var(--brand);
    border-radius: 6px; padding: 30px 30px 28px;
  }
  .track-card.copper-top { border-top-color: var(--copper); }
  .track-card .tag {
    font-size: 11.5px; letter-spacing: .2em; text-transform: uppercase; font-weight: 700;
    color: var(--brand);
  }
  .track-card.copper-top .tag { color: var(--copper-deep); }
  .track-card h3 { font-size: clamp(20px, 2.4vw, 26px); margin: 10px 0 12px; color: var(--ink); }
  .track-card p { margin: 0 0 10px; color: var(--text-dim-light); font-size: 15.5px; }
  .track-card ul { margin: 14px 0 0; padding: 0; list-style: none; }
  .track-card li {
    padding: 8px 0 8px 24px; position: relative; font-size: 14.5px; color: var(--text-on-light);
    border-top: 1px solid #e6ecf0;
  }
  .track-card li::before {
    content: ""; position: absolute; left: 4px; top: 15px;
    width: 8px; height: 8px; border-radius: 50%; border: 2px solid var(--copper);
  }

  /* status band */
  .status-band { background: var(--ink-2); }
  .status-inner { display: grid; grid-template-columns: 1fr auto; gap: 40px; align-items: center; }
  @media (max-width: 820px) { .status-inner { grid-template-columns: 1fr; } }
  .status-band h2 { font-size: clamp(24px, 3.2vw, 36px); color: var(--paper); margin: 14px 0 12px; }
  .status-band p { color: var(--text-dim-dark); max-width: 52ch; margin: 0; }
  .panel {
    background: #081420; border: 1px solid #1d3348; border-radius: 10px;
    padding: 20px 22px 14px; min-width: min(360px, 100%);
    font-family: "Cascadia Code", Consolas, monospace;
  }
  .panel-head {
    display: flex; justify-content: space-between; align-items: center;
    font-size: 11.5px; color: #5d7690; margin-bottom: 14px;
  }
  .panel-head b { color: #b9c9d6; font-weight: 600; letter-spacing: .04em; }
  .live { display: inline-flex; align-items: center; gap: 7px; color: var(--ok); }
  .live i { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); }
  @media (prefers-reduced-motion: no-preference) {
    .live i { animation: pulse 2.2s ease infinite; }
    @keyframes pulse { 0%,100% { box-shadow: 0 0 0 0 #3aa98166; } 50% { box-shadow: 0 0 0 6px #3aa98100; } }
  }
  .ticks { display: flex; gap: 3px; margin-bottom: 12px; }
  .ticks i { flex: 1; height: 30px; border-radius: 2px; background: #22684f; }
  .ticks i.hi { background: #2f9068; }
  .panel-foot {
    font-size: 12px; color: #5d7690; padding-bottom: 6px;
    font-variant-numeric: tabular-nums;
  }
  .panel-foot b { color: var(--ok); font-weight: 600; }

  /* cta + footer */
  .cta { text-align: center; }
  .cta .eyebrow { justify-content: center; }
  .cta .eyebrow::after { content: ""; width: 36px; height: 2px; background: var(--copper); }
  .cta h2 { font-size: clamp(32px, 5vw, 58px); color: var(--paper); margin: 18px auto 16px; max-width: 16ch; }
  .cta p { color: var(--text-dim-dark); max-width: 46ch; margin: 0 auto 32px; }
  footer {
    border-top: 1px solid #1d3348; padding: 30px 0 44px;
    display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap;
  }
  .footer-logo { color: var(--steel); width: 150px; }
  .footer-logo svg { display: block; width: 100%; height: auto; }
  footer small { color: #5d7690; font-size: 12.5px; letter-spacing: .06em; }

/* deployable-site additions (per approved plan): slab-serif display face */
.disp { font-family: "Roboto Slab", "Segoe UI", Georgia, serif; font-weight: 800; }

/* WP admin bar: keep full-viewport hero math honest when logged in */
.admin-bar .hero-wrap { min-height: calc(100svh - 32px); }

/* ---------- portfolio archive ---------- */
.page-band { background: var(--ink); padding-bottom: clamp(48px, 8vh, 88px); }
.page-band header a { color: inherit; text-decoration: none; }
.page-hero { padding-top: clamp(40px, 7vh, 80px); }
.page-hero h1 { font-size: clamp(32px, 4.2vw, 56px); color: var(--paper); margin: 18px 0 18px; }
.page-hero .sub { color: var(--text-dim-dark); max-width: 56ch; margin: 0; font-size: clamp(16px, 1.6vw, 18px); }
.project-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
@media (max-width: 720px) { .project-grid { grid-template-columns: 1fr; } }
.project-card h3 { margin-top: 10px; }
.project-shot { margin: -30px -30px 22px; border-bottom: 1px solid #dbe3e9; }
.project-shot img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; }
.project-link { margin-top: 20px !important; }

/* ---------- contact form (WPForms in the dark CTA) ---------- */
.cta-form { max-width: 560px; margin: 0 auto; text-align: left; }
.cta-form .wpforms-field { padding: 8px 0 !important; }
.cta-form .wpforms-field-label {
  color: var(--steel) !important; font-size: 12px !important; font-weight: 700 !important;
  letter-spacing: .18em; text-transform: uppercase; margin-bottom: 6px !important;
}
.cta-form input[type="text"], .cta-form input[type="email"], .cta-form textarea {
  width: 100% !important; box-sizing: border-box;
  background: #081420 !important; color: var(--text-on-dark) !important;
  border: 1px solid #1d3348 !important; border-radius: 4px !important;
  padding: 12px 14px !important; font-size: 15px !important;
  font-family: inherit !important;
}
.cta-form input:focus, .cta-form textarea:focus {
  outline: none !important; border-color: var(--copper) !important;
  box-shadow: 0 0 0 2px #c67f4233 !important;
}
.cta-form .wpforms-submit, .cta-form button[type="submit"] {
  background: var(--copper) !important; color: #14202d !important;
  font-weight: 700 !important; font-size: 13px !important;
  letter-spacing: .12em; text-transform: uppercase;
  padding: 13px 26px !important; border-radius: 3px !important; border: none !important;
  cursor: pointer; transition: background .15s ease;
}
.cta-form .wpforms-submit:hover { background: #d68f52 !important; }
.cta-form .wpforms-field-sublabel { color: #5d7690 !important; }
.cta-form .wpforms-error { color: #e08a8a !important; }

/* logo inside a link must never take link colors */
.logo-lockup a, .logo-lockup a:visited, .logo-lockup a:hover { color: inherit; text-decoration: none; }

/* ---------- contact modal ---------- */
.contact-modal { position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center; padding: 20px; }
.contact-modal[hidden] { display: none; }
.contact-modal-overlay { position: absolute; inset: 0; background: #0a1a2ad9; }
.contact-modal-panel {
  position: relative; background: var(--ink); border: 1px solid #1d3348; border-radius: 10px;
  max-width: 640px; width: 100%; padding: 34px 36px 36px; max-height: 90vh; overflow: auto;
  box-sizing: border-box;
}
.contact-modal-panel h2 { color: var(--paper); font-size: clamp(24px, 3vw, 34px); margin: 14px 0 10px; }
.contact-modal-panel > p { color: var(--text-dim-dark); margin: 0 0 22px; max-width: 52ch; }
.contact-modal-x {
  position: absolute; top: 12px; right: 14px; background: none; border: none;
  color: var(--steel); font-size: 28px; line-height: 1; cursor: pointer; padding: 4px 8px;
}
.contact-modal-x:hover, .contact-modal-x:focus-visible { color: var(--copper); }
@media (max-width: 480px) { .contact-modal-panel { padding: 26px 22px 28px; } }

/* ---------- sticky site bar ---------- */
.site-bar {
  position: sticky; top: 0; z-index: 900;
  background: var(--ink); border-bottom: 1px solid #1d3348;
}
.site-bar header { padding: 14px 0; }
.admin-bar .site-bar { top: 32px; }
@media (max-width: 782px) { .admin-bar .site-bar { top: 46px; } }
/* keep the hero's through-line pinned to the fold now that the bar owns ~72px */
@media (min-aspect-ratio: 4/3) {
  .hero-wrap { min-height: calc(100vh - 72px); min-height: calc(100svh - 72px); }
  .admin-bar .hero-wrap { min-height: calc(100svh - 104px); }
}
/* anchor targets shouldn't hide under the sticky bar */
section[id], .cta[id] { scroll-margin-top: 84px; }

/* ---------- portfolio hover-pan window ---------- */
/* the window keeps a fixed frame; the tall page screenshot glides toward the
   bottom on hover, like someone scrolling the site */
.project-shot { aspect-ratio: 16 / 10; overflow: hidden; }
.project-shot img {
  width: 100%; height: 100%;
  aspect-ratio: auto;
  object-fit: cover; object-position: top center;
  transition: object-position 6s ease-in-out;
}
.project-card:hover .project-shot img,
.project-card:focus-within .project-shot img { object-position: bottom center; }
@media (prefers-reduced-motion: reduce) {
  .project-shot img { transition: none; }
}
