/* JUMA Leuchten — Homepage styles */

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; overflow-x: clip; }
body {
  background: var(--ink);
  color: var(--cream);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

img { display: block; max-width: 100%; }

/* Density modifiers (controlled via Tweaks → data-density on <body>) */
body[data-density="airy"]    { --pad-section: 160px; --pad-x: 72px; }
body[data-density="comfort"] { --pad-section: 112px; --pad-x: 56px; }
body[data-density="dense"]   { --pad-section: 72px;  --pad-x: 40px; }

/* Type-scale modifiers */
body[data-typescale="editorial"] { --display-scale: 1.15; }
body[data-typescale="balanced"]  { --display-scale: 1; }
body[data-typescale="restrained"]{ --display-scale: 0.82; }

/* Mood */
body[data-mood="warm"]   { --mood-tint: rgba(200,169,110,0.05); }
body[data-mood="crystal"]{ --mood-tint: rgba(180,200,220,0.03); }
body[data-mood="deep"]   { --mood-tint: rgba(0,0,0,0.2); }

/* Reveal-on-scroll */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 1s cubic-bezier(.2,.6,.2,1), transform 1s cubic-bezier(.2,.6,.2,1);
  will-change: transform, opacity;
}
.reveal.is-in { opacity: 1; transform: translateY(0); }

/* Stagger children */
.stagger > * { transition-delay: var(--d, 0ms); }

/* Cursor effect (when enabled) */
body[data-cursor="on"] {
  cursor: none;
}
.cursor-dot, .cursor-ring {
  position: fixed; top: 0; left: 0; pointer-events: none; z-index: 9999;
  transform: translate(-50%, -50%);
  transition: opacity .3s ease, width .25s ease, height .25s ease;
  opacity: 0;
}
body[data-cursor="on"] .cursor-dot,
body[data-cursor="on"] .cursor-ring { opacity: 1; }
.cursor-dot { width: 4px; height: 4px; background: var(--gold); border-radius: 50%; }
.cursor-ring { width: 36px; height: 36px; border: 1px solid rgba(200,169,110,0.5); border-radius: 50%; transition: width .25s, height .25s, opacity .25s; }
.cursor-ring.hover { width: 80px; height: 80px; border-color: var(--gold-bright); }

/* Layout helpers */
.container { padding-left: var(--pad-x, 56px); padding-right: var(--pad-x, 56px); }
.eyebrow {
  font-family: var(--font-sans);
  font-size: 10px; font-weight: 500;
  letter-spacing: 0.28em; text-transform: uppercase;
  color: var(--gold);
  display: inline-flex; align-items: center; gap: 12px;
}
.eyebrow::before {
  content: ""; display: inline-block;
  width: 28px; height: 1px; background: var(--gold);
}
.eyebrow.no-line::before { display: none; }

.h-display {
  font-family: var(--font-display);
  font-weight: 300; line-height: 1.05;
  text-transform: uppercase;
  color: var(--cream);
  letter-spacing: -0.005em;
  font-size: calc(64px * var(--display-scale, 1));
}
.h-display .accent { color: var(--gold); font-style: italic; }

.h-section {
  font-family: var(--font-display);
  font-weight: 300; line-height: 1.08;
  text-transform: uppercase;
  color: var(--cream);
  font-size: calc(56px * var(--display-scale, 1));
  letter-spacing: -0.005em;
}

.copy {
  font-family: var(--font-sans);
  font-size: 15px; font-weight: 300;
  line-height: 1.75;
  color: var(--cream-2);
  max-width: 52ch;
}

.btn {
  display: inline-flex; align-items: center; gap: 14px;
  font-family: var(--font-sans);
  font-size: 10px; font-weight: 500;
  letter-spacing: 0.25em; text-transform: uppercase;
  padding: 16px 32px;
  border: 1px solid rgba(240,235,224,0.3);
  color: var(--cream); background: transparent;
  text-decoration: none; cursor: pointer;
  transition: all 0.4s cubic-bezier(.2,.6,.2,1);
  position: relative; overflow: hidden;
}
.btn::after {
  content: ""; position: absolute; inset: 0;
  background: var(--gold);
  transform: translateY(101%);
  transition: transform 0.4s cubic-bezier(.4,0,.2,1);
  z-index: -1;
}
.btn:hover { color: var(--ink); border-color: var(--gold); }
.btn:hover::after { transform: translateY(0); }
.btn .arr { transition: transform 0.4s ease; }
.btn:hover .arr { transform: translateX(6px); }

.btn--gold { border-color: var(--gold); color: var(--gold); }
.btn--gold:hover { color: var(--ink); }
.btn--filled { background: var(--gold); border-color: var(--gold); color: var(--ink); }
.btn--filled::after { background: var(--cream); }
.btn--filled:hover { color: var(--ink); }

