/* ========================================
   CSS VARIABLES
   ======================================== */
:root {
  --bg: #F0EBE3;
  --bg-dark: #0A0A0A;
  --ink: #1A1A1A;
  --cream: #F0EBE3;
  --muted: #6B6460;
  --accent: #B8956A;
  --accent-hover: #A07A52;
  --serif: 'EB Garamond', 'Georgia', serif;
  --sans: 'Inter', 'Helvetica Neue', sans-serif;
  --nav-height: 60px;
  --section-pad: clamp(80px, 10vw, 140px);
  --side-pad: clamp(20px, 5vw, 80px);
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-out-quart: cubic-bezier(0.25, 1, 0.5, 1);
}

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

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  overflow-x: hidden;
  cursor: none;
}

a { color: inherit; text-decoration: none; cursor: none; }
img { display: block; max-width: 100%; height: auto; }

::selection { background: var(--accent); color: var(--cream); }

/* ========================================
   LOADER
   ======================================== */
.loader {
  position: fixed; inset: 0;
  background: var(--bg-dark);
  display: flex; align-items: center; justify-content: center;
  z-index: 10000;
  transition: opacity 0.8s ease, visibility 0.8s ease;
}
.loader.done { opacity: 0; visibility: hidden; pointer-events: none; }
.loader-text {
  font-family: var(--serif);
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  color: var(--cream);
  letter-spacing: 0.08em;
}
.loader-text span {
  display: inline-block; opacity: 0; transform: translateY(12px);
  animation: loaderIn 0.5s ease forwards;
}
.loader-text span:nth-child(1) { animation-delay: 0.05s; }
.loader-text span:nth-child(2) { animation-delay: 0.1s; }
.loader-text span:nth-child(3) { animation-delay: 0.15s; }
.loader-text span:nth-child(4) { animation-delay: 0.2s; }
.loader-text span:nth-child(5) { animation-delay: 0.25s; }
.loader-text .loader-dot { color: var(--accent); animation-delay: 0.35s; }

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

/* ========================================
   CUSTOM CURSOR
   ======================================== */
.cursor-dot, .cursor-ring {
  position: fixed; top: 0; left: 0;
  pointer-events: none; z-index: 9999; will-change: transform;
}
.cursor-dot {
  width: 8px; height: 8px;
  background: var(--accent); border-radius: 50%;
  mix-blend-mode: difference;
  transform: translate(-50%, -50%);
  transition: width 0.3s var(--ease-out-expo), height 0.3s var(--ease-out-expo);
}
.cursor-ring {
  width: 40px; height: 40px;
  border: 1px solid rgba(184, 149, 106, 0.4); border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: width 0.4s var(--ease-out-expo), height 0.4s var(--ease-out-expo), border-color 0.3s ease;
}
body.cursor-hover .cursor-dot { width: 14px; height: 14px; }
body.cursor-hover .cursor-ring { width: 55px; height: 55px; border-color: rgba(184, 149, 106, 0.7); }

/* ========================================
   NAVIGATION
   ======================================== */
.nav {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 1000; height: var(--nav-height);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 var(--side-pad);
  transition: transform 0.4s ease, background 0.4s ease;
}
.nav--over-hero { background: transparent; color: var(--cream); }
.nav--scrolled {
  background: rgba(240, 235, 227, 0.95);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  color: var(--ink);
  border-bottom: 1px solid rgba(0,0,0,0.06);
}
.nav--hidden { transform: translateY(-100%); }
/* Non-hero pages: light bg nav by default */
.nav--light { background: rgba(240, 235, 227, 0.95); color: var(--ink); border-bottom: 1px solid rgba(0,0,0,0.06); }

.nav-logo { font-family: var(--serif); font-size: 1.5rem; font-weight: 500; letter-spacing: 0.02em; }
.nav-logo span { color: var(--accent); }

.nav-links { list-style: none; display: flex; gap: 2.5rem; }
.nav-links a {
  font-family: var(--sans); font-size: 0.8rem; font-weight: 400;
  letter-spacing: 0.12em; text-transform: uppercase;
  position: relative; transition: opacity 0.3s ease;
}
.nav-links a::after {
  content: ''; position: absolute; bottom: -4px; left: 0;
  width: 0; height: 1px; background: currentColor;
  transition: width 0.3s ease;
}
.nav-links a:hover::after { width: 100%; }
.nav-links a:hover { opacity: 0.7; }

