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

html {
  scroll-behavior: auto; /* we handle scroll ourselves */
}

body {
  font-family: 'Inter', sans-serif;
  color: #fff;
  background: #0a0a0a;
  overflow-x: hidden;
}

/* ── Scroll Progress Bar ────────────────────────────── */
#scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0%;
  background: #ff6b35;
  z-index: 100;
  transition: width 0.1s ease-out;
}

/* ── Fixed Scroll Video ───────────────────────────── */
#frame-container {
  position: fixed;
  inset: 0;
  z-index: 0;
  background: #0a0a0a;
}

#scroll-canvas {
  width: 100%;
  height: 100%;
  display: block;
}

/* Dark overlay so white text reads over bright frames */
#frame-container::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  pointer-events: none;
}

/* ── Fade overlay (smooth transition to page content) ── */
#fade-overlay {
  position: fixed;
  inset: 0;
  z-index: 1;
  background: #0a0a0a;
  opacity: 0;
  pointer-events: none;
  transition: none;
}

/* ── Scrollable spacer (drives animation + reveals) ── */
#scroll-content {
  position: relative;
  z-index: 1;
}

.scroll-spacer {
  height: 500vh;
}

/* ── Fixed Hero Overlay ────────────────────────────── */
#hero-overlay {
  position: fixed;
  z-index: 1;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0 8vw;
  pointer-events: none;
  transition: opacity 1s ease;
}

#hero-overlay.hidden {
  opacity: 0;
}

.hero-words {
  display: flex;
  gap: clamp(0.8rem, 2vw, 1.5rem);
  flex-wrap: wrap;
  margin-top: 0.25rem;
}

.hero-word {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(1.5rem, 4vw, 3rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 1.4s ease, transform 1.4s ease;
}

.hero-word.visible {
  opacity: 1;
  transform: translateY(0);
}

.hero-word .dot {
  color: #ff6b35;
}

/* ── Typography ────────────────────────────────────── */
h1,
h2 {
  font-family: 'Space Grotesk', sans-serif;
}

.hero-title {
  font-size: clamp(3rem, 8vw, 6rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.05;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.5);
  opacity: 0;
  transform: translateY(24px);
  animation: heroEntrance 1.6s ease forwards;
  animation-delay: 0.3s;
}

@keyframes heroEntrance {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-title .dot {
  color: #ff6b35;
}

/* ── Scroll Hint ───────────────────────────────────── */
.scroll-hint {
  position: absolute;
  bottom: 3rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  color: rgba(255, 255, 255, 0.4);
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: opacity 0.4s ease;
}

.scroll-hint.fade-out {
  opacity: 0;
}

.scroll-arrow {
  width: 20px;
  height: 20px;
  border-right: 2px solid rgba(255, 255, 255, 0.4);
  border-bottom: 2px solid rgba(255, 255, 255, 0.4);
  transform: rotate(45deg);
  animation: bounce 2s ease infinite;
}

@keyframes bounce {

  0%,
  20%,
  50%,
  80%,
  100% {
    transform: rotate(45deg) translateY(0);
  }

  40% {
    transform: rotate(45deg) translateY(8px);
  }

  60% {
    transform: rotate(45deg) translateY(4px);
  }
}

.cta-button {
  display: inline-block;
  padding: 1rem 3rem;
  background: #ff6b35;
  color: #fff;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.1rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: 60px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 4px 24px rgba(255, 107, 53, 0.3);
}

.cta-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 32px rgba(255, 107, 53, 0.5);
}



/* ── Navigation ────────────────────────────────────── */
#nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 2.5rem;
  transition: background 0.3s ease, box-shadow 0.3s ease;
}

#nav.scrolled {
  background: rgba(10, 10, 10, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.06);
}

.nav-logo {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.2rem;
  font-weight: 700;
  color: #fff;
  text-decoration: none;
  letter-spacing: -0.02em;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.nav-logo.visible {
  opacity: 1;
}

.nav-logo .dot {
  color: #ff6b35;
}

.nav-links {
  display: flex;
  gap: 2rem;
}

.nav-links a {
  color: rgba(255, 255, 255, 0.6);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 400;
  letter-spacing: 0.02em;
  transition: color 0.2s ease;
}

.nav-links a:hover {
  color: #fff;
}

/* ── Page Sections (below animation) ───────────────── */
#page-content {
  position: relative;
  z-index: 2;
  background: #0a0a0a;
}

