/* ============================================================
   Kunza Wrap & Tint — styles
   Mobile-first. Dark studio theme, brand red accent.
   ============================================================ */

:root {
  --bg: #0a0a0b;
  --bg-2: #111113;
  --bg-3: #17171a;
  --line: rgba(255, 255, 255, 0.08);
  --text: #f5f5f4;
  --muted: #a1a1aa;
  --red: #ff1e14;
  --red-deep: #c80f08;
  --red-glow: rgba(255, 30, 20, 0.35);
  --radius: 18px;
  --font: "Archivo", system-ui, -apple-system, "Segoe UI", sans-serif;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

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

/* ---------- Scroll progress ---------- */
.scroll-progress {
  position: fixed; inset: 0 0 auto 0; height: 2px; z-index: 200;
  background: transparent; pointer-events: none;
}
.scroll-progress span {
  display: block; height: 100%; width: 100%;
  background: linear-gradient(90deg, var(--red-deep), var(--red));
  transform-origin: 0 50%; transform: scaleX(0);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.55rem;
  padding: 0.95rem 1.6rem; border-radius: 999px;
  font-weight: 700; font-size: 0.95rem; letter-spacing: 0.01em;
  border: 1px solid transparent; cursor: pointer;
  transition: transform 0.35s var(--ease-out), box-shadow 0.35s var(--ease-out),
              background 0.35s, border-color 0.35s, color 0.35s;
  will-change: transform;
}
.btn:active { transform: scale(0.97); }
.btn-red {
  background: linear-gradient(135deg, var(--red), var(--red-deep));
  color: #fff; box-shadow: 0 8px 28px -8px var(--red-glow);
}
.btn-red:hover { transform: translateY(-2px); box-shadow: 0 14px 36px -8px var(--red-glow); }
.btn-ghost {
  border-color: rgba(255, 255, 255, 0.22); color: var(--text);
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.btn-ghost:hover { border-color: rgba(255, 255, 255, 0.5); transform: translateY(-2px); }
.btn-small { padding: 0.6rem 1.1rem; font-size: 0.85rem; }

.text-link {
  color: var(--red); font-weight: 600; font-size: 0.95rem;
  transition: opacity 0.25s;
}
.text-link:hover { opacity: 0.75; }

/* ---------- Header ---------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  transition: background 0.4s, border-color 0.4s, backdrop-filter 0.4s;
  border-bottom: 1px solid transparent;
}
.site-header.scrolled {
  background: rgba(10, 10, 11, 0.72);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom-color: var(--line);
}
.header-inner {
  max-width: 1200px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 0.85rem 1.25rem;
  transition: padding 0.4s var(--ease-out);
}
.site-header.scrolled .header-inner { padding-block: 0.55rem; }

.brand { display: inline-flex; align-items: center; gap: 0.6rem; }
.brand-mark { width: 34px; height: 34px; filter: drop-shadow(0 0 10px var(--red-glow)); }
.brand-word {
  font-weight: 900; letter-spacing: 0.14em; font-size: 0.95rem; line-height: 1.05;
  display: inline-flex; flex-direction: column;
}
.brand-word em {
  font-style: normal; font-weight: 600; font-size: 0.58rem;
  letter-spacing: 0.32em; color: var(--muted);
}

.main-nav { display: none; gap: 1.75rem; }
.main-nav a {
  font-size: 0.9rem; font-weight: 600; color: var(--muted);
  position: relative; transition: color 0.3s;
}
.main-nav a::after {
  content: ""; position: absolute; left: 0; bottom: -6px; height: 2px; width: 100%;
  background: var(--red); transform: scaleX(0); transform-origin: 0 50%;
  transition: transform 0.35s var(--ease-out);
}
.main-nav a:hover { color: var(--text); }
.main-nav a:hover::after { transform: scaleX(1); }

.header-cta span { white-space: nowrap; }

/* ---------- Hero ---------- */
.hero {
  position: relative; min-height: 100svh;
  display: flex; flex-direction: column; justify-content: flex-end;
  overflow: hidden;
}
.hero-media { position: absolute; inset: 0; z-index: 0; }
.hero-video {
  width: 100%; height: 100%; object-fit: cover; object-position: center;
  transform-origin: center;
}
.hero-shade {
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(10,10,11,0.55) 0%, rgba(10,10,11,0.15) 35%, rgba(10,10,11,0.82) 78%, var(--bg) 100%),
    radial-gradient(90% 60% at 20% 85%, rgba(10,10,11,0.65) 0%, transparent 60%);
}

.hero-content {
  position: relative; z-index: 1;
  max-width: 1200px; width: 100%; margin: 0 auto;
  padding: 7rem 1.25rem 6.5rem;
}
.hero-eyebrow {
  font-size: 0.8rem; font-weight: 700; letter-spacing: 0.28em; text-transform: uppercase;
  color: var(--red); margin-bottom: 1.1rem;
}
.hero-title {
  font-size: clamp(2.6rem, 9.5vw, 5.4rem);
  font-weight: 900; line-height: 0.98; letter-spacing: -0.02em;
  text-transform: uppercase; margin-bottom: 1.2rem;
}
.hero-title .line { display: block; }
.hero-title .word { display: inline-block; white-space: nowrap; overflow: hidden; }
.hero-title .ch { display: inline-block; }
.hero-title .accent {
  color: transparent;
  -webkit-text-stroke: 1.5px rgba(255, 255, 255, 0.85);
}
.hero-sub {
  max-width: 34rem; color: #d4d4d8; font-size: clamp(1rem, 2.6vw, 1.15rem);
  margin-bottom: 1.75rem;
}
.hero-ctas { display: flex; flex-wrap: wrap; gap: 0.8rem; margin-bottom: 1.6rem; }
.hero-chips { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.hero-chips li {
  font-size: 0.78rem; font-weight: 600; letter-spacing: 0.04em; color: #e4e4e7;
  padding: 0.42rem 0.85rem; border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(10, 10, 11, 0.4);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}

.hero-scrollcue {
  position: absolute; z-index: 1; right: 1.5rem; bottom: 2rem;
  display: none; flex-direction: column; align-items: center; gap: 0.6rem;
}
.cue-line { width: 1px; height: 56px; background: linear-gradient(180deg, transparent, var(--red)); overflow: hidden; position: relative; }
.cue-line::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent, #fff);
  animation: cueDrop 2.2s var(--ease-out) infinite;
}
@keyframes cueDrop { 0% { transform: translateY(-100%); } 60%, 100% { transform: translateY(100%); } }
.cue-text { font-size: 0.68rem; letter-spacing: 0.3em; text-transform: uppercase; color: var(--muted); writing-mode: vertical-rl; }

/* ---------- Marquee ---------- */
.marquee {
  border-block: 1px solid var(--line);
  background: var(--bg-2);
  overflow: hidden; padding: 1rem 0;
  position: relative; z-index: 2;
}
.marquee-track {
  display: flex; align-items: center; gap: 2.5rem; width: max-content;
  animation: marquee 28s linear infinite;
}
.marquee-track span {
  font-weight: 800; font-size: 0.95rem; letter-spacing: 0.12em; text-transform: uppercase;
  color: #d4d4d8; white-space: nowrap;
}
.marquee-track i { color: var(--red); font-style: normal; font-size: 0.6rem; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- Sections shared ---------- */
section { position: relative; }
.section-head {
  max-width: 1200px; margin: 0 auto; padding: 5rem 1.25rem 2.5rem;
}
.eyebrow {
  font-size: 0.78rem; font-weight: 700; letter-spacing: 0.3em; text-transform: uppercase;
  color: var(--red); margin-bottom: 0.9rem;
}
.section-head h2, .contact-card h2 {
  font-size: clamp(1.9rem, 5.5vw, 3.2rem); font-weight: 900;
  line-height: 1.05; letter-spacing: -0.015em; text-transform: uppercase;
}
.section-sub { color: var(--muted); max-width: 34rem; margin-top: 1rem; }

/* ---------- Services ---------- */
.service-grid {
  max-width: 1200px; margin: 0 auto;
  padding: 0 1.25rem 5rem;
  display: grid; gap: 1.25rem;
}
.service-card {
  background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.5s var(--ease-out), border-color 0.5s, box-shadow 0.5s;
}
.service-card:hover {
  transform: translateY(-6px);
  border-color: rgba(255, 30, 20, 0.35);
  box-shadow: 0 24px 50px -20px rgba(0, 0, 0, 0.8);
}
.service-media { aspect-ratio: 4 / 3; overflow: hidden; }
.service-media img {
  width: 100%; height: 115%; object-fit: cover;
  transition: transform 0.7s var(--ease-out);
}
.service-card:hover .service-media img { transform: scale(1.04); }
.service-body { padding: 1.5rem 1.4rem 1.6rem; position: relative; }
.service-index {
  position: absolute; top: 1.3rem; right: 1.3rem;
  font-size: 0.8rem; font-weight: 800; letter-spacing: 0.15em; color: var(--red);
}
.service-body h3 {
  font-size: 1.25rem; font-weight: 800; letter-spacing: -0.01em;
  margin-bottom: 0.5rem; padding-right: 2.5rem;
}
.service-body p { color: var(--muted); font-size: 0.95rem; margin-bottom: 1.1rem; }
.service-link {
  display: inline-flex; align-items: center; gap: 0.45rem;
  font-size: 0.88rem; font-weight: 700; color: var(--text);
  transition: color 0.3s, gap 0.3s var(--ease-out);
}
.service-link:hover { color: var(--red); gap: 0.75rem; }

/* ---------- Showcase: slow conveyor, left → right ---------- */
.showcase { background: var(--bg-2); border-block: 1px solid var(--line); }
.showcase-pin { overflow: hidden; padding: 0.5rem 0 1.5rem; }
.showcase-track {
  display: flex; gap: 1rem; width: max-content;
  animation: conveyor 60s linear infinite;
}
.showcase-track:hover { animation-play-state: paused; }
@keyframes conveyor { from { transform: translateX(-50%); } to { transform: translateX(0); } }
.shot {
  flex: 0 0 72vw; max-width: 340px;
  border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--line);
}
.shot img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.showcase-ctas {
  max-width: 1200px; margin: 0 auto;
  display: flex; flex-wrap: wrap; gap: 0.8rem;
  padding: 0.5rem 1.25rem 5rem;
}

/* ---------- Contact (light section) ---------- */
.contact { padding-bottom: 6rem; background: #f2f2f0; color: #141416; }
.contact .eyebrow { color: var(--red-deep); }
.contact .giant-title { -webkit-text-stroke-color: rgba(20, 20, 22, 0.09); }
.contact-card {
  max-width: 1200px; margin: 0 auto;
  padding: 4.5rem 1.25rem 2rem; text-align: left;
}
.contact-card h2 { max-width: 44rem; margin-bottom: 1.75rem; color: #141416; }
.contact-actions { display: flex; flex-wrap: wrap; gap: 0.8rem; }
.contact .btn-ghost {
  border-color: rgba(20, 20, 22, 0.25); color: #141416;
  background: rgba(20, 20, 22, 0.04);
}
.contact .btn-ghost:hover { border-color: rgba(20, 20, 22, 0.55); }
.contact .text-link { color: var(--red-deep); }

.contact-info {
  max-width: 1200px; margin: 0 auto;
  padding: 1.5rem 1.25rem 0;
  display: grid; gap: 1.25rem;
}
.info-block {
  background: #ffffff; border: 1px solid rgba(20, 20, 22, 0.08); border-radius: var(--radius);
  padding: 1.6rem 1.5rem;
  box-shadow: 0 10px 30px -18px rgba(20, 20, 22, 0.18);
}
.info-block h3 {
  font-size: 0.82rem; font-weight: 800; letter-spacing: 0.24em; text-transform: uppercase;
  color: var(--red-deep); margin-bottom: 0.9rem;
}
.info-block p { color: #3f3f46; margin-bottom: 0.75rem; }
.hours-table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
.hours-table td { padding: 0.4rem 0; color: #3f3f46; }
.hours-table td:last-child { text-align: right; color: #71717a; }
.warranty-note {
  max-width: 1200px; margin: 0 auto; padding: 2rem 1.25rem 0;
  font-size: 0.8rem; color: #71717a;
}

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); background: var(--bg-2); }
.footer-inner {
  max-width: 1200px; margin: 0 auto;
  padding: 2.5rem 1.25rem calc(2.5rem + 76px);
  display: flex; flex-direction: column; gap: 1.4rem; align-items: flex-start;
}
.footer-links { display: flex; gap: 1.5rem; }
.footer-links a { font-size: 0.9rem; font-weight: 600; color: var(--muted); transition: color 0.3s; }
.footer-links a:hover { color: var(--text); }
.footer-copy { font-size: 0.8rem; color: var(--muted); }

/* ---------- Mobile sticky CTA ---------- */
.mobile-cta {
  position: fixed; inset: auto 0 0 0; z-index: 150;
  display: flex; gap: 0.6rem;
  padding: 0.7rem 0.9rem calc(0.7rem + env(safe-area-inset-bottom));
  background: rgba(10, 10, 11, 0.82);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid var(--line);
  transform: translateY(110%);
  transition: transform 0.5s var(--ease-out);
}
.mobile-cta.visible { transform: translateY(0); }
.mobile-cta a {
  flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  min-height: 48px; border-radius: 12px; font-weight: 800; font-size: 0.95rem;
}
.mc-call { background: linear-gradient(135deg, var(--red), var(--red-deep)); color: #fff; }
.mc-text { border: 1px solid rgba(255, 255, 255, 0.25); color: var(--text); }

/* ---------- Reveal defaults (JS enhances) ---------- */
.reveal { opacity: 1; }

/* ============================================================
   Tablet & up
   ============================================================ */
@media (min-width: 640px) {
  .service-grid { grid-template-columns: repeat(2, 1fr); }
  .contact-info { grid-template-columns: 2fr 1fr; }
}

/* ============================================================
   Desktop
   ============================================================ */
@media (min-width: 900px) {
  .main-nav { display: flex; }
  .hero-scrollcue { display: flex; }
  .mobile-cta { display: none; }
  .footer-inner { padding-bottom: 2.5rem; flex-direction: row; align-items: center; justify-content: space-between; }

  .service-grid { grid-template-columns: repeat(4, 1fr); gap: 1rem; }
  .service-card:nth-child(even) { transform: translateY(2.5rem); }
  .service-card:nth-child(even):hover { transform: translateY(calc(2.5rem - 6px)); }

  /* Showcase conveyor: wider shots, slower drift on desktop */
  .showcase-track { animation-duration: 80s; }
  .shot { flex: 0 0 24vw; max-width: 430px; }
  .shot img { aspect-ratio: 4 / 3; }
}

/* ============================================================
   Reduced motion
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001s !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001s !important;
  }
  .marquee-track { animation: none; }
  .hero-video { display: none; }
  .hero-media { background: url("assets/hero.jpg") center / cover no-repeat; }
  .showcase-track { animation: none; }
  .showcase-pin { overflow-x: auto; }
}

/* ============================================================
   Cut dividers — precision-cut line between sections
   ============================================================ */
.cut-divider { line-height: 0; padding: 0.5rem 0; }
.cut-divider svg { width: 100%; height: 80px; display: block; }
.cut-divider.flip svg { transform: scaleY(-1); }
.cut-path {
  stroke: var(--red); stroke-width: 2; fill: none;
  stroke-dasharray: 1600; stroke-dashoffset: 0;
  filter: drop-shadow(0 0 8px var(--red-glow));
  opacity: 0.85;
}
.cut-blade { fill: var(--red); filter: drop-shadow(0 0 6px var(--red-glow)); }

/* ============================================================
   Portfolio-grade layer: preloader / cursor / grain / titles
   ============================================================ */

/* ---------- Preloader (pure CSS, self-dismissing) ---------- */
.preloader {
  position: fixed; inset: 0; z-index: 400;
  background: var(--bg);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1.2rem;
  animation: preOut 0.5s ease 1s forwards;
}
.preloader img { animation: preMark 1.1s var(--ease-out) both; filter: drop-shadow(0 0 18px var(--red-glow)); }
.pre-bar { width: 120px; height: 2px; background: rgba(255, 255, 255, 0.12); overflow: hidden; border-radius: 2px; }
.pre-bar i { display: block; height: 100%; width: 100%; background: var(--red); transform-origin: 0 50%; animation: preBar 0.9s var(--ease-out) 0.1s both; }
@keyframes preMark { from { opacity: 0; transform: scale(0.8) rotate(-8deg); } to { opacity: 1; transform: none; } }
@keyframes preBar { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes preOut { to { opacity: 0; visibility: hidden; } }

/* ---------- Custom cursor (fine pointers only) ---------- */
.cursor-dot, .cursor-ring {
  position: fixed; top: 0; left: 0; z-index: 500;
  pointer-events: none; border-radius: 50%;
  display: none;
}
.cursor-dot { width: 8px; height: 8px; background: var(--red); margin: -4px 0 0 -4px; }
.cursor-ring {
  width: 38px; height: 38px; margin: -19px 0 0 -19px;
  border: 1.5px solid rgba(255, 30, 20, 0.55);
  transition: width 0.3s var(--ease-out), height 0.3s var(--ease-out),
              margin 0.3s var(--ease-out), border-color 0.3s, background 0.3s;
}
.cursor-ring.grow {
  width: 64px; height: 64px; margin: -32px 0 0 -32px;
  border-color: rgba(255, 30, 20, 0.9);
  background: rgba(255, 30, 20, 0.08);
}
html.has-cursor body { cursor: none; }
html.has-cursor a, html.has-cursor button { cursor: none; }

/* ---------- Film grain ---------- */
.grain {
  position: fixed; inset: -50%; z-index: 240; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.5'/%3E%3C/svg%3E");
  opacity: 0.05;
  animation: grainShift 0.9s steps(3) infinite;
}
@keyframes grainShift {
  0% { transform: translate(0, 0); }
  33% { transform: translate(-2%, 1.5%); }
  66% { transform: translate(1.5%, -2%); }
  100% { transform: translate(0, 0); }
}

/* ---------- Giant outlined section titles (JS-injected) ---------- */
.section-head, .contact-card { position: relative; }
.giant-title {
  position: absolute; top: 1.2rem; left: 0; z-index: 0;
  font-weight: 900; font-size: clamp(4.2rem, 15vw, 11rem);
  line-height: 0.9; letter-spacing: 0.02em; text-transform: uppercase;
  white-space: nowrap; pointer-events: none; user-select: none;
  color: transparent;
  -webkit-text-stroke: 1px rgba(255, 255, 255, 0.07);
}
.section-head > *:not(.giant-title), .contact-card > *:not(.giant-title) { position: relative; z-index: 1; }

/* ---------- Curtain reveals for images ---------- */
.service-media { position: relative; }
.curtain::after {
  content: ""; position: absolute; inset: 0; z-index: 2;
  background: var(--bg);
  transform-origin: 50% 0;
  transition: transform 0.9s var(--ease-out);
}
.curtain.in::after { transform: scaleY(0); }

/* ============================================================
   Services → compact rows on small phones (faster scrolling)
   ============================================================ */
@media (max-width: 639px) {
  .section-head { padding: 3.5rem 1.25rem 1.75rem; }
  .service-grid { gap: 0.7rem; padding-bottom: 3.5rem; }
  .service-card { display: grid; grid-template-columns: 96px 1fr; }
  .service-media { aspect-ratio: auto; height: 100%; min-height: 96px; }
  .service-media img { height: 100%; }
  .service-body { padding: 0.85rem 1rem; }
  .service-index { display: none; }
  .service-body h3 { font-size: 1rem; padding-right: 0; margin-bottom: 0.25rem; }
  .service-body p { font-size: 0.84rem; margin-bottom: 0.5rem; }
  .service-link { font-size: 0.8rem; }
}

/* ============================================================
   Reduced motion — additions
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  .preloader, .grain, .cursor-dot, .cursor-ring { display: none !important; }
  .curtain::after { display: none; }
  .giant-title { display: none; }
  .service-card { position: static !important; height: auto !important; }
}

/* ============================================================
   Map embed (contact) + draggable conveyor (JS mode)
   ============================================================ */
.map-wrap {
  margin: 0.75rem 0 0.9rem;
  border-radius: 12px; overflow: hidden;
  border: 1px solid rgba(20, 20, 22, 0.1);
}
.map-wrap iframe {
  display: block; width: 100%; height: 230px; border: 0;
}

.showcase-pin.js-scroll { overflow-x: auto; scrollbar-width: none; user-select: none; }
.showcase-pin.js-scroll::-webkit-scrollbar { display: none; }
.showcase-pin.js-scroll .showcase-track { animation: none; }
@media (pointer: fine) {
  .showcase-pin.js-scroll { cursor: grab; }
  .showcase-pin.js-scroll:active { cursor: grabbing; }
}
