/* ==========================================================================
   Joshi Supply Chain Solutions — Stylesheet
   ========================================================================== */

@font-face {
  font-family: 'Red Hat Display';
  src: url('../assets/fonts/RedHatDisplay/RedHatDisplay-VariableFont_wght.ttf') format('truetype-variations'),
       url('../assets/fonts/RedHatDisplay/RedHatDisplay-VariableFont_wght.ttf') format('truetype');
  font-weight: 300 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Manrope';
  src: url('../assets/fonts/Manrope/Manrope-VariableFont_wght.ttf') format('truetype-variations'),
       url('../assets/fonts/Manrope/Manrope-VariableFont_wght.ttf') format('truetype');
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}

:root {
  --red: #dc3d44;
  --red-dark: #b8323a;
  --red-deep: #8f262c;
  --red-tint: #fbe9ea;
  --red-tint-2: #f6d3d5;

  --ink: #18161a;
  --ink-soft: #57545c;
  --ink-faint: #8b8890;

  --white: #ffffff;
  --bg-alt: #faf8f7;
  --border: #ebe6e6;

  --font-display: 'Red Hat Display', 'Arial Narrow', sans-serif;
  --font-body: 'Manrope', -apple-system, BlinkMacSystemFont, sans-serif;

  --container: 1240px;
  --radius-lg: 22px;
  --radius-md: 14px;
  --radius-sm: 8px;

  --ease-premium: cubic-bezier(0.16, 1, 0.3, 1);
  --shadow-soft: 0 20px 60px -25px rgba(20, 10, 10, 0.25);
  --shadow-card: 0 12px 34px -18px rgba(20, 10, 10, 0.22);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }

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

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.08;
  margin: 0;
  letter-spacing: -0.01em;
}

p { margin: 0; }

button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}

::selection { background: var(--red); color: var(--white); }

.eyebrow {
  display: inline-block;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 14px;
}

.section-title {
  font-size: clamp(1.9rem, 3.4vw, 2.8rem);
  max-width: 720px;
  margin-bottom: 18px;
}

.section-sub {
  font-size: 1.08rem;
  line-height: 1.65;
  color: var(--ink-soft);
  max-width: 640px;
}

.section {
  padding: clamp(70px, 10vw, 130px) clamp(20px, 5vw, 60px);
  max-width: var(--container);
  margin: 0 auto;
}

.section-head { margin-bottom: 56px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 16px 32px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.98rem;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.35s var(--ease-premium), box-shadow 0.35s var(--ease-premium), background 0.3s ease, color 0.3s ease, border-color 0.3s ease;
  white-space: nowrap;
}

.btn-primary {
  background: var(--red);
  color: var(--white);
  box-shadow: 0 14px 30px -12px rgba(220, 61, 68, 0.55);
}
.btn-primary:hover {
  background: var(--red-dark);
  transform: translateY(-3px);
  box-shadow: 0 18px 36px -12px rgba(220, 61, 68, 0.6);
}

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--border);
}
.btn-ghost:hover {
  border-color: var(--red);
  color: var(--red);
  transform: translateY(-3px);
}

/* ---------- Scroll progress bar ---------- */
.scroll-progress {
  position: fixed;
  top: 0; left: 0;
  width: 100%;
  height: 3px;
  z-index: 1000;
  background: transparent;
}
.scroll-progress span {
  display: block;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--red), var(--red-dark));
  transform-origin: left;
}

/* ---------- Header ---------- */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 900;
  padding: 22px clamp(20px, 5vw, 60px);
  transition: padding 0.4s var(--ease-premium), background 0.4s var(--ease-premium), box-shadow 0.4s var(--ease-premium);
}

.site-header.scrolled {
  padding: 12px clamp(20px, 5vw, 60px);
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 8px 30px -20px rgba(0,0,0,0.25);
}

