:root{
  --graphite:#18191B;
  --graphite-2:#222427;
  --graphite-3:#121315;
  --cream:#F5F4F0;
  --orange:#FF5C00;
}

*{ box-sizing:border-box; margin:0; padding:0; border-radius:0 !important; }

html{ scroll-behavior:smooth; }

body{
  overflow-x:hidden;
  background:var(--graphite);
  color:#fff;
  font-family:"Inter",sans-serif;
  -webkit-font-smoothing:antialiased;
  text-rendering:optimizeLegibility;
}

img, svg{ display:block; max-width:100%; }

.display{ font-family:"Oswald",sans-serif; }

/* === clip shapes === */
.clip-btn      { clip-path:polygon(12px 0,100% 0,calc(100% - 12px) 100%,0 100%); }
.clip-btn-top  { clip-path:polygon(0 0,calc(100% - 14px) 0,100% 100%,0 100%); }
.clip-card     { clip-path:polygon(0 0,calc(100% - 26px) 0,100% 26px,100% calc(100% - 24px),calc(100% - 24px) 100%,0 100%); }
.clip-image    { clip-path:polygon(0 0,calc(100% - 38px) 0,100% 38px,100% calc(100% - 28px),calc(100% - 28px) 100%,0 100%); }
.clip-stat     { clip-path:polygon(16px 0,100% 0,100% calc(100% - 16px),calc(100% - 16px) 100%,0 100%,0 16px); }
.clip-form     { clip-path:polygon(42px 0,100% 0,100% calc(100% - 42px),calc(100% - 42px) 100%,0 100%,0 42px); }
.clip-corner   { clip-path:polygon(0 0,calc(100% - 22px) 0,100% 22px,100% 100%,0 100%); }

.hero-photo{ clip-path:polygon(12% 0,100% 0,100% 100%,0 100%); }

/* === backgrounds === */
.grid-bg{
  background-image:
    linear-gradient(rgba(255,255,255,.035) 1px,transparent 1px),
    linear-gradient(90deg,rgba(255,255,255,.035) 1px,transparent 1px);
  background-size:48px 48px;
}
.grid-bg-light{
  background-image:
    linear-gradient(rgba(24,25,27,.045) 1px,transparent 1px),
    linear-gradient(90deg,rgba(24,25,27,.045) 1px,transparent 1px);
  background-size:48px 48px;
}

/* === nav underline === */
.nav-line::after{
  content:""; position:absolute; left:0; bottom:-8px;
  width:0; height:2px; background:var(--orange);
  transition:width .3s ease;
}
.nav-line:hover::after{ width:100%; }

