/* ============================================================
   Script Systems — Modern Website Styles
   ============================================================ */

/* --- Reset & Base ----------------------------------------- */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  /* Palette — orange/yellow/navy brand */
  --color-bg:        #0a0a14;
  --color-bg-alt:    #0e0f1d;
  --color-bg-card:   #141524;
  --color-surface:   #1b1c36;
  --color-border:    rgba(255,255,255,.06);
  --color-text:      #e0e0eb;
  --color-text-dim:  #8888a0;
  --color-text-muted:#7a7a95;
  --color-accent:    #f04923;
  --color-accent-2:  #fed700;
  --color-accent-3:  #ff9a5c;
  --color-navy:      #282973;
  --color-gradient:  linear-gradient(135deg, var(--color-accent), var(--color-accent-2));

  /* Typography */
  --font-body:   'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono:   'JetBrains Mono', 'Fira Code', monospace;
  --fs-base:     1rem;
  --lh-base:     1.7;

  /* Spacing */
  --container:   1200px;
  --section-gap: clamp(5rem, 12vw, 10rem);

  /* Animation */
  --ease-out-expo: cubic-bezier(0.19, 1, 0.22, 1);
  --ease-out-circ: cubic-bezier(0, 0.55, 0.45, 1);
  --duration: 0.6s;
}

html {
  scroll-behavior: smooth;
  font-size: 100%;
}

body {
  font-family: var(--font-body);
  font-size: var(--fs-base);
  line-height: var(--lh-base);
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

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

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 clamp(1.5rem, 5vw, 3rem);
}

/* --- Selection --------------------------------------------- */
::selection {
  background: var(--color-accent);
  color: #fff;
}

/* --- Focus visibility -------------------------------------- */
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--color-accent-2);
  outline-offset: 2px;
  border-radius: 4px;
}

/* --- Section Header ---------------------------------------- */
.section-header {
  margin-bottom: clamp(2.5rem, 6vw, 5rem);
}

.section-header__overline {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: 1rem;
}

.section-header__title {
  font-size: clamp(2rem, 5vw, 3.25rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
  color: #fff;
}

.section-header__desc {
  margin-top: 1rem;
  font-size: 1.125rem;
  color: var(--color-text-dim);
  max-width: 36rem;
}

/* --- Reveal Animations ------------------------------------- */
.js .reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity var(--duration) var(--ease-out-expo),
              transform var(--duration) var(--ease-out-expo);
}

.js .reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* --- Buttons ----------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 2rem;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  cursor: pointer;
  transition: all 0.3s var(--ease-out-circ);
  border: none;
  position: relative;
  overflow: hidden;
}

.btn--primary {
  background: var(--color-gradient);
  color: var(--color-navy);
  box-shadow: 0 4px 24px rgba(240, 73, 35, 0.3);
}

.btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(240, 73, 35, 0.45);
}

.btn--ghost {
  background: transparent;
  color: var(--color-text);
  border: 1px solid rgba(255,255,255,.12);
}

.btn--ghost:hover {
  background: rgba(255,255,255,.04);
  border-color: rgba(255,255,255,.2);
}

/* --- Nav --------------------------------------------------- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 1rem 0;
  transition: background 0.3s, box-shadow 0.3s, padding 0.3s;
}

.nav.is-scrolled {
  background: rgba(10, 10, 20, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 1px 0 rgba(255,255,255,.05);
  padding: 0.65rem 0;
}

.nav__inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 clamp(1.5rem, 5vw, 3rem);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav__logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  font-size: 1.1rem;
  color: #fff;
  letter-spacing: -0.02em;
}

.nav__logo-img {
  display: block;
  width: 32px;
  height: 32px;
  flex-shrink: 0;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.nav__link {
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--color-text-dim);
  border-radius: 6px;
  transition: color 0.2s, background 0.2s;
}

.nav__link:hover {
  color: #fff;
  background: rgba(255,255,255,.04);
}

.nav__link--cta {
  margin-left: 0.5rem;
  background: var(--color-gradient);
  color: var(--color-navy) !important;
  padding: 0.5rem 1.25rem;
  border-radius: 6px;
}

.nav__link--cta:hover {
  box-shadow: 0 4px 20px rgba(240, 73, 35, 0.4);
  transform: translateY(-1px);
}

/* Hamburger */
.nav__toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 0.5rem;
  background: none;
  border: none;
  cursor: pointer;
}

.nav__toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
}

