/* ─── Nohemi Variable Font ─── */
@font-face {
  font-family: 'Nohemi';
  src: url('/fonts/Nohemi-VF-BF6438cc58ad63d.ttf') format('truetype');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --black: #000;
  --white: #fff;
  --gray-50: #fafafa;
  --gray-100: #f5f5f5;
  --gray-200: #ebebeb;
  --gray-300: #d4d4d4;
  --gray-400: #a3a3a3;
  --gray-500: #737373;
  --gray-600: #525252;
  --gray-700: #404040;
  --gray-800: #262626;
  --gray-900: #171717;
  --font-sans: 'Nohemi', sans-serif;
  --font-serif: 'Nohemi', sans-serif;
  --accent: #111;
  --accent-soft: var(--gray-400);
  --accent-glow: rgba(0,0,0,0.05);
}

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

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

body {
  background: var(--white);
  color: var(--black);
  font-family: var(--font-sans);
  font-weight: 300;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

.hide-scrollbar::-webkit-scrollbar { display: none; }
.hide-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }

h1, h2, h3, h4 { font-family: var(--font-sans); font-weight: 600; letter-spacing: -0.01em; }
a { color: inherit; text-decoration: none !important; }

/* ─── Navigation ─── */
.site-nav {
  position: fixed;
  top: 0; left: 0; width: 100%;
  padding: 24px 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 100;
  transition: background 0.4s ease, backdrop-filter 0.4s ease;
  border-bottom: 1px solid transparent;
}

.site-nav.nav-scrolled {
  background: linear-gradient(135deg, rgba(255,255,255,0.72) 0%, rgba(255,255,255,0.42) 100%);
  backdrop-filter: blur(40px) saturate(1.8);
  -webkit-backdrop-filter: blur(40px) saturate(1.8);
}

.site-nav .logo-container { width: 44px; height: 44px; }
.site-nav .logo-image { width: 100%; height: 100%; object-fit: contain; image-rendering: pixelated; image-rendering: crisp-edges; }

.site-nav .nav-links {
  display: flex;
  gap: 40px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.4em;
}

.site-nav .nav-links a {
  position: relative;
  transition: opacity 0.3s ease;
}

/* ─── Inverted Nav (inner pages — same blend as homepage) ─── */
.site-nav.invert-ui {
  mix-blend-mode: difference;
  color: var(--white);
  background: transparent !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  border-bottom-color: transparent !important;
  box-shadow: none !important;
}

.site-nav.invert-ui .logo-image {
  filter: invert(1);
}

/* ─── Footer ─── */
.site-footer {
  padding: 40px;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  border-top: 1px solid var(--gray-200);
}

.site-footer .copyright {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.4em;
  color: var(--gray-400);
}

.site-footer .social-links {
  display: flex;
  gap: 32px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.4em;
}

.site-footer .social-links a {
  color: var(--gray-400);
  transition: transform 0.3s ease;
}

/* ─── Inverted Footer (inner pages — fixed + blend) ─── */
.site-footer.invert-ui {
  position: fixed;
  bottom: 0; left: 0; width: 100%;
  mix-blend-mode: difference;
  color: var(--white);
  border-top: none;
  z-index: 50;
  pointer-events: none;
}

.site-footer.invert-ui .copyright,
.site-footer.invert-ui .social-links a {
  color: inherit;
  pointer-events: auto;
}

/* ─── Contact Modal — Refined Glass ─── */
.contact-overlay {
  position: fixed; inset: 0;
  background: rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(32px) saturate(1.4);
  -webkit-backdrop-filter: blur(32px) saturate(1.4);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.5s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.5s ease;
}
.contact-overlay.active { opacity: 1; visibility: visible; }

.contact-modal {
  background: linear-gradient(
    165deg,
    rgba(255, 255, 255, 0.82) 0%,
    rgba(255, 255, 255, 0.6) 40%,
    rgba(255, 255, 255, 0.7) 100%
  );
  backdrop-filter: blur(80px) saturate(2.2) brightness(1.05);
  -webkit-backdrop-filter: blur(80px) saturate(2.2) brightness(1.05);
  padding: 52px;
  width: 90%; max-width: 480px;
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-top-color: rgba(255, 255, 255, 0.65);
  border-left-color: rgba(255, 255, 255, 0.55);
  border-radius: 28px;
  box-shadow:
    0 1px 0 0 rgba(255, 255, 255, 0.7) inset,
    0 -1px 0 0 rgba(255, 255, 255, 0.1) inset,
    0 0 60px rgba(255, 255, 255, 0.1) inset,
    0 12px 40px rgba(0, 0, 0, 0.1),
    0 32px 80px rgba(0, 0, 0, 0.08);
  transform: translateY(16px) scale(0.96);
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 0.5s ease;
}

.contact-overlay.active .contact-modal {
  transform: translateY(0) scale(1);
}

