/* ===== RESET & BASE ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  background: #050505;
  color: #e8e4df;
  font-family: 'JetBrains Mono', monospace;
  overflow-x: hidden;
  cursor: none;
}

a {
  color: inherit;
  text-decoration: none;
}

/* ===== FILM GRAIN OVERLAY ===== */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  opacity: 0.035;
  pointer-events: none;
  z-index: 9998;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 512 512' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ===== CUSTOM CURSOR ===== */
.cursor-dot {
  position: fixed;
  width: 6px;
  height: 6px;
  background: #e8e4df;
  border-radius: 50%;
  pointer-events: none;
  z-index: 99999;
  transition: transform 0.1s ease;
  mix-blend-mode: difference;
}

.cursor-ring {
  position: fixed;
  width: 36px;
  height: 36px;
  border: 1px solid rgba(232, 228, 223, 0.3);
  border-radius: 50%;
  pointer-events: none;
  z-index: 99998;
  transition: all 0.15s ease-out;
  mix-blend-mode: difference;
}

.cursor-ring.hovering {
  width: 60px;
  height: 60px;
  border-color: rgba(232, 228, 223, 0.6);
}

/* ===== MOUSE GLOW ===== */
.mouse-glow {
  position: fixed;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.03) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
  transition: transform 0.3s ease-out;
}

/* ===== PRELOADER ===== */
.preloader {
  position: fixed;
  inset: 0;
  background: #050505;
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.8s cubic-bezier(0.4, 0, 0, 1), visibility 0.8s;
}

.preloader.done {
  opacity: 0;
  visibility: hidden;
}

.preloader-text {
  font-family: 'Cormorant Garamond', serif;
  font-size: 14px;
  letter-spacing: 8px;
  text-transform: uppercase;
  opacity: 0.4;
  animation: preloaderPulse 1.5s ease-in-out infinite;
}

@keyframes preloaderPulse {
  0%, 100% { opacity: 0.15; }
  50% { opacity: 0.5; }
}

/* ===== SCROLL REVEAL ===== */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.9s cubic-bezier(0.2, 0, 0, 1),
              transform 0.9s cubic-bezier(0.2, 0, 0, 1);
}

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

.reveal-delay-1 { transition-delay: 0.15s; }
.reveal-delay-2 { transition-delay: 0.3s; }
.reveal-delay-3 { transition-delay: 0.45s; }
.reveal-delay-4 { transition-delay: 0.6s; }

/* ===== SHARED KEYFRAMES ===== */
@keyframes blink {
  0%, 45% { opacity: 1; }
  50%, 95% { opacity: 0; }
  100% { opacity: 1; }
}

@keyframes accentPulse {
  0%, 100% { opacity: 0.15; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(1.2); }
}

@keyframes scrollDown {
  0% { top: -60px; }
  100% { top: 60px; }
}

/* ===== NAVIGATION ===== */
.nav {
  position: fixed;
  top: 0;
  width: 100%;
  padding: 30px 50px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 100;
  mix-blend-mode: difference;
}

.nav-logo {
  font-family: 'Cormorant Garamond', serif;
  font-size: 13px;
  letter-spacing: 5px;
  text-transform: uppercase;
  opacity: 0.8;
}

.nav-links {
  display: flex;
  gap: 32px;
}

.nav-links a {
  font-size: 9px;
  letter-spacing: 3px;
  text-transform: uppercase;
  opacity: 0.55;
  transition: opacity 0.4s;
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1px;
  background: #e8e4df;
  transition: width 0.4s cubic-bezier(0.2, 0, 0, 1);
}

.nav-links a:hover {
  opacity: 0.9;
}

.nav-links a:hover::after {
  width: 100%;
}

/* ===== HERO ===== */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  padding: 60px 40px;
}

