/* ==========================================================================
   Berksdelivery - Design System & Main Stylesheet
   Stitch Visual Design System (Coral Pink #ff5770 & Dark Slate #0e1726)
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Design Tokens & CSS Variables
   -------------------------------------------------------------------------- */
:root {
  --brand-pink: #ff5277;
  --brand-primary: #ff5770;
  --brand-hover: #fa3c61;
  --brand-soft: #ffe8ed;
  --brand-light: #ffd6df;
  --brand-card: #ff6584;

  --dark-slate: #0e1726;
  --dark-navy: #111827;
  
  --text-main: #0e1726;
  --text-muted: #5b6577;
  --text-light: #9ca3af;

  --bg-white: #ffffff;
  --bg-surface: #f8f9ff;
  --bg-gray: #f9fafb;

  --border-light: #f3f4f6;
  --border-subtle: #e5e7eb;

  --radius-sm: 0.5rem;    /* 8px */
  --radius-md: 0.75rem;   /* 12px */
  --radius-lg: 1.25rem;   /* 20px */
  --radius-xl: 1.75rem;   /* 28px */
  --radius-full: 9999px;

  --shadow-sm: 0 1px 3px rgba(14, 23, 38, 0.04), 0 1px 2px rgba(14, 23, 38, 0.02);
  --shadow-md: 0 4px 14px rgba(255, 82, 119, 0.12), 0 2px 4px rgba(14, 23, 38, 0.04);
  --shadow-lg: 0 12px 28px rgba(14, 23, 38, 0.08), 0 4px 10px rgba(14, 23, 38, 0.03);

  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* --------------------------------------------------------------------------
   2. Global Reset & Base
   -------------------------------------------------------------------------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-family: "Plus Jakarta Sans", system-ui, -apple-system, sans-serif;
  color: var(--text-main);
  background-color: var(--bg-white);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

button, input, select, textarea {
  font: inherit;
}

/* Scrollbar styling */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: #f1f1f1;
}
::-webkit-scrollbar-thumb {
  background: var(--brand-light);
  border-radius: var(--radius-full);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--brand-pink);
}

/* --------------------------------------------------------------------------
   3. Container & Layout
   -------------------------------------------------------------------------- */
.container {
  width: 100%;
  max-width: 1340px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

@media (min-width: 1024px) {
  .container {
    padding-left: 3rem;
    padding-right: 3rem;
  }
}

/* --------------------------------------------------------------------------
   4. Header & Sticky Navigation
   -------------------------------------------------------------------------- */
.site-header {
  width: 100%;
  background-color: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-light);
  position: sticky;
  top: 0;
  z-index: 100;
}

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

.logo-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.logo-img {
  height: 34px;
  width: auto;
  object-fit: contain;
  transition: transform var(--transition-fast);
}

.logo-img:hover {
  transform: scale(1.02);
}

.logo-fallback-text {
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--dark-slate);
  letter-spacing: -0.03em;
}

.logo-fallback-text span {
  color: var(--brand-pink);
}

/* Desktop Nav */
.main-nav {
  display: flex;
  align-items: center;
  gap: 2.5rem;
}

.nav-link {
  font-size: 1.15rem;
  font-weight: 600;
  color: #ff7594;
  letter-spacing: -0.01em;
  transition: color var(--transition-fast);
  position: relative;
  padding: 0.25rem 0;
}

.nav-link:hover {
  color: var(--brand-pink);
}

.nav-link.active {
  color: var(--brand-pink);
  font-weight: 700;
}

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 100%;
  height: 3px;
  background-color: var(--brand-pink);
  border-radius: var(--radius-full);
}

/* Mobile Hamburger Button */
.mobile-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--dark-slate);
  cursor: pointer;
  padding: 0.5rem;
  border-radius: var(--radius-sm);
}

.mobile-toggle .material-symbols-outlined {
  font-size: 32px;
}

