/* ---------------------------------------------------------------------------
   The delivery home page.

   Follows the landing page: the same reveal easing, the same soft radial
   shapes, the same crimson icon tiles and card shadows. Prefixed dh- so it
   cannot collide with the tracking components or the chrome.
--------------------------------------------------------------------------- */

/* ---- Reveal -------------------------------------------------------------- */

.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal.in {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ---- Hero ---------------------------------------------------------------- */

.dh-hero {
  position: relative;
  text-align: center;
  padding: clamp(28px, 5vw, 64px) clamp(18px, 4vw, 56px) clamp(32px, 5vw, 60px);
  margin-bottom: clamp(24px, 4vw, 44px);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: clamp(18px, 2.4vw, 28px);
  box-shadow: 0 30px 70px -40px rgba(116, 3, 24, 0.34);
  overflow: hidden;
}

.dh-shape {
  position: absolute;
  border-radius: 50%;
  z-index: 0;
  pointer-events: none;
  will-change: transform;
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}
.dh-s1 {
  width: 420px;
  height: 420px;
  background: radial-gradient(circle at 30% 30%, rgba(139, 0, 0, 0.16), transparent 70%);
  top: -170px;
  right: -120px;
}
.dh-s2 {
  width: 260px;
  height: 260px;
  background: radial-gradient(circle at 50% 50%, rgba(116, 3, 24, 0.12), transparent 70%);
  bottom: -120px;
  left: -90px;
}
.dh-s3 {
  width: 120px;
  height: 120px;
  border: 2px solid rgba(116, 3, 24, 0.16);
  top: 22%;
  left: -60px;
}

.dh-hero > *:not(.dh-shape) {
  position: relative;
  z-index: 1;
}

.dh-title {
  font-family: var(--font-display);
  font-size: clamp(30px, 5.2vw, 56px);
  line-height: 1.08;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin: 14px 0 16px;
}

.dh-lead {
  color: var(--muted);
  font-size: clamp(15px, 1.4vw, 17px);
  line-height: 1.65;
  max-width: 620px;
  margin: 0 auto 30px;
}

/* ---- Search -------------------------------------------------------------- */

.dh-search {
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 560px;
  margin: 0 auto;
  padding: 7px 7px 7px 16px;
  background: var(--surface);
  border: 1.5px solid var(--line-strong);
  border-radius: var(--pill);
  box-shadow: 0 16px 40px -26px rgba(20, 16, 14, 0.5);
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}
.dh-search:focus-within {
  border-color: var(--crimson);
  box-shadow: 0 0 0 4px var(--crimson-soft), 0 16px 40px -26px rgba(116, 3, 24, 0.5);
}

.dh-search-icon {
  display: grid;
  place-items: center;
  color: var(--muted);
  flex-shrink: 0;
}
.dh-search-icon svg {
  width: 19px;
  height: 19px;
}

.dh-search input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: none;
  padding: 12px 0;
  font-family: var(--font-mono);
  font-size: 16px;
  letter-spacing: 0.04em;
  color: var(--ink);
  min-height: 0;
}
.dh-search input:focus {
  outline: none;
  box-shadow: none;
}

.dh-search-go {
  flex-shrink: 0;
  border-radius: var(--pill);
  padding: 13px 28px;
  font-weight: 600;
}

.home-search-note {
  min-height: 20px;
  margin: 12px 0 0;
  font-size: 13.5px;
  color: var(--danger);
}

.dh-alt {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 15px;
}
.dh-alt a {
  color: var(--crimson);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* A quieter second line, so it reads as an aside rather than a rival action. */
.dh-alt-driver {
  margin-top: 8px;
  font-size: 14px;
  color: var(--muted);
}
.dh-alt-driver a {
  color: var(--ink-soft);
  text-decoration-color: var(--line-strong);
}
.dh-alt-driver a:hover {
  color: var(--crimson);
}

.dh-alt-client {
  margin-top: 4px;
  font-size: 14px;
  color: var(--muted);
}
.dh-alt-client a {
  color: var(--ink-soft);
  text-decoration-color: var(--line-strong);
}
.dh-alt-client a:hover {
  color: var(--crimson);
}

/* ---- Assurance strip ----------------------------------------------------- */

.dh-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  padding: 20px clamp(16px, 3vw, 34px);
  margin-bottom: clamp(24px, 4vw, 44px);
  background: var(--crimson);
  border-radius: clamp(16px, 2vw, 22px);
  color: #fff;
}
.dh-strip-item {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 14.5px;
  font-weight: 600;
  text-align: left;
}
.dh-strip-ic {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  flex-shrink: 0;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.14);
}
.dh-strip-ic svg {
  width: 18px;
  height: 18px;
}

/* ---- Steps --------------------------------------------------------------- */

.dh-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(12px, 1.6vw, 20px);
  margin-bottom: clamp(24px, 4vw, 44px);
}