/* Marquee track */
.marquee {
  display: flex; overflow: hidden; gap: 64px;
  padding: 24px 0;
  border-top: 1px solid var(--gold-subtle);
  border-bottom: 1px solid var(--gold-subtle);
  mask-image: linear-gradient(90deg, transparent 0, black 8%, black 92%, transparent 100%);
}
.marquee-track {
  display: flex; gap: 64px; flex-shrink: 0;
  animation: marquee 40s linear infinite;
  white-space: nowrap;
}
@keyframes marquee {
  to { transform: translateX(-50%); }
}
.marquee-item {
  font-family: var(--font-display);
  font-size: 28px; color: var(--cream-2);
  text-transform: uppercase; letter-spacing: 0.08em;
  display: inline-flex; align-items: center; gap: 64px;
}
.marquee-item .dot { width: 6px; height: 6px; background: var(--gold); border-radius: 50%; }

/* Image hover */
.img-hover { overflow: hidden; }
.img-hover img { transition: transform 1.2s cubic-bezier(.2,.6,.2,1); }
.img-hover:hover img { transform: scale(1.06); }

/* Section dividers */
.divider {
  height: 1px; background: var(--gold-subtle);
  margin: 0 var(--pad-x, 56px);
}

/* Scrollbar — subtle */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--ink); }
::-webkit-scrollbar-thumb { background: var(--surface-2); }
::-webkit-scrollbar-thumb:hover { background: var(--gold-dim); }

/* Legend (Konfiguration) — compact 3-column horizontal layout */
.legend-cols-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--gold-subtle);
  border-bottom: 1px solid var(--gold-subtle);
}
.legend-column {
  border-right: 1px solid var(--gold-subtle);
  display: flex; flex-direction: column;
  padding: 24px 18px 20px;
  min-width: 0;
}
.legend-column:last-child { border-right: none; }
.legend-column-head {
  display: flex; flex-direction: column; gap: 6px;
  padding-bottom: 18px; margin-bottom: 18px;
  border-bottom: 1px solid var(--gold-subtle);
}
.legend-column-num {
  font-family: 'Manrope', sans-serif;
  font-size: 9px; letter-spacing: 0.28em; color: #c8a96e;
}
.legend-column-title {
  font-family: 'Poiret One', sans-serif;
  font-size: 20px; font-weight: 300; color: #f0ebe0;
  text-transform: uppercase; letter-spacing: 0.02em; line-height: 1.2;
}
.legend-column-sub {
  font-family: 'Manrope', sans-serif;
  font-size: 11px; font-weight: 300; color: #9e9080; line-height: 1.5;
}
.legend-column-grid {
  display: grid; gap: 14px 8px;
  flex: 1;
}
.legend-cell-mini {
  display: flex; flex-direction: column; align-items: center;
  gap: 18px; padding: 4px 2px;
}
.lc-icon {
  width: 100%; max-width: 56px; aspect-ratio: 100 / 70;
  color: #c8a96e; display: flex; align-items: center; justify-content: center;
}
.lc-shape {
  width: 100%;
  max-width: 78px;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  display: block;
  transition: transform 0.4s cubic-bezier(.2,.6,.2,1), opacity 0.4s ease;
  opacity: 0.92;
}
.legend-cell-mini:hover .lc-shape {
  transform: translateY(-2px) scale(1.05);
  opacity: 1;
}
.lc-pendant {
  width: 100%;
  max-width: 78px;
  aspect-ratio: 320 / 540;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 6px 14px rgba(0,0,0,0.55));
  transition: transform 0.4s cubic-bezier(.2,.6,.2,1), filter 0.4s ease;
}
.legend-cell-mini:hover .lc-pendant {
  transform: translateY(-3px) scale(1.04);
  filter: drop-shadow(0 14px 28px rgba(0,0,0,0.7));
}
.lc-bead {
  position: relative;
  width: 100%; max-width: 36px; aspect-ratio: 1; border-radius: 50%;
}
.lc-bead-glint {
  position: absolute; top: 5px; left: 7px; width: 8px; height: 8px;
  border-radius: 50%; background: rgba(255,255,255,0.55); filter: blur(2px);
}
.lc-label {
  font-family: 'Manrope', sans-serif;
  font-size: 9px; font-weight: 500;
  letter-spacing: 0.16em; text-transform: uppercase;
  color: #f0ebe0; text-align: center; line-height: 1.3;
}

/* Stay 3-up as long as possible — only stack on very narrow phones */
@media (max-width: 600px) {
  .legend-cols-3 { grid-template-columns: 1fr; }
  .legend-column { border-right: none; border-bottom: 1px solid var(--gold-subtle); padding: 18px 16px; }
  .legend-column:last-child { border-bottom: none; }
  .legend-column-title { font-size: 17px; }
}
@media (max-width: 900px) {
  .legend-column { padding: 20px 14px; }
  .legend-column-title { font-size: 17px; }
  .legend-column-sub { font-size: 10px; }
  .legend-column-grid { gap: 10px 4px; }
  .lc-label { font-size: 8px; letter-spacing: 0.12em; }
  .lc-icon { max-width: 44px; }
  .lc-shape { max-width: 62px; }
  .lc-bead { max-width: 30px; }
  .lc-pendant { max-width: 62px; }
  .finish-swatch { max-width: 80px; }
}

