/* ==========================================================================
   Monika Boutique — Responsive Layout & Components (App, Mobile & Laptop)
   ========================================================================== */

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

html {
  font-size: 16px;
  scroll-behavior: auto; /* Handled smoothly by Lenis */
}

body {
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  overflow-x: hidden;
  transition: background-color 0.35s ease, color 0.35s ease;
  -webkit-font-smoothing: antialiased;
}

img,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

/* Scroll Progress Thread */
.scroll-thread {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 100%;
  transform-origin: left center;
  transform: scaleX(0);
  background: linear-gradient(90deg, var(--gold-deep), var(--gold-bright), var(--gold));
  z-index: 120;
  pointer-events: none;
}

/* Ambient Orbs */
.ambient-orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(88px);
  z-index: -1;
  pointer-events: none;
  transition: background 0.4s ease;
}
.orb-1 {
  width: min(440px, 70vw);
  height: min(440px, 70vw);
  background: var(--orb-1);
  top: -110px;
  right: -90px;
}
.orb-2 {
  width: min(400px, 65vw);
  height: min(400px, 65vw);
  background: var(--orb-2);
  bottom: 8%;
  left: -120px;
}

/* Typography */
h1,
h2,
h3,
.brand-serif {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.container {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 22px;
}

/* Surfaces */
.glass-panel {
  background: var(--surface-glass);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid var(--border-gold);
  border-radius: 26px;
  box-shadow: var(--shadow-soft);
}

.atelier-card {
  background: var(--surface-card);
  border: 1px solid var(--border-subtle);
  border-radius: 24px;
  box-shadow: var(--shadow-soft);
  transition: transform 0.25s ease, border-color 0.25s ease, background-color 0.35s ease;
}

.atelier-card:hover {
  border-color: var(--border-gold);
}

/* Buttons */
.btn-atelier {
  border: 1px solid var(--border-gold);
  background: var(--bg-elevated);
  color: var(--ink);
  font-weight: 600;
  font-size: 0.92rem;
  min-height: 44px;
  padding: 10px 22px;
  border-radius: 999px;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: var(--shadow-soft);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.25s ease;
}
.btn-atelier:hover {
  transform: translateY(-1px);
  border-color: var(--gold);
}
.btn-atelier:active {
  transform: translateY(0);
}

.btn-gold {
  border: none;
  background: linear-gradient(135deg, var(--gold-bright), var(--gold), var(--gold-deep));
  color: var(--ink-on-gold);
  box-shadow: var(--shadow-gold);
}
.btn-gold:hover {
  opacity: 0.95;
}

/* Header & Navigation */
.site-header {
  position: sticky;
  top: 14px;
  z-index: 80;
  padding: 0 18px;
}

.nav-bar {
  max-width: 1180px;
  margin: 0 auto;
  padding: 10px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border-radius: 999px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--ink);
  min-width: 0;
}

.brand-crest-thumb {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  border: 1.5px solid var(--gold);
  box-shadow: 0 4px 12px rgba(184, 134, 45, 0.2);
  flex-shrink: 0;
  background: #ffffff;
}

.brand-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.brand-title {
  font-size: 1.32rem;
  line-height: 1.05;
  white-space: nowrap;
}
.brand-sub {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--gold);
  white-space: nowrap;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 20px;
}
.nav-links a {
  text-decoration: none;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.2s;
  white-space: nowrap;
}
.nav-links a:hover {
  color: var(--gold);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Theme Toggle Switch */
.theme-toggle {
  border: 1px solid var(--border-gold);
  background: var(--bg-soft);
  color: var(--ink);
  min-height: 42px;
  padding: 6px 14px;
  border-radius: 999px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  font-weight: 600;
  transition: background-color 0.25s ease, border-color 0.25s ease, transform 0.2s ease;
}
.theme-toggle:hover {
  border-color: var(--gold);
  transform: translateY(-1px);
}
.theme-toggle-dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 11px;
  background: linear-gradient(135deg, var(--gold-bright), var(--gold-deep));
  color: var(--ink-on-gold);
}