.page-section {
  padding: 8rem 2rem;
}

.page-inner {
  max-width: 1100px;
  margin: 0 auto;
}

.section-heading {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 3rem;
  position: relative;
  display: inline-block;
}

.section-heading::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 0;
  width: 40px;
  height: 3px;
  background: #ff6b35;
  border-radius: 2px;
}

.coming-soon {
  font-size: 1.1rem;
  color: rgba(255, 255, 255, 0.35);
  font-weight: 300;
  font-style: italic;
}

/* ── About ─────────────────────────────────────────── */
.about-content {
  max-width: 700px;
}

.about-content p {
  font-size: clamp(1.05rem, 1.8vw, 1.2rem);
  line-height: 1.8;
  color: rgba(255, 255, 255, 0.7);
  font-weight: 300;
  margin-bottom: 1.5rem;
}

.about-content .pillar {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  color: #fff;
}

/* ── Portfolio Grid ────────────────────────────────── */
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
}

@media (max-width: 700px) {
  .portfolio-grid {
    grid-template-columns: 1fr;
  }
}

.project-card {
  display: block;
  text-decoration: none;
  color: #fff;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 16px;
  overflow: hidden;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.project-card:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 107, 53, 0.3);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
}

.project-thumb {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: rgba(255, 255, 255, 0.06);
  /* Replace with actual project images via inline style or img tag */
}

.project-info {
  padding: 1.5rem;
}

.project-info h3 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.project-info p {
  font-size: 0.95rem;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.55);
  font-weight: 300;
}

/* ── Contact ───────────────────────────────────────── */
.contact-intro {
  font-size: clamp(1.05rem, 1.8vw, 1.2rem);
  color: rgba(255, 255, 255, 0.7);
  font-weight: 300;
  margin-bottom: 2.5rem;
}

.contact-form {
  max-width: 600px;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.form-row {
  display: flex;
  gap: 1.25rem;
}

@media (max-width: 500px) {
  .form-row {
    flex-direction: column;
  }
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 1rem 1.25rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  color: #fff;
  font-family: 'Inter', sans-serif;
  font-size: 1rem;
  font-weight: 300;
  outline: none;
  transition: border-color 0.2s ease;
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
  color: rgba(255, 255, 255, 0.3);
}

.contact-form input:focus,
.contact-form textarea:focus {
  border-color: rgba(255, 107, 53, 0.5);
}

.contact-form textarea {
  resize: vertical;
  min-height: 120px;
}

.contact-form .cta-button {
  align-self: flex-start;
  border: none;
  cursor: pointer;
}

/* Honeypot - hidden from humans */
.contact-form .honeypot {
  position: absolute;
  left: -9999px;
  opacity: 0;
  pointer-events: none;
}

/* Form status message */
.form-status {
  font-size: 0.95rem;
  margin-top: 0.5rem;
}

.form-status.success {
  color: #4ade80;
}

.form-status.error {
  color: #f87171;
}

/* Turnstile widget spacing */
.cf-turnstile {
  margin-bottom: 0.5rem;
}

/* ── Footer ────────────────────────────────────────── */
.site-footer {
  padding: 3rem 2rem;
  text-align: center;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.3);
  font-size: 0.85rem;
}

/* ── Back to Top Button ────────────────────────────── */
#back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 50;
  width: 48px;
  height: 48px;
  border: none;
  border-radius: 50%;
  background: #ff6b35;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity 0.3s ease, transform 0.3s ease, background 0.2s ease;
  box-shadow: 0 4px 16px rgba(255, 107, 53, 0.3);
}

#back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

#back-to-top:hover {
  background: #ff8555;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 107, 53, 0.4);
}

#back-to-top:active {
  transform: translateY(0);
}

/* ── Fade-in for page sections ─────────────────────── */
.page-section .page-inner {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.page-section .page-inner.visible {
  opacity: 1;
  transform: translateY(0);
}