/* ============================================================
   KC3D — Global Stylesheet
   casey3d.com
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=Barlow:wght@400;500;600&family=Barlow+Condensed:wght@400;600;700&display=swap');

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

:root {
  --orange:       #E8750A;
  --orange-dim:   #a35208;
  --orange-dark:  #7a3c06;
  --black:        #0d0d0d;
  --surface:      #161616;
  --surface2:     #1f1f1f;
  --border:       #2e2e2e;
  --text:         #f0ece4;
  --muted:        #888880;
  --font-display: 'Bebas Neue', sans-serif;
  --font-body:    'Barlow', sans-serif;
  --font-cond:    'Barlow Condensed', sans-serif;
}

html { scroll-behavior: auto; overflow-x: hidden; }

body {
  background: var(--black);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: clip;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

body > footer {
  margin-top: auto;
}

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }

/* ── NAV ── */
nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(13,13,13,0.96);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2.5rem;
  height: 64px;
  backdrop-filter: blur(8px);
}

.nav-logo {
  font-family: var(--font-display);
  font-size: 2rem;
  letter-spacing: 0.04em;
  color: var(--text);
  line-height: 1;
}
.nav-logo span { color: var(--orange); }

.nav-links {
  display: flex;
  gap: 2.5rem;
  list-style: none;
  font-family: var(--font-cond);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.nav-links a { color: var(--muted); transition: color 0.2s; }
.nav-links a:hover,
.nav-links a.active { color: var(--orange); }

/* ── BUTTONS ── */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--orange);
  color: #000;
  font-family: var(--font-cond);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  padding: 0.9rem 2.2rem;
  border: none;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
}
.btn-primary:hover { background: #ff8c1a; transform: translateY(-1px); }

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: transparent;
  color: var(--text);
  font-family: var(--font-cond);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  padding: 0.9rem 2.2rem;
  border: 1px solid var(--border);
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
}
.btn-ghost:hover { border-color: var(--orange); color: var(--orange); }

/* ── TICKER ── */
.ticker {
  background: var(--orange);
  color: #000;
  padding: 0.6rem 0;
  overflow: hidden;
  white-space: nowrap;
  font-family: var(--font-cond);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}
.ticker-inner { display: inline-block; animation: ticker 120s linear infinite; }
.ticker-inner span { margin: 0 3rem; }
.ticker-inner .dot { opacity: 0.45; }
@keyframes ticker {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ── SECTION UTILITIES ── */
.section { padding: 5rem 4rem; }

.section-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 3rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 1.5rem;
}
.section-num {
  font-family: var(--font-display);
  font-size: 5rem;
  color: var(--border);
  line-height: 1;
  margin-right: 1rem;
}
.section-title {
  font-family: var(--font-display);
  font-size: 2.8rem;
  letter-spacing: 0.04em;
  line-height: 1;
}
.section-link {
  font-family: var(--font-cond);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--orange);
  border-bottom: 1px solid var(--orange);
  padding-bottom: 2px;
  transition: opacity 0.2s;
}
.section-link:hover { opacity: 0.7; }

.eyebrow {
  font-family: var(--font-cond);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--orange);
  border-left: 3px solid var(--orange);
  padding-left: 0.75rem;
  margin-bottom: 1.25rem;
  display: block;
}

/* ── GALLERY GRID ── */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: transparent;
  border: none;
}
.gallery-card {
  background: rgba(22,22,22,0.55);
  aspect-ratio: 4/3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  transition: background 0.2s;
}
.gallery-card:hover { background: rgba(31,31,31,0.7); }
.gallery-card:hover .card-overlay { opacity: 1; }
.gallery-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  inset: 0;
  filter: invert(1);
}
.card-overlay {
  position: absolute;
  inset: 0;
  border: 2px solid var(--orange);
  opacity: 0;
  transition: opacity 0.2s;
  pointer-events: none;
  z-index: 2;
}
.card-info {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 1rem;
  background: linear-gradient(transparent, rgba(13,13,13,0.95));
  z-index: 3;
}
.card-name {
  font-family: var(--font-cond);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text);
}
.card-tag {
  font-family: var(--font-cond);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--orange);
}

/* ── SERVICES BAR ── */
.services-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  background: var(--border);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.service-item {
  background: var(--surface);
  padding: 2rem;
  border-right: 1px solid var(--border);
  transition: background 0.2s;
}
.service-item:last-child { border-right: none; }
.service-item:hover { background: var(--surface2); }
.service-item:hover .service-name { color: var(--orange); }
.service-icon { width: 32px; height: 32px; margin-bottom: 1rem; color: var(--orange); }
.service-name {
  font-family: var(--font-cond);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text);
  margin-bottom: 0.5rem;
  transition: color 0.2s;
}
.service-desc { font-size: 0.82rem; color: var(--muted); line-height: 1.6; }

/* ── FIXED BACKGROUND DRAWING ── */
.bg-drawing {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: var(--black);
}
.bg-drawing img {
  position: absolute;
  top: 64px;
  height: calc(100vh - 64px);
  width: auto;
  filter: invert(1) brightness(0.4);
}
.tint-overlay {
  display: none;
}
.vignette {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: linear-gradient(to right, var(--black) 40%, transparent 75%);
}

.hero {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--border);
  background: transparent;
  width: 50%;
}

/* Hero screen: natural height, JS sizes a spacer to push ticker to bottom */
.hero-screen {
  display: flex;
  flex-direction: column;
}