.hero-badge {
  font-size: 9px;
  letter-spacing: 5px;
  opacity: 0.15;
  text-transform: uppercase;
  margin-bottom: 50px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.hero-badge .line {
  width: 30px;
  height: 1px;
  background: rgba(255, 255, 255, 0.2);
}

.hero-logo {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 300;
  font-size: 72px;
  letter-spacing: 4px;
  line-height: 1;
  margin-bottom: 8px;
  position: relative;
}

.hero-logo .accent {
  display: inline-block;
  width: 10px;
  height: 10px;
  background: #e8e4df;
  border-radius: 50%;
  margin-left: 6px;
  opacity: 0.3;
  vertical-align: super;
  font-size: 0;
  animation: accentPulse 3s ease-in-out infinite;
}

.hero-tagline-wrapper {
  margin-top: 30px;
  overflow: hidden;
  display: inline-block;
}

.hero-tagline {
  font-size: 14px;
  letter-spacing: 1.5px;
  line-height: 2.4;
  opacity: 0.45;
  font-weight: 300;
}

.hero-tagline .cursor {
  display: inline-block;
  width: 1px;
  height: 16px;
  background: #e8e4df;
  margin-left: 3px;
  vertical-align: middle;
  animation: blink 1.1s ease-in-out infinite;
}

.hero-scroll-indicator {
  position: absolute;
  bottom: 50px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.scroll-line {
  width: 1px;
  height: 60px;
  position: relative;
  overflow: hidden;
}

.scroll-line::after {
  content: '';
  position: absolute;
  top: -60px;
  width: 1px;
  height: 60px;
  background: linear-gradient(to bottom, transparent, rgba(255, 255, 255, 0.3));
  animation: scrollDown 2s ease-in-out infinite;
}

.scroll-text {
  font-size: 8px;
  letter-spacing: 5px;
  text-transform: uppercase;
  opacity: 0.1;
}

/* ===== SHARED SECTION ===== */
section {
  position: relative;
  padding: 140px 40px;
}

.section-label {
  text-align: center;
  font-size: 8px;
  letter-spacing: 7px;
  opacity: 0.1;
  text-transform: uppercase;
  margin-bottom: 70px;
  position: relative;
}

.section-label::before,
.section-label::after {
  content: '';
  display: inline-block;
  width: 30px;
  height: 1px;
  background: rgba(255, 255, 255, 0.08);
  vertical-align: middle;
  margin: 0 18px;
}

.section-rule {
  width: 1px;
  height: 80px;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0.06), transparent);
  margin: 0 auto;
}

/* ===== PROJECTS ===== */
.projects-grid {
  display: flex;
  flex-direction: column;
  gap: 50px;
  max-width: 620px;
  margin: 0 auto;
}

.project-card {
  display: block;
  border: 1px solid rgba(255, 255, 255, 0.04);
  padding: 56px 48px;
  text-align: center;
  position: relative;
  overflow: hidden;
  transition: all 0.6s cubic-bezier(0.2, 0, 0, 1);
  cursor: pointer;
  background: rgba(255, 255, 255, 0.01);
}

.project-card::before {
  content: '';
  position: absolute;
  inset: -1px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), transparent 40%, transparent 60%, rgba(255, 255, 255, 0.05));
  opacity: 0;
  transition: opacity 0.6s;
  z-index: -1;
}

.project-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.015) 0%, transparent 50%);
  opacity: 0;
  transition: opacity 0.6s;
}

