/* YTR INNOVATION LTD — Walthamstow Signal Box stylesheet
   Palette: BOX-PAPER #F2F1E8, INK-COAL #232B26, INTERLOCK-GREEN #2F5D46,
   TOWER-IRON #1D251F, CARD-PAPER #E8E6D7, BRASS-ROD #A8874F,
   TRACK-BROWN #6B4A38, ARM-RED #8E3B32 (semaphore arms ONLY). */

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-size: 16px;
  font-family: Georgia, "Times New Roman", serif;
  background-color: #F2F1E8;
  color: #232B26;
  line-height: 1.7;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }

a { color: #2F5D46; text-decoration: underline; }
a:hover { color: #1D251F; }

h1, h2, h3, h4 {
  font-family: "Iowan Old Style", Georgia, "Times New Roman", serif;
  color: #1D251F;
  line-height: 1.18;
  margin: 0 0 0.5em;
}

p { margin: 0 0 1.1em; }

.wrap {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ============ LEVER FRAME HEADER ============ */
.levernav {
  background-color: #1D251F;
  border-bottom: 6px solid #A8874F;
}

.levernav-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 14px 24px 0;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 8px;
}

.levernav-plate {
  background-color: #A8874F;
  color: #F2F1E8;
  border: 2px solid #6B4A38;
  border-radius: 6px;
  padding: 14px 18px;
  font-family: "Iowan Old Style", Georgia, serif;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  margin-bottom: 10px;
  box-shadow: inset 0 0 0 1px #E8E6D7;
}

.levernav-levers {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 6px;
  flex: 1 1 auto;
  justify-content: flex-end;
}

.lever {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  padding: 0 6px 0;
}

.lever-rod {
  width: 10px;
  background-color: #E8E6D7;
  border: 2px solid #6B4A38;
  border-radius: 4px 4px 0 0;
}

.lever-rod.tall { height: 62px; }
.lever-rod.mid { height: 50px; }
.lever-rod.short { height: 40px; }

.lever-ring {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background-color: #A8874F;
  border: 3px solid #6B4A38;
  margin-top: -6px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #1D251F;
  font-size: 0.72rem;
  font-weight: 700;
}

.lever-name {
  color: #F2F1E8;
  font-family: Georgia, serif;
  font-size: 0.82rem;
  margin-top: 8px;
  padding-bottom: 10px;
  border-bottom: 3px solid transparent;
}

.lever:hover .lever-name {
  color: #A8874F;
  border-bottom-color: #A8874F;
}

.levernav-toggle {
  display: none;
  background-color: #A8874F;
  color: #1D251F;
  border: 2px solid #6B4A38;
  border-radius: 6px;
  font-size: 1rem;
  font-weight: 700;
  padding: 8px 14px;
  margin: 0 0 12px auto;
  cursor: pointer;
  font-family: Georgia, serif;
}

/* ============ HERO — ROUTE BED STACKED ============ */
.routebed { padding: 54px 0 0; }

.routebed-copy {
  padding-bottom: 40px;
}

.routebed-eyebrow {
  font-size: 0.82rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #6B4A38;
  font-weight: 700;
  margin-bottom: 14px;
}

.routebed-title {
  font-size: 2.9rem;
  color: #232B26;
  margin-bottom: 18px;
}

.routebed-title .green { color: #2F5D46; }

.routebed-display {
  display: block;
  font-size: 5rem;
  letter-spacing: 0.02em;
  color: #1D251F;
  line-height: 0.98;
}

.routebed-lead {
  max-width: 720px;
  font-size: 1.08rem;
  color: #232B26;
}

.routebed-secondary {
  display: inline-block;
  margin-top: 6px;
  font-weight: 700;
  color: #2F5D46;
  text-decoration: none;
  border-bottom: 2px solid #2F5D46;
}

.routebed-secondary:hover { color: #1D251F; border-bottom-color: #1D251F; }

/* route bed scene */
.routebed-scene {
  background-color: #1D251F;
  padding: 34px 24px 0;
}

.routebed-scene-inner {
  max-width: 1120px;
  margin: 0 auto;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px;
  flex-wrap: wrap;
}

/* left lever frame */
.routestand-frame {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  padding-bottom: 26px;
}

.stand-lever {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.stand-rod {
  width: 8px;
  background-color: #E8E6D7;
  border: 2px solid #6B4A38;
  border-radius: 3px;
  transform-origin: bottom center;
}

.stand-rod.angle-a { height: 56px; transform: rotate(-16deg); }
.stand-rod.angle-b { height: 48px; transform: rotate(10deg); }
.stand-rod.angle-c { height: 60px; transform: rotate(-6deg); }
.stand-rod.angle-d { height: 44px; transform: rotate(18deg); }
.stand-rod.angle-e { height: 52px; transform: rotate(-12deg); }

.stand-ring {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background-color: #A8874F;
  border: 2px solid #6B4A38;
  margin-top: 4px;
}

/* center route bed */
.routebed-rails {
  flex: 1 1 320px;
  min-width: 280px;
  padding-bottom: 12px;
}

.rail-line {
  height: 8px;
  background-color: #6B4A38;
  border-top: 2px solid #A8874F;
  border-bottom: 2px solid #1D251F;
  border-radius: 3px;
  margin: 12px 0;
}

.rail-line.narrow { width: 70%; }
.rail-line.narrower { width: 52%; }

.rail-converge {
  height: 74px;
  position: relative;
  margin: 0 0 6px;
}

.converge-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 6px;
  background-color: #6B4A38;
  border-radius: 3px;
}

.converge-a {
  position: absolute;
  bottom: 6px;
  left: 0;
  width: 100%;
  height: 5px;
  background-color: #6B4A38;
  transform-origin: bottom left;
  transform: rotate(-9deg);
}

.converge-b {
  position: absolute;
  bottom: 6px;
  left: 0;
  width: 100%;
  height: 5px;
  background-color: #6B4A38;
  transform-origin: bottom right;
  transform: rotate(9deg);
}

.point-blade {
  position: absolute;
  bottom: 10px;
  left: 48%;
  width: 60px;
  height: 5px;
  background-color: #A8874F;
  transform: rotate(20deg);
  border-radius: 3px;
}

.routeboard {
  display: inline-block;
  background-color: #E8E6D7;
  color: #1D251F;
  border: 2px solid #A8874F;
  border-radius: 5px;
  padding: 8px 14px;
  font-size: 0.86rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  margin-top: 10px;
}

.routeboard .cleared { color: #2F5D46; }

/* right signal mast with semaphores */
.routemast {
  position: relative;
  width: 180px;
  padding-bottom: 12px;
}

.mast-pole {
  position: absolute;
  right: 40px;
  bottom: 0;
  width: 14px;
  height: 190px;
  background-color: #232B26;
  border: 2px solid #6B4A38;
  border-radius: 4px;
}

.semaphore {
  position: absolute;
  right: 48px;
  display: flex;
  align-items: center;
}

.semaphore.upper { bottom: 150px; }
.semaphore.lower { bottom: 92px; }

.sem-arm {
  width: 96px;
  height: 16px;
  border-radius: 3px;
  border: 2px solid #1D251F;
  position: relative;
}

.sem-arm.red {
  background-color: #8E3B32;
}

.sem-arm.green {
  background-color: #2F5D46;
}

.semweight {
  width: 20px;
  height: 26px;
  background-color: #232B26;
  border: 2px solid #A8874F;
  border-radius: 3px;
  margin-left: -4px;
}

.sem-upper-arm { transform: rotate(0deg); }
.lampbox {
  position: absolute;
  right: 20px;
  bottom: 214px;
  width: 26px;
  height: 30px;
  background-color: #A8874F;
  border: 2px solid #6B4A38;
  border-radius: 4px;
}

/* primary CTA bar */
.routebed-cta {
  display: block;
  background-color: #2F5D46;
  color: #F2F1E8;
  text-align: center;
  text-decoration: none;
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  padding: 20px 24px;
  margin-top: 30px;
  border-top: 5px solid #A8874F;
}

.routebed-cta:hover { background-color: #1D251F; color: #F2F1E8; }

.routebed-cta .arrow { margin-left: 12px; }

/* ============ SECTION HEADS ============ */
.section { padding: 68px 0; }

.section-head { max-width: 760px; margin-bottom: 34px; }

.section-kicker {
  font-size: 0.8rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #6B4A38;
  font-weight: 700;
  margin-bottom: 10px;
}

.section-title { font-size: 2.1rem; margin-bottom: 12px; }

.section-intro { font-size: 1.05rem; }

/* ============ SIGNAL-BOX JOB-CARD LADDER ============ */
.jobcards { background-color: #E8E6D7; }

.jobrack { position: relative; }

.jobcard {
  background-color: #F2F1E8;
  border: 2px solid #1D251F;
  border-radius: 6px;
  padding: 22px 24px;
  margin-bottom: 26px;
  box-shadow: 6px 6px 0 #1D251F;
  position: relative;
}

.jobcard h3 { font-size: 1.3rem; margin-bottom: 8px; }
.jobcard p { margin-bottom: 0; }

.jobcard .card-link { font-weight: 700; }

.jobchip {
  display: inline-block;
  background-color: #A8874F;
  color: #1D251F;
  border: 2px solid #6B4A38;
  border-radius: 4px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  padding: 3px 9px;
  margin-bottom: 10px;
}

/* deliberate irregular widths and offsets */
.jobcard-wide { width: 74%; margin-left: 0; }
.jobcard-narrow { width: 44%; margin-left: 52%; margin-top: -18px; }
.jobcard-medium { width: 60%; margin-left: 16%; margin-top: 8px; }
.jobcard-tall { width: 52%; margin-left: 4%; }
.jobcard-short { width: 40%; margin-left: 50%; margin-top: -12px; }
.jobcard-mid { width: 66%; margin-left: 22%; margin-top: 6px; }

/* single decorative devices, used at most once each */
.deco-clip::before {
  content: "";
  position: absolute;
  top: -14px;
  left: 26px;
  width: 8px;
  height: 26px;
  border: 2px solid #6B4A38;
  border-radius: 5px;
  border-bottom: none;
}

.deco-punch::after {
  content: "";
  position: absolute;
  top: 10px;
  right: 14px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background-color: #E8E6D7;
  border: 2px solid #6B4A38;
}

/* ============ PROSE BLOCKS ============ */
.prose-two {
  column-count: 2;
  column-gap: 42px;
}

.prose-two p { break-inside: avoid; }

.pullquote {
  border-left: 8px solid #2F5D46;
  background-color: #E8E6D7;
  padding: 20px 24px;
  margin: 26px 0;
  font-size: 1.1rem;
  color: #1D251F;
}

/* ============ WOVEN SERVICE INDEX ============ */
.woven-list { list-style: none; padding: 0; margin: 0; }

.woven-list li {
  padding: 14px 0 14px 26px;
  border-bottom: 1px solid #6B4A38;
  position: relative;
}

.woven-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 22px;
  width: 10px;
  height: 10px;
  background-color: #A8874F;
  border: 2px solid #6B4A38;
  border-radius: 50%;
}

/* ============ BRASS CAST-PLATE BAND ============ */
.brassband {
  background-color: #1D251F;
  border-top: 5px solid #A8874F;
  border-bottom: 5px solid #A8874F;
  padding: 24px 0;
}

.brassband-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}

.brassband-plate {
  background-color: #A8874F;
  color: #1D251F;
  border: 2px solid #6B4A38;
  border-radius: 5px;
  padding: 8px 14px;
  font-weight: 700;
  letter-spacing: 0.08em;
  font-size: 0.9rem;
  white-space: nowrap;
}

.brassband-text {
  color: #F2F1E8;
  font-size: 1.02rem;
  margin: 0;
  flex: 1 1 320px;
}

/* ============ BLOCK BELL / OIL LAMP ACCENTS ============ */
.workshop-strip {
  display: flex;
  gap: 26px;
  flex-wrap: wrap;
  margin-top: 30px;
}

.workshop-item {
  flex: 1 1 240px;
  background-color: #F2F1E8;
  border: 2px solid #1D251F;
  border-radius: 6px;
  padding: 20px 22px;
}

.workshop-item h4 { margin-bottom: 8px; }

.bell {
  width: 40px;
  height: 40px;
  border-radius: 50% 50% 8px 8px;
  background-color: #A8874F;
  border: 3px solid #6B4A38;
  margin-bottom: 12px;
}

.oillamp {
  width: 26px;
  height: 34px;
  background-color: #2F5D46;
  border: 2px solid #6B4A38;
  border-radius: 4px 4px 10px 10px;
  margin-bottom: 12px;
  position: relative;
}

.oillamp::before {
  content: "";
  position: absolute;
  top: -12px;
  left: 8px;
  width: 6px;
  height: 12px;
  background-color: #232B26;
  border-radius: 3px;
}

/* ============ MAINTENANCE JOB-CARD / TABLE ============ */
.tasklines { width: 100%; border-collapse: collapse; margin-top: 20px; }
.tasklines th, .tasklines td {
  text-align: left;
  padding: 12px 14px;
  border-bottom: 1px solid #6B4A38;
}
.tasklines th {
  background-color: #1D251F;
  color: #F2F1E8;
  font-size: 0.9rem;
  letter-spacing: 0.05em;
}
.tasklines tr:nth-child(even) td { background-color: #E8E6D7; }

/* ============ SERVICE DETAIL (services.html) ============ */
.servicedetail {
  border-top: 4px solid #1D251F;
  padding-top: 30px;
  margin-top: 34px;
}
.servicedetail h3 { font-size: 1.55rem; }
.servicedetail .sindex {
  display: inline-block;
  background-color: #A8874F;
  color: #1D251F;
  border: 2px solid #6B4A38;
  border-radius: 4px;
  padding: 3px 10px;
  font-weight: 700;
  margin-bottom: 12px;
}

/* ============ CONTACT FORM ============ */
.contact-grid {
  display: flex;
  gap: 40px;
  flex-wrap: wrap;
}

.contact-form-wrap { flex: 1 1 440px; }
.contact-info-wrap { flex: 1 1 300px; }

.field { margin-bottom: 18px; }

.field label {
  display: block;
  font-weight: 700;
  margin-bottom: 6px;
  color: #1D251F;
}

.field input,
.field textarea {
  width: 100%;
  padding: 12px 14px;
  font-size: 1rem;
  font-family: Georgia, serif;
  color: #232B26;
  background-color: #F2F1E8;
  border: 2px solid #1D251F;
  border-radius: 5px;
}

.field textarea { min-height: 150px; resize: vertical; }

.btn-submit {
  display: inline-block;
  background-color: #2F5D46;
  color: #F2F1E8;
  border: 2px solid #1D251F;
  border-radius: 5px;
  font-size: 1.05rem;
  font-weight: 700;
  padding: 14px 30px;
  cursor: pointer;
  font-family: Georgia, serif;
}

.btn-submit:hover { background-color: #1D251F; }

.formstatus {
  margin-top: 16px;
  font-weight: 700;
  color: #2F5D46;
}

.info-block {
  background-color: #E8E6D7;
  border: 2px solid #1D251F;
  border-radius: 6px;
  padding: 22px 24px;
  margin-bottom: 20px;
}

.info-block h4 { margin-bottom: 10px; }

/* FAQ accordion */
.faq-item {
  border: 2px solid #1D251F;
  border-radius: 6px;
  margin-bottom: 12px;
  background-color: #F2F1E8;
  overflow: hidden;
}

.faq-q {
  width: 100%;
  text-align: left;
  background-color: #E8E6D7;
  border: none;
  padding: 16px 20px;
  font-size: 1.02rem;
  font-weight: 700;
  color: #1D251F;
  cursor: pointer;
  font-family: Georgia, serif;
}

.faq-q:hover { background-color: #2F5D46; color: #F2F1E8; }

.faq-a {
  padding: 0 20px;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
}

.faq-item.open .faq-a {
  max-height: 400px;
  padding: 14px 20px 18px;
}

/* ============ SCROLL REVEAL ============ */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* ============ TOWER ROOM FOOTER ============ */
.towerfoot {
  background-color: #1D251F;
  color: #F2F1E8;
  padding: 54px 0 0;
  border-top: 6px solid #A8874F;
}

.towerfoot-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  gap: 46px;
  flex-wrap: wrap;
}

.towerfoot-brand { flex: 1 1 320px; }

.towerfoot-plate {
  background-color: #A8874F;
  color: #1D251F;
  border: 2px solid #6B4A38;
  border-radius: 6px;
  padding: 12px 16px;
  font-weight: 700;
  letter-spacing: 0.06em;
  display: inline-block;
  margin-bottom: 16px;
}

.towerfoot-blurb { color: #E8E6D7; }

.towerfoot-links {
  flex: 2 1 420px;
  display: flex;
  gap: 60px;
  flex-wrap: wrap;
}

.towerfoot-col h4 {
  color: #A8874F;
  font-size: 0.86rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.towerfoot-lamp {
  width: 14px;
  height: 20px;
  background-color: #2F5D46;
  border: 2px solid #A8874F;
  border-radius: 3px 3px 7px 7px;
  display: inline-block;
}

.towerfoot-col ul { list-style: none; padding: 0; margin: 0; }

.towerfoot-col li { margin-bottom: 10px; }

.towerfoot-col a {
  color: #F2F1E8;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  padding-bottom: 2px;
}

.towerfoot-col a:hover {
  color: #A8874F;
  border-bottom-color: #A8874F;
}

.towerfoot-shelf {
  height: 10px;
  background-color: #6B4A38;
  margin: 32px auto 0;
  max-width: 1120px;
  border-radius: 3px;
}

.towerfoot-legal {
  background-color: #232B26;
  margin-top: 24px;
  border-top: 2px solid #6B4A38;
}

.towerfoot-legal-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 18px 24px 22px;
  color: #E8E6D7;
  font-size: 0.9rem;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 26px;
}

.brassdiamond {
  display: inline-block;
  width: 10px;
  height: 10px;
  background-color: #A8874F;
  transform: rotate(45deg);
  margin-right: 8px;
  vertical-align: middle;
}

/* ============ RESPONSIVE ============ */
@media (max-width: 900px) {
  .routebed-title { font-size: 2.2rem; }
  .routebed-display { font-size: 3.4rem; }
  .prose-two { column-count: 1; }
  .jobcard-wide, .jobcard-narrow, .jobcard-medium,
  .jobcard-tall, .jobcard-short, .jobcard-mid {
    width: 100%;
    margin-left: 0;
    margin-top: 0;
  }
}

@media (max-width: 720px) {
  .levernav-toggle { display: inline-block; }
  .levernav-levers {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
  }
  .levernav-levers.open { display: flex; }
  .lever {
    flex-direction: row;
    justify-content: flex-start;
    gap: 14px;
    background-color: #232B26;
    border: 2px solid #6B4A38;
    border-radius: 6px;
    padding: 10px 14px;
    margin-bottom: 8px;
  }
  .lever-rod, .lever-ring {
    width: auto;
    height: auto;
    border-radius: 0;
    background: none;
    border: none;
    margin: 0;
    color: #A8874F;
    font-weight: 700;
  }
  .lever-rod { display: none; }
  .lever-name { padding-bottom: 0; border-bottom: none; }
  .routebed-display { font-size: 2.6rem; }
  .routebed-scene-inner { justify-content: center; }
  .routemast { margin: 0 auto; }
}