/* Active page indicator */
.nav-links a.active { opacity: 1; }
.nav-links a.active::after { width: 100%; }

.nav-menu-btn {
  display: none; background: none; border: none; cursor: none;
  width: 28px; height: 20px; position: relative; z-index: 1001;
}
.nav-menu-btn span {
  display: block; width: 100%; height: 1.5px;
  background: currentColor; position: absolute; left: 0;
  transition: transform 0.3s ease, opacity 0.3s ease;
}
.nav-menu-btn span:nth-child(1) { top: 0; }
.nav-menu-btn span:nth-child(2) { top: 50%; transform: translateY(-50%); }
.nav-menu-btn span:nth-child(3) { bottom: 0; }
.nav-menu-btn.active span:nth-child(1) { top: 50%; transform: translateY(-50%) rotate(45deg); }
.nav-menu-btn.active span:nth-child(2) { opacity: 0; }
.nav-menu-btn.active span:nth-child(3) { bottom: 50%; transform: translateY(50%) rotate(-45deg); }

.mobile-menu {
  display: none; position: fixed; inset: 0;
  background: var(--bg-dark); z-index: 999;
  flex-direction: column; align-items: center; justify-content: center;
  gap: 2.5rem; opacity: 0; transition: opacity 0.4s ease;
}
.mobile-menu.open { display: flex; opacity: 1; }
.mobile-menu a {
  font-family: var(--serif); font-size: 2rem; color: var(--cream);
  letter-spacing: 0.04em; transition: color 0.3s ease;
}
.mobile-menu a:hover { color: var(--accent); }

/* ========================================
   HERO
   ======================================== */
.hero {
  position: relative; width: 100%; height: 100vh;
  min-height: 600px; background: var(--bg-dark); overflow: hidden;
}
.hero-picture { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-picture img {
  width: 100%; height: 100%; object-fit: cover; object-position: center center;
  opacity: 0; transition: opacity 1s ease;
}
.hero-picture img.loaded { opacity: 1; }

.hero-headline {
  position: absolute; bottom: clamp(60px, 10vw, 120px);
  left: var(--side-pad); max-width: 600px;
}
.hero-headline h1 {
  font-family: var(--serif); font-size: clamp(2rem, 4vw, 3.4rem);
  font-weight: 400; color: var(--cream); line-height: 1.25; margin-bottom: 1.2rem;
}
.hero-headline h1 em { font-style: italic; color: var(--accent); }

.line { overflow: hidden; display: block; }
.line-inner {
  display: block; transform: translateY(110%);
  transition: transform 1s var(--ease-out-expo);
}
.hero-loaded .line-inner { transform: translateY(0); }
.hero-loaded .line:nth-child(2) .line-inner { transition-delay: 0.12s; }

.hero-headline a {
  font-family: var(--sans); font-size: 0.75rem;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--cream);
  border-bottom: 1px solid rgba(240,235,227,0.4); padding-bottom: 4px;
  opacity: 0; transform: translateY(10px);
  transition: border-color 0.3s ease, opacity 0.8s ease 0.5s, transform 0.8s var(--ease-out-expo) 0.5s;
}
.hero-loaded .hero-headline a { opacity: 1; transform: translateY(0); }
.hero-headline a:hover { border-color: var(--accent); }

.hero-scroll-hint {
  position: absolute; bottom: clamp(30px, 5vw, 60px); right: var(--side-pad);
  display: flex; flex-direction: column; align-items: center; gap: 0.5rem;
}
.hero-scroll-hint span {
  font-family: var(--sans); font-size: 0.65rem; color: rgba(240,235,227,0.5);
  letter-spacing: 0.2em; text-transform: uppercase; writing-mode: vertical-rl;
}
.hero-scroll-line {
  width: 1px; height: 40px; background: rgba(240,235,227,0.3);
  position: relative; overflow: hidden;
}
.hero-scroll-line::after {
  content: ''; position: absolute; top: -100%; width: 100%; height: 100%;
  background: var(--accent); animation: scrollPulse 2s ease-in-out infinite;
}
@keyframes scrollPulse { 0% { top: -100%; } 100% { top: 100%; } }

/* ========================================
   ESSENCE / QUOTE
   ======================================== */
