/* website/home.css */

:root{
  --bg:#0f1115;
  --headline:#eef2f7;
  --text:#c7cdd6;
  --muted:#9aa3af;
  --accent:#E3B341;
}

html, body{
  width: 100%;
  max-width: 100%;
}

/* Safari horizontal overflow guard */
html{ overflow-x: hidden; }
@supports (overflow: clip){
  html{ overflow-x: clip; }
}

body.home{
  background: var(--bg);
  color: var(--text);
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  line-height: 1.7;
  overflow-x: hidden;
}
@supports (overflow: clip){
  body.home{ overflow-x: clip; }
}

body.home h1,
body.home h2,
body.home h3,
body.home h4,
body.home .font-heading{
  font-family: Poppins, Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--headline);
}

body.home .text-accent{ color: var(--accent); }
body.home .bg-accent{ background: var(--accent); }

body.home .btn-industrial{
  border-radius: 0px;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 600;
  font-family: Poppins, Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  transition: transform 160ms ease, box-shadow 160ms ease, background-color 160ms ease, color 160ms ease, border-color 160ms ease, opacity 160ms ease;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  line-height: 1;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}
body.home .btn-industrial:hover{
  transform: translateY(-1px);
  box-shadow: 0 8px 30px rgba(227,179,65,0.14);
}

/* Separator */
body.home .section-sep{
  height: 1px;
  background: linear-gradient(to right, transparent, rgba(255,255,255,0.10), transparent);
}

/* HERO (Safari safe) */
body.home header#top{
  position: relative;
  overflow: hidden;
  min-height: 100vh;
  min-height: 100svh;
}

body.home .video-layer{
  position: absolute;
  inset: 0;
  left: 50%;
  width: 100vw;
  height: 100%;
  transform: translateX(-50%);
  overflow: hidden;
  background: #000;
}

body.home .video-el{
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 1;
}

/* Grain */
body.home .grain{
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.05;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)' opacity='.4'/%3E%3C/svg%3E");
}

/* Hero anchor */
body.home .hero-anchor-right{
  position: absolute;
  right: 24px;
  bottom: 22px;
  z-index: 20;
  pointer-events: none;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(238,242,247,0.60);
  text-shadow: 0 10px 40px rgba(0,0,0,0.55);
  display: none;
}

/* Timed overlay */
body.home .dwell-stage{
  position: absolute;
  inset: 0;
  z-index: 15;
  pointer-events: none;
}

body.home .dwell-card{
  position: absolute;
  max-width: min(560px, 86vw);
  padding: 0;
  background: transparent;
  border: none;
  box-shadow: none;
}

body.home .dwell-line{
  margin: 0;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 700ms ease, transform 700ms ease;
  will-change: opacity, transform;

  font-family: Poppins, Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.10em;
  color: rgba(246,247,251,0.84);
  text-shadow: 0 16px 70px rgba(0,0,0,0.65);

  line-height: 1.14;
  font-size: clamp(15px, 1.8vw, 24px);
}
body.home .dwell-line.show{ opacity: 1; transform: translateY(0); }

/* Positions */
body.home .pos-right-mid{ left: 62%; top: 44%; transform: translate(-10%, -50%); text-align: left; }
body.home .pos-left-mid{ left: 8%; top: 44%; transform: translate(0, -50%); text-align: left; }
body.home .pos-center-right-lower{ left: 56%; top: 68%; transform: translate(0, -50%); text-align: left; }
body.home .pos-center{ left: 50%; top: 52%; transform: translate(-50%, -50%); text-align: center; }

/* Intro */
body.home .intro-slate{
  position:absolute;
  inset:0;
  z-index:25;
  display:flex;
  align-items:center;
  justify-content:center;
  pointer-events:none;
  text-align:center;
  padding: 0 22px;
  background: rgba(0,0,0,0.20);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  opacity: 0;
  transition: opacity 520ms ease;
}
body.home .intro-slate.is-in{ opacity: 1; }
body.home .intro-slate.is-out{ opacity: 0; }

body.home .intro-block{
  max-width: min(980px, 92vw);
  transform: translateY(18px);
  opacity: 0;
  transition: opacity 520ms ease, transform 520ms ease;
}
body.home .intro-block.is-in{ opacity: 1; transform: translateY(0); }
body.home .intro-block.is-out{ opacity: 0; transform: translateY(-10px); }

body.home .intro-headline{
  font-family: Poppins, Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 700;
  color: rgba(246,247,251,0.92);
  font-size: clamp(30px, 3.6vw, 56px);
  line-height: 1.03;
  text-shadow: 0 18px 80px rgba(0,0,0,0.70);
}

