/* ═══════════════════════════════════════════════════════════════════
   JAGY ATELIER — LAYOUT CSS (Swiss 12-Column Grid & Architecture)
   ═══════════════════════════════════════════════════════════════════ */

.grid-container {
  max-width: 1360px;
  margin: 0 auto;
  padding: 0 48px;
}

.hairline {
  width: 100%;
  height: 1px;
  background: var(--rule);
  border: none;
}

/* ── WebGL Canvas Placement ── */
#webgl-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 1;
  pointer-events: auto;
  cursor: grab;
}

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

.editorial-content {
  position: relative;
  z-index: 2;
  pointer-events: none;
}

.editorial-content a,
.editorial-content button,
.editorial-content .interactive {
  pointer-events: auto;
}

/* ── Masthead ── */
.masthead {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 100;
  padding: 24px 48px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  pointer-events: auto;
  background: linear-gradient(180deg, rgba(251, 249, 245, 0.95) 0%, rgba(251, 249, 245, 0) 100%);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--rule);
  transition: padding 0.3s ease;
}

.masthead.scrolled {
  padding: 16px 48px;
  background: rgba(251, 249, 245, 0.97);
}

.masthead-brand {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
}

.masthead-logo-img {
  width: 44px;
  height: 44px;
  object-fit: contain;
  border-radius: 8px;
  border: 1px solid var(--rule);
  background: #FFF;
  padding: 3px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  flex-shrink: 0;
}

.masthead-title {
  font-family: var(--font-serif);
  font-size: 1.625rem;
  font-weight: 400;
  letter-spacing: 0.03em;
  color: var(--ink);
  white-space: nowrap;
}

.masthead-nav {
  display: flex;
  gap: 36px;
  align-items: center;
  flex-shrink: 0;
}

.masthead-link {
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--ink);
  position: relative;
  padding-bottom: 2px;
  transition: color 0.3s ease;
  white-space: nowrap;
}

.masthead-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 1px;
  background: var(--ink);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform var(--transition-smooth);
}

.masthead-link:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

/* ── Hero Section ── */
.hero-section {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding-top: 170px;
  padding-bottom: 96px;
}

.hero-layout {
  display: grid;
  grid-template-columns: 7fr 5fr;
  gap: 64px;
  align-items: flex-end;
}

.hero-headline {
  font-family: var(--font-serif);
  font-size: clamp(2.85rem, 5.5vw, 5.6rem);
  font-weight: 300;
  line-height: 1.08;
  letter-spacing: -0.025em;
  color: var(--ink);
}

.hero-headline em {
  font-style: italic;
  font-weight: 400;
  color: var(--ink);
}

/* Dedicated mobile 3D viewing clearance zone */
.hero-3d-spacer {
  display: none;
}

.hero-aside {
  display: flex;
  flex-direction: column;
  gap: 28px;
  max-width: 440px;
  margin-left: auto;
}

.hero-description {
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--ink-muted);
  font-weight: 400;
}

.hero-actions {
  display: flex;
  gap: 16px;
  align-items: center;
  flex-wrap: wrap;
}

/* ── Section Structure ── */
.editorial-section {
  padding: 140px 0;
  position: relative;
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--ink);
  margin-bottom: 56px;
}

.section-title {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 3.5vw, 3rem);
  font-weight: 300;
  letter-spacing: -0.015em;
}

/* ── Responsive Breakpoints ── */
@media (max-width: 1024px) {
  .grid-container { padding: 0 32px; }
  .masthead { padding: 18px 32px; }
  .hero-layout { grid-template-columns: 1fr; gap: 40px; }
  .hero-aside { margin-left: 0; max-width: 100%; }
}

@media (max-width: 768px) {
  .masthead-nav a:not(.whatsapp-pill) { display: none; }
  .grid-container { padding: 0 20px; }
  .hero-section { padding-top: 105px; padding-bottom: 48px; min-height: auto; }
  .editorial-section { padding: 80px 0; }
  .section-head { flex-direction: column; gap: 12px; margin-bottom: 36px; }
  .hero-headline {
    font-size: clamp(2.15rem, 8vw, 2.75rem);
    line-height: 1.12;
  }
  .hero-3d-spacer {
    display: block;
    width: 100%;
    height: 170px;
    margin: 8px 0 16px 0;
    pointer-events: none;
  }
  .hero-description {
    font-size: 0.9375rem;
    line-height: 1.65;
    color: #383733;
  }
  .hero-actions {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }
}

@media (max-width: 640px) {
  .masthead {
    padding: 12px 18px;
  }
  .masthead-brand {
    gap: 10px;
  }
  .masthead-logo-img {
    width: 34px;
    height: 34px;
    padding: 2px;
    border-radius: 6px;
  }
  .masthead-title {
    font-size: 1.25rem;
  }
}
