/* ==========================================================================
   IMA MUOTO — Interactive Scroll & Floating 3D Horology
   Minimalist Black & White with a Subtle Whisper of Gold
   ========================================================================== */

:root {
  --bg: #050507;
  --white: #f4f2ed;
  --white-muted: rgba(244, 242, 237, 0.58);
  --white-faint: rgba(244, 242, 237, 0.14);
  --gold-subtle: #b87d4b;
  --font-display: 'Orbitron', sans-serif;
  --font-editorial: 'Orbitron', sans-serif;
  --font-sans: 'Orbitron', sans-serif;
  --font-mono: 'Orbitron', sans-serif;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

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

html, body {
  background: var(--bg);
  color: var(--white);
  font-family: var(--font-sans);
  font-weight: 300;
  scroll-behavior: smooth;
  overflow-x: hidden;
}

/* Fixed 3D WebGL Viewport */
#webgl-container {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 1;
}

#clock-canvas {
  width: 100%;
  height: 100%;
  display: block;
  cursor: grab;
}

#clock-canvas:active {
  cursor: grabbing;
}

.optical-vignette {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 2;
  background: radial-gradient(circle at 50% 50%, transparent 40%, rgba(5, 5, 7, 0.82) 100%);
}

/* Minimal Header */
.top-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.8rem 3.5rem;
  pointer-events: none;
}

.top-nav > * {
  pointer-events: auto;
}

.brand-identity {
  text-decoration: none;
  color: var(--white);
  display: inline-flex;
  align-items: center;
}

.brand-logo-img {
  width: auto;
  height: 48px;
  object-fit: contain;
  display: block;
  filter: brightness(1.6) contrast(1.5) drop-shadow(0 0 0.45px #ffffff);
  transition: opacity 0.25s ease;
}

.brand-identity:hover .brand-logo-img {
  opacity: 0.82;
}

.footer-logo-img {
  width: auto;
  height: 40px;
  object-fit: contain;
  display: block;
  filter: brightness(1.6) contrast(1.5) drop-shadow(0 0 0.45px #ffffff);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2.5rem;
  list-style: none;
}

.nav-links a {
  color: var(--white-muted);
  text-decoration: none;
  font-size: 0.7rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  white-space: nowrap;
  transition: color 0.25s ease;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--white);
}

.btn-minimal {
  background: rgba(5, 5, 7, 0.55);
  backdrop-filter: blur(8px);
  color: var(--white);
  border: 1px solid var(--white-faint);
  padding: 0.5rem 1.1rem;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  white-space: nowrap;
  cursor: pointer;
  transition: border-color 0.25s ease;
}

.btn-minimal:hover {
  border-color: var(--white);
}

/* Right-Side Minimalist Scroll Progress Rail */
.scroll-rail {
  position: fixed;
  right: 2.2rem;
  top: 50%;
  transform: translateY(-50%);
  z-index: 35;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.rail-dot {
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.55rem;
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.16em;
  color: rgba(244, 242, 237, 0.32);
  transition: all 0.3s var(--ease);
}

.rail-dot::after {
  content: "";
  width: 14px;
  height: 1px;
  background: rgba(244, 242, 237, 0.25);
  transition: all 0.3s var(--ease);
}

.rail-dot:hover {
  color: var(--white);
}

.rail-dot.active {
  color: var(--gold-subtle);
}

.rail-dot.active::after {
  width: 28px;
  background: var(--gold-subtle);
}

/* ==========================================================================
   Scroll-Driven 8-Design Chapters & Weightless Floating Cards
   ========================================================================== */
@keyframes floatWeightless {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-12px);
  }
}

.scroll-showcase {
  position: relative;
  z-index: 10;
  pointer-events: none;
}

.design-scroll-chapter {
  min-height: 100vh;
  width: 100%;
  display: flex;
  align-items: center;
  padding: 6rem 5.5rem;
  position: relative;
}

