@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,500;0,600;1,300;1,400&display=swap');

:root {
  --obsidian: #0A0A0A;
  --obsidian-light: #141414;
  --obsidian-mid: #1a1a1a;
  --alabaster: #F5F5F5;
  --alabaster-dim: #E8E8E8;
  --sage: #8A9A5B;
  --sage-glow: #9AAD6B;
  --sage-muted: rgba(138, 154, 91, 0.15);
  --stone: #2a2a2a;
  --warm-gray: #999;
  --font-display: 'Cormorant Garamond', 'Georgia', serif;
  --font-body: 'Satoshi', -apple-system, BlinkMacSystemFont, sans-serif;
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --nav-height: 72px;
}

@font-face {
  font-family: 'Satoshi';
  src: url('https://api.fontshare.com/v2/css?f[]=satoshi@400,500,700&display=swap');
  font-display: swap;
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
  scrollbar-width: thin;
  scrollbar-color: var(--sage) var(--obsidian);
}

body {
  font-family: var(--font-body);
  background: var(--obsidian);
  color: var(--alabaster);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

::selection {
  background: var(--sage);
  color: var(--obsidian);
}

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--obsidian); }
::-webkit-scrollbar-thumb { background: var(--sage); border-radius: 3px; }

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }

/* ─── PRELOADER ─── */
.preloader {
  position: fixed; inset: 0; z-index: 9999;
  background: var(--obsidian);
  display: flex; align-items: center; justify-content: center;
  transition: opacity 0.8s var(--ease-out-expo), visibility 0.8s;
}
.preloader.hidden { opacity: 0; visibility: hidden; pointer-events: none; }
.preloader-text {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 4vw, 3rem);
  font-weight: 300; letter-spacing: 0.3em; text-transform: uppercase;
  color: var(--alabaster);
  opacity: 0; animation: preloaderFade 2s var(--ease-out-expo) forwards;
}
@keyframes preloaderFade {
  0% { opacity: 0; transform: translateY(20px); }
  50% { opacity: 1; transform: translateY(0); }
  100% { opacity: 0.4; transform: translateY(0); }
}

/* ─── NAV ─── */
.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 clamp(24px, 4vw, 64px);
  transition: all 0.5s var(--ease-out-expo);
}
.nav.scrolled {
  background: rgba(10, 10, 10, 0.7);
  backdrop-filter: blur(20px) saturate(1.5);
  -webkit-backdrop-filter: blur(20px) saturate(1.5);
  border-bottom: 1px solid rgba(245, 245, 245, 0.06);
}
.nav-logo {
  font-family: var(--font-display);
  font-size: 1.4rem; font-weight: 300;
  letter-spacing: 0.25em; text-transform: uppercase;
  color: var(--alabaster);
}
.nav-links { display: flex; gap: 40px; list-style: none; }
.nav-links a {
  font-size: 0.75rem; font-weight: 500;
  letter-spacing: 0.15em; text-transform: uppercase;
  color: rgba(245, 245, 245, 0.6);
  transition: color 0.3s ease;
  position: relative;
}
.nav-links a::after {
  content: ''; position: absolute; bottom: -4px; left: 0;
  width: 0; height: 1px; background: var(--sage);
  transition: width 0.4s var(--ease-out-expo);
}
.nav-links a:hover { color: var(--alabaster); }
.nav-links a:hover::after { width: 100%; }

.nav-cta {
  font-size: 0.7rem; font-weight: 500;
  letter-spacing: 0.15em; text-transform: uppercase;
  color: var(--obsidian);
  background: var(--sage);
  padding: 10px 24px; border-radius: 0;
  transition: all 0.4s var(--ease-out-expo);
}
.nav-cta:hover {
  background: var(--sage-glow);
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(138, 154, 91, 0.3);
}

.mobile-toggle { display: none; flex-direction: column; gap: 5px; cursor: pointer; }
.mobile-toggle span {
  width: 24px; height: 1.5px; background: var(--alabaster);
  transition: all 0.3s ease;
}