/* Mobile Drawer Overlay & Nav */
.mobile-drawer-overlay {
  position: fixed;
  inset: 0;
  background-color: rgba(14, 23, 38, 0.5);
  backdrop-filter: blur(4px);
  z-index: 150;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-normal);
}

.mobile-drawer-overlay.active {
  opacity: 1;
  visibility: visible;
}

.mobile-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 300px;
  max-width: 85vw;
  background-color: var(--bg-white);
  z-index: 160;
  transform: translateX(100%);
  transition: transform var(--transition-normal);
  display: flex;
  flex-direction: column;
  padding: 2rem 1.5rem;
  box-shadow: -10px 0 30px rgba(0, 0, 0, 0.15);
}

.mobile-drawer.active {
  transform: translateX(0);
}

.mobile-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-light);
}

.mobile-drawer-close {
  background: none;
  border: none;
  color: var(--dark-slate);
  cursor: pointer;
  padding: 0.25rem;
}

.mobile-drawer-nav {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin-top: 2rem;
}

.mobile-drawer-nav .nav-link {
  font-size: 1.25rem;
}

/* Responsive Nav Breakpoint */
@media (max-width: 768px) {
  .main-nav {
    display: none;
  }
  .mobile-toggle {
    display: block;
  }
  .header-inner {
    height: 56px;
  }
  .logo-img {
    height: 26px;
  }
}

/* --------------------------------------------------------------------------
   5. Buttons & Interactive Controls (Stitch Theme)
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.875rem 2rem;
  border-radius: var(--radius-md);
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: all var(--transition-fast);
  border: none;
  text-align: center;
}

.btn-primary {
  background-color: var(--brand-pink);
  color: var(--bg-white);
  box-shadow: 0 4px 14px rgba(255, 82, 119, 0.3);
}

.btn-primary:hover {
  background-color: var(--brand-hover);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(255, 82, 119, 0.4);
}

.btn-primary:active {
  transform: scale(0.98);
}

.btn-secondary {
  background-color: #ff7594;
  color: var(--bg-white);
  box-shadow: 0 2px 8px rgba(255, 117, 148, 0.2);
}

.btn-secondary:hover {
  background-color: #ff5d82;
  transform: translateY(-1px);
}

.btn-dark {
  background-color: var(--dark-slate);
  color: var(--bg-white);
  box-shadow: 0 4px 12px rgba(14, 23, 38, 0.15);
}

.btn-dark:hover {
  background-color: #000000;
  transform: translateY(-1px);
}

.btn-outline {
  background-color: #f3f4f6;
  color: var(--dark-slate);
  border: 1px solid var(--border-subtle);
}

.btn-outline:hover {
  background-color: #e5e7eb;
}

/* --------------------------------------------------------------------------
   6. Page Hero Sections
   -------------------------------------------------------------------------- */
.main-content {
  flex: 1;
  padding-top: 2rem;
  padding-bottom: 3.5rem;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  align-items: center;
}

@media (min-width: 1024px) {
  .hero-grid {
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 3rem;
  }

  .hero-col-left {
    grid-column: span 6 / span 6;
  }

  .hero-col-right {
    grid-column: span 6 / span 6;
  }
}

.hero-title {
  font-size: 2.25rem;
  line-height: 1.15;
  font-weight: 900;
  color: var(--dark-slate);
  letter-spacing: -0.025em;
}

@media (min-width: 640px) {
  .hero-title {
    font-size: 3rem;
  }
}

@media (min-width: 1024px) {
  .hero-title {
    font-size: 3.375rem;
  }
}

.hero-title-highlight {
  color: #ff476d;
}

.hero-description {
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1.6;
  margin-top: 1.25rem;
  max-width: 38rem;
}

@media (min-width: 640px) {
  .hero-description {
    font-size: 1.125rem;
  }
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 2rem;
  flex-wrap: wrap;
}

