/* ==========================================================================
   Waybill Logistics — Design System
   Signature: the waybill stub — a perforated shipping-label card used for
   tracking search, shipment cards, and receipts. Grounded in the real
   paper artifact couriers hand you at the counter.
   ========================================================================== */

:root {
  /* Color tokens */
  --ink: #10182B;
  --ink-soft: #1B2A4A;
  --paper: #F6F7F5;
  --paper-dim: #EBEDE8;
  --line: #D7DAD2;
  --amber: #FFB020;
  --amber-dark: #C9860A;
  --route-green: #1F9D55;
  --alert-red: #E14B4B;
  --ink-70: rgba(16, 24, 43, 0.7);
  --ink-45: rgba(16, 24, 43, 0.45);
  --white: #FFFFFF;

  /* Type */
  --font-display: 'Space Grotesk', sans-serif;
  --font-body: 'Inter', sans-serif;
  --font-mono: 'IBM Plex Mono', monospace;

  --radius: 14px;
  --shadow: 0 10px 30px rgba(16, 24, 43, 0.10);
  --shadow-lg: 0 24px 60px rgba(16, 24, 43, 0.18);
}

[data-theme="dark"] {
  --paper: #0D1220;
  --paper-dim: #131A2C;
  --ink: #F6F7F5;
  --ink-70: rgba(246,247,245,0.7);
  --ink-45: rgba(246,247,245,0.45);
  --line: #263049;
  --white: #161E30;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--paper);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  transition: background .3s ease, color .3s ease;
}
h1, h2, h3, h4 { font-family: var(--font-display); margin: 0 0 .5em; line-height: 1.1; letter-spacing: -0.01em; }
p { line-height: 1.6; color: var(--ink-70); }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
.mono { font-family: var(--font-mono); letter-spacing: 0.02em; }
.container { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 24px; }
.section { padding: 96px 0; }
.section-tight { padding: 56px 0; }
.eyebrow {
  font-family: var(--font-mono); font-size: 12px; letter-spacing: .12em; text-transform: uppercase;
  color: var(--amber-dark); display: inline-flex; align-items: center; gap: 8px; margin-bottom: 14px;
}
.eyebrow::before { content: ''; width: 18px; height: 2px; background: var(--amber); display: inline-block; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--font-body); font-weight: 600; font-size: 15px;
  padding: 13px 24px; border-radius: 10px; border: 1px solid transparent;
  cursor: pointer; transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.btn:focus-visible { outline: 3px solid var(--amber); outline-offset: 2px; }
.btn-primary { background: var(--ink); color: var(--paper); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.btn-amber { background: var(--amber); color: var(--ink); }
.btn-amber:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(255,176,32,.35); }
.btn-outline { background: transparent; border-color: var(--line); color: var(--ink); }
.btn-outline:hover { border-color: var(--ink); }
.btn-block { width: 100%; }
.btn-sm { padding: 8px 16px; font-size: 13px; border-radius: 8px; }

/* ---------- Navigation ---------- */
.nav {
  position: sticky; top: 0; z-index: 100; background: var(--paper);
  border-bottom: 1px solid var(--line); backdrop-filter: blur(8px);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; padding: 16px 24px; max-width: 1180px; margin: 0 auto; }
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 700; font-size: 20px; }
.brand-mark { width: 34px; height: 34px; border-radius: 8px; background: var(--ink); color: var(--amber); display: flex; align-items: center; justify-content: center; font-family: var(--font-mono); font-size: 13px; font-weight: 700; }
.nav-links { display: flex; gap: 28px; align-items: center; }
.nav-links a { font-size: 14px; font-weight: 500; color: var(--ink-70); }
.nav-links a:hover { color: var(--ink); }
.nav-actions { display: flex; align-items: center; gap: 12px; }
.currency-form { display: inline-flex; }
.currency-select {
  height: 38px; padding: 0 10px; border-radius: 20px; border: 1px solid var(--line);
  background: var(--white); font-family: var(--font-mono); font-size: 12px; font-weight: 600;
  color: var(--ink); cursor: pointer; appearance: none; -webkit-appearance: none;
}
.currency-select:focus-visible { outline: 2px solid var(--amber); outline-offset: 1px; }
.theme-toggle { width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line); background: var(--white); display: flex; align-items: center; justify-content: center; cursor: pointer; }
.nav-toggle { display: none; background: none; border: none; font-size: 22px; cursor: pointer; color: var(--ink); }