/* Shimmer edge */
.contact-modal::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 28px;
  padding: 1px;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.5) 0%,
    rgba(255, 255, 255, 0.08) 30%,
    rgba(255, 255, 255, 0.0) 50%,
    rgba(255, 255, 255, 0.1) 80%,
    rgba(255, 255, 255, 0.35) 100%
  );
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.contact-modal .close-modal {
  position: absolute; top: 20px; right: 24px;
  font-size: 1.3rem;
  cursor: pointer;
  color: var(--gray-400);
  transition: color 0.3s ease, transform 0.3s ease;
  background: none; border: none;
  font-family: var(--font-sans);
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
}
.contact-modal .close-modal:hover {
  color: var(--black);
  background: rgba(0, 0, 0, 0.05);
  transform: rotate(90deg);
}

.contact-modal h3 { font-size: 1.7rem; margin-bottom: 8px; }
.contact-modal .modal-subtitle {
  font-size: 0.95rem;
  color: var(--gray-500);
  margin-bottom: 36px;
  line-height: 1.6;
}

.contact-modal form { display: flex; flex-direction: column; }
.contact-modal .form-field {
  margin-bottom: 24px;
  position: relative;
}

.contact-modal input,
.contact-modal textarea {
  width: 100%;
  padding: 16px 0;
  border: none;
  border-bottom: 1.5px solid rgba(0, 0, 0, 0.12);
  font-family: var(--font-sans);
  font-size: 1rem;
  background: transparent;
  outline: none;
  transition: border-color 0.4s ease;
  color: var(--black);
}
.contact-modal input:focus,
.contact-modal textarea:focus {
  border-bottom-color: var(--black);
}
.contact-modal input::placeholder,
.contact-modal textarea::placeholder { color: var(--gray-500); }

.contact-modal input.error,
.contact-modal textarea.error { border-bottom-color: red !important; color: red !important; }
.contact-modal input.error::placeholder,
.contact-modal textarea.error::placeholder { color: rgba(255, 0, 0, 0.7); }

.contact-modal textarea { resize: vertical; min-height: 80px; }
.contact-modal .form-submit { margin-top: 16px; }

.contact-modal .form-submit .btn {
  border-radius: 14px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}