/* Even chapters put floating info on Left (while 3D clock floats on Right) */
.design-scroll-chapter.align-left {
  justify-content: flex-start;
}

/* Odd chapters put floating info on Right (while 3D clock floats on Left) */
.design-scroll-chapter.align-right {
  justify-content: flex-end;
  padding-right: 6.5rem;
}

.floating-chapter-card {
  pointer-events: auto;
  max-width: 410px;
  padding: 2.1rem 2.2rem;
  background: rgba(8, 8, 12, 0.58);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--white-faint);
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  opacity: 0.18;
  filter: blur(4px);
  transform: translateY(36px);
  transition: opacity 0.7s var(--ease), filter 0.7s var(--ease), transform 0.7s var(--ease), border-color 0.4s ease;
}

.design-scroll-chapter.in-view .floating-chapter-card {
  opacity: 1;
  filter: blur(0px);
  transform: translateY(0px);
}

.floating-chapter-card:hover {
  border-color: rgba(244, 242, 237, 0.32);
}

.chapter-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 0.64rem;
  letter-spacing: 0.24em;
  color: var(--gold-subtle);
}

.chapter-dim-pill {
  color: var(--white-muted);
  letter-spacing: 0.12em;
}

.chapter-title {
  font-family: var(--font-display);
  font-size: clamp(1.85rem, 2.8vw, 2.45rem);
  font-weight: 400;
  letter-spacing: 0.16em;
  line-height: 1.1;
  color: var(--white);
}

.chapter-subtitle {
  font-family: var(--font-editorial);
  font-style: normal;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold-subtle);
  margin-top: -0.25rem;
}

.chapter-summary {
  font-size: 0.78rem;
  line-height: 1.82;
  letter-spacing: 0.08em;
  color: var(--white-muted);
}

.chapter-actions {
  display: flex;
  align-items: stretch;
  flex-wrap: nowrap;
  gap: 0.55rem;
  padding-top: 0.4rem;
}

.btn-macro-toggle {
  background: transparent;
  color: var(--white);
  border: 1px solid var(--white-faint);
  padding: 0.62rem 0.95rem;
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  white-space: nowrap;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.25s ease;
}

.btn-macro-toggle:hover,
.btn-macro-toggle.active {
  border-color: var(--white);
  background: rgba(255, 255, 255, 0.1);
}

.btn-learn-more {
  background: var(--white);
  color: var(--bg);
  border: 1px solid var(--white);
  padding: 0.62rem 1rem;
  font-family: var(--font-mono);
  font-size: 0.56rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  white-space: nowrap;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.25s ease;
}

.btn-learn-more:hover {
  opacity: 0.85;
}

.scroll-cue {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(244, 242, 237, 0.35);
  padding-top: 0.35rem;
}

/* ==========================================================================
   Overview Grid & Floating Studio Gallery Below
   ========================================================================== */
.content-wrapper {
  position: relative;
  z-index: 20;
  background: linear-gradient(180deg, transparent 0%, rgba(5, 5, 7, 0.95) 8%, var(--bg) 18%);
}

.section-container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 6rem 3.5rem;
}

.section-header {
  text-align: center;
  margin-bottom: 4rem;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.64rem;
  letter-spacing: 0.3em;
  color: var(--gold-subtle);
  display: block;
  margin-bottom: 0.6rem;
}

.section-title {
  font-family: var(--font-display);
  font-size: 1.65rem;
  font-weight: 400;
  letter-spacing: 0.24em;
  margin-bottom: 0.5rem;
}

.section-subtitle {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  color: var(--gold-subtle);
}

/* 8 Designs Overview Grid */
.designs-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}

.design-card {
  background: rgba(10, 10, 14, 0.78);
  backdrop-filter: blur(10px);
  border: 1px solid var(--white-faint);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.85rem;
  transition: transform 0.45s var(--ease), border-color 0.3s ease;
}

.design-card:hover {
  transform: translateY(-8px);
  border-color: rgba(244, 242, 237, 0.38);
}

