/* Tiba Freight – sections */

/* quote hero: photo band on top, calculator overlapping */
.quote { position: relative; background: var(--mist); padding-bottom: 4rem; }
.quote__photo { height: 420px; overflow: hidden; }
.quote__photo img { width: 100%; height: 100%; object-fit: cover; object-position: center 70%; }
.quote__grid { display: grid; grid-template-columns: 1fr 1.05fr; gap: 3rem; align-items: start; margin-top: -8rem; position: relative; }
.quote__intro { background: var(--cobalt); color: #fff; padding: 2.4rem; }
.quote__intro h1 { font-size: clamp(1.8rem, 3.6vw, 2.9rem); line-height: 1.3; }
.quote__intro p { color: #D5DDF7; margin: 0; }

.calc { background: #fff; padding: 2rem; border-top: 6px solid var(--red); box-shadow: 0 18px 40px rgba(21,25,42,.12); display: grid; gap: 1rem; }
.calc__title { font-size: 1.3rem; margin: 0; }
.calc label { display: flex; flex-direction: column; gap: .3rem; font-weight: 700; font-size: .9rem; }
.calc select, .calc input[type="number"], .calc input[type="tel"] { font: inherit; font-weight: 400; font-size: 1rem; border: 2px solid var(--line); padding: .6rem .7rem; min-height: 50px; background: #fff; }
.calc select:focus, .calc input:focus { border-color: var(--cobalt); outline: none; }
.calc__route { display: grid; grid-template-columns: 1fr auto 1fr; gap: .6rem; align-items: end; }
.calc__swap { font-size: 1.3rem; width: 50px; height: 50px; border: 2px solid var(--line); background: var(--mist); cursor: pointer; }
.calc__swap:hover { border-color: var(--cobalt); }
.calc__row { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; }
.calc .calc__check { flex-direction: row; align-items: center; gap: .5rem; font-weight: 400; }
.calc__check input { width: 20px; height: 20px; accent-color: var(--cobalt); }

.calc__out { background: var(--asphalt); color: #fff; padding: 1.2rem 1.4rem; }
.calc__label { font-size: .82rem; color: #AEB3C2; }
.calc__price { display: block; font-size: clamp(1.4rem, 3vw, 2rem); font-weight: 800; line-height: 1.4; }
.calc__meta { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; margin: .8rem 0 0; padding-top: .8rem; border-top: 2px dashed #555A63; }
.calc__meta dt { font-size: .75rem; color: #AEB3C2; }
.calc__meta dd { margin: 0; font-weight: 700; font-size: .92rem; }
.calc__error { margin: 0; color: #FFB4AF; font-weight: 700; }

.calc__confirm { display: grid; grid-template-columns: 1fr auto; gap: .8rem; align-items: end; }
.calc__confirm button { font: inherit; font-weight: 800; background: var(--cobalt); color: #fff; border: 0; padding: 0 1.5rem; min-height: 50px; cursor: pointer; }
.calc__confirm button:hover { background: var(--cobalt-dark); }
.calc input[aria-invalid="true"] { border-color: var(--red); }
.calc__done { margin: 0; font-weight: 700; color: var(--cobalt); }
.calc__done:empty { display: none; }
.calc__done.is-error { color: var(--red); }
.calc__fine { font-size: .78rem; color: var(--muted); margin: 0; }

/* cargo rows with road-marking divider */
.cargo { padding: 5rem 0; }
.cargo__rows { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2rem; margin-top: 1.5rem; }
.cargo__row { border-top: 6px solid var(--ink); padding-top: 1rem; position: relative; }
.cargo__row::before { content: ""; position: absolute; top: -6px; inset-inline-start: 0; width: 40%; height: 6px; background: var(--red); }
.cargo__row p { color: var(--muted); font-size: .95rem; }

/* fleet */
.fleet { background: var(--mist); padding: 5rem 0; }
.fleet__grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: 3rem; align-items: center; }
.fleet__lead { color: var(--muted); max-width: 40em; }
.fleet__table { overflow-x: auto; background: #fff; }
.fleet__table table { width: 100%; border-collapse: collapse; min-width: 560px; }
.fleet__table th, .fleet__table td { text-align: right; padding: .85rem 1rem; border-bottom: 1px solid var(--line); }
.fleet__table thead th { background: var(--cobalt); color: #fff; font-size: .85rem; }
.fleet__table tbody th { font-weight: 700; }
.fleet__table td:last-child { font-weight: 800; font-size: 1.1rem; color: var(--cobalt); }
.fleet__fig { margin: 0; }
.fleet__fig img { width: 100%; aspect-ratio: 6 / 5; object-fit: cover; }
.fleet__fig figcaption { font-size: .86rem; color: var(--muted); padding: .7rem 0; border-bottom: 2px solid var(--ink); }

/* departure board */
.board { background: var(--asphalt); color: #fff; padding: 5rem 0; }
.board__lead { color: #C3C7D2; max-width: 46em; }
.board__scroll { overflow-x: auto; margin-top: 1.5rem; }
.board__table { width: 100%; border-collapse: separate; border-spacing: 4px; min-width: 720px; }
.board__table th, .board__table td { background: #383B41; padding: .8rem; text-align: center; }
.board__table thead th { background: transparent; color: #AEB3C2; font-weight: 400; font-size: .85rem; }
.board__table tbody th { text-align: right; font-weight: 800; background: #25272B; white-space: nowrap; }
.board__table td:last-child { background: transparent; color: #FFD6D4; font-size: .9rem; white-space: nowrap; }
.board__table td.go { background: var(--red); font-weight: 800; font-size: .88rem; }

/* steps */
.steps { padding: 5rem 0; }
.steps__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem 3rem; align-items: start; }
.steps h2 { grid-column: 1 / -1; }
.steps ol { list-style: none; counter-reset: st; margin: 0; padding: 0; }
.steps li { counter-increment: st; display: grid; grid-template-columns: 3.2rem 1fr; padding: 1rem 0; border-bottom: 1px solid var(--line); }
.steps li::before { content: counter(st); grid-row: span 2; font-size: 2rem; font-weight: 800; color: var(--red); line-height: 1; }
.steps li b { font-size: 1.1rem; }
.steps li span { color: var(--muted); }
.steps img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }

/* business */
.biz { background: var(--cobalt); color: #fff; padding: 3.5rem 0; }
.biz__grid { display: grid; grid-template-columns: auto 1fr auto; gap: 2.5rem; align-items: center; }
.biz h2 { margin: 0; font-size: clamp(1.5rem, 3vw, 2.1rem); }
.biz p { margin: 0; color: #D5DDF7; max-width: 40em; }
.cta { background: #fff; color: var(--cobalt); text-decoration: none; font-weight: 800; padding: .9rem 1.5rem; white-space: nowrap; }
.cta:hover { background: var(--mist); }

/* faq */
.faq { padding: 5rem 0; }
.faq__grid { display: grid; grid-template-columns: 1fr 2fr; gap: 3rem; }
.faq details { border-bottom: 2px solid var(--ink); }
.faq summary { cursor: pointer; font-weight: 800; font-size: 1.08rem; padding: 1.1rem 0; list-style: none; display: flex; justify-content: space-between; gap: 1rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--red); font-size: 1.4rem; line-height: 1; }
.faq details[open] summary::after { content: "−"; }
.faq details p { color: var(--muted); }

@media (max-width: 1000px) {
  .quote__grid { grid-template-columns: 1fr; gap: 0; margin-top: -6rem; }
  .cargo__rows { grid-template-columns: 1fr 1fr; }
  .fleet__grid, .faq__grid { grid-template-columns: 1fr; gap: 2rem; }
  .biz__grid { grid-template-columns: 1fr; gap: 1rem; }
  .cta { justify-self: start; }
}
@media (max-width: 640px) {
  .quote__photo { height: 260px; }
  .quote__grid { margin-top: -3rem; width: 100%; }
  .quote__intro { padding: 1.5rem 1.25rem; }
  .calc { padding: 1.25rem; box-shadow: none; }
  .calc__row, .calc__confirm { grid-template-columns: 1fr; }
  .calc__confirm button { width: 100%; }
  .calc__meta { grid-template-columns: 1fr 1fr; }
  .cargo__rows, .steps__grid { grid-template-columns: 1fr; }
  .cargo, .fleet, .board, .steps, .faq { padding: 3.5rem 0; }
}

/* prevent wide tables/forms from stretching grid tracks on small screens */
.quote__grid > *, .fleet__grid > *, .faq__grid > *, .steps__grid > *, .biz__grid > * { min-width: 0; }
.calc__route > label, .calc__row > label, .calc__confirm > label { min-width: 0; }
.calc select { width: 100%; }
