/* Appily Nineteen — Orchard Transit Beacon tracker (unique ot- layout) */

.page-orchard-transit {
  --ot-deep: #0c2d3e;
  --ot-teal: #1a6b7a;
  --ot-sea: #2a9d8f;
  --ot-moss: #145233;
  --ot-honey: #e8a317;
  --ot-coral: #d45a3a;
  --ot-paper: #f4f1ea;
  --ot-ink: #15202b;
  --ot-line: #d4cdc0;
  --ot-mono: 'IBM Plex Mono', 'Consolas', monospace;
  --ot-serif: 'Fraunces', Georgia, serif;
  --ot-sans: 'Sora', system-ui, sans-serif;
  background:
    radial-gradient(ellipse at 90% 0%, rgba(42, 157, 143, 0.08) 0%, transparent 50%),
    linear-gradient(180deg, #eef6f5 0%, var(--ot-paper) 320px);
}

/* ── Beacon hero ── */
.ot-beacon-hero {
  position: relative;
  padding: clamp(32px, 5vw, 52px) 0 clamp(28px, 4vw, 40px);
  background: linear-gradient(155deg, var(--ot-deep) 0%, var(--ot-teal) 52%, #0f4a52 100%);
  color: #fff;
  overflow: hidden;
}

.ot-wave {
  position: absolute;
  inset: auto 0 -1px;
  height: 48px;
  background: var(--ot-paper);
  clip-path: ellipse(120% 100% at 50% 100%);
}

.ot-grid-lines {
  position: absolute;
  inset: 0;
  opacity: 0.12;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.15) 1px, transparent 1px),
    linear-gradient(0deg, rgba(255, 255, 255, 0.1) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
}

.ot-hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: clamp(24px, 4vw, 48px);
  align-items: center;
}

.ot-kicker {
  margin: 0 0 10px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.6);
}

.ot-hero-copy h1 {
  margin: 0 0 12px;
  font-family: var(--ot-serif);
  font-size: clamp(1.95rem, 4.2vw, 2.85rem);
  line-height: 1.1;
  font-weight: 600;
}

.ot-hero-copy h1 em {
  font-style: italic;
  color: var(--ot-honey);
}

.ot-lede {
  margin: 0 0 18px;
  max-width: 520px;
  font-size: 0.96rem;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.82);
}

