/* iTrackOrder customer site — original design, postal-service-inspired. */

:root {
  --blue: #005ffa;
  --blue-dark: #0043bd;
  --blue-deep: #0a3d91;
  --navy: #081f3e;
  --bg: #f4f7fc;
  --card: #ffffff;
  --text: #0f1f38;
  --muted: #5b6b85;
  --border: #dbe4f0;
  --radius: 14px;
  --shadow: 0 2px 6px rgba(8, 31, 62, 0.08), 0 12px 32px rgba(8, 31, 62, 0.1);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

.container { max-width: 1080px; margin: 0 auto; padding: 0 20px; }

.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

/* ---------- slim navy top bar ---------- */

.topbar {
  background: var(--navy);
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-align: center;
  padding: 7px 12px;
  text-transform: uppercase;
}

/* ---------- white header ---------- */

.site-header {
  background: #fff;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 50;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }

.brand-logo {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: block;
}

.brand-name {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--navy);
}

.site-nav { display: flex; gap: 4px; }
.site-nav a {
  color: var(--muted);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 10px 14px;
  border-radius: 8px;
}
.site-nav a:hover { color: var(--navy); background: #eef3fa; }

/* ---------- hero ---------- */

.hero {
  background: linear-gradient(135deg, var(--blue) 0%, var(--blue-deep) 100%);
  color: #fff;
  padding: 72px 0 88px;
  position: relative;
  overflow: hidden;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.09) 1.5px, transparent 1.5px);
  background-size: 26px 26px;
  pointer-events: none;
}

.hero-inner { position: relative; z-index: 1; text-align: center; }

.hero h1 {
  margin: 0 0 12px;
  font-size: clamp(2rem, 5vw, 3.25rem);
  font-weight: 800;
  letter-spacing: -0.03em;
}

.hero-sub {
  margin: 0 auto 32px;
  max-width: 560px;
  font-size: 1.125rem;
  color: rgba(255, 255, 255, 0.88);
}

.track-form {
  display: flex;
  gap: 10px;
  max-width: 640px;
  margin: 0 auto;
  background: #fff;
  padding: 8px;
  border-radius: 16px;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.25);
}

.track-form input {
  flex: 1;
  font: inherit;
  font-size: 1.1rem;
  border: none;
  outline: none;
  padding: 14px 18px;
  border-radius: 10px;
  color: var(--text);
  min-width: 0;
}

.btn-track {
  font: inherit;
  font-size: 1.1rem;
  font-weight: 700;
  background: var(--navy);
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 14px 34px;
  cursor: pointer;
  transition: background 0.15s ease;
  white-space: nowrap;
}
.btn-track:hover { background: #0e2a52; }
.btn-track:disabled { opacity: 0.65; cursor: wait; }

.track-error {
  max-width: 640px;
  margin: 14px auto 0;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.35);
  color: #fff;
  padding: 12px 18px;
  border-radius: 10px;
  font-size: 0.95rem;
}

/* ---------- result card ---------- */

.result-card {
  max-width: 760px;
  margin: 28px auto 0;
  background: var(--card);
  color: var(--text);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px 30px;
  text-align: left;
}

.rc-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}

.rc-tracking {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 1.05rem;
  font-weight: 700;
  margin: 0;
  word-break: break-all;
}

.rc-carrier {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--blue-dark);
  background: #e9f1ff;
  padding: 5px 12px;
  border-radius: 999px;
}

.rc-status-line { margin: 6px 0 6px; color: var(--muted); font-size: 0.95rem; }
.rc-status-line strong { color: var(--text); }
.rc-eta {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 0.95rem;
}
.rc-eta strong { color: var(--blue-dark); }

/* timeline — shipment progress stepper */
.timeline {
  list-style: none;
  margin: 12px 0 6px;
  padding: 0;
  display: flex;
}

.tl-step {
  flex: 1 1 0;
  min-width: 0;
  position: relative;
  text-align: center;
  padding-top: 38px; /* dot height + clear breathing room above the label */
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1.5;
  color: #9aa7bd;
}

/* the dot */
.tl-step::before {
  content: "";
  position: absolute;
  top: 4px;
  left: 50%;
  transform: translateX(-50%);
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #e6ecf6;
  border: 2px solid #ffffff;
  box-shadow: 0 0 0 1px #d3deee;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  color: #ffffff;
}

/* connector line running through the dot centers */
.tl-step::after {
  content: "";
  position: absolute;
  top: 15px; /* dot center: 4 + 11 */
  left: calc(-50% + 17px);
  right: calc(50% + 17px);
  height: 2px;
  border-radius: 1px;
  background: #dbe4f0;
}
.tl-step:first-child::after { display: none; }

/* completed steps get a check mark */
.tl-step.done { color: var(--blue-dark); }
.tl-step.done::before {
  content: "\2713";
  background: var(--blue);
  border-color: #ffffff;
  box-shadow: 0 0 0 1px var(--blue);
}
.tl-step.done::after { background: var(--blue); opacity: 0.35; }

/* current step — declared after .done so it wins the cascade */
.tl-step.current { color: var(--navy); font-weight: 700; }
.tl-step.current::before {
  content: "";
  background: var(--blue);
  border-color: #ffffff;
  box-shadow: 0 0 0 2px #ffffff, 0 0 0 4px rgba(0, 95, 250, 0.3);
}

.tl-step.neutral { color: #9aa7bd; }

.rc-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 28px;
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
  font-size: 0.9rem;
}
.rc-meta .k { color: var(--muted); margin-right: 6px; }

.rc-items { margin: 14px 0 0; padding-left: 20px; font-size: 0.92rem; }
.rc-items li { margin-bottom: 4px; }