.essence {
  padding: var(--section-pad) var(--side-pad);
  text-align: center; max-width: 700px; margin: 0 auto;
}
.essence blockquote {
  font-family: var(--serif); font-size: clamp(1.1rem, 2vw, 1.35rem);
  color: var(--muted); line-height: 1.9; font-weight: 400; font-style: italic;
}
.essence cite {
  display: block; margin-top: 1rem;
  font-family: var(--sans); font-size: 0.7rem; color: var(--accent);
  letter-spacing: 0.15em; text-transform: uppercase; font-style: normal; font-weight: 300;
}

/* ========================================
   WORKS GRID
   ======================================== */
.works { padding: 0 var(--side-pad) var(--section-pad); }

.works-header {
  display: flex; align-items: baseline; justify-content: space-between;
  margin-bottom: clamp(40px, 5vw, 70px);
}
.works-header h2 {
  font-family: var(--serif); font-size: clamp(1.8rem, 3vw, 2.6rem);
  font-weight: 400; letter-spacing: 0.01em;
}
.works-header a {
  font-family: var(--sans); font-size: 0.75rem; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--muted);
  border-bottom: 1px solid var(--muted); padding-bottom: 2px;
  transition: color 0.3s ease, border-color 0.3s ease;
}
.works-header a:hover { color: var(--accent); border-color: var(--accent); }

.works-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: clamp(20px, 3vw, 50px);
}

.work-item:nth-child(even) { margin-top: clamp(60px, 8vw, 120px); }
.work-item a { display: block; }

.work-image { position: relative; overflow: hidden; background: #e8e3db; }
.work-image::after {
  content: ''; position: absolute; inset: 0;
  background: var(--bg); transform: scaleY(1); transform-origin: top;
  transition: transform 1s var(--ease-out-expo);
}
.work-item.visible .work-image::after { transform: scaleY(0); transform-origin: bottom; }

.work-image img {
  width: 100%; aspect-ratio: 4 / 5; object-fit: cover;
  transition: transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.work-item a:hover .work-image img { transform: scale(1.03); }

.work-caption {
  display: flex; justify-content: space-between; align-items: baseline;
  padding: 1rem 0 0;
}
.work-title { font-family: var(--serif); font-size: clamp(1rem, 1.5vw, 1.2rem); font-weight: 400; }
.work-nuqat {
  font-family: var(--sans); font-size: 0.7rem; color: var(--muted);
  letter-spacing: 0.1em; text-transform: uppercase; font-weight: 300;
}

/* ========================================
   CRAFT
   ======================================== */
.craft { display: grid; grid-template-columns: 1fr 1fr; min-height: 80vh; }
.craft-image { position: relative; overflow: hidden; background: var(--bg-dark); }
.craft-image img { width: 100%; height: 100%; object-fit: cover; }

.craft-text {
  display: flex; flex-direction: column; justify-content: center;
  padding: clamp(40px, 6vw, 100px); background: var(--bg-dark); color: var(--cream);
}
.craft-text h2 {
  font-family: var(--serif); font-size: clamp(1.8rem, 3vw, 2.8rem);
  font-weight: 400; line-height: 1.3; margin-bottom: 1.5rem;
}
.craft-text h2 em { font-style: italic; color: var(--accent); }
.craft-text p {
  font-family: var(--sans); font-size: clamp(0.85rem, 1vw, 0.95rem);
  color: rgba(240,235,227,0.6); line-height: 1.8; max-width: 400px;
  margin-bottom: 2.5rem; font-weight: 300;
}
.craft-link {
  font-family: var(--sans); font-size: 0.75rem; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--accent);
  display: inline-flex; align-items: center; gap: 0.7rem;
  transition: gap 0.3s ease;
}
.craft-link:hover { gap: 1.1rem; }
.craft-link svg { width: 20px; height: 20px; stroke: var(--accent); stroke-width: 1.5; fill: none; }

/* ========================================
   COMMISSION CTA
   ======================================== */
.commission { padding: var(--section-pad) var(--side-pad); text-align: center; }
.commission h2 {
  font-family: var(--serif); font-size: clamp(2rem, 4vw, 3.2rem);
  font-weight: 400; line-height: 1.3; margin-bottom: 1rem;
}
.commission h2 em { font-style: italic; color: var(--accent); }
.commission p {
  font-family: var(--sans); font-size: clamp(0.85rem, 1vw, 0.95rem);
  color: var(--muted); max-width: 480px; margin: 0 auto 2.5rem;
  line-height: 1.8; font-weight: 300;
}
.btn-commission {
  display: inline-block; font-family: var(--sans); font-size: 0.75rem;
  letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--cream); background: var(--bg-dark);
  padding: 1.1rem 3rem; border: none; cursor: none;
  position: relative; overflow: hidden; transition: color 0.4s ease;
}
.btn-commission::before {
  content: ''; position: absolute; inset: 0;
  background: var(--accent); transform: translateX(-101%);
  transition: transform 0.5s var(--ease-out-expo);
}
.btn-commission:hover::before { transform: translateX(0); }
.btn-commission span { position: relative; z-index: 1; }

