/* USA Containers homepage — design system per brief */
:root {
  --navy: #1B2A4A;
  --ink: #0F1B33;
  --orange: #D9531E;
  --paper: #FFFFFF;
  --mist: #F4F6F9;
  --line: #DDE3EC;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
}

.wrap {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 20px;
}

section { padding: 72px 0; }
@media (max-width: 767px) {
  section { padding: 48px 0; }
}

h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 800;
  line-height: 1.1;
  margin: 0 0 16px;
}
h2 {
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  font-weight: 800;
  line-height: 1.2;
  margin: 0 0 12px;
  color: var(--navy);
}
h3 { font-weight: 800; color: var(--navy); }

img {
  width: 100%;
  height: auto;
  object-fit: cover;
  border-radius: 8px;
}

.btn {
  display: inline-block;
  background: var(--orange);
  color: #fff;
  border: none;
  padding: 14px 28px;
  border-radius: 6px;
  font-weight: 600;
  font-family: inherit;
  font-size: 1rem;
  cursor: pointer;
  text-decoration: none;
}
.btn:hover { filter: brightness(1.06); }
.btn:disabled { opacity: 0.5; cursor: default; }
.btn:focus-visible,
a:focus-visible,
input:focus-visible,
summary:focus-visible {
  outline: 3px solid var(--orange);
  outline-offset: 2px;
}

/* ===== Header ===== */
.site-header {
  background: var(--navy);
  height: 64px;
  position: sticky;
  top: 0;
  z-index: 50;
}
.site-header .header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.site-header img { width: auto; border-radius: 0; }
.site-header .phone {
  color: #fff;
  text-decoration: none;
  font-weight: 600;
}
.site-header .phone:hover { text-decoration: underline; }

/* ===== Hero ===== */
.hero {
  background:
    linear-gradient(rgba(27, 42, 74, 0.78), rgba(27, 42, 74, 0.78)),
    url("https://usacontainers.co/cdn/shop/files/DJI_0123.jpg?v=1744941919&width=2400") center / cover no-repeat;
  color: #fff;
  min-height: 620px;
  display: flex;
  align-items: center;
  padding: 56px 0;
}
@media (max-width: 767px) {
  .hero { min-height: 0; }
}
.hero-content { max-width: 640px; text-align: left; }
.hero .sub { font-size: 1.125rem; margin: 0 0 24px; }
.deposit-note {
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.9rem;
  margin: 12px 0 0;
}

/* ===== Panel (gate + chat) ===== */
.panel {
  background: var(--paper);
  color: var(--ink);
  border-radius: 8px;
  padding: 20px;
}
.gate-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 14px;
}
@media (max-width: 639px) {
  .gate-fields { grid-template-columns: 1fr; }
}
.gate-fields label {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 4px;
  color: var(--navy);
}
.gate-fields input,
.chat-form input {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  font: inherit;
  color: var(--ink);
}
#gate .btn { width: 100%; }
.skip {
  display: inline-block;
  margin-top: 10px;
  color: var(--navy);
  font-size: 0.95rem;
}

/* ===== Chat ===== */
.chat-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 12px;
}
.avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--navy);
  color: #fff;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
}
.chat-name { font-weight: 800; margin: 0; line-height: 1.2; color: var(--navy); }
.chat-role { margin: 0; font-size: 0.85rem; color: #5a6478; }

#messages {
  max-height: 60vh;
  min-height: 120px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 12px;
}
.msg {
  max-width: 80%;
  border-radius: 12px;
  padding: 10px 14px;
  background: var(--mist);
  color: var(--ink);
  align-self: flex-start;
  overflow-wrap: break-word;
}
.msg.user {
  background: var(--navy);
  color: #fff;
  align-self: flex-end;
}
.msg.empty,
.msg.typing {
  background: none;
  color: #5a6478;
  padding: 4px 0;
}
.msg.typing::after { content: "…"; }

.chat-form {
  display: flex;
  gap: 8px;
}
.chat-form input { flex: 1; min-width: 0; }
.chat-form .btn { padding: 12px 20px; flex: none; }

/* ===== Trust bar ===== */
.trust {
  background: var(--navy);
  color: #fff;
  padding: 48px 0;
}
.trust-items {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  text-align: center;
}
@media (max-width: 767px) {
  .trust-items { grid-template-columns: repeat(2, 1fr); }
}
.trust-items strong {
  display: block;
  font-size: 1.75rem;
  font-weight: 800;
}
.trust-items span { font-size: 0.9rem; opacity: 0.9; }
.trust-line {
  text-align: center;
  font-size: 0.9rem;
  opacity: 0.9;
  margin: 24px 0 0;
}