.header-inner {
  max-width: var(--container);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand-logo { height: 34px; width: auto; }

.main-nav {
  display: flex;
  align-items: center;
  gap: 34px;
}

.nav-link {
  font-size: 0.94rem;
  font-weight: 600;
  color: var(--ink);
  position: relative;
  padding: 4px 0;
}
.nav-link::after {
  content: '';
  position: absolute;
  left: 0; bottom: -2px;
  width: 0%;
  height: 2px;
  background: var(--red);
  transition: width 0.3s var(--ease-premium);
}
.nav-link:hover::after { width: 100%; }

.nav-cta {
  background: var(--red);
  color: var(--white);
  padding: 10px 22px;
  border-radius: 999px;
  font-weight: 700;
  transition: background 0.3s ease, transform 0.3s ease;
}
.nav-cta::after { display: none; }
.nav-cta:hover { background: var(--red-dark); transform: translateY(-2px); }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}
.nav-toggle span {
  width: 24px;
  height: 2px;
  background: var(--ink);
  transition: transform 0.3s ease, opacity 0.3s ease;
}
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  padding: 140px clamp(20px, 5vw, 60px) 0;
  background: radial-gradient(ellipse 900px 500px at 78% 18%, var(--red-tint) 0%, rgba(251,233,234,0) 70%);
}

.hero-sky { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.hero-cloud {
  position: absolute;
  background: #fff;
  border-radius: 999px;
  opacity: 0.6;
  filter: blur(1px);
}
.hero-cloud.c1 { width: 180px; height: 46px; top: 18%; left: 8%; }
.hero-cloud.c2 { width: 130px; height: 36px; top: 30%; left: 70%; }
.hero-cloud.c3 { width: 100px; height: 30px; top: 12%; left: 55%; }

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 760px;
  margin: 0 auto 220px;
  width: 100%;
}

.hero-title {
  font-size: clamp(2.6rem, 6vw, 4.6rem);
  color: var(--ink);
  margin-bottom: 26px;
}
.hero-title em {
  font-style: normal;
  color: var(--red);
}
.reveal-line { display: block; overflow: hidden; }
.reveal-inner { display: inline-block; will-change: transform; }

.hero-sub {
  font-size: clamp(1.05rem, 1.6vw, 1.24rem);
  line-height: 1.65;
  color: var(--ink-soft);
  max-width: 560px;
  margin-bottom: 40px;
}

.hero-actions { display: flex; gap: 18px; flex-wrap: wrap; }

.hero-scene {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  /* Height scales with viewport width so the SVG's slice ratio stays constant
     at every zoom/resolution — this keeps the whole truck in frame instead of
     cropping its top on wider/zoomed-out screens. No upper cap on purpose: a
     fixed ceiling would shrink the visible band on ultrawide and clip the truck
     again. Floor of 190px keeps it sensible on narrow desktops. */
  height: max(190px, 16vw);
  z-index: 1;
}
.hero-truck-svg { width: 100%; height: 100%; display: block; }

.scroll-cue {
  position: absolute;
  bottom: 26px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  width: 26px;
  height: 42px;
  border: 2px solid var(--ink-faint);
  border-radius: 20px;
}
.scroll-cue span {
  position: absolute;
  top: 8px; left: 50%;
  width: 5px; height: 5px;
  margin-left: -2.5px;
  border-radius: 50%;
  background: var(--red);
  animation: cueDrop 1.8s ease-in-out infinite;
}
@keyframes cueDrop {
  0% { transform: translateY(0); opacity: 1; }
  70% { transform: translateY(16px); opacity: 0; }
  100% { transform: translateY(16px); opacity: 0; }
}

/* ---------- Marquee ---------- */
.marquee-section {
  background: var(--ink);
  overflow: hidden;
  padding: 22px 0;
}
.marquee-track { display: flex; width: max-content; }
.marquee-group {
  display: flex;
  align-items: center;
  white-space: nowrap;
  animation: marqueeScroll 28s linear infinite;
}
.marquee-group span {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--white);
  padding: 0 18px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.marquee-group .dot { color: var(--red); padding: 0 6px; font-size: 1rem; }

@keyframes marqueeScroll {
  from { transform: translateX(0); }
  to { transform: translateX(-100%); }
}

/* ---------- Industries ---------- */
.industry-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.industry-card {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 36px 30px;
  transition: transform 0.4s var(--ease-premium), box-shadow 0.4s var(--ease-premium), border-color 0.4s ease;
}
.industry-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-card);
  border-color: var(--red-tint-2);
}

.industry-icon {
  width: 56px; height: 56px;
  border-radius: 16px;
  background: var(--red-tint);
  color: var(--red);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 22px;
}
.industry-icon svg { width: 28px; height: 28px; }

.industry-card h3 {
  font-size: 1.28rem;
  margin-bottom: 10px;
}
.industry-card p {
  color: var(--ink-soft);
  line-height: 1.6;
  font-size: 0.98rem;
}