body.home .intro-sub{
  margin-top: 16px;
  font-family: Poppins, Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.10em;
  font-weight: 500;
  color: rgba(246,247,251,0.80);
  font-size: clamp(15px, 1.8vw, 24px);
  text-shadow: 0 18px 80px rgba(0,0,0,0.70);
  line-height: 1.14;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce){
  body.home .dwell-line{ transition: none !important; transform: none !important; opacity: 1 !important; }
  body.home .intro-slate, body.home .intro-block{ transition: none !important; opacity: 1 !important; transform: none !important; }
  html{ scroll-behavior: auto !important; }
}

*[id]{ scroll-margin-top: 6rem; }

/* =========================
   LOOP INDICATOR (behind cards + aligned)
   ========================= */

body.home .loop-wrap{
  position: relative;
  overflow: visible;
}

/* SVG layer behind the cards */
body.home .loop-connectors{
  position: absolute;
  left: 0;
  right: 0;
  top: 0;

  /* covers the card row area */
  height: 340px;
  width: 100%;

  pointer-events: none;
  z-index: 0;
  opacity: 0.85;

  /* tune this if you want the line to hit true mid-card */
  transform: translateY(-60px);
}

/* Cards above connector layer */
body.home .loop-cards{
  position: relative;
  z-index: 1;
}

/* SVG styling */
body.home .loop-svg{
  width: 100%;
  height: 100%;
  display: block;
}

body.home .loop-node{
  fill: rgba(227,179,65,0.92);
  filter: drop-shadow(0 6px 16px rgba(227,179,65,0.16));
}

body.home .loop-path{
  stroke: rgba(227,179,65,0.50);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-dasharray: 10 14;
  animation: loopFlow 1.9s linear infinite;
  filter: drop-shadow(0 8px 22px rgba(227,179,65,0.10));
}

body.home .loop-path-back{
  stroke: rgba(227,179,65,0.18);
  stroke-width: 2.5;
  stroke-dasharray: 6 18;
  animation-duration: 2.7s;
}

@keyframes loopFlow{
  to { stroke-dashoffset: -48; }
}

body.home .loop-labels{
  margin-top: 10px;
  display: flex;
  justify-content: space-between;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono","Courier New", monospace;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(238,242,247,0.55);
}

@media (prefers-reduced-motion: reduce){
  body.home .loop-path{ animation: none; }
}

/* IMPORTANT: hide the animation any time the layout is below Tailwind md (cards stack) */
@media (max-width: 767.98px){
  body.home .loop-connectors{ display: none !important; }
  body.home .loop-indicator{ display: none !important; } /* backup if that older wrapper still exists */
}

/* Carousel */
body.home .car-btn{
  width: 44px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255,255,255,0.15);
  background: rgba(255,255,255,0.03);
  color: rgba(238,242,247,0.86);
  transition: background 160ms ease, border-color 160ms ease, transform 160ms ease;
  cursor: pointer;
}
body.home .car-btn:hover{
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.22);
  transform: translateY(-1px);
}

body.home .car-track{
  display: flex;
  gap: 14px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding: 2px 2px 10px;
}
body.home .car-track::-webkit-scrollbar{ height: 10px; }
body.home .car-track::-webkit-scrollbar-thumb{
  background: rgba(255,255,255,0.12);
  border-radius: 999px;
}

body.home .car-card{
  scroll-snap-align: start;
  min-width: min(420px, 86vw);
  padding: 22px;
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(20,22,27,0.42);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  box-shadow: 0 16px 60px rgba(0,0,0,0.26);
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
  text-decoration: none;
}
body.home .car-card:hover{
  transform: translateY(-2px);
  border-color: rgba(255,255,255,0.18);
  box-shadow: 0 18px 80px rgba(0,0,0,0.34);
}

body.home .car-meta{
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono","Courier New", monospace;
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(154,163,175,0.70);
}

body.home .car-title{
  margin-top: 10px;
  font-family: Poppins, Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: rgba(238,242,247,0.94);
  line-height: 1.12;
}

body.home .car-excerpt{
  margin-top: 10px;
  color: rgba(214,220,228,0.78);
  line-height: 1.6;
}

body.home .car-tags{
  display:flex;
  flex-wrap:wrap;
  gap: 10px;
  margin-top: 16px;
}

body.home .car-tag{
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(238,242,247,0.62);
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.10);
}

body.home .car-card.is-featured{
  border-color: rgba(227,179,65,0.28);
  box-shadow:
    0 0 0 1px rgba(227,179,65,0.10),
    0 18px 70px rgba(227,179,65,0.12);
}
body.home .car-card.is-featured:hover{
  box-shadow:
    0 0 0 1px rgba(227,179,65,0.16),
    0 22px 90px rgba(227,179,65,0.16);
}

body.home .car-badge{
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono","Courier New", monospace;
  font-size: 11px;
  letter-spacing: 0.20em;
  text-transform: uppercase;
  color: rgba(227,179,65,0.85);
}