.project-card:hover {
  border-color: rgba(255, 255, 255, 0.1);
  transform: translateY(-4px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

.project-card:hover::before { opacity: 1; }
.project-card:hover::after { opacity: 1; }

.project-number {
  font-size: 9px;
  letter-spacing: 5px;
  opacity: 0.1;
  margin-bottom: 24px;
}

.project-name {
  font-family: 'Cormorant Garamond', serif;
  font-size: 34px;
  font-weight: 300;
  letter-spacing: 4px;
  margin-bottom: 14px;
  transition: letter-spacing 0.6s cubic-bezier(0.2, 0, 0, 1);
}

.project-card:hover .project-name {
  letter-spacing: 7px;
}

.project-desc {
  font-size: 11px;
  opacity: 0.25;
  letter-spacing: 2px;
  font-weight: 300;
  margin-bottom: 28px;
}

.project-tags {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-bottom: 28px;
}

.project-tag {
  font-size: 8px;
  letter-spacing: 2px;
  opacity: 0.1;
  padding: 5px 12px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  text-transform: uppercase;
  transition: all 0.4s;
}

.project-card:hover .project-tag {
  opacity: 0.25;
  border-color: rgba(255, 255, 255, 0.1);
}

.project-cta {
  font-size: 9px;
  letter-spacing: 5px;
  opacity: 0.1;
  text-transform: uppercase;
  transition: all 0.4s;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.project-cta .arrow {
  display: inline-block;
  transition: transform 0.4s cubic-bezier(0.2, 0, 0, 1);
}

.project-card:hover .project-cta {
  opacity: 0.5;
  letter-spacing: 7px;
}

.project-card:hover .project-cta .arrow {
  transform: translateX(6px);
}

/* ===== PHILOSOPHY ===== */
.philosophy-text {
  max-width: 500px;
  margin: 0 auto;
  text-align: center;
  font-family: 'Cormorant Garamond', serif;
  font-size: 26px;
  font-weight: 300;
  line-height: 2;
  opacity: 0.5;
  font-style: italic;
}

.philosophy-attribution {
  text-align: center;
  margin-top: 50px;
  font-size: 9px;
  letter-spacing: 5px;
  opacity: 0.08;
  text-transform: uppercase;
}

/* ===== CONTACT ===== */
.contact-grid {
  max-width: 640px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1px 1fr;
  gap: 50px;
  text-align: center;
}

.contact-grid .divider {
  background: linear-gradient(to bottom, transparent, rgba(255, 255, 255, 0.06), transparent);
}

.contact-block h4 {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 300;
  font-size: 13px;
  letter-spacing: 5px;
  opacity: 0.2;
  margin-bottom: 24px;
  text-transform: uppercase;
}

.contact-block p {
  font-size: 11px;
  line-height: 2.4;
  opacity: 0.35;
  font-weight: 300;
}

.contact-email {
  position: relative;
  transition: opacity 0.4s;
}

.contact-email::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 100%;
  height: 1px;
  background: rgba(255, 255, 255, 0.15);
  transform: scaleX(0);
  transition: transform 0.4s cubic-bezier(0.2, 0, 0, 1);
  transform-origin: left;
}

.contact-email:hover {
  opacity: 0.7;
}

.contact-email:hover::after {
  transform: scaleX(1);
}

/* ===== FOOTER ===== */
footer {
  padding: 60px 40px 50px;
  text-align: center;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-brand {
  font-family: 'Cormorant Garamond', serif;
  font-size: 13px;
  letter-spacing: 5px;
  text-transform: uppercase;
  opacity: 0.4;
  margin-bottom: 28px;
}

.footer-legal {
  display: flex;
  justify-content: center;
  gap: 28px;
  font-size: 10px;
  opacity: 0.35;
  letter-spacing: 2px;
}

.footer-legal span {
  opacity: 0.5;
}

.footer-copy {
  margin-top: 20px;
  font-size: 9px;
  opacity: 0.2;
  letter-spacing: 4px;
  text-transform: uppercase;
}

/* ===== RESPONSIVE ===== */

/* Hide custom cursor on touch devices */
@media (hover: none), (pointer: coarse) {
  body {
    cursor: auto;
  }

  .cursor-dot,
  .cursor-ring,
  .mouse-glow {
    display: none;
  }
}

/* Tablet and below */
@media (max-width: 768px) {
  .nav {
    padding: 20px 24px;
  }

  .nav-links {
    gap: 20px;
  }

  .hero-logo {
    font-size: 40px;
    letter-spacing: 2px;
  }

  .hero-tagline {
    font-size: 12px;
  }

  .hero-badge {
    font-size: 8px;
    letter-spacing: 3px;
  }

  section {
    padding: 80px 24px;
  }

  .projects-grid {
    gap: 30px;
  }

  .project-card {
    padding: 36px 28px;
  }

  .project-name {
    font-size: 26px;
    letter-spacing: 2px;
  }

  .philosophy-text {
    font-size: 20px;
  }

  .contact-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .contact-grid .divider {
    width: 60px;
    height: 1px;
    background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.06), transparent);
    margin: 0 auto;
  }
}

/* Small phone */
@media (max-width: 480px) {
  .nav-logo {
    font-size: 11px;
  }

  .nav-links a {
    font-size: 8px;
    letter-spacing: 2px;
  }

  .hero-logo {
    font-size: 30px;
  }

  .hero-tagline {
    font-size: 11px;
  }

  .project-name {
    font-size: 22px;
  }

  .project-tags {
    flex-wrap: wrap;
  }

  .footer-legal {
    flex-direction: column;
    gap: 8px;
  }

  .footer-legal span:nth-child(2) {
    display: none;
  }
}