.ot-signal-bars {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.ot-signal-bars li span {
  display: inline-block;
  padding: 6px 14px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 4px;
  font-family: var(--ot-mono);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: rgba(0, 0, 0, 0.18);
}

/* Compass beacon */
.ot-compass {
  display: grid;
  justify-items: center;
  gap: 8px;
  padding: 22px 28px 18px;
  min-width: 180px;
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 12px;
  text-align: center;
  box-shadow: inset 0 0 32px rgba(42, 157, 143, 0.15);
}

.ot-compass-face {
  position: relative;
  width: 110px;
  height: 110px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #2d5a62, #0a2228);
  border: 3px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 0 0 6px rgba(42, 157, 143, 0.15);
}

.ot-compass-ring {
  position: absolute;
  inset: 8px;
  border-radius: 50%;
  border: 1px dashed rgba(255, 255, 255, 0.25);
}

.ot-compass-needle {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 4px;
  height: 42px;
  margin: -42px 0 0 -2px;
  background: linear-gradient(180deg, var(--ot-coral) 0%, var(--ot-coral) 48%, #fff 52%, #fff 100%);
  transform-origin: bottom center;
  transform: rotate(-25deg);
  border-radius: 2px;
  transition: transform 0.6s ease;
  animation: ot-needle-idle 4s ease-in-out infinite;
}

.ot-compass.is-found .ot-compass-needle {
  transform: rotate(65deg);
  animation: none;
}

.ot-compass.is-miss .ot-compass-needle {
  transform: rotate(-120deg);
  background: linear-gradient(180deg, #888 0%, #888 48%, #ccc 52%, #ccc 100%);
  animation: ot-needle-wobble 0.8s ease-in-out infinite;
}

@keyframes ot-needle-idle {
  0%, 100% { transform: rotate(-25deg); }
  50% { transform: rotate(15deg); }
}

@keyframes ot-needle-wobble {
  0%, 100% { transform: rotate(-115deg); }
  50% { transform: rotate(-125deg); }
}

.ot-compass-n,
.ot-compass-e,
.ot-compass-s,
.ot-compass-w {
  position: absolute;
  font-family: var(--ot-mono);
  font-size: 0.62rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.55);
}

.ot-compass-n { top: 6px; left: 50%; transform: translateX(-50%); }
.ot-compass-e { right: 8px; top: 50%; transform: translateY(-50%); }
.ot-compass-s { bottom: 6px; left: 50%; transform: translateX(-50%); }
.ot-compass-w { left: 8px; top: 50%; transform: translateY(-50%); }

.ot-compass-temp {
  font-family: var(--ot-mono);
  font-size: 1.4rem;
  color: #7ee8d8;
  text-shadow: 0 0 10px rgba(126, 232, 216, 0.4);
}

.ot-compass-label {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.ot-compass-code {
  font-family: var(--ot-mono);
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0.55;
}

/* ── Deck layout ── */
.ot-deck {
  padding: clamp(28px, 4vw, 44px) 0 clamp(56px, 6vw, 84px);
}

.ot-deck-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: clamp(20px, 3vw, 32px);
  align-items: start;
}

/* Waybill form card */
.ot-waybill {
  position: relative;
  padding: clamp(22px, 3vw, 30px);
  background: #fff;
  border: 1px solid var(--ot-line);
  border-radius: 4px;
  box-shadow: 0 8px 28px rgba(21, 32, 43, 0.08);
}

.ot-waybill::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 6px;
  background: repeating-linear-gradient(
    90deg,
    var(--ot-teal) 0,
    var(--ot-teal) 16px,
    var(--ot-honey) 16px,
    var(--ot-honey) 32px
  );
}

.ot-waybill-head {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 14px;
  align-items: start;
  margin-bottom: 14px;
  padding-top: 4px;
}

.ot-waybill-qr {
  display: grid;
  grid-template-columns: repeat(3, 10px);
  gap: 3px;
  padding: 6px;
  border: 1px solid var(--ot-line);
  background: var(--ot-paper);
}

.ot-waybill-qr span {
  width: 10px;
  height: 10px;
  background: var(--ot-ink);
}

.ot-waybill-qr span:nth-child(2),
.ot-waybill-qr span:nth-child(4),
.ot-waybill-qr span:nth-child(6),
.ot-waybill-qr span:nth-child(8) {
  background: transparent;
}

.ot-waybill-tag {
  margin: 0 0 4px;
  font-family: var(--ot-mono);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ot-teal);
}

.ot-waybill h2 {
  margin: 0;
  font-family: var(--ot-serif);
  font-size: clamp(1.15rem, 2.4vw, 1.4rem);
}

.ot-waybill-stamp {
  padding: 6px 12px;
  border: 2px solid var(--ot-coral);
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ot-coral);
  transform: rotate(-6deg);
}

.ot-waybill-note {
  margin: 0 0 20px;
  font-size: 0.88rem;
  color: #5c6670;
  line-height: 1.6;
}

.ot-waybill-form {
  display: grid;
  gap: 16px;
}

.ot-field label {
  display: block;
  margin-bottom: 6px;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--ot-ink);
}

.ot-field input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--ot-line);
  border-radius: 4px;
  background: var(--ot-paper);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.ot-field input:focus {
  outline: none;
  border-color: var(--ot-sea);
  box-shadow: 0 0 0 3px rgba(42, 157, 143, 0.18);
}

.ot-input-mono {
  font-family: var(--ot-mono);
  font-size: 0.9rem;
  letter-spacing: 0.02em;
}

.ot-form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 4px;
}

.ot-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 22px;
  border-radius: 4px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.ot-btn-primary {
  border: 0;
  background: var(--ot-teal);
  color: #fff;
}

.ot-btn-primary:hover {
  background: var(--ot-deep);
  color: #fff;
}

.ot-btn-ghost {
  border: 2px solid var(--ot-teal);
  background: transparent;
  color: var(--ot-teal);
}

.ot-btn-ghost:hover {
  background: rgba(26, 107, 122, 0.08);
}

.ot-btn-wide {
  width: 100%;
  margin-top: 8px;
}