/* ---------- Network scenes ---------- */
.network-intro {
  max-width: var(--container);
  margin: 0 auto;
  padding: clamp(60px, 8vw, 100px) clamp(20px, 5vw, 60px) 40px;
  text-align: center;
}
.network-intro .section-title,
.network-intro .section-sub { margin-left: auto; margin-right: auto; }

.network-scenes {
  position: relative;
  height: 640vh;
}

.scene-pin {
  height: 100vh;
  display: flex;
  align-items: center;
  gap: clamp(20px, 4vw, 60px);
  padding: 0 clamp(20px, 6vw, 90px);
  max-width: 1440px;
  margin: 0 auto;
  overflow: hidden;
}

.scene-text {
  flex: 0 0 clamp(260px, 30vw, 380px);
  z-index: 2;
}

.scene-index {
  display: block;
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--ink-faint);
  letter-spacing: 0.08em;
  margin-bottom: 18px;
  font-size: 0.92rem;
}

.scene-title {
  font-size: clamp(1.9rem, 3vw, 2.6rem);
  margin-bottom: 18px;
  min-height: 1.2em;
}

.scene-desc {
  color: var(--ink-soft);
  font-size: 1.05rem;
  line-height: 1.7;
  min-height: 4.8em;
}

.scene-dots {
  display: flex;
  gap: 10px;
  margin-top: 36px;
}
.scene-dot {
  width: 34px;
  height: 4px;
  border-radius: 3px;
  background: var(--border);
  transition: background 0.4s ease, width 0.4s ease;
}
.scene-dot.active { background: var(--red); width: 50px; }

.scene-visual {
  flex: 1;
  height: 100%;
  display: flex;
  align-items: center;
}
.scene-svg {
  width: 100%;
  height: auto;
  max-height: 74vh;
}

/* ---------- Why Joshi ---------- */
.why-section { background: var(--bg-alt); border-radius: 40px; margin: 0 auto; }

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

.why-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 34px 30px;
  border: 1px solid var(--border);
  transition: transform 0.4s var(--ease-premium), box-shadow 0.4s var(--ease-premium);
}
.why-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-card); }

.why-num {
  display: block;
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--red);
  margin-bottom: 16px;
  letter-spacing: 0.05em;
}

.why-card h3 { font-size: 1.22rem; margin-bottom: 10px; }
.why-card p { color: var(--ink-soft); line-height: 1.6; font-size: 0.98rem; }

/* ---------- Process ---------- */
.process-track { position: relative; margin-top: 20px; }

.process-line {
  width: 100%;
  height: 4px;
  display: block;
  margin-bottom: 46px;
}

.process-steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 28px;
}

.process-marker {
  width: 46px; height: 46px;
  border-radius: 50%;
  background: var(--red);
  color: var(--white);
  font-family: var(--font-display);
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  font-size: 1.05rem;
}

.process-step h3 { font-size: 1.14rem; margin-bottom: 10px; }
.process-step p { color: var(--ink-soft); line-height: 1.6; font-size: 0.96rem; }

/* ---------- Inquiry / CTA ---------- */
.inquiry-section {
  max-width: none;
  width: 100%;
  background: linear-gradient(180deg, var(--bg-alt) 0%, var(--white) 100%);
}

.inquiry-inner {
  max-width: var(--container);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: clamp(30px, 6vw, 90px);
  align-items: start;
}

.inquiry-contact {
  list-style: none;
  padding: 0;
  margin: 34px 0 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.inquiry-contact li {
  display: flex;
  align-items: center;
  gap: 14px;
  font-weight: 600;
  color: var(--ink);
}
.inquiry-contact a {
  color: inherit;
  text-decoration: none;
  transition: color .2s ease;
}
.inquiry-contact a:hover { color: var(--red); }
.inquiry-contact svg {
  width: 20px; height: 20px;
  color: var(--red);
  flex-shrink: 0;
}

.inquiry-form {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: clamp(26px, 4vw, 42px);
  box-shadow: var(--shadow-soft);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 20px;
}

.form-field { display: flex; flex-direction: column; gap: 8px; margin-bottom: 20px; }
.form-row .form-field { margin-bottom: 0; }

.form-field label {
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--ink-soft);
}