/* ─── HERO ─── */
.hero {
  position: relative; height: 100vh; min-height: 700px;
  display: flex; align-items: flex-end;
  padding: 0 clamp(24px, 4vw, 64px) clamp(60px, 10vh, 120px);
  overflow: hidden;
}
.hero-bg {
  position: absolute; inset: 0; z-index: 0;
}
.hero-bg img {
  width: 100%; height: 100%; object-fit: cover;
  transform: scale(1.05);
  transition: transform 8s var(--ease-out-expo);
}
.hero-bg::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(
    to top,
    rgba(10, 10, 10, 0.95) 0%,
    rgba(10, 10, 10, 0.6) 30%,
    rgba(10, 10, 10, 0.3) 60%,
    rgba(10, 10, 10, 0.15) 100%
  );
}
.hero-content {
  position: relative; z-index: 2;
  max-width: 900px;
}
.hero-eyebrow {
  font-size: 0.7rem; font-weight: 500;
  letter-spacing: 0.3em; text-transform: uppercase;
  color: var(--sage);
  margin-bottom: 24px;
  opacity: 0; transform: translateY(30px);
}
.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(3rem, 7vw, 6.5rem);
  font-weight: 300; line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--alabaster);
  margin-bottom: 24px;
  opacity: 0; transform: translateY(40px);
}
.hero h1 em {
  font-style: italic; font-weight: 300;
  color: var(--sage);
}
.hero-sub {
  font-family: var(--font-display);
  font-size: clamp(1rem, 2vw, 1.35rem);
  font-weight: 300; font-style: italic;
  color: rgba(245, 245, 245, 0.5);
  letter-spacing: 0.02em;
  max-width: 500px;
  opacity: 0; transform: translateY(30px);
}

.scroll-indicator {
  position: absolute; bottom: 32px;
  left: 50%; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  opacity: 0;
}
.scroll-indicator span {
  font-size: 0.6rem; letter-spacing: 0.3em; text-transform: uppercase;
  color: rgba(245, 245, 245, 0.3);
}
.scroll-line {
  width: 1px; height: 48px; background: rgba(245, 245, 245, 0.1);
  position: relative; overflow: hidden;
}
.scroll-line::after {
  content: ''; position: absolute; top: -100%; left: 0;
  width: 1px; height: 100%;
  background: var(--sage);
  animation: scrollPulse 2s var(--ease-in-out) infinite;
}
@keyframes scrollPulse {
  0% { top: -100%; }
  100% { top: 100%; }
}

/* ─── SECTION COMMONS ─── */
.section {
  padding: clamp(80px, 12vh, 160px) clamp(24px, 4vw, 64px);
}
.section-label {
  font-size: 0.65rem; font-weight: 500;
  letter-spacing: 0.35em; text-transform: uppercase;
  color: var(--sage);
  margin-bottom: 16px;
}
.section-heading {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 5vw, 4.5rem);
  font-weight: 300; line-height: 1.1;
  letter-spacing: -0.01em;
  margin-bottom: 24px;
}
.section-body {
  font-size: 0.95rem; line-height: 1.75;
  color: rgba(245, 245, 245, 0.55);
  max-width: 580px;
}
.reveal { opacity: 0; transform: translateY(40px); transition: all 0.9s var(--ease-out-expo); }
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ─── PHILOSOPHY BENTO ─── */
.philosophy { background: var(--obsidian); }
.philosophy-intro {
  max-width: 720px;
  margin-bottom: clamp(48px, 6vw, 96px);
}
.bento-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  grid-template-rows: auto;
  gap: 16px;
}
.bento-card {
  position: relative; overflow: hidden;
  background: var(--obsidian-light);
  border: 1px solid rgba(245, 245, 245, 0.04);
  padding: clamp(32px, 3vw, 48px);
  display: flex; flex-direction: column; justify-content: flex-end;
  min-height: 380px;
  transition: all 0.6s var(--ease-out-expo);
}
.bento-card:hover {
  border-color: rgba(138, 154, 91, 0.2);
  transform: translateY(-4px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}
.bento-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0;
  height: 1px; background: linear-gradient(90deg, transparent, var(--sage), transparent);
  opacity: 0; transition: opacity 0.5s ease;
}
.bento-card:hover::before { opacity: 1; }

.bento-card:nth-child(1) { grid-column: 1 / 7; grid-row: 1; }
.bento-card:nth-child(2) { grid-column: 7 / 13; grid-row: 1; }
.bento-card:nth-child(3) { grid-column: 1 / 13; grid-row: 2; min-height: 300px; }