/* Hero Section */
.hero {
  padding: 40px 0 36px;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.08fr 0.92fr;
  gap: 32px;
  align-items: center;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 16px;
  border-radius: 999px;
  border: 1px solid var(--border-gold);
  background: var(--bg-soft);
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 18px;
}

.hero h1 {
  font-size: clamp(2.35rem, 4.4vw, 3.85rem);
  line-height: 1.06;
  margin-bottom: 18px;
}
.hero h1 em {
  color: var(--gold);
  font-style: italic;
}
.hero-copy {
  color: var(--muted);
  font-size: clamp(0.96rem, 1.3vw, 1.06rem);
  max-width: 540px;
  margin-bottom: 26px;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* Logo Showcase Card (Light Logo Image + Dark Video Reveal) */
.crest-showcase {
  padding: 20px;
}
.crest-stage {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid var(--border-gold);
  aspect-ratio: 4 / 3;
  min-height: 280px;
  background: #ffffff;
}
[data-theme="dark"] .crest-stage {
  background: #090705;
}

.crest-img,
.crest-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  transition: opacity 0.45s ease;
}

.crest-img {
  object-fit: contain;
  padding: 10px;
}

.crest-video {
  object-fit: cover;
  opacity: 0;
  pointer-events: none;
}

[data-theme="dark"] .crest-img,
.crest-stage.is-video-active .crest-img {
  opacity: 0;
  pointer-events: none;
}

[data-theme="dark"] .crest-video,
.crest-stage.is-video-active .crest-video {
  opacity: 1;
  pointer-events: auto;
}

.crest-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 14px;
  flex-wrap: wrap;
}
.crest-caption {
  font-size: 0.82rem;
  color: var(--muted);
}
.btn-chip {
  border: 1px solid var(--border-gold);
  background: var(--bg-soft);
  color: var(--ink);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 7px 14px;
  border-radius: 999px;
  cursor: pointer;
  min-height: 36px;
  transition: border-color 0.2s, background-color 0.2s;
}
.btn-chip:hover {
  border-color: var(--gold);
}

.stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 14px;
}
.stat-box {
  padding: 12px 8px;
  border-radius: 16px;
  text-align: center;
  background: var(--bg-soft);
  border: 1px solid var(--border-subtle);
}
.stat-box strong {
  display: block;
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.45rem;
  color: var(--gold);
  line-height: 1.1;
}
.stat-box span {
  font-size: 0.74rem;
  color: var(--muted);
}

/* Section Headers */
section {
  padding: 44px 0;
}
.section-head {
  text-align: center;
  max-width: 660px;
  margin: 0 auto 32px;
}
.section-kicker {
  display: inline-block;
  font-size: 0.74rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--gold);
  margin-bottom: 8px;
}
.section-head h2 {
  font-size: clamp(1.9rem, 3.2vw, 2.55rem);
  margin-bottom: 8px;
}
.section-head p {
  color: var(--muted);
  font-size: 0.96rem;
}

[hidden] {
  display: none !important;
}

/* 3D Boutique Screen & Interactive Measurement Studio */
.studio-tabs {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
}

.studio-tab {
  border: 1px solid var(--border-gold);
  background: var(--surface-card);
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 600;
  min-height: 44px;
  padding: 10px 22px;
  border-radius: 999px;
  cursor: pointer;
  box-shadow: var(--shadow-soft);
  transition: transform 0.2s ease, border-color 0.2s ease, background-color 0.25s ease;
}

.studio-tab:hover {
  border-color: var(--gold);
  transform: translateY(-1px);
}

.studio-tab.is-active {
  border-color: transparent;
  background: linear-gradient(135deg, var(--gold-bright), var(--gold), var(--gold-deep));
  color: var(--ink-on-gold);
  box-shadow: var(--shadow-gold);
}

.spec-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.spec-cell {
  padding: 9px 10px;
  border-radius: 14px;
  background: var(--bg-soft);
  border: 1px solid var(--border-subtle);
}

