/* ============================================================
   RAIL TECH — section & component styles (shared across pages)
   ============================================================ */

/* ---------- forge (dark) sections ---------- */
.forge { background: var(--ink); color: var(--paper); position: relative; }
.forge .lead, .forge p { color: var(--steel-300); }
.lead.on-dark { color: var(--steel-300); }
.forge h2, .forge h3, .forge h4 { color: var(--paper); }
.head-split { display: flex; align-items: flex-end; justify-content: space-between; gap: 40px; flex-wrap: wrap; }
.head-split .lead { flex: 1 1 320px; }

/* ============ HERO ============ */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding-top: 120px;
  background: var(--ink);
  overflow: hidden;
}
.hero-media { position: absolute; inset: 0; border: none; border-radius: 0; }
.hero-media-img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: 78% center;
}
@media (max-width: 760px) { .hero-media-img { object-position: 64% center; } }
.hero-scrim {
  position: absolute; inset: 0;
  background:
    linear-gradient(90deg, rgba(15,16,20,0.96) 0%, rgba(15,16,20,0.82) 34%, rgba(15,16,20,0.35) 70%, rgba(15,16,20,0.55) 100%),
    linear-gradient(180deg, rgba(15,16,20,0.55) 0%, rgba(15,16,20,0.15) 40%, rgba(15,16,20,0.85) 100%),
    radial-gradient(70% 55% at 82% 22%, rgba(232,80,10,0.30), transparent 60%);
}
.hero-inner { position: relative; padding-bottom: clamp(40px, 5vw, 72px); width: 100%; }
.hero-kicker {
  display: inline-flex; align-items: center; flex-wrap: wrap; gap: 6px 14px;
  font-size: 13px; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--ember); margin-bottom: 28px;
}
.hero-kicker .sep { color: var(--orange); }
.hero-title {
  color: var(--paper);
  font-size: clamp(38px, 6.2vw, 90px);
  line-height: 0.98;
  max-width: 18ch;
  margin-bottom: 0.5em;
  padding-bottom: 0.08em;
}
.hero-sub { color: var(--steel-200); font-size: clamp(17px, 1.5vw, 21px); max-width: 56ch; line-height: 1.55; }
.hero-actions { display: flex; align-items: center; gap: 28px; flex-wrap: wrap; margin-top: 36px; }
.hero-play { display: inline-flex; align-items: center; gap: 14px; color: var(--paper); }
.play-ring {
  width: 56px; height: 56px; border-radius: 50%;
  border: 1.5px solid rgba(255,255,255,0.4);
  display: grid; place-items: center;
  transition: background .3s, border-color .3s, transform .3s;
}
.play-ring .tri {
  width: 0; height: 0;
  border-left: 12px solid var(--paper);
  border-top: 8px solid transparent;
  border-bottom: 8px solid transparent;
  margin-left: 3px;
}
.hero-play:hover .play-ring { background: var(--orange); border-color: var(--orange); transform: scale(1.05); }
.hero-play:hover .play-ring .tri { border-left-color: #fff; }
.play-label { font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; line-height: 1.3; color: var(--steel-200); }

.hero-specs {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--line-dark);
}
.hero-specs .spec {
  padding: 26px 0 30px;
  display: flex; flex-direction: column; gap: 8px;
  border-left: 1px solid var(--line-dark);
  padding-left: 24px;
}
.hero-specs .spec:first-child { border-left: none; padding-left: 0; }
.hero-specs .spec-num {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(24px, 2.6vw, 38px); color: var(--paper);
}
.hero-specs .mono-tag { color: var(--steel-400); }

