:root {
  --navy: #090e17;
  --gold: #c5a059;
  --ivory: #fcfcfc;
  --text-light: rgba(252,252,252,0.8);
  --font-serif: "Cormorant Garamond", serif;
  --font-sans: "Inter", sans-serif;
  --cursor-size: 10px;
}

/* Time-Synced Mid-Night Aesthetic Override */
body.midnight-mode {
  --navy: #020408;
  --gold: #8c7340;
  --text-light: rgba(252,252,252,0.6);
}

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

body {
  background-color: var(--navy);
  color: var(--ivory);
  font-family: var(--font-sans);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  cursor: none; /* Hide default cursor for custom cursor */
}

/* Custom Cursor */
.custom-cursor {
  position: fixed;
  top: 0; left: 0;
  width: var(--cursor-size);
  height: var(--cursor-size);
  background: var(--gold);
  border-radius: 50%;
  pointer-events: none;
  z-index: 999999;
  mix-blend-mode: difference;
  transform: translate(-50%, -50%);
  transition: width 0.3s cubic-bezier(0.19, 1, 0.22, 1), height 0.3s cubic-bezier(0.19, 1, 0.22, 1);
}
.custom-cursor.hovering {
  width: 60px;
  height: 60px;
  background: transparent;
  border: 1px solid var(--gold);
  mix-blend-mode: normal;
}

/* Preloader */
.preloader {
  position: fixed;
  top: 0; left: 0; width: 100%; height: 100%;
  background: var(--navy);
  z-index: 9999;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: opacity 1.5s ease;
}
.preloader.fade-out {
  opacity: 0;
  pointer-events: none;
}
.preloader-crest img {
  width: 80px; opacity: 0; border-radius: 8px;
  animation: pulseCrest 0.8s ease forwards;
}
@keyframes pulseCrest {
  0% { opacity: 0; transform: scale(0.9); filter: blur(4px); }
  50% { opacity: 1; transform: scale(1); filter: blur(0px); }
  100% { opacity: 0; transform: scale(1.05); }
}

/* Typography & Cryptographic Scramble */
h1, h2, h3 { font-family: var(--font-serif); font-weight: 400; line-height: 1.1; }
.eyebrow { font-family: var(--font-sans); font-size: 11px; letter-spacing: 0.3em; text-transform: uppercase; color: var(--gold); margin-bottom: 2rem; }
.dud { color: var(--gold); opacity: 0.7; } /* Scramble text color */

/* Topbar */
.topbar { position: fixed; top: 0; left: 0; width: 100%; z-index: 100; padding: 2rem 0; transition: background 0.4s ease, padding 0.4s ease; }
.topbar.scrolled { background: rgba(9, 14, 23, 0.85); backdrop-filter: blur(10px); padding: 1rem 0; border-bottom: 1px solid rgba(252,252,252,0.05); }
.container { width: min(1400px, 90vw); margin: 0 auto; }
.nav-wrap { display: flex; justify-content: space-between; align-items: center; }
.brand { text-decoration: none; color: var(--ivory); cursor: none; }
.brand-name { font-family: var(--font-serif); font-size: 24px; letter-spacing: 0.05em; }
.nav { display: flex; gap: 3rem; align-items: center; }
.nav a { text-decoration: none; color: var(--text-light); font-size: 13px; letter-spacing: 0.1em; text-transform: uppercase; transition: color 0.3s ease; cursor: none; }
.nav a:hover { color: var(--gold); }
.nav-cta { position: relative; color: var(--gold) !important; }
.nav-cta::after { content: ''; position: absolute; bottom: -4px; left: 0; width: 100%; height: 1px; background: var(--gold); transform: scaleX(0); transform-origin: right; transition: transform 0.4s ease; }
.nav-cta:hover::after { transform: scaleX(1); transform-origin: left; }

/* Hero Section */
.hero { position: relative; height: 100vh; display: flex; align-items: center; overflow: hidden; }
.hero-bg { position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: 0; }
.bg-image { width: 100%; height: 100%; object-fit: cover; transform: scale(1.1); animation: kenBurns 30s ease-out infinite alternate; }
.bg-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: linear-gradient(to right, rgba(9,14,23,0.9) 0%, rgba(9,14,23,0.4) 100%); }
@keyframes kenBurns { 0% { transform: scale(1.1) translate(0, 0); } 100% { transform: scale(1) translate(-2%, -2%); } }

.hero-content { position: relative; z-index: 10; }
.hero-text-wrap { max-width: 800px; }
.hero h1 { font-size: clamp(50px, 8vw, 110px); margin-bottom: 2rem; color: var(--ivory); }
.hero-body { font-size: 18px; line-height: 1.8; color: var(--text-light); max-width: 500px; margin-bottom: 3rem; font-weight: 300; }