.spec-cell span {
  display: block;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.spec-cell strong {
  display: block;
  font-size: 0.8rem;
  color: var(--ink);
  margin-top: 2px;
}

.studio-3d-shell {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 24px;
  padding: 22px;
  align-items: stretch;
}

.viewport-wrap {
  position: relative;
  border-radius: 22px;
  overflow: hidden;
  border: 1px solid var(--border-gold);
  background: var(--canvas-bg);
  min-height: 440px;
  display: flex;
  align-items: stretch;
}

#atelier-canvas {
  width: 100%;
  height: 100%;
  min-height: 440px;
  touch-action: pan-y;
  cursor: grab;
}
#atelier-canvas:active {
  cursor: grabbing;
}

.viewport-hud-top {
  position: absolute;
  top: 14px;
  left: 14px;
  right: 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  pointer-events: none;
  flex-wrap: wrap;
}
.hud-badge {
  pointer-events: auto;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 600;
  background: var(--surface-glass);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border-gold);
  color: var(--ink);
}

.viewport-hud-bottom {
  position: absolute;
  bottom: 14px;
  left: 14px;
  right: 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  pointer-events: none;
}
.style-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  pointer-events: auto;
}
.style-pill {
  border: 1px solid var(--border-gold);
  background: var(--surface-glass);
  backdrop-filter: blur(10px);
  color: var(--ink);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 999px;
  cursor: pointer;
  min-height: 34px;
  transition: all 0.2s ease;
}
.style-pill.is-active {
  background: linear-gradient(135deg, var(--gold-bright), var(--gold));
  color: var(--ink-on-gold);
  border-color: transparent;
}

.canvas-fallback {
  position: absolute;
  inset: 0;
  display: none;
  place-items: center;
  padding: 24px;
  text-align: center;
  color: var(--muted);
}

/* Measurement Controls Panel */
.measure-controls {
  padding: 22px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 16px;
}
.measure-controls h3 {
  font-size: 1.6rem;
  margin-bottom: 4px;
}
.measure-sub {
  font-size: 0.86rem;
  color: var(--muted);
}

.slider-group {
  display: grid;
  gap: 14px;
}
.slider-row label {
  display: flex;
  justify-content: space-between;
  font-size: 0.84rem;
  font-weight: 600;
  margin-bottom: 6px;
}
.slider-row label span:last-child {
  color: var(--gold);
}
.slider-row input[type="range"] {
  width: 100%;
  accent-color: var(--gold);
  cursor: pointer;
  height: 6px;
}

.measure-summary {
  padding: 12px 14px;
  border-radius: 16px;
  background: var(--bg-soft);
  border: 1px solid var(--border-subtle);
  font-size: 0.82rem;
  color: var(--muted);
}

/* Services Grid */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
}
.service-card {
  padding: 24px 22px;
}
.service-card:hover {
  transform: translateY(-4px);
}
.icon-circle {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-size: 1.25rem;
  color: var(--gold);
  background: var(--bg-soft);
  border: 1px solid var(--border-gold);
  margin-bottom: 14px;
}
.service-card h3 {
  font-size: 1.45rem;
  margin-bottom: 8px;
}
.service-card p {
  font-size: 0.9rem;
  color: var(--muted);
  margin-bottom: 12px;
}
.tag-price {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--gold);
}

/* Female Blouse Silhouettes & Measurement Blueprints */
.silhouette-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}
.silhouette-card {
  padding: 20px;
  text-align: center;
}
.blueprint-svg {
  width: 120px;
  height: 120px;
  margin: 0 auto 12px;
  color: var(--gold);
}
.silhouette-card h3 {
  font-size: 1.35rem;
  margin-bottom: 6px;
}
.silhouette-card p {
  font-size: 0.85rem;
  color: var(--muted);
}