/* ============ INTRO ============ */
.intro-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(32px, 5vw, 90px); align-items: start; }
.intro-left .kicker { margin-bottom: 26px; }
.intro-right .lead { margin-bottom: 38px; }
.intro-tabs .tab-row { display: flex; gap: 6px; border-bottom: 1px solid var(--line); margin-bottom: 28px; flex-wrap: wrap; }
.tab-btn {
  font-family: var(--font-mono); font-size: 13px; letter-spacing: 0.06em; text-transform: uppercase;
  padding: 14px 18px; min-height: 44px; color: var(--steel-500); position: relative; transition: color .2s;
}
.tab-btn::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--orange); transform: scaleX(0); transition: transform .3s; }
.tab-btn.active { color: var(--ink); }
.tab-btn.active::after { transform: scaleX(1); }
.tab-pane { display: none; animation: fadeUp .5s ease; }
.tab-pane.active { display: block; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(10px);} to { opacity:1; transform:none; } }
.tick-list { margin-top: 22px; display: flex; flex-wrap: wrap; gap: 14px 32px; }
.tick-list li { display: flex; align-items: center; gap: 10px; font-family: var(--font-mono); font-size: 13px; letter-spacing: 0.03em; text-transform: uppercase; color: var(--steel-700); }
.tick-list li::before { content: "✓"; color: var(--orange); font-weight: 700; }
.forge .tick-list li { color: var(--steel-200); }

/* ============ SERVICES ============ */
.services-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(16px, 1.6vw, 24px); }
.svc-card {
  background: var(--steel-900);
  border: 1px solid var(--line-dark);
  border-radius: var(--radius);
  padding: clamp(22px, 2vw, 34px);
  display: flex; flex-direction: column;
  position: relative;
  transition: transform .35s cubic-bezier(.4,0,.2,1), border-color .35s, background .35s;
}
.svc-card:hover { transform: translateY(-8px); border-color: var(--orange); background: #20242b; }
.svc-idx { position: absolute; top: 22px; right: 26px; color: var(--steel-500); font-size: 13px; }
.svc-thumb { aspect-ratio: 16/11; margin-bottom: 26px; }
.svc-card h3 { margin-bottom: 14px; }
.svc-card p { color: var(--steel-300); margin-bottom: 26px; flex: 1; }
.svc-link { font-size: 13px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ember); transition: color .2s, letter-spacing .2s; }
.svc-card:hover .svc-link { color: var(--orange); letter-spacing: 0.1em; }

/* ============ MARQUEE BAND ============ */
.marquee-band { background: var(--paper); border-block: 2px solid var(--ink); padding-block: 26px; }

/* ============ WHY CHOOSE ============ */
.why-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(32px, 5vw, 80px); align-items: center; }
.why-media { position: relative; }
.why-media .ph { aspect-ratio: 4/5; }
.why-badge {
  position: absolute; bottom: 28px; left: -28px;
  background: var(--orange); color: #fff;
  padding: 24px 30px; border-radius: var(--radius);
  display: flex; flex-direction: column; gap: 6px;
  box-shadow: 0 30px 60px -25px rgba(232,80,10,0.6);
}
.why-badge-num { font-family: var(--font-display); font-weight: 800; font-size: clamp(40px, 4vw, 58px); line-height: 0.9; }
.why-badge-label { font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; line-height: 1.35; color: rgba(255,255,255,0.92); }
.why-content .kicker { margin-bottom: 22px; }
.why-content > h2 { margin-bottom: 40px; }
.why-items { display: flex; flex-direction: column; gap: 28px; margin-bottom: 42px; }
.why-item { display: flex; gap: 22px; padding-bottom: 28px; border-bottom: 1px solid var(--line); }
.why-item:last-child { border-bottom: none; padding-bottom: 0; }
.why-num { color: var(--orange); font-size: 14px; padding-top: 6px; }
.why-item h4 { margin-bottom: 8px; }
.why-item p { color: var(--steel-500); }

/* ============ STATS ============ */
.stats-band .section-head { margin-bottom: clamp(48px, 6vw, 88px); }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line-dark); border: 1px solid var(--line-dark); }
.stat { background: var(--ink); padding: clamp(28px, 3vw, 48px) clamp(20px, 2vw, 32px); display: flex; flex-direction: column; gap: 14px; align-items: center; text-align: center; }
.stat-num { font-family: var(--font-display); font-weight: 800; font-size: clamp(40px, 5vw, 76px); line-height: 0.9; }
.stat-label { font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--steel-400); }