.bento-number {
  font-family: var(--font-display);
  font-size: 5rem; font-weight: 300;
  color: rgba(138, 154, 91, 0.1);
  position: absolute; top: 24px; right: 32px;
  line-height: 1;
}
.bento-icon {
  width: 40px; height: 40px;
  border: 1px solid rgba(138, 154, 91, 0.3);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 24px;
  color: var(--sage);
  font-size: 1rem;
}
.bento-title {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 2.5vw, 2rem);
  font-weight: 400; margin-bottom: 16px;
}
.bento-text {
  font-size: 0.85rem; line-height: 1.7;
  color: rgba(245, 245, 245, 0.45);
  max-width: 500px;
}
.bento-card:nth-child(3) {
  flex-direction: row; align-items: center; gap: 48px;
  background: linear-gradient(135deg, var(--obsidian-light), rgba(138, 154, 91, 0.06));
}
.bento-card:nth-child(3) .bento-text-wrap { max-width: 600px; }
.bento-stat-grid {
  display: flex; gap: 48px; margin-left: auto;
}
.bento-stat {
  text-align: center;
}
.bento-stat-value {
  font-family: var(--font-display);
  font-size: 3rem; font-weight: 300;
  color: var(--sage);
  line-height: 1;
}
.bento-stat-label {
  font-size: 0.65rem; letter-spacing: 0.2em; text-transform: uppercase;
  color: rgba(245, 245, 245, 0.35);
  margin-top: 8px;
}

/* ─── 3D PLACEHOLDER ─── */
.threejs-placeholder {
  position: absolute; top: 24px; right: 24px;
  width: 120px; height: 120px;
  border: 1px solid rgba(138, 154, 91, 0.15);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: radial-gradient(circle, rgba(138, 154, 91, 0.05), transparent);
}
.threejs-placeholder .orb {
  width: 60px; height: 60px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%,
    rgba(138, 154, 91, 0.3),
    rgba(138, 154, 91, 0.05) 60%,
    transparent 80%
  );
  animation: orbFloat 4s ease-in-out infinite;
  box-shadow: 0 0 40px rgba(138, 154, 91, 0.1);
}
@keyframes orbFloat {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-8px) scale(1.05); }
}

/* ─── THE WORK / HORIZONTAL GALLERY ─── */
.work {
  background: var(--obsidian-light);
  padding-bottom: 0;
}
.work-header {
  padding-bottom: clamp(40px, 5vw, 72px);
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 32px; flex-wrap: wrap;
}
.work-header .section-body { margin-bottom: 0; }
.gallery-hint {
  font-size: 0.65rem; letter-spacing: 0.2em; text-transform: uppercase;
  color: rgba(245, 245, 245, 0.3);
  display: flex; align-items: center; gap: 12px;
  white-space: nowrap;
}
.gallery-hint .arrow {
  display: inline-block; width: 40px; height: 1px;
  background: rgba(245, 245, 245, 0.2); position: relative;
}
.gallery-hint .arrow::after {
  content: '→'; position: absolute; right: -16px; top: -8px;
  font-size: 0.8rem; color: var(--sage);
}
.gallery-track-wrapper {
  overflow-x: auto; overflow-y: hidden;
  cursor: grab;
  -ms-overflow-style: none;
  scrollbar-width: none;
  padding-bottom: clamp(60px, 8vh, 100px);
}
.gallery-track-wrapper::-webkit-scrollbar { display: none; }
.gallery-track {
  display: flex; gap: 24px;
  padding: 0 clamp(24px, 4vw, 64px);
  width: max-content;
}
.gallery-card {
  flex: 0 0 auto;
  width: clamp(320px, 30vw, 480px);
  position: relative; overflow: hidden;
  cursor: pointer;
  group: true;
}
.gallery-card-img {
  width: 100%; aspect-ratio: 3/4;
  overflow: hidden;
}
.gallery-card-img img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.8s var(--ease-out-expo);
  filter: grayscale(30%) brightness(0.85);
}
.gallery-card:hover .gallery-card-img img {
  transform: scale(1.06);
  filter: grayscale(0%) brightness(1);
}
.gallery-card-info {
  padding: 20px 0;
}
.gallery-card-name {
  font-family: var(--font-display);
  font-size: 1.3rem; font-weight: 400;
  margin-bottom: 4px;
}
.gallery-card-meta {
  font-size: 0.7rem; letter-spacing: 0.15em; text-transform: uppercase;
  color: rgba(245, 245, 245, 0.35);
}
.gallery-card-tag {
  position: absolute; top: 20px; left: 20px;
  font-size: 0.6rem; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--sage);
  background: rgba(10, 10, 10, 0.7);
  backdrop-filter: blur(10px);
  padding: 6px 14px;
}