.measure-guide-strip {
  margin-top: 22px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(175px, 1fr));
  gap: 12px;
}
.guide-chip {
  padding: 14px 16px;
  border-radius: 18px;
  background: var(--bg-soft);
  border: 1px solid var(--border-subtle);
}
.guide-chip strong {
  display: block;
  font-size: 0.88rem;
  color: var(--ink);
  margin-bottom: 3px;
}
.guide-chip span {
  font-size: 0.78rem;
  color: var(--muted);
}

/* Booking & Live Feed */
.booking-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 26px;
  align-items: start;
}
.form-panel {
  padding: 28px;
}
.field {
  margin-bottom: 15px;
}
.field label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 6px;
}
.field input,
.field select,
.field textarea {
  width: 100%;
  border: 1px solid var(--border-subtle);
  outline: none;
  padding: 12px 14px;
  font-size: 0.94rem;
  color: var(--ink);
  background: var(--bg-soft);
  border-radius: 14px;
  box-shadow: var(--shadow-inset);
  transition: border-color 0.2s;
}
.field input:focus,
.field select:focus,
  .field textarea:focus {
  border-color: var(--gold);
}
.field textarea {
  min-height: 96px;
  resize: vertical;
}

.status-msg {
  margin-top: 12px;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--gold);
}

.feed-panel {
  padding: 28px;
}
.inquiry-item {
  padding: 14px 16px;
  border-radius: 16px;
  margin-bottom: 12px;
  background: var(--bg-soft);
  border: 1px solid var(--border-subtle);
}
.inquiry-top {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-weight: 600;
  font-size: 0.92rem;
}
.inquiry-meta {
  font-size: 0.82rem;
  color: var(--muted);
  margin-top: 4px;
}

/* Footer */
footer {
  text-align: center;
  padding: 34px 20px 56px;
  color: var(--muted);
  font-size: 0.86rem;
}

/* Mobile App Bottom Dock (Hidden on Laptop/Desktop) */
.mobile-dock {
  display: none;
}

/* Tablet & Laptop Breakpoints */
@media (max-width: 960px) {
  .hero-grid,
  .studio-3d-shell,
  .booking-grid {
    grid-template-columns: 1fr;
  }

  .cards-grid,
  .silhouette-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .nav-links {
    display: none;
  }

  .viewport-wrap,
  #atelier-canvas {
    min-height: 360px;
  }
}

/* Mobile App Mode */
@media (max-width: 680px) {
  body {
    padding-bottom: calc(76px + env(safe-area-inset-bottom));
  }

  .site-header {
    top: 8px;
    padding: 0 12px;
  }

  .nav-bar {
    padding: 8px 14px;
  }

  .brand-title {
    font-size: 1.15rem;
  }

  .nav-cta-desktop {
    display: none;
  }

  .container {
    padding: 0 16px;
  }

  .hero {
    padding: 24px 0 24px;
  }

  section {
    padding: 32px 0;
  }

  .studio-3d-shell,
  .form-panel,
  .feed-panel,
  .crest-showcase {
    padding: 16px;
  }

  .viewport-wrap,
  #atelier-canvas {
    min-height: 320px;
  }

  .hero-actions .btn-atelier {
    width: 100%;
  }

  .cards-grid,
  .silhouette-grid {
    grid-template-columns: 1fr;
  }

  .spec-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .mobile-dock {
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: calc(10px + env(safe-area-inset-bottom));
    z-index: 95;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 4px;
    padding: 8px 6px;
    border-radius: 22px;
    background: var(--nav-dock-bg);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border: 1px solid var(--border-gold);
    box-shadow: var(--shadow-soft);
  }

  .mobile-dock a {
    text-decoration: none;
    color: var(--muted);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    font-size: 0.68rem;
    font-weight: 600;
    min-height: 44px;
    border-radius: 14px;
    transition: color 0.2s, background-color 0.2s;
  }

  .mobile-dock a:hover,
  .mobile-dock a.is-primary-dock {
    color: var(--gold);
  }
  .mobile-dock .dock-icon {
    font-size: 1rem;
    line-height: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}