.card-top-bar {
  width: 100%;
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.16em;
  color: var(--white-muted);
}

.card-vector-stage {
  width: 100%;
  height: 165px;
  display: grid;
  place-items: center;
  perspective: 800px;
  cursor: pointer;
}

.card-vector-stage .clock-vector-svg {
  width: 132px;
  height: 132px;
  transition: transform 0.85s var(--ease);
}

.card-title {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 400;
  letter-spacing: 0.16em;
  color: var(--white);
}

.card-dim {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  color: var(--gold-subtle);
  letter-spacing: 0.08em;
  margin-top: -0.45rem;
}

.card-actions {
  width: 100%;
  display: flex;
  align-items: stretch;
  flex-wrap: nowrap;
  gap: 0.4rem;
  margin-top: 0.25rem;
}

.btn-card-3d,
.btn-card-learn {
  flex: 1;
  background: transparent;
  border: 1px solid var(--white-faint);
  color: var(--white);
  padding: 0.5rem 0.35rem;
  font-family: var(--font-mono);
  font-size: 0.5rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-card-3d:hover {
  border-color: var(--white);
}

.btn-card-learn {
  background: rgba(255, 255, 255, 0.06);
}

.btn-card-learn:hover {
  background: var(--white);
  color: var(--bg);
}

/* Minimalist About Section */
.about-minimal-grid {
  max-width: 980px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 3rem;
}

.about-lead {
  text-align: center;
  max-width: 720px;
  margin: 0 auto;
  padding: 2.2rem 2.5rem;
  border: 1px solid var(--white-faint);
  background: rgba(10, 10, 14, 0.72);
  backdrop-filter: blur(10px);
}

.about-lead h3 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1.05rem;
  letter-spacing: 0.18em;
  color: var(--gold-subtle);
  margin-bottom: 1rem;
}

.about-lead p {
  font-size: 0.78rem;
  line-height: 1.9;
  letter-spacing: 0.08em;
  color: var(--white-muted);
}

.about-lead strong {
  color: var(--white);
  font-weight: 500;
}

.about-pillars {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.about-pillar {
  border: 1px solid var(--white-faint);
  background: rgba(10, 10, 14, 0.65);
  padding: 1.8rem 1.6rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.pillar-num {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.22em;
  color: var(--gold-subtle);
}

.about-pillar h4 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 0.88rem;
  letter-spacing: 0.14em;
  color: var(--gold-subtle);
}

.about-pillar p {
  font-size: 0.76rem;
  line-height: 1.82;
  letter-spacing: 0.08em;
  color: var(--white-muted);
}

/* Minimal Footer */
.luxury-footer {
  border-top: 1px solid var(--white-faint);
  padding: 2.2rem 3.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 0.64rem;
  letter-spacing: 0.2em;
  color: var(--white-muted);
}

/* Minimal "Learn More" Drawer */
.drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  z-index: 90;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.drawer-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

.learn-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: min(400px, 100vw);
  height: 100vh;
  height: 100dvh;
  background: #08080b;
  border-left: 1px solid var(--white-faint);
  z-index: 100;
  padding: 2rem 1.8rem 2.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  transform: translateX(100%);
  transition: transform 0.35s var(--ease);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.learn-drawer > * {
  flex-shrink: 0;
}

.learn-drawer.open {
  transform: translateX(0);
}

.drawer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.24em;
  color: var(--gold-subtle);
}

.btn-close-drawer {
  background: none;
  border: none;
  color: var(--white);
  font-size: 1.5rem;
  line-height: 1;
  padding: 0.2rem 0.4rem;
  cursor: pointer;
}

.drawer-photo-wrap {
  border: 1px solid var(--white-faint);
  background: #050507;
  width: 100%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.drawer-photo-wrap img {
  width: 100%;
  max-height: 280px;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  display: block;
}

.drawer-title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1.35rem;
  letter-spacing: 0.18em;
}

.drawer-subtitle {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--gold-subtle);
  letter-spacing: 0.1em;
  margin-top: -0.6rem;
}