/* === service buttons === */
.service-item{ transition:background .3s ease,border-color .3s ease,transform .3s ease; }
.service-item:hover{ transform:translateX(6px); background:rgba(255,92,0,.045); }
.service-item.active{ background:rgba(255,92,0,.08); border-color:rgba(255,92,0,.85) !important; }
.service-item.active .service-title{ color:#18191B; }

/* === reveal === */
.reveal{ opacity:0; transform:translateY(25px); animation:reveal .9s cubic-bezier(.16,1,.3,1) forwards; }
.delay-1{ animation-delay:.10s; }
.delay-2{ animation-delay:.20s; }
.delay-3{ animation-delay:.30s; }
.delay-4{ animation-delay:.40s; }
@keyframes reveal{ to{ opacity:1; transform:translateY(0); } }

/* === pulse dot === */
.pulse{ animation:pulse 2s infinite; }
@keyframes pulse{
  0%,100%{ box-shadow:0 0 0 0 rgba(255,92,0,.5); }
  50%    { box-shadow:0 0 0 8px rgba(255,92,0,0); }
}

/* === counters === */
.counter{ font-variant-numeric:tabular-nums; }

/* === marquee === */
.marquee{ overflow:hidden; white-space:nowrap; }
.marquee-track{ display:inline-flex; width:max-content; animation:marquee 26s linear infinite; }
@keyframes marquee{ from{ transform:translateX(0); } to{ transform:translateX(-50%); } }

/* === inputs === */
input,textarea,select{ outline:none; transition:border-color .25s ease,box-shadow .25s ease; }
input:focus,textarea:focus,select:focus{
  border-color:var(--orange) !important;
  box-shadow:0 0 0 1px var(--orange);
}
select option{ background:#222427; color:#fff; }

/* =========================================================
   PHOTO RAIL
   ========================================================= */
.rail{
  display:flex;
  gap:12px;
  overflow-x:auto;
  overflow-y:hidden;
  scrollbar-width:none;
  -ms-overflow-style:none;
  scroll-snap-type:x mandatory;
  padding-bottom:4px;
  scroll-behavior:smooth;
}
.rail::-webkit-scrollbar{ display:none; }

.rail-card{
  position:relative;
  flex:0 0 auto;
  width:14%;
  height:410px;
  overflow:hidden;
  cursor:pointer;
  scroll-snap-align:center;
  filter:grayscale(1) brightness(.5);
  opacity:.85;
  transition:
    width .75s cubic-bezier(.22,.61,.36,1),
    filter .6s ease,
    opacity .6s ease;
  clip-path:polygon(
    0 0,
    calc(100% - 32px) 0,
    100% 32px,
    100% 100%,
    32px 100%,
    0 calc(100% - 32px)
  );
}

.rail-card.active{
  width:38%;
  filter:none;
  opacity:1;
}

.rail-card:hover{ filter:grayscale(.25) brightness(.85); opacity:1; }
.rail-card.active:hover{ filter:none; }

.rail-img{
  position:absolute; inset:0;
  width:100%; height:100%;
  object-fit:cover;
  transition:transform 1.1s cubic-bezier(.22,.61,.36,1);
}
.rail-card:hover .rail-img{ transform:scale(1.07); }

.rail-shade{
  position:absolute; inset:0;
  background:linear-gradient(to top,rgba(12,13,14,.94) 0%,rgba(12,13,14,.25) 52%,rgba(12,13,14,.05) 100%);
}

.rail-copy{
  position:absolute; left:22px; right:22px; bottom:24px;
  opacity:0; transform:translateY(14px);
  transition:opacity .45s ease .18s,transform .55s cubic-bezier(.22,.61,.36,1) .18s;
  pointer-events:none;
}
.rail-card.active .rail-copy{ opacity:1; transform:translateY(0); }

.rail-progress{
  position:absolute; left:0; bottom:0; height:3px; width:0;
  background:var(--orange);
  z-index:5;
}
.rail-card.active .rail-progress{ animation:railProg 4.6s linear forwards; }
@keyframes railProg{ from{ width:0; } to{ width:100%; } }

/* =========================================================
   RESPONSIVE — rail & layout
   ========================================================= */

/* Tablet: hide non-active cards narrower */
@media (max-width:1100px) and (min-width:901px){
  .rail-card{ width:16%; }
  .rail-card.active{ width:46%; }
  .rail-copy{ left:20px; right:20px; bottom:22px; }
}

/* Mobile & small tablet: single card carousel */
@media (max-width:900px){
  .hero-photo{ clip-path:none; }
  .rail{ scroll-snap-type:x mandatory; padding-bottom:8px; }
  .rail-card,
  .rail-card.active{
    width:82vw;
    height:380px;
    filter:none;
    opacity:1;
  }
  .rail-card .rail-copy{ opacity:1; transform:none; }
  .rail-copy{ left:20px; right:20px; bottom:22px; }
}

/* Small phones */
@media (max-width:480px){
  .rail-card,
  .rail-card.active{
    width:88vw;
    height:340px;
  }
  .rail-copy{ left:16px; right:16px; bottom:18px; }
}

/* Very small phones — hide the 01/05 counter */
@media (max-width:400px){
  #railCounter,
  #railTotal{
    /* still functional, just visually smaller handled by parent */
  }
}

/* Section scroll offset for sticky header */
section{ scroll-margin-top:110px; }

/* Prevent text overflow on narrow screens */
body{ word-wrap:break-word; }

/* Custom xs breakpoint helper (used in form stats) */
@media (min-width:420px){
  .xs\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* Reduced motion */
@media (prefers-reduced-motion:reduce){
  *{ animation-duration:.001ms !important; transition-duration:.001ms !important; }
}

/* Custom scrollbar for desktop */
@media (min-width:1024px){
  ::-webkit-scrollbar{ width:10px; height:10px; }
  ::-webkit-scrollbar-track{ background:#121315; }
  ::-webkit-scrollbar-thumb{ background:#2a2c30; }
  ::-webkit-scrollbar-thumb:hover{ background:#FF5C00; }
}