.hero-image-card {
  position: relative;
  width: 100%;
  height: 320px;
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border-light);
}

@media (min-width: 640px) {
  .hero-image-card {
    height: 380px;
  }
}

.hero-image-card picture {
  display: block;
  width: 100%;
  height: 100%;
}

.hero-image-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

/* --------------------------------------------------------------------------
   7. Partner Company Logo Cards (1, 2, 3)
   -------------------------------------------------------------------------- */
.partners-section {
  margin-top: 2.5rem;
  width: 100%;
}

.partners-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

@media (min-width: 768px) {
  .partners-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.partner-logo-card {
  background-color: var(--bg-white);
  border: 1px solid var(--border-light);
  border-radius: 22px;
  padding: 1.75rem 2rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 120px;
  transition: all var(--transition-fast);
}

.partner-logo-card:hover {
  border-color: rgba(255, 82, 119, 0.3);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.partner-logo-img {
  max-height: 60px;
  max-width: 85%;
  width: auto;
  object-fit: contain;
}

/* --------------------------------------------------------------------------
   8. States Cards
   -------------------------------------------------------------------------- */
.states-section {
  margin-top: 2.5rem;
  width: 100%;
}

.states-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

@media (min-width: 640px) {
  .states-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .states-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.state-card {
  background-color: var(--bg-white);
  border-radius: 22px;
  overflow: hidden;
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  transition: all var(--transition-normal);
}

.state-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-3px);
}

.state-image-wrap {
  position: relative;
  height: 176px;
  width: 100%;
  overflow: hidden;
  background-color: var(--border-light);
}

.state-image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform 0.5s ease;
}

.state-card:hover .state-image-wrap img {
  transform: scale(1.06);
}

.state-info {
  padding: 1.25rem;
  background-color: var(--bg-white);
  border-top: 1px solid var(--border-light);
}

.state-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: #111827;
  letter-spacing: -0.01em;
}

/* --------------------------------------------------------------------------
   9. Application Form - Stitch Visual Design System
   -------------------------------------------------------------------------- */
.form-card-wrap {
  background-color: var(--bg-white);
  padding: 1.75rem;
  border-radius: 28px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-light);
  width: 100%;
}

@media (min-width: 640px) {
  .form-card-wrap {
    padding: 2.25rem 2.5rem;
  }
}

/* Step Progress Header (Stitch Coral Pink Theme) */
.form-header-bar {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--border-light);
  margin-bottom: 1.5rem;
}

.form-step-badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-full);
  background-color: #f9fafb;
  border: 1px solid var(--border-light);
  color: #ff476d;
  font-weight: 700;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.progress-track {
  width: 100%;
  background-color: var(--border-light);
  height: 8px;
  border-radius: var(--radius-full);
  overflow: hidden;
  margin-top: 0.5rem;
}

.progress-fill {
  height: 100%;
  background-color: var(--brand-primary);
  border-radius: var(--radius-full);
  transition: width 0.4s ease;
}

/* Form Steps */
.form-step-container {
  display: none;
}

.form-step-container.active {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.form-grid-2col {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem 1.5rem;
}

@media (min-width: 768px) {
  .form-grid-2col {
    grid-template-columns: repeat(2, 1fr);
  }
}

.form-grid-full {
  grid-column: 1 / -1;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}

.form-label {
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--dark-slate);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.form-label span.req {
  color: var(--brand-primary);
  margin-left: 2px;
}

.form-input, .form-select, .form-textarea {
  width: 100%;
  height: 48px;
  padding: 0 1rem;
  border-radius: var(--radius-md);
  background-color: var(--bg-white);
  border: 1px solid var(--border-subtle);
  color: var(--dark-slate);
  font-size: 0.875rem;
  transition: all var(--transition-fast);
}

.form-textarea {
  height: auto;
  min-height: 110px;
  padding: 0.75rem 1rem;
  resize: vertical;
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
  outline: none;
  border-color: var(--brand-primary);
  box-shadow: 0 0 0 3px rgba(255, 87, 112, 0.15);
}

/* File Upload Button (Stitch Style) */
.file-upload-wrap {
  margin-top: 0.5rem;
}

.file-upload-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background-color: var(--dark-slate);
  color: #ffffff;
  padding: 0.875rem 1.5rem;
  border-radius: var(--radius-md);
  font-weight: 700;
  font-size: 0.875rem;
  cursor: pointer;
  width: 100%;
  transition: background-color 0.2s ease;
  border: none;
}