/* ─── CONTACT ─── */
.contact {
  background: var(--obsidian);
  border-top: 1px solid rgba(245, 245, 245, 0.04);
}
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(48px, 6vw, 96px);
  align-items: start;
}
.contact-left .section-heading {
  margin-bottom: 32px;
}
.contact-detail {
  margin-bottom: 24px;
}
.contact-detail-label {
  font-size: 0.65rem; letter-spacing: 0.25em; text-transform: uppercase;
  color: var(--sage); margin-bottom: 6px;
}
.contact-detail-value {
  font-size: 0.9rem; color: rgba(245, 245, 245, 0.6); line-height: 1.6;
}
.contact-form { display: flex; flex-direction: column; gap: 20px; }
.form-group { position: relative; }
.form-group label {
  display: block;
  font-size: 0.65rem; letter-spacing: 0.2em; text-transform: uppercase;
  color: rgba(245, 245, 245, 0.4);
  margin-bottom: 8px;
}
.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: 1px solid rgba(245, 245, 245, 0.1);
  padding: 12px 0;
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: var(--alabaster);
  transition: border-color 0.3s ease;
  outline: none;
  appearance: none;
}
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  border-bottom-color: var(--sage);
}
.form-group textarea { resize: none; min-height: 80px; }
.form-group select option { background: var(--obsidian); color: var(--alabaster); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }

.submit-btn {
  display: inline-flex; align-items: center; gap: 16px;
  font-size: 0.75rem; font-weight: 500;
  letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--obsidian);
  background: var(--sage);
  padding: 16px 40px;
  margin-top: 12px;
  transition: all 0.4s var(--ease-out-expo);
  align-self: flex-start;
}
.submit-btn:hover {
  background: var(--sage-glow);
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(138, 154, 91, 0.25);
}
.submit-btn .btn-arrow {
  transition: transform 0.3s ease;
}
.submit-btn:hover .btn-arrow { transform: translateX(4px); }

/* ─── FOOTER ─── */
.footer {
  padding: 40px clamp(24px, 4vw, 64px);
  border-top: 1px solid rgba(245, 245, 245, 0.04);
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 16px;
}
.footer-copy {
  font-size: 0.7rem; color: rgba(245, 245, 245, 0.25);
  letter-spacing: 0.1em;
}
.footer-links { display: flex; gap: 32px; list-style: none; }
.footer-links a {
  font-size: 0.7rem; color: rgba(245, 245, 245, 0.3);
  letter-spacing: 0.1em; text-transform: uppercase;
  transition: color 0.3s ease;
}
.footer-links a:hover { color: var(--sage); }

/* ─── NOISE OVERLAY ─── */
.noise {
  position: fixed; inset: 0; z-index: 9998;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.03'/%3E%3C/svg%3E");
  opacity: 0.4;
}

/* ─── RESPONSIVE ─── */
@media (max-width: 1024px) {
  .bento-card:nth-child(1),
  .bento-card:nth-child(2) { grid-column: 1 / 13; }
  .bento-card:nth-child(3) { flex-direction: column; align-items: flex-start; }
  .bento-stat-grid { margin-left: 0; margin-top: 32px; }
  .contact-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .nav-links, .nav-cta { display: none; }
  .mobile-toggle { display: flex; }
  .hero h1 { font-size: clamp(2.4rem, 10vw, 3.5rem); }
  .bento-grid { gap: 12px; }
  .bento-card { min-height: 280px; padding: 28px; }
  .bento-number { font-size: 3rem; }
  .gallery-card { width: 280px; }
  .form-row { grid-template-columns: 1fr; }
  .work-header { flex-direction: column; align-items: flex-start; }
}