@media (max-width: 860px) {
  .nav-links { position: fixed; top: 68px; left: 0; right: 0; background: var(--paper); flex-direction: column; padding: 20px 24px; border-bottom: 1px solid var(--line); transform: translateY(-140%); transition: transform .25s ease; }
  .nav-links.open { transform: translateY(0); }
  .nav-toggle { display: block; }
}

/* ---------- Hero ---------- */
.hero { padding: 72px 0 60px; overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 56px; align-items: center; }
.hero h1 { font-size: clamp(36px, 5vw, 58px); }
.hero .lede { font-size: 17px; max-width: 480px; margin-bottom: 28px; }
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 36px; }
.hero-stats { display: flex; gap: 32px; flex-wrap: wrap; }
.hero-stat b { display: block; font-family: var(--font-display); font-size: 26px; }
.hero-stat span { font-size: 12px; color: var(--ink-45); text-transform: uppercase; letter-spacing: .06em; }

/* Waybill stub — the signature element */
.stub {
  background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow-lg);
  padding: 26px; position: relative; border: 1px solid var(--line);
  animation: stub-in .7s cubic-bezier(.2,.9,.25,1) both;
}
@keyframes stub-in { from { opacity: 0; transform: translateY(18px) rotate(-1.5deg); } to { opacity: 1; transform: translateY(0) rotate(-1.5deg); } }
.stub::before, .stub::after {
  content: ''; position: absolute; width: 26px; height: 26px; background: var(--paper);
  border-radius: 50%; top: 50%; transform: translateY(-50%);
}
.stub::before { left: -13px; } .stub::after { right: -13px; }
.stub-tear { border-top: 2px dashed var(--line); margin: 18px 0; }
.stub-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.stub-label { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-45); }
.stub-value { font-family: var(--font-mono); font-size: 15px; font-weight: 600; }
.stub-code { font-family: var(--font-mono); font-size: 22px; font-weight: 700; letter-spacing: .04em; }
.stub-stamp {
  position: absolute; top: 24px; right: 26px; border: 2px solid var(--route-green); color: var(--route-green);
  font-family: var(--font-mono); font-size: 11px; font-weight: 700; text-transform: uppercase;
  padding: 4px 10px; border-radius: 6px; transform: rotate(8deg); letter-spacing: .06em;
}
.stub-barcode { display: flex; gap: 2px; align-items: flex-end; height: 34px; margin-top: 12px; }
.stub-barcode span { display: block; background: var(--ink); width: 3px; }

/* Search bar */
.track-search { display: flex; gap: 10px; background: var(--white); border: 1px solid var(--line); border-radius: 12px; padding: 8px; box-shadow: var(--shadow); }
.track-search input { flex: 1; border: none; outline: none; background: transparent; font-family: var(--font-mono); font-size: 15px; padding: 10px 12px; color: var(--ink); }
.track-result { margin-top: 20px; }

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
}

/* ---------- Sections shared ---------- */
.section-head { max-width: 620px; margin: 0 auto 48px; text-align: center; }
.section-head.left { margin: 0 0 48px; text-align: left; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
@media (max-width: 900px) { .grid-3, .grid-4 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 620px) { .grid-3, .grid-4 { grid-template-columns: 1fr; } }

.card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; transition: transform .2s ease, box-shadow .2s ease; }
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.card .icon { width: 44px; height: 44px; border-radius: 10px; background: var(--ink); color: var(--amber); display: flex; align-items: center; justify-content: center; margin-bottom: 16px; font-size: 18px; }