/* Ticker sits at the bottom of the hero screen, then sticks below nav when scrolled */
.ticker-wrap {
  position: sticky;
  top: 64px;
  z-index: 99;
  max-width: 100vw;
  overflow-x: hidden;
  margin-top: auto;
}

@media (pointer: coarse) {
  .ticker-wrap {
    position: static;
    top: auto;
  }
}
.main-content {
  position: relative;
  z-index: 1;
  max-width: 100vw;
  overflow-x: hidden;
}
.hero-content {
  padding: 5rem 3rem 8rem 4rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: 100%;
}
.hero-right {
  /* transparent — fixed drawing background shows through */
}
.hero-title {
  font-family: var(--font-display);
  font-size: clamp(3.5rem, 7vw, 10rem);
  line-height: 0.9;
  letter-spacing: 0.02em;
  margin-bottom: 1.5rem;
  text-shadow: 0 2px 40px rgba(0,0,0,0.9), 0 1px 8px rgba(0,0,0,0.95);
}
.hero-sub {
  font-size: 1rem;
  color: var(--muted);
  line-height: 1.7;
  max-width: 400px;
  margin-bottom: 2.5rem;
  text-shadow: 0 1px 12px rgba(0,0,0,0.9);
}
.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}


.main-content .section {
  background: transparent;
}
.main-content .services-bar {
  background: transparent;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.main-content .service-item {
  background: transparent;
}
.main-content .service-item:hover {
  background: rgba(255,255,255,0.04);
}
.main-content footer {
  background: var(--black);
}

/* ── PAGE HERO (inner pages) ── */
.page-hero {
  padding: 5rem 4rem 4rem;
  border-bottom: 1px solid var(--border);
}
.page-hero-title {
  font-family: var(--font-display);
  font-size: clamp(3.5rem, 7vw, 7rem);
  line-height: 0.9;
  letter-spacing: 0.02em;
  margin-bottom: 1.5rem;
}
.page-hero-title .accent { color: var(--orange); }
.page-hero-sub { font-size: 1rem; color: var(--muted); max-width: 520px; line-height: 1.7; }

/* ── FOOTER ── */
footer {
  border-top: 1px solid var(--border);
  padding: 2rem 4rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--black);
}
.footer-logo { font-family: var(--font-display); font-size: 1.6rem; color: var(--muted); }
.footer-logo span { color: var(--orange); }
.footer-copy {
  font-family: var(--font-cond);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  color: var(--muted);
  text-transform: uppercase;
}
.footer-links {
  display: flex;
  gap: 2rem;
  list-style: none;
  font-family: var(--font-cond);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.footer-links a { color: var(--muted); transition: color 0.2s; }
.footer-links a:hover { color: var(--orange); }

/* ── CONTACT FORM ── */
.contact-form { display: grid; gap: 1.5rem; max-width: 640px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
.form-group { display: flex; flex-direction: column; gap: 0.5rem; }
.form-group label {
  font-family: var(--font-cond);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--muted);
}
.form-group input,
.form-group textarea,
.form-group select {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.95rem;
  padding: 0.85rem 1rem;
  outline: none;
  transition: border-color 0.2s;
  width: 100%;
}
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus { border-color: var(--orange); }
.form-group textarea { resize: vertical; min-height: 140px; }

/* ── RESPONSIVE ─────────────────────────────────────────── */

/* Medium screens: SVG starts to crowd, widen hero and fade drawing */
@media (max-width: 1024px) {
  .hero {
    width: 65%;
  }
  .vignette {
    background: linear-gradient(to right, var(--black) 20%, transparent 70%);
  }
}

/* Small screens: SVG as faded full-screen background, full-width hero */
@media (max-width: 768px) {
  .page-hero,
  .page-hero-title,
  .page-hero-sub {
    text-align: left;
  }
  .page-hero {
    padding: 3rem 1.5rem 2rem;
  }
  .bg-drawing img {
    position: fixed !important;
    left: 50vw !important;
    top: 50vh !important;
    transform: translate(-50%, -50%) !important;
    width: 200vw !important;
    height: auto !important;
    max-width: none !important;
    max-height: none !important;
    opacity: 1;
  }
  .vignette {
    background: linear-gradient(to bottom, rgba(13,13,13,0.3) 0%, transparent 30%, transparent 70%, rgba(13,13,13,0.3) 100%);
  }
  .hero {
    width: 100%;
    background: transparent;
  }
  .hero-content {
    padding: 3rem 1.5rem 4rem 1.5rem;
    background: linear-gradient(to bottom, rgba(13,13,13,0.7) 0%, rgba(13,13,13,0.4) 100%);
  }
  .hero-title {
    font-size: clamp(3rem, 12vw, 5rem);
  }
  .section {
    padding: 3rem 1.5rem;
  }
  .gallery-grid {
    grid-template-columns: 1fr;
  }
  .services-bar {
    grid-template-columns: 1fr 1fr;
  }
  nav {
    padding: 0 1.5rem;
  }
  footer {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
    padding: 2rem 1.5rem;
  }
  .section-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
}

/* Very small screens */
@media (max-width: 480px) {
  .services-bar {
    grid-template-columns: 1fr;
  }
  .nav-links {
    gap: 1.2rem;
    font-size: 0.75rem;
  }
}

@media (max-width: 768px) {
  .about-grid {
    grid-template-columns: 1fr !important;
  }
  .about-stats {
    display: none !important;
  }
}