/* Magnetic Button */
.btn-magnetic { display: inline-flex; align-items: center; justify-content: center; padding: 1.2rem 2.5rem; border: 1px solid rgba(197, 160, 89, 0.4); border-radius: 100px; text-decoration: none; color: var(--ivory); font-size: 13px; letter-spacing: 0.1em; text-transform: uppercase; transition: background 0.4s ease, border-color 0.4s ease; overflow: hidden; position: relative; cursor: none; }
.btn-magnetic::before { content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: var(--gold); transform: translateY(100%); transition: transform 0.5s cubic-bezier(0.19, 1, 0.22, 1); z-index: 0; }
.btn-magnetic:hover::before { transform: translateY(0); }
.btn-magnetic .btn-text { position: relative; z-index: 1; transition: color 0.4s ease; }
.btn-magnetic:hover .btn-text { color: var(--navy); }

/* Scroll Indicator */
.scroll-indicator { position: absolute; bottom: 40px; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 15px; z-index: 10; }
.scroll-indicator span { font-size: 10px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--text-light); }
.scroll-line { width: 1px; height: 60px; background: rgba(252,252,252,0.2); position: relative; overflow: hidden; }
.scroll-line::after { content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 50%; background: var(--gold); animation: scrollDrop 2s infinite ease-in-out; }
@keyframes scrollDrop { 0% { transform: translateY(-100%); } 100% { transform: translateY(200%); } }

/* Fade Up Animations */
.fade-up { opacity: 0; transform: translateY(30px); transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.19, 1, 0.22, 1); }
.fade-up.visible { opacity: 1; transform: translateY(0); }
.delay-1 { transition-delay: 0.1s; } .delay-2 { transition-delay: 0.2s; } .delay-3 { transition-delay: 0.3s; } .delay-4 { transition-delay: 0.4s; } .delay-5 { transition-delay: 0.5s; }

/* General Section */
.section { padding: 150px 0; position: relative; z-index: 10; background: var(--navy); }
.section h2 { font-size: clamp(40px, 5vw, 80px); margin-bottom: 2rem; color: var(--ivory); }
.section p { font-size: 16px; line-height: 1.8; color: var(--text-light); margin-bottom: 1.5rem; max-width: 600px; }


/* Editorial Grid (Collection) */
.editorial-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 30px; align-items: center; }
.ed-text { grid-column: 1 / 6; z-index: 2; }
.ed-image { border-radius: 4px; overflow: hidden; position: relative; cursor: none; }
.ed-image img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.5s cubic-bezier(0.19, 1, 0.22, 1); }
.ed-image:hover img { transform: scale(1.05); }
.ed-image.img-1 { grid-column: 6 / 10; height: 600px; }
.ed-image.img-2 { grid-column: 9 / 13; margin-top: 150px; height: 400px; z-index: 3; }

.ed-text-secondary { grid-column: 2 / 8; margin-top: 200px; z-index: 2; }
.ed-text-secondary h3 { font-family: var(--font-serif); font-size: 32px; color: var(--gold); margin-bottom: 1rem; }
.ed-text-secondary p { font-size: 14px; line-height: 1.8; color: var(--text-light); max-width: 400px; }

/* Horizontal Vault */
.horizontal-scroll-wrap { width: 100%; overflow-x: auto; padding: 50px 0 100px 5vw; scroll-snap-type: x mandatory; scrollbar-width: none; cursor: none; }
.horizontal-scroll-wrap::-webkit-scrollbar { display: none; }
.h-scroll-container { display: flex; gap: 40px; width: max-content; padding-right: 5vw; }
.vault-item { width: 600px; height: 400px; scroll-snap-align: center; position: relative; overflow: hidden; border-radius: 4px; }
.vault-item img { width: 100%; height: 100%; object-fit: cover; transition: transform 1s ease; }
.vault-item:hover img { transform: scale(1.05); }
.vault-item.locked { background: #111824; display: flex; flex-direction: column; align-items: center; justify-content: center; border: 1px solid rgba(197, 160, 89, 0.2); }
.lock-icon { font-size: 30px; margin-bottom: 10px; opacity: 0.5; }
.vault-caption { position: absolute; bottom: 0; left: 0; width: 100%; padding: 30px; background: linear-gradient(to top, rgba(9,14,23,0.9), transparent); color: var(--ivory); font-family: var(--font-serif); font-size: 24px; }
.locked .vault-caption { position: static; background: none; padding: 0; font-size: 18px; color: var(--gold); }

/* Manifesto Grid */
.manifesto-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 60px 40px; margin-top: 60px; border-top: 1px solid rgba(252,252,252,0.1); padding-top: 60px; }
.manifesto-item h3 { font-family: var(--font-sans); font-size: 14px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--gold); margin-bottom: 15px; }