/* ============ WORK PROCESS ============ */
.process-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(16px, 2vw, 32px); }
.proc { position: relative; padding-top: 36px; border-top: 2px solid var(--ink); }
.proc-num { font-family: var(--font-display); font-weight: 800; font-size: clamp(48px, 5vw, 80px); line-height: 0.8; color: transparent; -webkit-text-stroke: 1.5px var(--steel-300); display: block; margin-bottom: 22px; transition: -webkit-text-stroke-color .3s, color .3s; }
.proc:hover .proc-num { -webkit-text-stroke-color: var(--orange); }
.proc h4 { margin-bottom: 12px; }
.proc p { color: var(--steel-500); }

/* ============ REACH ============ */
.reach-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(32px, 5vw, 80px); align-items: center; }
.reach-content .kicker { margin-bottom: 22px; }
.reach-content h2 { margin-bottom: 26px; }
.reach-stats { display: flex; gap: clamp(24px, 4vw, 56px); margin-top: 40px; flex-wrap: wrap; }
.reach-stats > div { display: flex; flex-direction: column; gap: 8px; }
.reach-n { font-family: var(--font-display); font-weight: 800; font-size: clamp(28px, 3vw, 44px); color: var(--paper); line-height: 1; }
.reach-map .ph { aspect-ratio: 4/3; }

/* ============ BLOG ============ */
.blog-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(20px, 2.4vw, 36px); }
.blog-card { display: flex; flex-direction: column; }
.blog-thumb { aspect-ratio: 3/2; margin-bottom: 22px; transition: transform .4s; overflow: hidden; }
.blog-card:hover .blog-thumb { transform: scale(0.99); border-color: var(--steel-300); }
.blog-body { display: flex; flex-direction: column; gap: 14px; }
.blog-body .mono-tag { color: var(--orange); }
.blog-card h3 { transition: color .2s; }
.blog-card:hover h3 { color: var(--orange); }
.blog-body .text-link { margin-top: 6px; align-self: flex-start; }