/* ========================================
   LIFESTYLE / QUOTE
   ======================================== */
.lifestyle {
  position: relative; width: 100%; min-height: 70vh;
  overflow: hidden; display: flex; align-items: center; justify-content: center;
}
.lifestyle-bg { position: absolute; inset: 0; }
.lifestyle-bg img {
  width: 100%; height: 100%; object-fit: cover; filter: brightness(0.45);
  transition: transform 8s ease;
}
.lifestyle.visible .lifestyle-bg img { transform: scale(1.05); }

.lifestyle-quote {
  position: relative; z-index: 1; text-align: center;
  max-width: 650px; padding: 40px var(--side-pad);
}
.lifestyle-quote blockquote {
  font-family: var(--serif); font-size: clamp(1.3rem, 2.5vw, 1.8rem);
  color: var(--cream); font-weight: 400; font-style: italic;
  line-height: 1.7; margin-bottom: 1.5rem;
}
.lifestyle-quote cite {
  font-family: var(--sans); font-size: 0.7rem; color: var(--accent);
  letter-spacing: 0.15em; text-transform: uppercase; font-style: normal; font-weight: 300;
}

/* ========================================
   PAGE HEADER (for non-hero pages)
   ======================================== */
.page-header {
  padding: calc(var(--nav-height) + clamp(60px, 8vw, 120px)) var(--side-pad) clamp(40px, 5vw, 80px);
  text-align: center;
}
.page-header h1 {
  font-family: var(--serif); font-size: clamp(2rem, 4vw, 3.2rem);
  font-weight: 400; line-height: 1.25; margin-bottom: 0.8rem;
}
.page-header h1 em { font-style: italic; color: var(--accent); }
.page-header p {
  font-family: var(--sans); font-size: clamp(0.85rem, 1vw, 0.95rem);
  color: var(--muted); max-width: 500px; margin: 0 auto; line-height: 1.8; font-weight: 300;
}

/* ========================================
   COLLECTION GRID (full page)
   ======================================== */
.collection-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: clamp(16px, 2.5vw, 40px);
  padding: 0 var(--side-pad) var(--section-pad);
}
.collection-grid .work-item:nth-child(even) { margin-top: 0; }
.collection-grid .work-item:nth-child(3n+2) { margin-top: clamp(40px, 5vw, 80px); }

/* ========================================
   STORY PAGE
   ======================================== */
.story-section {
  padding: 0 var(--side-pad) var(--section-pad);
  max-width: 800px; margin: 0 auto;
}
.story-section h2 {
  font-family: var(--serif); font-size: clamp(1.4rem, 2.5vw, 2rem);
  font-weight: 400; margin-bottom: 1.5rem;
}
.story-section h2 em { font-style: italic; color: var(--accent); }
.story-section p {
  font-family: var(--sans); font-size: clamp(0.88rem, 1vw, 0.95rem);
  color: var(--muted); line-height: 1.9; font-weight: 300; margin-bottom: 1.5rem;
}
.story-section p:last-child { margin-bottom: 0; }

.story-image {
  width: 100%; margin: var(--section-pad) 0; overflow: hidden;
}
.story-image img {
  width: 100%; height: auto; object-fit: cover;
}

/* ========================================
   COMMISSION PAGE
   ======================================== */
.commission-steps {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: clamp(20px, 3vw, 50px);
  padding: 0 var(--side-pad) var(--section-pad);
  max-width: 1000px; margin: 0 auto;
}
.step { text-align: center; }
.step-number {
  font-family: var(--serif); font-size: clamp(2rem, 3vw, 3rem);
  color: var(--accent); font-weight: 400; margin-bottom: 1rem;
}
.step h3 {
  font-family: var(--serif); font-size: clamp(1.1rem, 1.5vw, 1.3rem);
  font-weight: 400; margin-bottom: 0.8rem;
}
.step p {
  font-family: var(--sans); font-size: clamp(0.82rem, 0.9vw, 0.9rem);
  color: var(--muted); line-height: 1.7; font-weight: 300;
}