.nav__toggle.is-open span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.nav__toggle.is-open span:nth-child(2) { opacity: 0; }
.nav__toggle.is-open span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* --- Hero -------------------------------------------------- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8rem 2rem 5rem;
  overflow: hidden;
}

/* Grid background */
.hero__grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(240, 73, 35, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(240, 73, 35, 0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 40%, black 30%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 40%, black 30%, transparent 70%);
}

.hero::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(240, 73, 35, 0.08) 0%, transparent 70%);
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.hero__content {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 800px;
}

.hero__overline {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--color-accent-2);
  margin-bottom: 1.5rem;
}

.hero__title {
  font-size: clamp(2.75rem, 7vw, 5.5rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.04em;
  color: #fff;
  margin-bottom: 1.5rem;
}

.hero__title-line {
  display: block;
}

.hero__title-line--accent {
  background: var(--color-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero__subtitle {
  font-size: clamp(1rem, 2vw, 1.25rem);
  color: var(--color-text-dim);
  max-width: 560px;
  margin: 0 auto 2.5rem;
}

.hero__actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.hero__scroll {
  position: absolute;
  bottom: 3rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  color: var(--color-text-muted);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  z-index: 1;
}

.hero__scroll-line {
  width: 1px;
  height: 48px;
  background: linear-gradient(to bottom, var(--color-text-muted), transparent);
  animation: scrollPulse 2s ease-in-out infinite;
}

@keyframes scrollPulse {
  0%, 100% { opacity: 0.2; transform: scaleY(1); }
  50% { opacity: 1; transform: scaleY(1.3); }
}

/* --- About ------------------------------------------------- */
.about {
  padding: var(--section-gap) 0;
  background: var(--color-bg-alt);
}

.about__grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: clamp(3rem, 6vw, 5rem);
  align-items: start;
}

.about__text p {
  color: var(--color-text-dim);
  margin-bottom: 1.25rem;
  font-size: 1.05rem;
}

.about__text strong {
  color: #fff;
  font-weight: 600;
}

.about__text em {
  color: var(--color-accent-2);
  font-style: normal;
}

.about__stat-card {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: 16px;
  padding: 2.5rem 2rem;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.stat {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.15rem;
}

.stat__number {
  font-size: 2.75rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.03em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.stat__suffix {
  font-size: 1.5rem;
  font-weight: 700;
  background: var(--color-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.stat__label {
  display: block;
  width: 100%;
  font-size: 0.85rem;
  color: var(--color-text-muted);
  margin-top: 0.25rem;
  font-weight: 500;
}

/* --- Process ----------------------------------------------- */
.process {
  padding: var(--section-gap) 0;
}

.process__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}

.process-step {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: 16px;
  padding: 2.25rem 1.75rem;
  transition: border-color 0.3s, transform 0.3s, box-shadow 0.3s;
}

.process-step:hover {
  border-color: rgba(240, 73, 35, 0.25);
  transform: translateY(-3px);
  box-shadow: 0 12px 40px rgba(0,0,0,.3);
}

.process-step__num {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  color: var(--color-accent-2);
  margin-bottom: 1rem;
}

.process-step h3 {
  font-size: 1.25rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.6rem;
  letter-spacing: -0.01em;
}

.process-step p {
  color: var(--color-text-dim);
  font-size: 0.95rem;
}

/* --- Services ---------------------------------------------- */
.services {
  padding: var(--section-gap) 0;
  background: var(--color-bg-alt);
}

.services__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

.service-card {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: 16px;
  padding: 2.5rem;
  transition: border-color 0.3s, transform 0.3s, box-shadow 0.3s;
}

.service-card:hover {
  border-color: rgba(240, 73, 35, 0.2);
  transform: translateY(-3px);
  box-shadow: 0 12px 40px rgba(0,0,0,.3);
}

.service-card__icon {
  width: 48px;
  height: 48px;
  color: var(--color-accent);
  margin-bottom: 1.5rem;
}

.service-card h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.75rem;
  letter-spacing: -0.01em;
}

.service-card p {
  color: var(--color-text-dim);
  font-size: 0.95rem;
}

/* --- Work -------------------------------------------------- */
.work {
  padding: var(--section-gap) 0;
}

.work__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-bottom: 3rem;
}

.work-card {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: 16px;
  padding: 2.25rem;
  transition: border-color 0.3s, transform 0.3s, box-shadow 0.3s;
}

.work-card:hover {
  border-color: rgba(240, 73, 35, 0.2);
  transform: translateY(-3px);
  box-shadow: 0 12px 40px rgba(0,0,0,.3);
}

.work-card h3 {
  font-size: 1.2rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.4rem;
  letter-spacing: -0.01em;
}

.work-card__tag {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-accent);
  margin-bottom: 0.9rem;
}

.work-card p:last-child {
  color: var(--color-text-dim);
  font-size: 0.95rem;
}

.work__now {
  text-align: center;
  padding: 2rem;
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: 16px;
}

.work__now-label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--color-accent);
  margin-bottom: 0.75rem;
}