.ot-waybill-perf {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -10px;
  height: 10px;
  background:
    radial-gradient(circle at 8px 0, transparent 8px, #fff 8px) 0 0 / 16px 10px repeat-x;
}

/* Milepost sidebar */
.ot-milepost {
  position: sticky;
  top: calc(var(--header-h, 72px) + 16px);
  padding: 20px 16px 18px 28px;
  background: var(--ot-paper);
  border: 1px solid var(--ot-line);
  border-radius: 4px;
}

.ot-milepost-pole {
  position: absolute;
  left: 12px;
  top: 0;
  bottom: 0;
  width: 6px;
  background: linear-gradient(180deg, #8b7355, #5c4a32);
  border-radius: 3px;
}

.ot-milepost-pole::before {
  content: "";
  position: absolute;
  top: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--ot-honey);
  border: 2px solid #5c4a32;
}

.ot-milepost-title {
  margin: 0 0 14px;
  font-family: var(--ot-serif);
  font-size: 1rem;
  color: var(--ot-ink);
}

.ot-plaque-grid {
  display: grid;
  gap: 10px;
}

.ot-plaque {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 4px 10px;
  padding: 10px 12px;
  background: #fff;
  border: 1px solid var(--ot-line);
  border-left: 4px solid var(--ot-sea);
  text-decoration: none;
  color: inherit;
  transition: transform 0.15s, border-color 0.15s, box-shadow 0.15s;
}

.ot-plaque:hover {
  transform: translateX(4px);
  border-left-color: var(--ot-honey);
  box-shadow: 0 4px 12px rgba(21, 32, 43, 0.08);
}

.ot-plaque-arrow {
  grid-row: span 2;
  align-self: center;
  font-size: 1rem;
  color: var(--ot-teal);
}

.ot-plaque strong {
  display: block;
  font-size: 0.84rem;
  color: var(--ot-ink);
}

.ot-plaque small {
  display: block;
  font-size: 0.72rem;
  color: #6b7280;
}

/* ── Readout / flipboard ── */
.ot-readout {
  margin-top: clamp(28px, 4vw, 44px);
}

.ot-flipboard {
  padding: clamp(24px, 4vw, 36px);
  background: #fff;
  border: 2px solid var(--ot-line);
  border-radius: 4px;
  box-shadow: 0 10px 32px rgba(21, 32, 43, 0.08);
}

.ot-flipboard-hit {
  border-color: var(--ot-sea);
  box-shadow: 0 0 0 4px rgba(42, 157, 143, 0.1), 0 10px 32px rgba(21, 32, 43, 0.08);
}

.ot-flipboard-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.ot-tag {
  padding: 5px 12px;
  border-radius: 2px;
  font-family: var(--ot-mono);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.ot-tag-ok {
  background: rgba(42, 157, 143, 0.15);
  color: var(--ot-teal);
}

.ot-tag-warn {
  background: rgba(212, 90, 58, 0.12);
  color: var(--ot-coral);
}

.ot-status-chip {
  margin-left: auto;
  padding: 6px 14px;
  background: var(--ot-deep);
  color: #fff;
  font-family: var(--ot-mono);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  border-radius: 2px;
}

.ot-order-id {
  margin: 0 0 18px;
  padding: 12px 16px;
  background: var(--ot-deep);
  color: #7ee8d8;
  font-family: var(--ot-mono);
  font-size: clamp(1rem, 2.5vw, 1.2rem);
  font-weight: 600;
  letter-spacing: 0.06em;
  border-radius: 2px;
}

.ot-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 28px;
  padding: 16px;
  background: var(--ot-paper);
  border: 1px dashed var(--ot-line);
  border-radius: 4px;
}

.ot-stats div {
  text-align: center;
}

.ot-stats dt {
  margin: 0 0 4px;
  font-family: var(--ot-mono);
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #6b7280;
}

.ot-stats dd {
  margin: 0;
  font-family: var(--ot-serif);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--ot-ink);
}

/* Cold-chain conveyor progress */
.ot-conveyor {
  margin-bottom: 24px;
}

.ot-conveyor-title {
  margin: 0 0 16px;
  font-family: var(--ot-mono);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ot-teal);
}

.ot-conveyor-belt {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
  position: relative;
}

.ot-conveyor-belt::before {
  content: "";
  position: absolute;
  top: 34px;
  left: 10%;
  right: 10%;
  height: 8px;
  background: repeating-linear-gradient(
    90deg,
    #b8b0a4 0,
    #b8b0a4 8px,
    #d4cdc0 8px,
    #d4cdc0 16px
  );
  border-radius: 4px;
  z-index: 0;
}

.ot-conveyor-belt::after {
  content: "";
  position: absolute;
  top: 34px;
  left: 10%;
  height: 8px;
  width: calc((var(--ot-step, 1) - 1) / 3 * 80%);
  background: linear-gradient(90deg, var(--ot-sea), var(--ot-honey));
  border-radius: 4px;
  z-index: 1;
  transition: width 0.5s ease;
}

.ot-crate-stop {
  position: relative;
  z-index: 2;
  display: grid;
  justify-items: center;
  gap: 10px;
  text-align: center;
}