/* shipment event feed (Amazon-style timeline) */
.rc-events { margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--border); }
.rc-events-title { margin: 0 0 12px; font-size: 0.95rem; color: var(--navy); }
.ev-day { margin-bottom: 14px; }
.ev-day:last-child { margin-bottom: 0; }
.ev-date { font-weight: 600; font-size: 0.72rem; margin-bottom: 8px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; }
.ev-row { display: flex; gap: 14px; padding: 8px 0; }
.ev-time { flex: 0 0 76px; font-size: 0.85rem; color: var(--muted); white-space: nowrap; }
.ev-body { border-left: 2px solid var(--border); padding-left: 14px; }
.ev-msg { font-size: 0.92rem; }
.ev-loc { font-size: 0.85rem; color: var(--muted); font-style: italic; }

.rc-notfound { text-align: center; padding: 12px 6px; }
.rc-notfound .nf-icon { font-size: 2.75rem; margin-bottom: 6px; }
.rc-notfound h3 { margin: 0 0 8px; font-size: 1.25rem; }
.rc-notfound p { margin: 0 auto 6px; color: var(--muted); max-width: 460px; }

.rc-loading { text-align: center; padding: 20px; color: var(--muted); }
.spinner {
  display: inline-block;
  width: 26px; height: 26px;
  border: 3px solid #cfe0ff;
  border-top-color: var(--blue);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  vertical-align: -7px;
  margin-right: 10px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- content sections ---------- */

.section { padding: 72px 0; }
.section-alt { background: #fff; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }

.section h2 {
  margin: 0 0 8px;
  font-size: 1.9rem;
  letter-spacing: -0.02em;
  text-align: center;
  color: var(--navy);
}
.section-sub { text-align: center; color: var(--muted); margin: 0 0 40px; font-size: 1.05rem; }

.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.step-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px;
  box-shadow: var(--shadow);
}

.step-num {
  width: 44px; height: 44px;
  border-radius: 12px;
  background: var(--blue);
  color: #fff;
  font-weight: 800;
  font-size: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}

.step-card h3 { margin: 0 0 8px; font-size: 1.1rem; }
.step-card p { margin: 0; color: var(--muted); font-size: 0.95rem; }

.features-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.feature-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px 24px;
}

.feature-icon { font-size: 1.9rem; margin-bottom: 10px; }
.feature-card h3 { margin: 0 0 8px; font-size: 1.1rem; color: var(--navy); }
.feature-card p { margin: 0; color: var(--muted); font-size: 0.95rem; }

/* ---------- FAQ ---------- */

.faq-wrap { max-width: 760px; }

.faq-list { display: grid; gap: 12px; }

.faq-item {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}

.faq-item summary {
  cursor: pointer;
  padding: 18px 22px;
  font-weight: 700;
  font-size: 1rem;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  font-size: 1.4rem;
  font-weight: 400;
  color: var(--blue);
  flex-shrink: 0;
}
.faq-item[open] summary::after { content: "–"; }
.faq-item p { margin: 0; padding: 0 22px 20px; color: var(--muted); font-size: 0.95rem; }
.faq-item a { color: var(--blue-dark); font-weight: 600; }

/* ---------- footer ---------- */

.site-footer {
  background: var(--navy);
  color: rgba(255, 255, 255, 0.75);
  padding: 52px 0 36px;
  text-align: center;
}

.footer-logo { max-width: 190px; height: auto; margin-bottom: 10px; }
.footer-tag { margin: 0 0 22px; font-size: 0.95rem; }

.footer-nav { display: flex; justify-content: center; gap: 6px; flex-wrap: wrap; margin-bottom: 24px; }
.footer-nav a {
  color: rgba(255, 255, 255, 0.75);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  padding: 8px 12px;
  border-radius: 8px;
}
.footer-nav a:hover { color: #fff; background: rgba(255, 255, 255, 0.08); }

.footer-copy { margin: 0; font-size: 0.85rem; color: rgba(255, 255, 255, 0.5); }

/* ---------- responsive ---------- */

@media (max-width: 720px) {
  .site-nav { display: none; }
  .track-form { flex-direction: column; }
  .btn-track { width: 100%; }
  .steps-grid { grid-template-columns: 1fr; }
  .features-grid { grid-template-columns: 1fr; }
  .section { padding: 52px 0; }
  .tl-step { font-size: 0.6rem; padding-top: 36px; }
  .result-card { padding: 22px 18px; }
}

/* Fulfillment section */
.beta-badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #1a73e8;
  background: #e8f0fe;
  border-radius: 999px;
  padding: 6px 14px;
  margin: 0 0 14px;
}
#fulfillment .container { text-align: center; }
#fulfillment h2 { margin-top: 0; }
.beta-note { margin: 28px 0 0; color: var(--muted); font-size: 0.95rem; }

/* Fulfillment process flow */
.process-flow {
  display: flex;
  align-items: stretch;
  justify-content: center;
  gap: 10px;
  margin: 36px auto 32px;
  max-width: 920px;
}
.process-step {
  flex: 1;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px 18px;
}
.process-icon { font-size: 2rem; margin-bottom: 10px; }
.process-step h3 { margin: 0 0 8px; font-size: 1.05rem; color: var(--navy); }
.process-step p { margin: 0; color: var(--muted); font-size: 0.92rem; }
.process-arrow {
  align-self: center;
  font-size: 1.8rem;
  font-weight: 700;
  color: #1a73e8;
  flex: 0 0 auto;
}
#fulfillment .btn { margin-top: 4px; }
@media (max-width: 700px) {
  .process-flow { flex-direction: column; max-width: 420px; }
  .process-arrow { transform: rotate(90deg); }
}