.form-field input,
.form-field select,
.form-field textarea {
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 13px 16px;
  background: var(--bg-alt);
  transition: border-color 0.3s ease, background 0.3s ease;
  resize: vertical;
}
.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--red);
  background: var(--white);
}

.mode-checks {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  padding: 13px 4px;
}
.mode-checks label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--ink-soft);
  cursor: pointer;
}
.mode-checks input { accent-color: var(--red); width: 16px; height: 16px; }

.btn-submit {
  width: 100%;
  margin-top: 6px;
  position: relative;
}
.btn-spinner {
  display: none;
  width: 16px; height: 16px;
  border: 2px solid rgba(255,255,255,0.4);
  border-top-color: #fff;
  border-radius: 50%;
}
.inquiry-form.is-loading .btn-spinner {
  display: inline-block;
  animation: spin 0.7s linear infinite;
}
.inquiry-form.is-loading .btn-label { opacity: 0.8; }
@keyframes spin { to { transform: rotate(360deg); } }

.form-success {
  margin-top: 16px;
  font-weight: 700;
  color: var(--red-dark);
  background: var(--red-tint);
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  opacity: 0;
  height: 0;
  overflow: hidden;
  transition: opacity 0.4s ease;
}
.form-success.show { opacity: 1; height: auto; margin-top: 16px; padding: 14px 18px; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--ink);
  color: rgba(255,255,255,0.82);
  padding: 80px clamp(20px, 5vw, 60px) 30px;
}

.footer-top {
  max-width: var(--container);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.2fr 2fr;
  gap: 60px;
  padding-bottom: 50px;
  border-bottom: 1px solid rgba(255,255,255,0.12);
}

.footer-logo { height: 32px; margin-bottom: 18px; }
.footer-brand p { line-height: 1.7; max-width: 380px; color: rgba(255,255,255,0.62); font-size: 0.95rem; }

.footer-cols {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}
.footer-col { display: flex; flex-direction: column; gap: 12px; }
.footer-col h4 {
  font-family: var(--font-body);
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 6px;
}
.footer-col a { color: rgba(255,255,255,0.72); font-size: 0.95rem; transition: color 0.25s ease; }
.footer-col a:hover { color: var(--white); }

.footer-bottom {
  max-width: var(--container);
  margin: 0 auto;
  padding-top: 26px;
  font-size: 0.86rem;
  color: rgba(255,255,255,0.5);
}

/* ---------- Reveal defaults (JS-driven) ---------- */
.reveal-up { opacity: 0; }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1024px) {
  .industry-grid { grid-template-columns: repeat(2, 1fr); }
  .why-grid { grid-template-columns: repeat(2, 1fr); }
  .process-steps { grid-template-columns: repeat(2, 1fr); row-gap: 40px; }
  .inquiry-inner { grid-template-columns: 1fr; }
  .footer-top { grid-template-columns: 1fr; }
  .scene-pin { flex-direction: column; justify-content: flex-start; padding-top: 110px; text-align: center; gap: 20px; }
  .scene-text { flex: none; }
  .scene-visual { flex: none; width: 100%; height: auto; }
  .scene-svg { max-height: 46vh; }
  .scene-dots { justify-content: center; }
  .scene-desc { min-height: 0; }
}

@media (max-width: 860px) {
  .main-nav {
    position: fixed;
    top: 0; right: 0;
    height: 100vh;
    width: min(320px, 80vw);
    background: var(--white);
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    padding: 40px;
    gap: 26px;
    transform: translateX(100%);
    transition: transform 0.4s var(--ease-premium);
    box-shadow: -20px 0 60px -30px rgba(0,0,0,0.3);
  }
  .main-nav.open { transform: translateX(0); }
  .nav-toggle { display: flex; }
  .nav-cta { width: 100%; text-align: center; }
}

@media (max-width: 640px) {
  .industry-grid { grid-template-columns: 1fr; }
  .why-grid { grid-template-columns: 1fr; }
  .process-steps { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .footer-cols { grid-template-columns: 1fr 1fr; }
  .hero-content { margin-bottom: 180px; }
  .hero-scene { height: 150px; }
  .network-scenes { height: 720vh; }
}

.form-honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.form-error {
  margin: 14px 0 0;
  font-size: 14px;
  line-height: 1.6;
  color: var(--red);
  opacity: 0;
  transform: translateY(6px);
  transition: opacity .35s ease, transform .35s ease;
  pointer-events: none;
}
.form-error.show {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}