.file-upload-btn:hover {
  background-color: #000000;
}

/* Checkbox & Radio lists */
.checkbox-group-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 0.25rem;
}

.checkbox-item {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  cursor: pointer;
}

.checkbox-item input[type="checkbox"] {
  width: 18px;
  height: 18px;
  min-width: 18px;
  flex: 0 0 18px;
  box-sizing: border-box;
  accent-color: var(--brand-primary);
  cursor: pointer;
}

.checkbox-item span {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--dark-slate);
}

/* Mock reCAPTCHA Box */
.recaptcha-box {
  display: inline-flex;
  align-items: center;
  gap: 1.25rem;
  background-color: #f9fafb;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.75rem 1.25rem;
  width: fit-content;
}

.recaptcha-box input[type="checkbox"] {
  width: 22px;
  height: 22px;
  accent-color: var(--brand-primary);
  cursor: pointer;
}

.recaptcha-text {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--dark-slate);
}

/* Form Action Navigation Buttons */
.form-nav-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-light);
}

/* --------------------------------------------------------------------------
   10. How It Works Timeline
   -------------------------------------------------------------------------- */
.timeline-wrap {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.timeline-item {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 1.25rem;
}

.timeline-number {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background-color: var(--brand-primary);
  color: var(--bg-white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 1.15rem;
  flex-shrink: 0;
  box-shadow: var(--shadow-sm);
  z-index: 2;
}

.timeline-number.alt {
  background-color: var(--dark-slate);
}

.timeline-content-card {
  flex: 1;
  background-color: var(--bg-white);
  padding: 1.5rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
  transition: all var(--transition-fast);
}

.timeline-content-card:hover {
  border-color: var(--brand-light);
  box-shadow: var(--shadow-sm);
}

.timeline-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--dark-slate);
  margin-bottom: 0.5rem;
}

.timeline-text {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.timeline-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  margin-top: 0.75rem;
  padding: 0.25rem 0.625rem;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 700;
}

.timeline-tag.tag-pink {
  color: #ff476d;
  background-color: #fff0f3;
  border: 1px solid #ffe3e8;
}

.timeline-tag.tag-blue {
  color: #0369a1;
  background-color: #f0f9ff;
  border: 1px solid #e0f2fe;
}

.timeline-tag.tag-green {
  color: #047857;
  background-color: #ecfdf5;
  border: 1px solid #d1fae5;
}

/* --------------------------------------------------------------------------
   11. Footer
   -------------------------------------------------------------------------- */
.site-footer {
  width: 100%;
  background-color: var(--bg-white);
  border-top: 1px solid var(--border-light);
  padding: 1.75rem 0;
  margin-top: 3rem;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.875rem;
  color: var(--text-light);
}

@media (min-width: 640px) {
  .footer-inner {
    flex-direction: row;
  }
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.footer-links a:hover {
  color: var(--text-muted);
  transition: color var(--transition-fast);
}

/* --------------------------------------------------------------------------
   12. Toast Feedback System
   -------------------------------------------------------------------------- */
.toast-container {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.toast {
  background-color: var(--dark-slate);
  color: var(--bg-white);
  padding: 0.875rem 1.25rem;
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  font-weight: 600;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  animation: slideUp 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.toast-success {
  border-left: 4px solid #10b981;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