.commission-image {
  width: 100%; max-width: 900px; margin: 0 auto var(--section-pad);
  padding: 0 var(--side-pad); overflow: hidden;
}
.commission-image img {
  width: 100%; aspect-ratio: 16 / 9; object-fit: cover;
}

/* ========================================
   CONTACT PAGE
   ======================================== */
.contact-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: clamp(40px, 5vw, 80px);
  padding: 0 var(--side-pad) var(--section-pad);
  max-width: 900px; margin: 0 auto;
}
.contact-block h3 {
  font-family: var(--serif); font-size: clamp(1.1rem, 1.5vw, 1.3rem);
  font-weight: 400; margin-bottom: 1rem;
}
.contact-block p, .contact-block a {
  font-family: var(--sans); font-size: clamp(0.85rem, 1vw, 0.95rem);
  color: var(--muted); line-height: 1.8; font-weight: 300;
  display: block; margin-bottom: 0.5rem;
}
.contact-block a:hover { color: var(--accent); }

/* ========================================
   FOOTER
   ======================================== */
.footer {
  display: flex; align-items: center; justify-content: space-between;
  padding: 2.5rem var(--side-pad);
  border-top: 1px solid rgba(0,0,0,0.08);
}
.footer-logo { font-family: var(--serif); font-size: 1.3rem; font-weight: 500; }
.footer-logo span { color: var(--accent); }
.footer-links { display: flex; gap: 2rem; }
.footer-links a {
  font-family: var(--sans); font-size: 0.7rem; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--muted); transition: color 0.3s ease;
}
.footer-links a:hover { color: var(--ink); }
.footer-email { font-family: var(--sans); font-size: 0.75rem; color: var(--muted); letter-spacing: 0.04em; }

/* ========================================
   WHATSAPP FLOAT
   ======================================== */
.wa-float {
  position: fixed; bottom: 30px; right: 30px; z-index: 900;
  width: 52px; height: 52px; background: #25D366; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 20px rgba(0,0,0,0.2);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.wa-float:hover { transform: scale(1.08); box-shadow: 0 6px 28px rgba(0,0,0,0.3); }
.wa-float svg { width: 26px; height: 26px; fill: #fff; }

/* ========================================
   SCROLL REVEAL
   ======================================== */
.reveal {
  opacity: 0; transform: translateY(30px);
  transition: opacity 0.8s ease, transform 0.8s var(--ease-out-quart);
}
.reveal.visible { opacity: 1; transform: translateY(0); }

.work-item.reveal:nth-child(2) { transition-delay: 0.15s; }
.work-item.reveal:nth-child(3) { transition-delay: 0.3s; }
.work-item.reveal:nth-child(4) { transition-delay: 0.45s; }

/* ========================================
   TOUCH DEVICES
   ======================================== */
@media (pointer: coarse) {
  body, a, button { cursor: auto; }
  .cursor-dot, .cursor-ring { display: none; }
}

/* ========================================
   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; }
  .reveal { opacity: 1; transform: none; }
  .hero-picture img { opacity: 1; }
  .line-inner { transform: none; }
  .work-image::after { transform: scaleY(0); }
  .loader { display: none; }
}

/* ========================================
   RESPONSIVE
   ======================================== */
@media (max-width: 1024px) {
  .craft { grid-template-columns: 1fr; }
  .craft-image { min-height: 50vh; }
  .collection-grid { grid-template-columns: 1fr 1fr; }
  .collection-grid .work-item:nth-child(3n+2) { margin-top: 0; }
  .collection-grid .work-item:nth-child(even) { margin-top: clamp(40px, 5vw, 80px); }
  .commission-steps { grid-template-columns: 1fr; gap: clamp(40px, 5vw, 60px); }
}

@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-menu-btn { display: block; color: inherit; }
  .works-grid { grid-template-columns: 1fr; gap: clamp(40px, 6vw, 60px); }
  .work-item:nth-child(even) { margin-top: 0; }
  .works-header { flex-direction: column; gap: 1rem; }
  .collection-grid { grid-template-columns: 1fr; }
  .collection-grid .work-item:nth-child(even) { margin-top: 0; }
  .contact-grid { grid-template-columns: 1fr; }
  .footer { flex-direction: column; gap: 1.5rem; text-align: center; }
  .footer-links { flex-wrap: wrap; justify-content: center; gap: 1.2rem; }
}

@media (max-width: 480px) {
  .hero-scroll-hint { display: none; }
}