.reveal { opacity: 0; transform: translateY(24px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: translateY(0); }

/* ---------- Pricing ---------- */
.price-card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 32px 28px; position: relative; }
.price-card.featured { border-color: var(--ink); box-shadow: var(--shadow-lg); }
.price-tag { position: absolute; top: -12px; right: 24px; background: var(--amber); color: var(--ink); font-family: var(--font-mono); font-size: 11px; padding: 4px 10px; border-radius: 6px; font-weight: 700; }
.price-amount { font-family: var(--font-display); font-size: 38px; margin: 10px 0 4px; }
.price-list { list-style: none; padding: 0; margin: 20px 0; }
.price-list li { padding: 8px 0; border-top: 1px solid var(--paper-dim); font-size: 14px; color: var(--ink-70); }
.price-list li::before { content: '✓ '; color: var(--route-green); font-weight: 700; }

/* ---------- Testimonials ---------- */
.testimonial { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; }
.testimonial p { font-size: 15px; color: var(--ink); }
.testimonial .who { display: flex; align-items: center; gap: 10px; margin-top: 16px; }
.avatar { width: 38px; height: 38px; border-radius: 50%; background: var(--ink-soft); color: var(--paper); display: flex; align-items: center; justify-content: center; font-family: var(--font-mono); font-size: 13px; font-weight: 700; }

/* ---------- Timeline (tracking) ---------- */
.timeline { position: relative; padding-left: 32px; }
.timeline::before { content: ''; position: absolute; left: 9px; top: 6px; bottom: 6px; width: 2px; background: var(--line); }
.timeline-item { position: relative; padding-bottom: 26px; }
.timeline-item::before { content: ''; position: absolute; left: -32px; top: 2px; width: 18px; height: 18px; border-radius: 50%; background: var(--paper); border: 3px solid var(--line); }
.timeline-item.done::before { border-color: var(--route-green); background: var(--route-green); }
.timeline-item.active::before { border-color: var(--amber); background: var(--amber); }
.timeline-item time { font-family: var(--font-mono); font-size: 12px; color: var(--ink-45); }

.progress-track { height: 8px; background: var(--paper-dim); border-radius: 20px; overflow: hidden; margin: 18px 0 6px; }
.progress-fill { height: 100%; background: linear-gradient(90deg, var(--amber), var(--route-green)); border-radius: 20px; transition: width .8s ease; }

/* ---------- Forms ---------- */
.form-card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 34px; max-width: 460px; margin: 0 auto; box-shadow: var(--shadow); }
.form-group { margin-bottom: 18px; }
label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; }
input, select, textarea {
  width: 100%; padding: 11px 13px; border-radius: 9px; border: 1px solid var(--line);
  background: var(--paper); font-family: var(--font-body); font-size: 14px; color: var(--ink);
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--amber); outline-offset: 1px; border-color: var(--amber); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 560px) { .form-row { grid-template-columns: 1fr; } }
.error-text { color: var(--alert-red); font-size: 13px; margin-top: 6px; }
.help-text { color: var(--ink-45); font-size: 12px; margin-top: 6px; }

.alert { padding: 12px 16px; border-radius: 9px; font-size: 14px; margin-bottom: 18px; }
.alert-error { background: rgba(225,75,75,.1); color: var(--alert-red); border: 1px solid rgba(225,75,75,.25); }
.alert-success { background: rgba(31,157,85,.1); color: var(--route-green); border: 1px solid rgba(31,157,85,.25); }

/* ---------- Badges ---------- */
.badge { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 20px; font-family: var(--font-mono); }
.badge-pending { background: rgba(255,176,32,.15); color: var(--amber-dark); }
.badge-transit { background: rgba(27,42,74,.1); color: var(--ink-soft); }
.badge-delivered { background: rgba(31,157,85,.15); color: var(--route-green); }
.badge-cancelled { background: rgba(225,75,75,.15); color: var(--alert-red); }

/* ---------- Footer ---------- */
.footer { background: var(--ink); color: var(--paper); padding: 64px 0 28px; }
.footer a { color: rgba(246,247,245,.7); }
.footer a:hover { color: var(--amber); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px; margin-bottom: 48px; }
.footer h4 { color: var(--paper); font-size: 14px; text-transform: uppercase; letter-spacing: .06em; }
.footer-bottom { border-top: 1px solid rgba(246,247,245,.12); padding-top: 22px; font-size: 13px; color: rgba(246,247,245,.5); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr 1fr; } }