/* Legacy classes still used by FinishSwatch */
.legend-cell-label {
  font-family: 'Manrope', sans-serif;
  font-size: 10px; font-weight: 500;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: #f0ebe0; text-align: center;
}
.legend-cell-sub {
  font-family: 'Manrope', sans-serif;
  font-size: 10px; font-weight: 500;
  letter-spacing: 0.12em; color: #9e9080;
  text-align: center; margin-top: -6px; white-space: nowrap;
}

/* Surface finish swatch — compact sizing for the new column layout */
.finish-swatch {
  width: 100%;
  max-width: 96px;
  aspect-ratio: 1 / 1;
  display: block;
  filter: drop-shadow(0 4px 10px rgba(0,0,0,0.45));
  transition: transform 0.4s cubic-bezier(.2,.6,.2,1), filter 0.4s ease;
}
.legend-cell-mini:hover .finish-swatch {
  transform: translateY(-3px) scale(1.04);
  filter: drop-shadow(0 14px 34px rgba(0,0,0,0.6));
}

/* Component-specific responsive tweaks */
@media (max-width: 720px) {
  a.proj-row {
    grid-template-columns: 1fr !important;
    gap: 10px !important;
    padding: 28px var(--pad-x, 20px) !important;
  }
  a.proj-row .proj-arrow { justify-self: flex-start !important; }
  a.proj-row .proj-preview { display: none !important; }
}
@media (max-width: 900px) {
  .services-row { grid-template-columns: 1fr !important; }
  .services-row > div:last-child { display: none !important; }
  .reviews-grid { grid-template-columns: 1fr !important; }
  .reviews-grid > div:first-child { border-right: none !important; border-bottom: 1px solid var(--gold-subtle) !important; }
}
@media (max-width: 1100px) {
  .cats-grid { grid-template-columns: repeat(2, 1fr) !important; }
}
@media (max-width: 720px) {
  .cats-grid { grid-template-columns: 1fr !important; }
  .cats-grid > a { aspect-ratio: 5/4 !important; }
  .heritage-grid {
    grid-auto-flow: column !important;
    grid-template-columns: none !important;
    grid-auto-columns: 78vw;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
  }
  .heritage-grid > div { scroll-snap-align: start; }
}

/* ──────────────────────────────────────────────────────────
   RESPONSIVE — tablet & mobile
   ────────────────────────────────────────────────────────── */

/* Tablet — collapse some 2-cols → 1-col, ease padding */
@media (max-width: 1100px) {
  body[data-density="airy"]    { --pad-section: 112px; --pad-x: 40px; }
  body[data-density="comfort"] { --pad-section: 88px;  --pad-x: 32px; }
  body[data-density="dense"]   { --pad-section: 56px;  --pad-x: 24px; }

  /* Generic header padding override */
  header > div { padding-left: 32px !important; padding-right: 32px !important; }
  /* Hide numbered nav, keep brand + actions visible */
  header nav { display: none !important; }

  /* Force any 2-col grid to stack at this width */
  .resp-grid-2 { grid-template-columns: 1fr !important; gap: 48px !important; }
  .resp-grid-3 { grid-template-columns: repeat(2, 1fr) !important; }
  .resp-grid-4 { grid-template-columns: repeat(2, 1fr) !important; }
  .resp-grid-5 { grid-template-columns: repeat(2, 1fr) !important; }
}

/* Mobile */
@media (max-width: 720px) {
  body[data-density="airy"]    { --pad-section: 80px; --pad-x: 22px; }
  body[data-density="comfort"] { --pad-section: 64px; --pad-x: 20px; }
  body[data-density="dense"]   { --pad-section: 48px; --pad-x: 16px; }

  /* Disable cursor effect on touch */
  body[data-cursor="on"] { cursor: auto; }
  body[data-cursor="on"] .cursor-dot,
  body[data-cursor="on"] .cursor-ring { display: none; }

  header > div { padding: 14px 20px !important; }

  /* Stack everything */
  .resp-grid-2,
  .resp-grid-3,
  .resp-grid-4,
  .resp-grid-5 { grid-template-columns: 1fr !important; gap: 0 !important; }

  /* Marquee: smaller text + faster spacing */
  .marquee { gap: 32px; padding: 16px 0; }
  .marquee-track { gap: 32px; }
  .marquee-item { font-size: 18px; gap: 32px; }

  /* Buttons: full-width-ish, more legible tap */
  .btn {
    padding: 14px 22px;
    font-size: 10px;
    letter-spacing: 0.22em;
  }

  /* Eyebrow tighter */
  .eyebrow { font-size: 9px; }
  .eyebrow::before { width: 18px; }

  .copy { font-size: 14px; line-height: 1.7; }

  /* Large display headings */
  .h-display { font-size: clamp(40px, 11vw, 64px) !important; }
  .h-section { font-size: clamp(34px, 9vw, 52px) !important; }

  /* Footer column collapse — target the inner brand+links rows directly */
  footer > div {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 18px !important;
  }
  footer > div > div:last-child {
    flex-wrap: wrap !important;
    gap: 14px 20px !important;
    font-size: 9px !important;
    letter-spacing: 0.18em !important;
  }
}