/* ============ CTA ============ */
.cta-band { background: var(--orange); color: #fff; padding-block: clamp(70px, 9vw, 130px); position: relative; overflow: hidden; }
.cta-band::before { content: ""; position: absolute; inset: 0; background: radial-gradient(60% 100% at 80% 0%, rgba(255,255,255,0.18), transparent 60%); }
.cta-inner { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 22px; }
.cta-inner .kicker { color: rgba(255,255,255,0.9); }
.cta-inner .kicker::before { background: #fff; box-shadow: 0 0 0 4px rgba(255,255,255,0.25); }
.cta-title { color: #fff; font-size: clamp(30px, 7vw, 104px); }
.cta-title .orange { color: var(--ink); }
.cta-inner .lead { color: rgba(255,255,255,0.92); max-width: 52ch; }
.center-actions { justify-content: center; }
.cta-band .btn-orange { background: var(--ink); color: #fff; }
.cta-band .btn-orange:hover { background: #fff; color: var(--ink); }
.cta-band .btn-ghost.on-dark { border-color: rgba(255,255,255,0.5); }
.cta-band .btn-ghost.on-dark:hover { background: #fff; color: var(--ink); border-color: #fff; }

/* ============ ABOUT PAGE ============ */
.mvv-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(16px, 1.6vw, 24px); }
.mvv { background: var(--steel-900); border: 1px solid var(--line-dark); border-radius: var(--radius); padding: clamp(28px, 2.6vw, 44px); border-top: 3px solid var(--orange); }
.mvv-idx { color: var(--orange); font-size: 13px; display: block; margin-bottom: 28px; }
.mvv h3 { margin-bottom: 14px; }
.mvv p { color: var(--steel-300); }
.about-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.astat { background: var(--card); padding: clamp(28px, 3vw, 46px) clamp(20px,2vw,30px); display: flex; flex-direction: column; gap: 12px; align-items: center; text-align: center; }
.astat-num { font-family: var(--font-display); font-weight: 800; font-size: clamp(40px, 4.6vw, 68px); line-height: 0.9; color: var(--orange); }
.team-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(16px,1.8vw,26px); }
.team-card { display: flex; flex-direction: column; gap: 18px; }
.team-card .ph { transition: border-color .3s; }
.team-card:hover .ph { border-color: var(--orange); }
.team-meta { display: flex; flex-direction: column; gap: 4px; }
.team-meta .mono-tag { color: var(--orange); }

/* ============ SERVICES PAGE ============ */
.svc-detail { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 5vw, 80px); align-items: center; }
.svc-detail.reverse .svc-detail-media { order: 2; }
.svc-detail-content .kicker { margin-bottom: 22px; }
.svc-detail-content h2 { margin-bottom: 22px; }
.acc { border-top: 1px solid var(--line-dark); }
.acc-item { border-bottom: 1px solid var(--line-dark); }
.acc-head { width: 100%; display: flex; align-items: center; gap: 24px; padding: 26px 0; text-align: left; color: var(--paper); }
.acc-n { color: var(--steel-400); font-size: 13px; flex: none; width: 32px; transition: color .3s; }
.acc-title { font-family: var(--font-display); font-weight: 700; text-transform: uppercase; font-size: clamp(18px, 2vw, 26px); flex: 1; transition: color .3s; }
.acc-ic { position: relative; width: 18px; height: 18px; flex: none; }
.acc-ic::before, .acc-ic::after { content: ""; position: absolute; background: var(--orange); transition: transform .3s, opacity .3s; }
.acc-ic::before { left: 0; right: 0; top: 8px; height: 2px; }
.acc-ic::after { top: 0; bottom: 0; left: 8px; width: 2px; }
.acc-item.open .acc-ic::after { transform: scaleY(0); opacity: 0; }
.acc-item.open .acc-n { color: var(--orange); }
.acc-item.open .acc-title { color: var(--orange); }
.acc-body { max-height: 0; overflow: hidden; transition: max-height .45s ease; }
.acc-item.open .acc-body { max-height: 420px; }
.acc-body p { color: var(--steel-300); padding: 0 0 28px 56px; max-width: 70ch; }

/* ============ TECHNOLOGY PAGE ============ */
.tech-overview { display: grid; grid-template-columns: 0.85fr 1.15fr; gap: clamp(32px, 5vw, 80px); align-items: center; }
.tech-overview .kicker { margin-bottom: 22px; }
.tech-overview h2 { margin-bottom: 22px; }
.spec-table { margin-top: 34px; border-top: 1px solid var(--line); }
.spec-row { display: flex; align-items: baseline; justify-content: space-between; gap: 20px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.spec-row .mono-tag { color: var(--steel-500); }
.spec-v { font-family: var(--font-display); font-weight: 700; font-size: clamp(20px, 2.2vw, 30px); color: var(--ink); }
.feat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line-dark); border: 1px solid var(--line-dark); }
.feat { background: var(--ink); padding: clamp(26px, 2.6vw, 42px); }
.feat-n { color: var(--orange); font-size: 13px; display: block; margin-bottom: 24px; }
.feat h4 { margin-bottom: 12px; }
.feat p { color: var(--steel-300); }

/* ============ BLOG PAGE ============ */
.feature-post { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(28px, 4vw, 64px); align-items: center; }
.feature-post-body { display: flex; flex-direction: column; gap: 18px; }
.feature-post-body h2 { transition: color .2s; }
.feature-post:hover h2 { color: var(--orange); }
.feature-post-body .text-link { align-self: flex-start; margin-top: 6px; }
.news-form { display: flex; gap: 12px; width: 100%; max-width: 520px; margin-top: 14px; flex-wrap: wrap; }
.news-form input { flex: 1 1 240px; background: rgba(255,255,255,0.14); border: 1.5px solid rgba(255,255,255,0.5); border-radius: var(--radius); padding: 16px 20px; color: #fff; font-family: var(--font-mono); font-size: 16px; min-width: 0; }
.news-form input::placeholder { color: rgba(255,255,255,0.7); }
.news-form input:focus { outline: none; border-color: #fff; background: rgba(255,255,255,0.2); }

/* ============ CONTACT PAGE ============ */
.contact-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: clamp(32px, 5vw, 80px); align-items: start; }
.contact-form { display: flex; flex-direction: column; gap: 22px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.field { display: flex; flex-direction: column; gap: 9px; }
.field > span { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--steel-500); }
.field input, .field textarea { background: var(--card); border: 1.5px solid var(--line); border-radius: var(--radius); padding: 15px 18px; font-family: var(--font-body); font-size: 16px; color: var(--ink); transition: border-color .2s; resize: vertical; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--orange); }
.contact-form button { align-self: flex-start; margin-top: 6px; }
.contact-info { background: var(--ink); color: var(--paper); border-radius: var(--radius); padding: clamp(28px, 3vw, 44px); display: flex; flex-direction: column; gap: 28px; }
.info-block { display: flex; flex-direction: column; gap: 8px; padding-bottom: 24px; border-bottom: 1px solid var(--line-dark); }
.info-block:last-of-type { border-bottom: none; padding-bottom: 0; }
.info-block .mono-tag { color: var(--orange); }
.info-block p { color: var(--steel-200); font-size: 17px; }
.info-block a:hover { color: var(--orange); }

/* ============ RESPONSIVE ============ */
@media (max-width: 1100px) {
  .tech-overview { grid-template-columns: 1fr 1.2fr; }
}
@media (max-width: 980px) {
  .intro-grid, .why-grid, .reach-grid { grid-template-columns: 1fr; }
  .services-grid, .blog-grid { grid-template-columns: 1fr 1fr; }
  .process-grid { grid-template-columns: 1fr 1fr; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .mvv-grid { grid-template-columns: 1fr; }
  .about-stats, .team-grid { grid-template-columns: 1fr 1fr; }
  .svc-detail { grid-template-columns: 1fr; }
  .svc-detail.reverse .svc-detail-media { order: 0; }
  .tech-overview { grid-template-columns: 1fr; }
  .feat-grid { grid-template-columns: 1fr 1fr; }
  .feature-post { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .hero-specs { grid-template-columns: 1fr 1fr; }
  .hero-specs .spec:nth-child(3) { border-left: none; padding-left: 0; }
  .hero-specs .spec { padding: 20px 0 22px; }
  .why-media .ph { aspect-ratio: 16/11; }
  .why-badge { left: 0; bottom: 0; padding: 20px 24px; }
  /* stack the tall portrait media above copy, capped so it never dominates */
  .tech-overview > div:first-child .ph { aspect-ratio: 16/10; }
}
@media (max-width: 760px) {
  .hero { padding-top: 96px; }
  .hero-kicker { margin-bottom: 20px; font-size: 12px; gap: 10px; }
  .hero-actions { gap: 20px; margin-top: 28px; }
  .acc-head { gap: 14px; padding: 22px 0; }
  .acc-n { width: 24px; }
  .acc-body p { padding-left: 38px; padding-bottom: 24px; }
  .why-item { gap: 16px; }
  .info-block a { display: inline-flex; align-items: center; min-height: 44px; }
}
@media (max-width: 600px) {
  .services-grid, .blog-grid, .process-grid { grid-template-columns: 1fr; }
  .head-split { flex-direction: column; align-items: flex-start; gap: 24px; }
  .team-grid, .feat-grid { grid-template-columns: 1fr; }
  .about-stats, .stats-grid { grid-template-columns: 1fr 1fr; }
  .field-row { grid-template-columns: 1fr; }
  .reach-stats { gap: 22px 32px; }
  .contact-info { gap: 22px; }
  .news-form { flex-direction: column; align-items: stretch; }
  .news-form .btn { justify-content: center; }
  .contact-form button { align-self: stretch; justify-content: center; }
  .team-card .ph, .team-grid .ph { aspect-ratio: 4/3 !important; }
}
@media (max-width: 430px) {
  .hero-specs { grid-template-columns: 1fr; }
  .hero-specs .spec { border-left: none; padding-left: 0; padding: 16px 0; border-top: 1px solid var(--line-dark); }
  .hero-specs .spec:first-child { border-top: none; }
  .about-stats, .stats-grid { grid-template-columns: 1fr; }
  .acc-body p { padding-left: 0; }
  .why-badge { position: static; margin-top: -1px; border-radius: 0 0 var(--radius) var(--radius); }
}