/* ===== Sections ===== */
.mist { background: var(--mist); }

.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin: 32px 0;
}
@media (max-width: 767px) {
  .cards { grid-template-columns: 1fr; }
}
.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.card img { border-radius: 0; aspect-ratio: 4 / 3; }
.card-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.card-body h3 { margin: 0 0 8px; }
.card-body p { margin: 0 0 16px; flex: 1; }
.card-body .btn { align-self: flex-start; }

.detail-img { margin-top: 8px; }
.caption {
  text-align: center;
  font-size: 0.9rem;
  color: #5a6478;
  margin: 8px 0 0;
}

/* ===== Delivery ===== */
.video-wrap {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  margin: 24px 0 32px;
  border-radius: 8px;
  overflow: hidden;
}
.video-wrap iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
.reqs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin: 16px 0;
}
@media (max-width: 767px) {
  .reqs { grid-template-columns: 1fr; }
}
.reqs strong {
  display: block;
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--navy);
}
.photo-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 24px;
}
@media (max-width: 767px) {
  .photo-row {
    display: flex;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .photo-row img { min-width: 75%; }
}

/* ===== Why us ===== */
.why {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: start;
}
@media (max-width: 767px) {
  .why { grid-template-columns: 1fr; }
}
.why-item { margin-bottom: 20px; }
.why-item strong { color: var(--navy); }
.why-item p { margin: 4px 0 0; }

/* ===== FAQ ===== */
.faq details { border-bottom: 1px solid var(--line); }
.faq details:first-of-type { border-top: 1px solid var(--line); }
.faq summary {
  font-weight: 600;
  padding: 16px 0;
  cursor: pointer;
}
.faq details p { margin: 0 0 16px; }

/* ===== Footer ===== */
footer {
  background: var(--navy);
  color: #fff;
  padding: 56px 0;
}
footer img { width: 56px; height: 56px; border-radius: 0; }
footer h3 { color: #fff; font-size: 1rem; margin: 0 0 8px; }
.foot-cols {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin: 24px 0;
}
@media (max-width: 639px) {
  .foot-cols { grid-template-columns: repeat(2, 1fr); }
}
footer ul { list-style: none; margin: 0; padding: 0; }
footer li { margin-bottom: 6px; }
footer a { color: rgba(255, 255, 255, 0.85); text-decoration: none; }
footer a:hover { text-decoration: underline; color: #fff; }
.contact { margin-top: 16px; }
.contact p { margin: 4px 0; }
.copyright { margin-top: 24px; font-size: 0.85rem; opacity: 0.7; }

/* ===== Sticky mobile CTA ===== */
.mobile-cta { display: none; }
@media (max-width: 767px) {
  body { padding-bottom: 60px; }
  .mobile-cta {
    display: flex;
    align-items: center;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    height: 60px;
    background: var(--navy);
    z-index: 40;
    padding: 0 12px;
  }
  .mobile-cta .btn { width: 100%; padding: 12px; }
  body.chat-open .mobile-cta { display: none; }
  body.chat-open { padding-bottom: 0; }
}

/* Connecting state */
#connecting {
  padding: 2.5rem 1rem;
  text-align: center;
}
.connecting-text {
  margin: 0;
  color: #5a6478;
}
.connecting-count {
  margin: 0.5rem 0 0;
  font-weight: 800;
  font-size: 1.5rem;
  color: var(--navy);
}
.connecting-dots {
  margin-top: 0.75rem;
}
.connecting-dots span {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin: 0 3px;
  border-radius: 50%;
  background: #5a6478;
  animation: dot-pulse 1.2s infinite ease-in-out;
}
.connecting-dots span:nth-child(2) { animation-delay: 0.2s; }
.connecting-dots span:nth-child(3) { animation-delay: 0.4s; }
@keyframes dot-pulse {
  0%, 80%, 100% { opacity: 0.25; transform: scale(0.8); }
  40% { opacity: 1; transform: scale(1); }
}
.msg.system {
  background: none;
  color: #5a6478;
  font-size: 0.85rem;
  text-align: center;
  align-self: center;
}