.dh-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: clamp(14px, 1.6vw, 18px);
  padding: clamp(20px, 2.2vw, 26px);
  box-shadow: 0 18px 40px -30px rgba(20, 16, 14, 0.45);
  transition: box-shadow 0.3s ease, transform 0.3s cubic-bezier(0.16, 1, 0.3, 1),
    opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
.dh-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 30px 60px -30px rgba(116, 3, 24, 0.42);
}
/* The hover lift must not fight the reveal, which is still moving it. */
.dh-card:not(.in):hover {
  transform: translateY(40px);
}

.dh-num {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--crimson-soft);
  color: var(--crimson);
  font-size: 12.5px;
  font-weight: 700;
  display: grid;
  place-items: center;
}

.dh-ic {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--crimson-soft);
  color: var(--crimson);
  margin-bottom: 16px;
}
.dh-ic svg {
  width: 22px;
  height: 22px;
}

.dh-card h3 {
  font-family: var(--font-display);
  font-size: 19px;
  color: var(--ink);
  margin: 0 0 8px;
}
.dh-card p {
  margin: 0;
  color: var(--muted);
  font-size: 14.5px;
  line-height: 1.6;
}

/* ---- Driver band --------------------------------------------------------- */

.dh-driver {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: clamp(18px, 3vw, 40px);
  padding: clamp(26px, 3.4vw, 44px);
  border-radius: clamp(16px, 2vw, 24px);
  background: linear-gradient(135deg, var(--crimson) 0%, #5c0213 100%);
  color: #fff;
}
.dh-driver::after {
  content: '';
  position: absolute;
  width: 320px;
  height: 320px;
  right: -110px;
  top: -140px;
  border-radius: 50%;
  background: radial-gradient(circle at 40% 40%, rgba(255, 255, 255, 0.12), transparent 70%);
  pointer-events: none;
}
.dh-driver-text {
  position: relative;
  z-index: 1;
  max-width: 620px;
}
.dh-driver h2 {
  font-family: var(--font-display);
  font-size: clamp(21px, 2.6vw, 30px);
  line-height: 1.15;
  margin: 0 0 10px;
  color: #fff;
}
.dh-driver p {
  margin: 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: 15px;
  line-height: 1.6;
}

.dh-driver-go {
  position: relative;
  z-index: 1;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 14px 26px;
  border-radius: var(--pill);
  background: #fff;
  color: var(--crimson);
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
  transition: transform 0.18s ease, box-shadow 0.3s ease;
}
.dh-driver-go:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 34px -18px rgba(0, 0, 0, 0.5);
  color: var(--crimson);
  text-decoration: none;
}
.dh-driver-go svg {
  width: 17px;
  height: 17px;
}

/* Client portal: same layout as the driver band, different colour so the two
   sign-ins cannot be read as one action. */
.dh-client {
  margin-top: 16px;
  background: linear-gradient(135deg, #1c1917 0%, #3f1518 100%);
}
.dh-client .dh-driver-go {
  color: #1c1917;
}

/* ---- Responsive ---------------------------------------------------------- */

/*
 * The strip drops to two columns before the cards do. Four across, the longest
 * label wraps on its own and leaves one item taller than the rest.
 */
@media (max-width: 1000px) {
  .dh-strip {
    grid-template-columns: 1fr 1fr;
    gap: 14px 10px;
  }
  .dh-strip-item {
    justify-content: flex-start;
  }
}

@media (max-width: 900px) {
  .dh-steps {
    grid-template-columns: 1fr 1fr;
  }
  .dh-steps .dh-card:last-child {
    grid-column: 1 / -1;
  }
}

@media (max-width: 760px) {
  .dh-driver,
  .dh-client {
    flex-direction: column;
    align-items: flex-start;
  }
  .dh-driver-go {
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 620px) {
  .dh-steps {
    grid-template-columns: 1fr;
  }
  .dh-steps .dh-card:last-child {
    grid-column: auto;
  }
  /* The shapes are sized for a wide hero and only crowd a narrow one. */
  .dh-shape {
    display: none;
  }
}

@media (max-width: 520px) {
  /*
   * The field and the button stop sharing a row: at this width the button
   * squeezes the number itself, which is the one thing that has to stay
   * readable while it is typed.
   */
  .dh-search {
    flex-wrap: wrap;
    border-radius: var(--r);
    padding: 12px;
  }
  .dh-search-icon {
    display: none;
  }
  .dh-search input {
    flex: 1 0 100%;
    text-align: center;
    padding: 10px 0;
  }
  .dh-search-go {
    flex: 1 0 100%;
    justify-content: center;
    min-height: var(--tap);
  }
  .dh-strip {
    grid-template-columns: 1fr;
  }
  .dh-strip-item {
    justify-content: flex-start;
  }
}