.contact-modal .form-submit .btn:hover {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

/* ─── Buttons ─── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  background: var(--black);
  color: var(--white);
  border: none;
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  cursor: pointer;
  transition: background 0.3s ease, transform 0.3s ease;
}
.btn:hover { background: var(--gray-800); transform: translateY(-1px); }

.btn-outline {
  background: transparent;
  color: var(--black);
  border: 1px solid var(--black);
}
.btn-outline:hover { background: var(--black); color: var(--white); }

/* ─── Page Enter ─── */
@keyframes pageEnter { from { opacity: 0; } to { opacity: 1; } }
.page-content {
  animation: pageEnter 0.6s ease forwards;
  padding-bottom: 100px;
  max-width: 100vw;
  overflow-x: hidden;
}

/* ─── Section ─── */
.section { padding: 120px 40px; }
.section-header { margin-bottom: 80px; }
.section-header h1,
.section-header h2 { font-size: clamp(2rem, 4vw, 3.5rem); margin-bottom: 16px; }
.section-header .section-line { width: 40px; height: 1px; background: var(--accent); margin-bottom: 16px; }
.section-header p { font-size: 1.1rem; color: var(--gray-500); max-width: 480px; line-height: 1.7; }

/* ─── CTA Section ─── */
.cta-section {
  padding: 120px 40px;
  text-align: center;
  border-top: 1px solid var(--gray-200);
}
.cta-section h2 { font-size: clamp(1.8rem, 3.5vw, 3rem); margin-bottom: 16px; }
.cta-section p { color: var(--gray-500); margin-bottom: 40px; font-size: 1.1rem; line-height: 1.7; }

/* CTA button — solid dark, visible on white background */
.cta-section .btn {
  background: var(--black);
  color: var(--white);
  border: none;
  border-radius: 100px;
  padding: 16px 40px;
  font-weight: 500;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}
.cta-section .btn:hover {
  background: var(--gray-800);
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

/* ─── Form Success ─── */
.form-success { display: none; text-align: center; padding: 40px 0; }
.form-success.active { display: block; }
.form-success h4 { font-size: 1.4rem; margin-bottom: 8px; }
.form-success p { color: var(--gray-500); font-size: 1rem; }

/* ─── Responsive ─── */
@media (max-width: 768px) {
  .site-nav { padding: 16px 24px; }
  .site-nav .nav-links { gap: 24px; font-size: 9px; }
  .site-footer {
    padding: 24px;
    flex-direction: column;
    gap: 16px;
    align-items: flex-start;
  }
  .section { padding: 80px 24px; }
  .cta-section { padding: 80px 24px; }
  .contact-modal { padding: 32px 24px; }
}

/* ═══════════════════════════════════════════════════════════════════════════
   PREMIUM ENHANCEMENTS
   ═══════════════════════════════════════════════════════════════════════════ */

/* ─── Custom Cursor ─── */
.cursor-dot {
  position: fixed;
  top: 0; left: 0;
  width: 8px; height: 8px;
  background: var(--white);
  border-radius: 50%;
  pointer-events: none;
  z-index: 99999;
  transform: translate(-50%, -50%);
  mix-blend-mode: difference;
  transition: width 0.25s ease, height 0.25s ease, opacity 0.3s ease;
  will-change: left, top;
}

.cursor-ring {
  position: fixed;
  top: 0; left: 0;
  width: 40px; height: 40px;
  border: 1.5px solid rgba(255,255,255,0.4);
  border-radius: 50%;
  pointer-events: none;
  z-index: 99998;
  transform: translate(-50%, -50%);
  mix-blend-mode: difference;
  transition: width 0.35s ease, height 0.35s ease, border-color 0.35s ease;
  will-change: left, top;
}

body.cursor-hover .cursor-ring {
  width: 64px; height: 64px;
  border-color: rgba(255,255,255,0.15);
}
body.cursor-hover .cursor-dot {
  width: 4px; height: 4px; opacity: 0.5;
}

@media (hover: hover) and (pointer: fine) {
  *, *::before, *::after { cursor: none !important; }
}
@media (hover: none), (pointer: coarse) {
  .cursor-dot, .cursor-ring { display: none !important; }
}

/* ─── Grain Texture ─── */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 9990;
  pointer-events: none;
  opacity: 0.03;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 256px 256px;
}

/* ─── Line Reveal Animation ─── */
.line-reveal {
  display: inline-block;
  overflow: hidden;
  vertical-align: bottom;
}
.line-reveal-inner {
  display: inline-block;
  /* Initial state + animation handled by GSAP */
}

/* ─── Marquee ─── */
.marquee {
  overflow: hidden;
  white-space: nowrap;
  padding: 48px 0;
  border-top: 1px solid var(--gray-200);
  border-bottom: 1px solid var(--gray-200);
  user-select: none;
}
.marquee-track {
  display: inline-flex;
  align-items: center;
  animation: marqueeScroll 30s linear infinite;
}
.marquee-item {
  font-family: var(--font-sans);
  font-size: clamp(1.2rem, 2.5vw, 2rem);
  font-weight: 500;
  color: var(--gray-300);
  padding: 0 24px;
  transition: color 0.4s ease;
}
.marquee:hover .marquee-item { color: var(--gray-500); }
.marquee-sep {
  color: var(--accent-soft);
  font-size: 0.55rem;
  padding: 0 8px;
}
.marquee:hover .marquee-track { animation-play-state: paused; }

@keyframes marqueeScroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ─── Magnetic Button ─── */
.btn-magnetic {
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
              background 0.3s ease, box-shadow 0.3s ease;
}

/* ─── Page Entry Transition ─── */
.page-transition {
  position: fixed;
  inset: 0;
  background: var(--black);
  z-index: 99990;
  transform: translateY(0);
  animation: pageSlideUp 0.9s cubic-bezier(0.76, 0, 0.24, 1) forwards;
  animation-delay: 0.05s;
  pointer-events: none;
}
@keyframes pageSlideUp {
  to { transform: translateY(-100%); }
}

/* ─── Loader (Homepage) ─── */
.loader {
  position: fixed; inset: 0;
  background: var(--black);
  z-index: 99999;
  display: flex; align-items: center; justify-content: center;
  flex-direction: column; gap: 32px;
}
.loader.done {
  pointer-events: none;
  animation: loaderExit 1s cubic-bezier(0.76, 0, 0.24, 1) forwards;
}
@keyframes loaderExit { to { transform: translateY(-100%); } }

.loader-logo {
  width: 64px;
  height: 64px;
  object-fit: contain;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  filter: invert(1);
  opacity: 0;
  animation: loaderLogoIn 0.6s ease forwards;
  animation-delay: 0.2s;
}

@keyframes loaderLogoIn {
  from { opacity: 0; transform: scale(0.8); }
  to   { opacity: 1; transform: scale(1); }
}

.loader-bar {
  width: 80px; height: 1px;
  background: rgba(255,255,255,0.15);
  overflow: hidden;
}
.loader-progress {
  width: 0; height: 100%;
  background: var(--white);
  transition: width 0.3s ease;
}

/* ─── Text Wave Hover Animation ─── */
.text-wave {
  display: inline-block;
  overflow: hidden;
  cursor: default;
  position: relative;
  vertical-align: bottom;
  text-decoration: none !important;
}

.text-wave-inner {
  display: block;
  position: relative;
  overflow: hidden;
}

.text-wave-row {
  display: flex;
  flex-wrap: nowrap;
  white-space: nowrap;
}

.text-wave-row:nth-child(2) {
  position: absolute;
  top: 100%;
  left: 0;
  white-space: nowrap;
}

.text-wave-char {
  display: inline-block;
  white-space: pre;
  transition: transform 0.45s cubic-bezier(0.76, 0, 0.24, 1);
  transition-delay: calc(var(--i, 0) * 0.025s);
  will-change: transform;
}

.text-wave:hover .text-wave-char {
  transform: translateY(-100%);
}

.text-wave:hover .text-wave-row:nth-child(2) .text-wave-char {
  transform: translateY(-100%);
}