.ot-crate {
  position: relative;
  display: grid;
  place-items: center;
}

.ot-crate-icon {
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  font-size: 1.35rem;
  background: #fff;
  border: 2px solid var(--ot-line);
  border-radius: 4px;
  box-shadow: 0 4px 0 #c4bdb0;
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}

.ot-crate-stop.is-done .ot-crate-icon,
.ot-crate-stop.is-live .ot-crate-icon {
  border-color: var(--ot-sea);
  box-shadow: 0 4px 0 rgba(42, 157, 143, 0.35);
}

.ot-crate-stop.is-live .ot-crate-icon {
  transform: translateY(-4px);
  animation: ot-crate-bounce 1.2s ease-in-out infinite;
}

@keyframes ot-crate-bounce {
  0%, 100% { transform: translateY(-4px); }
  50% { transform: translateY(-8px); }
}

.ot-crate-stop.is-done .ot-crate-icon {
  background: rgba(42, 157, 143, 0.1);
}

.ot-roller-track {
  display: none;
}

.ot-crate-hub {
  display: block;
  font-family: var(--ot-mono);
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #6b7280;
}

.ot-crate-stop.is-done .ot-crate-hub,
.ot-crate-stop.is-live .ot-crate-hub {
  color: var(--ot-teal);
}

.ot-crate-label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--ot-ink);
  line-height: 1.3;
}

/* Miss / idle */
.ot-flipboard-miss {
  text-align: center;
  padding: 48px 28px;
  background: var(--ot-paper);
  border-style: dashed;
}

.ot-miss-beacon {
  font-size: 3rem;
  margin-bottom: 12px;
  opacity: 0.65;
}

.ot-flipboard-miss h3 {
  margin: 0 0 10px;
  font-family: var(--ot-serif);
  font-size: 1.2rem;
}

.ot-flipboard-miss p {
  margin: 0 0 20px;
  color: #5c6670;
  max-width: 420px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.65;
}

.ot-idle {
  text-align: center;
  padding: 56px 24px;
  background: #fff;
  border: 2px dashed var(--ot-line);
  border-radius: 4px;
}

.ot-idle-scope {
  position: relative;
  width: 100px;
  height: 100px;
  margin: 0 auto 18px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(42, 157, 143, 0.12), transparent 70%);
  border: 2px solid rgba(26, 107, 122, 0.2);
  overflow: hidden;
}

.ot-idle-ring {
  position: absolute;
  inset: 12px;
  border-radius: 50%;
  border: 1px solid rgba(42, 157, 143, 0.3);
}

.ot-idle-sweep {
  position: absolute;
  inset: 0;
  background: conic-gradient(from 0deg, transparent 0deg, rgba(42, 157, 143, 0.25) 40deg, transparent 80deg);
  animation: ot-sweep 3s linear infinite;
}

@keyframes ot-sweep {
  to { transform: rotate(360deg); }
}

.ot-idle-blip {
  position: absolute;
  top: 28%;
  right: 30%;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ot-honey);
  box-shadow: 0 0 8px var(--ot-honey);
  animation: ot-blip 2s ease-in-out infinite;
}

@keyframes ot-blip {
  0%, 100% { opacity: 0.4; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.3); }
}

.ot-idle p {
  margin: 0;
  color: #5c6670;
  font-size: 0.92rem;
}

/* ── Responsive ── */
@media (max-width: 960px) {
  .ot-hero-grid {
    grid-template-columns: 1fr;
  }

  .ot-compass {
    justify-self: start;
  }

  .ot-deck-grid {
    grid-template-columns: 1fr;
  }

  .ot-milepost {
    position: static;
  }

  .ot-stats {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .ot-stats div {
    display: flex;
    justify-content: space-between;
    align-items: center;
    text-align: left;
    padding: 6px 0;
    border-bottom: 1px solid var(--ot-line);
  }

  .ot-stats div:last-child {
    border-bottom: 0;
  }

  .ot-conveyor-belt {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }

  .ot-conveyor-belt::before,
  .ot-conveyor-belt::after {
    display: none;
  }
}

@media (max-width: 480px) {
  .ot-conveyor-belt {
    grid-template-columns: 1fr;
  }

  .ot-form-actions {
    flex-direction: column;
  }

  .ot-btn {
    width: 100%;
  }

  .ot-waybill-head {
    grid-template-columns: 1fr;
  }

  .ot-waybill-stamp {
    justify-self: start;
  }
}