.work__now p:last-child {
  color: var(--color-text-dim);
  font-size: 0.95rem;
  line-height: 1.8;
}

/* --- Video -------------------------------------------------- */
.video {
  padding: var(--section-gap) 0;
}

.video__frame {
  max-width: 900px;
  margin: 0 auto;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--color-border);
  background: #000;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
}

.video__frame video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: #000;
}

/* --- Contact ----------------------------------------------- */
.contact {
  padding: var(--section-gap) 0;
  background: var(--color-bg-alt);
}

.contact__form {
  max-width: 600px;
  margin: 0 auto;
}

.contact__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}

.contact__field {
  margin-bottom: 1.25rem;
}

.contact__field label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 0.5rem;
}

.contact__field input,
.contact__field textarea {
  width: 100%;
  padding: 0.85rem 1rem;
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  color: #fff;
  font-family: var(--font-body);
  font-size: 0.95rem;
  transition: border-color 0.3s, box-shadow 0.3s;
  outline: none;
}

.contact__field input:focus,
.contact__field textarea:focus {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(240, 73, 35, 0.15);
}

.contact__field input::placeholder,
.contact__field textarea::placeholder {
  color: var(--color-text-muted);
}

.contact__form .btn {
  margin-top: 0.5rem;
}

.contact__honeypot {
  position: absolute;
  left: -9999px;
  top: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.contact__status {
  margin-top: 1rem;
  min-height: 1.5em;
  font-size: 0.9rem;
  font-weight: 500;
}

.contact__status.is-success { color: #4ade80; }
.contact__status.is-error { color: #f87171; }

/* --- Footer ------------------------------------------------ */
.footer {
  padding: 5rem 0 2rem;
  border-top: 1px solid var(--color-border);
}

.footer__grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer__brand p {
  color: var(--color-text-dim);
  font-size: 0.9rem;
  margin-top: 0.75rem;
  max-width: 320px;
}

.footer__logo {
  display: block;
  width: 100%;
  max-width: 320px;
  height: auto;
  margin-top: 1.75rem;
}

.footer__links h4 {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-text-muted);
  margin-bottom: 1rem;
}

.footer__links li {
  margin-bottom: 0.5rem;
}

.footer__links a {
  color: var(--color-text-dim);
  font-size: 0.9rem;
  transition: color 0.2s;
}

.footer__links a:hover {
  color: #fff;
}

.footer__bottom {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid var(--color-border);
}

.footer__bottom p {
  font-size: 0.8rem;
  color: var(--color-text-muted);
}

/* --- Responsive -------------------------------------------- */
@media (max-width: 768px) {
  .nav__links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    background: var(--color-bg-card);
    flex-direction: column;
    padding: 6rem 2rem 2rem;
    gap: 0.5rem;
    transition: right 0.4s var(--ease-out-expo);
    border-left: 1px solid var(--color-border);
    z-index: 999;
  }

  .nav__links.is-open {
    right: 0;
  }

  .nav__link {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 1rem;
  }

  .nav__link--cta {
    margin-left: 0;
    text-align: center;
  }

  .nav__toggle {
    display: flex;
    z-index: 1001;
  }

  .nav__overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.5);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
    z-index: 998;
  }

  .nav__overlay.is-open {
    opacity: 1;
    visibility: visible;
  }

  .about__grid {
    grid-template-columns: 1fr;
  }

  .services__grid {
    grid-template-columns: 1fr;
  }

  .contact__row {
    grid-template-columns: 1fr;
  }

  .footer__grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .process__grid {
    grid-template-columns: 1fr;
  }

  .work__grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .hero__actions {
    flex-direction: column;
    align-items: center;
  }

  .hero__actions .btn {
    width: 100%;
    justify-content: center;
  }
}

/* --- Reduced Motion ---------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  html {
    scroll-behavior: auto;
  }
}