.drawer-specs {
  border-top: 1px solid var(--white-faint);
  border-bottom: 1px solid var(--white-faint);
  padding: 0.75rem 0;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.drawer-spec-row {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.08em;
}

.drawer-spec-row span:first-child {
  color: var(--white-muted);
}

.drawer-summary {
  font-size: 0.78rem;
  line-height: 1.82;
  letter-spacing: 0.08em;
  color: var(--white-muted);
}

.inquiry-form {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  margin-top: 0.4rem;
}

.form-heading {
  font-family: var(--font-mono);
  font-size: 0.64rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--white-muted);
}

.inquiry-form input {
  background: transparent;
  border: 1px solid var(--white-faint);
  padding: 0.68rem 0.8rem;
  color: var(--white);
  font-family: var(--font-sans);
  font-size: 0.8rem;
}

.inquiry-form input:focus {
  outline: none;
  border-color: var(--white);
}

.order-toast {
  display: none;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--white);
}

@media (max-width: 1024px) {
  .designs-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .about-pillars {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .top-nav {
    padding: 1rem 1.1rem;
    gap: 0.6rem;
    background: linear-gradient(180deg, rgba(5, 5, 7, 0.88) 0%, rgba(5, 5, 7, 0) 100%);
  }
  .brand-logo-img {
    height: 30px;
  }
  .nav-links {
    gap: 1.1rem;
  }
  .nav-links a {
    font-size: 0.56rem;
    letter-spacing: 0.12em;
    white-space: nowrap;
  }
  .btn-minimal {
    padding: 0.38rem 0.6rem;
    font-size: 0.5rem;
    letter-spacing: 0.08em;
    white-space: nowrap;
  }
}

@media (max-width: 768px) and (orientation: portrait) {
  .top-nav .nav-actions {
    display: none;
  }
}

@media (max-width: 932px) and (orientation: landscape) {
  .top-nav {
    padding: 0.85rem 1.5rem;
  }
  .top-nav .nav-actions {
    display: block;
  }
}

@media (max-width: 768px) {
  .section-container {
    padding: 4rem 1.1rem;
  }
  .section-title {
    font-size: 1.3rem;
    letter-spacing: 0.16em;
    white-space: nowrap;
  }
  .scroll-rail {
    right: 0.55rem;
    gap: 0.55rem;
  }
  .rail-dot::after {
    width: 10px;
  }
  .rail-dot.active::after {
    width: 18px;
  }
  .design-scroll-chapter,
  .design-scroll-chapter.align-right {
    padding: 4.5rem 1rem 1.5rem;
    justify-content: center;
    align-items: flex-end;
  }
  .floating-chapter-card {
    max-width: 100%;
    width: 100%;
    padding: 1.25rem 1.15rem;
    gap: 0.6rem;
  }
  .chapter-title {
    font-size: 1.45rem;
    letter-spacing: 0.12em;
  }
  .chapter-subtitle {
    font-size: 0.66rem;
    letter-spacing: 0.1em;
  }
  .chapter-summary {
    font-size: 0.68rem;
    line-height: 1.65;
    letter-spacing: 0.05em;
  }
  .chapter-actions {
    gap: 0.4rem;
  }
  .btn-macro-toggle,
  .btn-learn-more {
    flex: 1;
    padding: 0.55rem 0.5rem;
    font-size: 0.5rem;
    letter-spacing: 0.08em;
  }
  .scroll-cue {
    font-size: 0.48rem;
    letter-spacing: 0.12em;
  }
  .designs-grid {
    grid-template-columns: 1fr;
  }
  .luxury-footer {
    padding: 1.8rem 1.1rem;
    flex-direction: column;
    gap: 0.8rem;
    text-align: center;
  }
  .learn-drawer {
    padding: 1.4rem 1.25rem 2.2rem;
    gap: 0.85rem;
  }
  .drawer-photo-wrap img {
    max-height: 230px;
  }
}