/* Contact / Application */
.contact-container { display: grid; grid-template-columns: 1fr 1fr; gap: 80px; }
.direct-lines { margin-top: 50px; display: flex; flex-direction: column; gap: 20px; }
.line-item span { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: 0.2em; color: rgba(252,252,252,0.5); margin-bottom: 5px; }
.line-item strong { font-family: var(--font-serif); font-size: 22px; font-weight: 400; color: var(--gold); }
.contact-form { background: rgba(252,252,252,0.03); padding: 50px; border: 1px solid rgba(252,252,252,0.05); border-radius: 4px; }
.form-group { position: relative; margin-bottom: 35px; }
.form-group input, .form-group textarea { width: 100%; background: transparent; border: none; border-bottom: 1px solid rgba(252,252,252,0.2); color: var(--ivory); font-family: var(--font-sans); font-size: 14px; padding: 10px 0; transition: border-color 0.3s ease; cursor: none; }
.form-group input:focus, .form-group textarea:focus { outline: none; border-bottom-color: var(--gold); }
.form-group label { position: absolute; top: 10px; left: 0; font-size: 14px; color: rgba(252,252,252,0.5); transition: all 0.3s ease; pointer-events: none; }
.form-group input:focus ~ label, .form-group input:not(:placeholder-shown) ~ label, .form-group textarea:focus ~ label, .form-group textarea:not(:placeholder-shown) ~ label { top: -20px; font-size: 11px; letter-spacing: 0.1em; color: var(--gold); text-transform: uppercase; }
.submit-btn { width: 100%; margin-top: 20px; background: transparent; }

/* Footer & Weather Widget */
.footer { padding: 80px 0 40px; border-top: 1px solid rgba(252,252,252,0.05); background: #060910; }
.footer-wrap { display: flex; justify-content: space-between; align-items: flex-end; }
.footer-crest { width: 60px; mix-blend-mode: screen; margin-bottom: 20px; border-radius: 4px; }
.footer p { font-size: 12px; color: rgba(252,252,252,0.4); }
.weather-widget { text-align: center; }
.weather-label { display: block; font-size: 10px; letter-spacing: 0.2em; color: var(--gold); margin-bottom: 8px; }
#weather-data { font-family: var(--font-serif); font-size: 20px; color: var(--ivory); }
.footer-right { text-align: right; }
.private-login { display: inline-block; font-size: 11px; text-transform: uppercase; letter-spacing: 0.2em; color: var(--gold); text-decoration: none; margin-bottom: 20px; border-bottom: 1px solid transparent; transition: border-color 0.3s ease; cursor: none; }
.private-login:hover { border-color: var(--gold); }

/* Scroll Animation Classes */
.fade-up-scroll { opacity: 0; transform: translateY(40px); transition: opacity 1s ease, transform 1s cubic-bezier(0.19, 1, 0.22, 1); }
.fade-up-scroll.in-view { opacity: 1; transform: translateY(0); }

/* Responsive */
@media (max-width: 1024px) {
  .editorial-grid { grid-template-columns: 1fr; }
  .ed-text { grid-column: 1 / -1; }
  .ed-image.img-1 { grid-column: 1 / -1; height: 400px; }
  .ed-image.img-2, .ed-text-secondary { display: none; }
  .contact-container { grid-template-columns: 1fr; }
  .hero h1 { font-size: 50px; }
  .nav { display: none; }
  .vault-item { width: 80vw; }
  .section { padding: 100px 0; }
}

@media (max-width: 768px) {
  .manifesto-grid { grid-template-columns: 1fr; gap: 40px; }
  .footer-wrap { flex-direction: column; align-items: flex-start; gap: 40px; }
  .footer-right { text-align: left; }
  .weather-widget { text-align: left; margin-top: 20px; }
  .hero h1 { font-size: 42px; }
  .section h2 { font-size: 36px; }
  .horizontal-scroll-wrap { padding: 30px 0 60px 5vw; }
  .vault-item { height: 300px; width: 85vw; }
  .contact-form { padding: 30px 20px; }
  .custom-cursor { display: none; } /* Hide custom cursor on mobile */
  * { cursor: auto !important; }
}

/* Masterwork Modal */
.modal-overlay {
  position: fixed;
  top: 0; left: 0; width: 100vw; height: 100vh;
  background: rgba(9, 14, 23, 0.95);
  backdrop-filter: blur(15px);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.6s cubic-bezier(0.19, 1, 0.22, 1);
  cursor: none;
}
.modal-overlay.active {
  opacity: 1;
  pointer-events: all;
}
.modal-close {
  position: absolute;
  top: 40px; right: 50px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--gold);
  cursor: none;
  z-index: 2;
}
.modal-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  width: min(1200px, 90vw);
  height: 70vh;
  gap: 60px;
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.6s ease 0.2s, transform 0.6s cubic-bezier(0.19, 1, 0.22, 1) 0.2s;
}
.modal-overlay.active .modal-content {
  opacity: 1;
  transform: translateY(0);
}
.modal-image {
  width: 100%; height: 100%;
  border-radius: 4px;
  overflow: hidden;
}
.modal-image img {
  width: 100%; height: 100%; object-fit: cover;
}
.modal-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.modal-text h2 {
  font-size: clamp(30px, 4vw, 60px);
  color: var(--ivory);
  margin-bottom: 2rem;
}
.modal-text p {
  font-size: 16px; line-height: 1.8; color: var(--text-light); margin-bottom: 3rem;
}

@media (max-width: 1024px) {
  .modal-content {
    grid-template-columns: 1fr;
    height: 85vh;
    gap: 30px;
    overflow-y: auto;
  }
  .modal-image { height: 40vh; }
  .modal-text { justify-content: flex-start; }
}
@media (max-width: 768px) {
  .modal-close { top: 20px; right: 20px; }
}