/* ---------- Dashboard shell (admin + customer) ---------- */
.dash { display: grid; grid-template-columns: 250px 1fr; min-height: 100vh; }
.sidebar { background: var(--ink); color: var(--paper); padding: 24px 18px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.sidebar .brand { color: var(--paper); margin-bottom: 32px; }
.side-link { display: flex; align-items: center; gap: 10px; padding: 11px 12px; border-radius: 8px; font-size: 14px; color: rgba(246,247,245,.75); margin-bottom: 2px; }
.side-link:hover, .side-link.active { background: rgba(255,176,32,.12); color: var(--amber); }
.side-group { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: rgba(246,247,245,.35); margin: 20px 0 8px 12px; }
.dash-main { padding: 28px 32px; background: var(--paper-dim); }
.dash-topbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 28px; }
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-bottom: 28px; }
.stat-card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.stat-card .stat-num { font-family: var(--font-display); font-size: 30px; margin: 6px 0; }
.stat-card .stat-label { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-45); }
.stat-card .stat-delta { font-size: 12px; font-weight: 600; }
.panel { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; margin-bottom: 22px; }
.panel-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; }
table.data { width: 100%; border-collapse: collapse; font-size: 14px; }
table.data th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-45); padding: 10px 12px; border-bottom: 1px solid var(--line); }
table.data td { padding: 12px; border-bottom: 1px solid var(--paper-dim); }
table.data tr:hover td { background: var(--paper); }
@media (max-width: 1000px) { .dash { grid-template-columns: 1fr; } .sidebar { display: none; } .stat-grid { grid-template-columns: 1fr 1fr; } }

/* Print styles for labels/invoices */
@media print {
  .no-print { display: none !important; }
  body { background: white; }
}

/* ---------- Photography ---------- */
.photo-band {
  position: relative;
  height: 420px;
  overflow: hidden;
  margin: 0;
}
.photo-band img {
  width: 100%; height: 100%; object-fit: cover; object-position: center 30%;
  filter: saturate(1.05);
}
.photo-band::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(16,24,43,.05) 0%, rgba(16,24,43,.75) 100%);
}
.photo-band-content {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 2;
  padding: 36px 24px; color: var(--white);
}
.photo-band-stats { display: flex; gap: 40px; flex-wrap: wrap; max-width: 1180px; margin: 0 auto; }
.photo-band-stats b { display: block; font-family: var(--font-display); font-size: 28px; color: var(--white); }
.photo-band-stats span { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: rgba(255,255,255,.7); }

.process-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
@media (max-width: 900px) { .process-grid { grid-template-columns: 1fr; } }
.process-step { position: relative; }
.process-photo { position: relative; border-radius: var(--radius); overflow: hidden; aspect-ratio: 4/3; margin-bottom: 18px; box-shadow: var(--shadow); }
.process-photo img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.process-step:hover .process-photo img { transform: scale(1.06); }
.process-index {
  position: absolute; top: 14px; left: 14px; width: 36px; height: 36px; border-radius: 50%;
  background: var(--amber); color: var(--ink); font-family: var(--font-mono); font-weight: 700;
  display: flex; align-items: center; justify-content: center; font-size: 14px;
}
.process-step h3 { font-size: 19px; }

/* ---------- Partner logo strip ---------- */
.partner-strip { padding: 36px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.partner-strip-label { text-align: center; font-family: var(--font-mono); font-size: 11px; text-transform: uppercase; letter-spacing: .1em; color: var(--ink-45); margin-bottom: 24px; }
.partner-row { display: flex; align-items: center; justify-content: center; gap: 48px; flex-wrap: wrap; }
.partner-logo { display: flex; align-items: center; gap: 8px; opacity: .55; filter: grayscale(1); transition: opacity .2s ease, filter .2s ease; }
.partner-logo:hover { opacity: 1; filter: grayscale(0); }
.partner-logo img { height: 28px; width: auto; max-width: 140px; object-fit: contain; }
.partner-wordmark { font-family: var(--font-display); font-weight: 700; font-size: 17px; letter-spacing: -0.01em; color: var(--ink); white-space: nowrap; }
.partner-wordmark .dot { color: var(--amber); }
@media (max-width: 700px) { .partner-row { gap: 28px; } .partner-wordmark { font-size: 14px; } }
