:root {
  --g-bg: #e2dcd2;
  --g-ink: #1d1814;
  --g-muted: #5d5247;
  --g-accent: #9a6b3a;
  --g-panel: rgba(250, 247, 242, 0.86);
  --g-ivory: #f6ede0;
  --g-brass: #d9b88f;
  --g-line: rgba(29, 24, 20, 0.12);
  --g-serif: "Playfair Display", Georgia, serif;
  --g-sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --g-mono: "IBM Plex Mono", ui-monospace, monospace;
  --g-showroom: #1f1813;
  --g-view-bg: rgb(250 247 242 / 92%);
  --g-header-height: 3.75rem;
  --g-screen: 100svh;
  --g-slow: 460ms;
  --g-ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scrollbar-width: thin; }
.over-gallery { scrollbar-color: #93816e var(--g-showroom); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--g-bg);
  color: var(--g-ink);
  font: 400 1rem/1.6 var(--g-sans);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }

.g-skip {
  position: fixed; left: 1rem; top: -4rem; z-index: 50;
  background: var(--g-ink); color: #fff; padding: 0.6rem 1rem; border-radius: 0.4rem;
}
.g-skip:focus { top: 1rem; }

/* Header */
.g-header {
  position: fixed; inset: 0 0 auto 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  min-height: var(--g-header-height);
  padding: 0.5rem clamp(1rem, 4vw, 2.5rem);
  background: rgb(242 234 222 / 96%);
  border-bottom: 1px solid var(--g-line);
}
.over-gallery .g-header {
  color: var(--g-ivory);
  background: linear-gradient(rgb(25 18 13 / 92%), rgb(25 18 13 / 70%));
  border-color: rgb(246 237 224 / 19%);
}
.g-contact-page .g-header {
  color: var(--g-ivory);
  background: var(--g-showroom);
  border-color: rgb(246 237 224 / 19%);
}
.g-wordmark {
  font: 400 1.7rem/1 var(--g-serif); text-decoration: none; letter-spacing: 0.025em;
}
.g-languages {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  font: 400 0.75rem/1 var(--g-mono);
}
.g-languages a {
  display: grid;
  place-items: center;
  min-width: 1.5rem;
  min-height: 2rem;
  text-decoration: none;
  text-underline-offset: 0.3em;
}
.g-languages a:is(:hover, [aria-current="page"]) { text-decoration: underline; }
.g-nav { display: flex; align-items: center; gap: clamp(1rem, 3vw, 2.8rem); margin-inline-start: auto; font-size: 0.85rem; }
.g-nav a { text-decoration: none; }
.g-nav a:not(.g-nav__cta):is(:hover, [aria-current="page"]) { text-decoration: underline; text-underline-offset: 0.35em; }
.g-nav__cta {
  border: 1px solid color-mix(in srgb, currentcolor 54%, transparent);
  border-radius: 999px; padding: 0.5rem 1.1rem;
  transition: background-color var(--g-slow) var(--g-ease);
}
.g-nav__cta:hover { background: var(--g-ink); color: #fff; }
:is(.over-gallery, .g-contact-page) .g-nav__cta:hover { background: var(--g-ivory); color: var(--g-ink); }
/* Gallery stage */
.g-stage {
  position: relative;
  height: calc(var(--g-header-height) + 4.5rem);
}
.has-gallery-ui:not(.is-list) .g-stage {
  height: var(--g-screen);
  background: var(--g-showroom);
  color: var(--g-ivory);
}
.has-gallery-ui:not(.is-list) .g-stage::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgb(22 15 10 / 70%), transparent 26%),
    linear-gradient(0deg, rgb(22 15 10 / 92%), rgb(22 15 10 / 57%) 17%, transparent 37%);
}
.g-surface {
  position: absolute;
  inset: 0;
  touch-action: pan-y pinch-zoom;
  cursor: grab;
}
.g-canvas { width: 100%; height: 100%; display: block; }
.g-surface.is-over-slab { cursor: pointer; }
.g-surface.is-dragging { cursor: grabbing; }
.g-surface:focus-visible::after {
  content: ""; position: absolute; inset: calc(var(--g-header-height) + 3px) 3px 3px;
  z-index: 1; pointer-events: none; border: 2px solid var(--g-brass);
}
.g-loader {
  position: absolute; inset: 0; z-index: 1; display: grid; place-items: center; pointer-events: none;
  background: var(--g-showroom); font: 400 0.8125rem/1 var(--g-mono);
  letter-spacing: 0.18em; text-transform: uppercase; color: var(--g-brass);
  transition: opacity var(--g-slow) var(--g-ease), visibility var(--g-slow);
}
.g-loader.is-done { opacity: 0; visibility: hidden; }
.ec-gallery-poster { display: none; }
html:not(.has-gallery-ui) :is(.g-surface, .g-loader, .g-controls, .g-view),
.is-list :is(.g-surface, .g-loader, .g-controls, .g-hover-name) { display: none; }

.g-view, .g-controls { position: absolute; z-index: 2; }
.g-view {
  top: calc(var(--g-header-height) + 0.75rem); right: clamp(1rem, 3vw, 2.5rem);
  display: flex; padding: 0.2rem; border: 1px solid var(--g-line);
  border-radius: 999px; background: var(--g-view-bg);
}
.has-gallery-ui:not(.is-list) .g-view {
  background: rgb(35 25 18 / 86%); border-color: rgb(246 237 224 / 38%);
}
.g-view button, .g-caption__open, .g-arrow, .g-close, .g-swatch, .g-detail-nav button {
  font: inherit; color: inherit; border: 0; background: transparent; cursor: pointer;
}
.g-view button {
  min-height: 2.25rem; padding-inline: 0.7rem; border-radius: 999px;
  font: 400 0.75rem/1 var(--g-mono); text-transform: uppercase; letter-spacing: 0.09em;
  -webkit-tap-highlight-color: transparent;
}
.g-view button[aria-pressed="true"] { background: var(--g-ink); color: #fff; }
.has-gallery-ui:not(.is-list) .g-view button[aria-pressed="true"] { background: var(--g-ivory); color: var(--g-ink); }
.has-gallery-ui:not(.is-list) .g-view button[aria-pressed="false"]:hover { background: rgb(246 237 224 / 15%); }
.g-view button:disabled { opacity: 0.55; cursor: default; }

.g-controls {
  inset: auto 0 max(1rem, env(safe-area-inset-bottom));
  display: grid;
  justify-items: center;
  margin-inline: auto;
  width: min(calc(100% - 2rem), 36rem);
  text-align: center;
  pointer-events: none;
}
.g-controls button, .g-swatches { pointer-events: auto; }
.g-caption .g-eyebrow {
  margin-bottom: 0.15rem; color: var(--g-ivory); letter-spacing: 0.2em;
}
/* The caption sits over the lit floor pool; a soft scrim keeps its text readable. */
.g-caption {
  background: radial-gradient(farthest-side, rgb(22 16 12 / 0.78) 50%, rgb(22 16 12 / 0));
  text-shadow: 0 1px 10px rgb(20 14 10 / 0.6);
}
p, li { text-wrap: pretty; }
.g-caption__name {
  margin: 0;
  font: 400 clamp(2.5rem, 6.2svh, 3.75rem)/1.06 var(--g-serif);
  letter-spacing: -0.025em;
}
.g-caption__open {
  position: relative; min-height: 2.5rem; padding: 0.45rem 0;
  font-size: 0.8125rem;
  text-underline-offset: 0.3em;
  text-decoration: underline;
  text-decoration-color: var(--g-brass);
}
.g-caption__open span { margin-left: 0.25rem; }
.g-walk {
  display: grid;
  grid-template-columns: 44px minmax(0, auto) 44px;
  align-items: end;
  gap: 0.5rem;
  max-width: 100%;
}
.g-arrow {
  inline-size: 44px; block-size: 44px; margin-bottom: 0.3rem; border-radius: 50%;
  border: 1px solid rgb(246 237 224 / 65%);
  background: rgb(35 25 18 / 75%);
  transition: background-color var(--g-slow) var(--g-ease), color var(--g-slow) var(--g-ease);
}
.g-arrow:hover { background: var(--g-ivory); color: var(--g-ink); }
.g-swatches {
  position: relative;
  display: flex;
  gap: 0.1rem;
  padding: 1.15rem 0.3rem 0.3rem;
  overflow-x: auto;
  scrollbar-width: thin;
  scrollbar-color: #a18b73 transparent;
}
.g-swatch {
  position: relative;
  display: grid;
  place-items: center;
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  padding: 0;
}
.g-swatch img {
  width: 28.5px; height: 38px; border-radius: 0.35rem; object-fit: cover;
  border: 1px solid rgb(246 237 224 / 55%);
}
.g-swatch[aria-current="true"] img { outline: 2px solid var(--g-brass); outline-offset: 2px; }
.g-swatch span {
  position: absolute; bottom: 100%; left: 50%; transform: translateX(-50%);
  visibility: hidden;
  background: var(--g-showroom);
  padding-inline: 0.2rem;
  border-radius: 0.2rem;
  font-size: 0.75rem;
  line-height: 1.35;
  pointer-events: none;
}
.g-swatch:first-child span { left: 0; transform: none; }
.g-swatch:last-child span { left: auto; right: 0; transform: none; }
.g-swatch:is(:hover, :focus-visible) span { visibility: visible; }
.ec-gallery-swipe { display: none; }
.g-progress {
  position: relative; margin: 0.15rem 0 0; font: 400 0.8125rem/1.25 var(--g-mono); letter-spacing: 0.09em;
}
.g-rotation {
  position: absolute; inset-inline-start: calc(100% + 0.4rem); inset-block-start: 50%;
  transform: translateY(-50%); inline-size: 1.5rem; block-size: 1.5rem;
  padding: 0; border: 1px solid rgb(246 237 224 / 65%); border-radius: 50%;
  background: transparent; color: inherit; cursor: pointer;
}
.g-rotation::before {
  content: ""; display: block; inline-size: 0.35rem; block-size: 0.55rem;
  margin: auto; border-inline: 1px solid currentColor;
}
.g-rotation[data-paused]::before {
  inline-size: 0; block-size: 0; border: solid transparent; border-width: 5px 0 5px 7px;
  border-left-color: currentColor;
}
.g-rotation:hover { background: var(--g-ivory); color: var(--g-ink); }
.g-directions {
  margin: 0.1rem 0 0; font-size: 0.75rem; line-height: 1.35;
  transition: opacity var(--g-slow), visibility var(--g-slow);
}
.has-navigated .g-directions { opacity: 0; visibility: hidden; }
.g-hover-name {
  position: absolute; z-index: 1; pointer-events: none; transform: translate(-50%, -100%);
  border: 1px solid rgb(246 237 224 / 46%); border-radius: 999px;
  background: var(--g-showroom); padding: 0.2rem 0.65rem; font-size: 0.8125rem;
}

/* Sections */
.g-room {
  display: flex; align-items: center; padding: 3rem clamp(1rem, 4vw, 3rem);
  scroll-margin-top: var(--g-header-height);
}
.g-room--intro { padding-block: clamp(4.5rem, 10vw, 8rem); }
.g-room--text { justify-content: center; background: var(--g-bg); }

.g-collection {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(0.75rem, 2.4vw, 2rem);
  max-width: 84rem;
  margin-inline: auto;
  padding: 0 clamp(1rem, 4vw, 3rem) 2rem;
}
.has-gallery-ui:not(.is-list) .g-collection { display: none; }
.g-card, .g-panel--wide {
  background: var(--g-panel);
  border: 1px solid var(--g-line);
  border-radius: 0.5rem;
}
.g-card { position: relative; overflow: hidden; }
.g-card:focus-within { outline: 2px solid var(--g-accent); outline-offset: 3px; }
.g-card__image {
  width: 100%;
  height: clamp(10rem, 25vw, 20rem);
  object-fit: contain;
  background: #d5cabb;
}
.g-card__body { padding: clamp(0.8rem, 2.4vw, 1.65rem); }
.g-card__name { margin: 0 0 0.6rem; font: 400 clamp(1.6rem, 3vw, 2.5rem)/1.1 var(--g-serif); }
.g-card__name a { display: flex; align-items: baseline; justify-content: space-between; text-decoration: none; }
.g-card__name a:hover { text-decoration: underline; }
.g-card__name a::after { content: ""; position: absolute; inset: 0; }
.g-card__name span { font: 400 1rem/1 var(--g-sans); }
.g-card .g-look { font-size: 0.875rem; }

.ec-gallery-card-quote {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin-top: 0.3rem;
  text-underline-offset: 0.22em;
}
.g-panel--wide {
  width: min(52rem, 100%);
  padding: clamp(1.25rem, 3vw, 2.25rem);
  box-shadow: 0 24px 60px rgb(30 20 10 / 8%);
}
.g-panel--slab {
  position: fixed;
  inset: 0 max(1rem, calc(35% - 22.5rem)) 0 auto;
  width: min(22.5rem, calc(50% - 6.5rem));
  max-height: calc(var(--g-screen) - 2 * (var(--g-header-height) + 0.5rem));
  margin: auto 0;
  padding: clamp(1rem, 1.7vw, 1.5rem);
  color: var(--g-ink);
  background: var(--g-ivory);
  border: 1px solid var(--g-line);
  border-radius: 0.5rem;
  box-shadow: 0 24px 70px rgb(19 13 9 / 35%);
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: #826e58 var(--g-ivory);
}
.g-panel--slab::backdrop { background: rgb(25 18 13 / 22%); }
.g-panel--slab .g-eyebrow { margin-bottom: 0.5rem; }
.g-panel--slab .g-look { margin-bottom: 0.8rem; font-size: 0.875rem; line-height: 1.45; }
.g-panel--slab .g-specs { column-gap: 0.55rem; padding-block: 0.6rem; }
.g-panel--slab .g-specs dt { font-size: 0.6875rem; letter-spacing: 0.08em; }
.g-panel--slab .g-specs dd { font-size: 0.8125rem; line-height: 1.35; }
.g-panel--slab .g-actions { margin-top: 0.85rem; gap: 0.45rem; }
.g-panel--slab .g-button { min-height: 44px; padding-inline: 0.85rem; font-size: 0.8125rem; }
.g-close {
  display: grid; place-items: center; position: absolute; top: 0.75rem; right: 0.75rem;
  width: 44px; height: 44px; font: 400 1.4rem/1 var(--g-sans); border-radius: 50%;
  border: 1px solid var(--g-line);
}
.g-close:hover, .g-detail-nav button:hover { background: var(--g-line); }
.g-detail-nav { display: flex; justify-content: space-between; gap: 0.65rem; margin-top: 0.75rem; }
.g-detail-nav button {
  flex: 1;
  min-height: 44px;
  padding: 0.35rem 0.6rem;
  border: 1px solid var(--g-line);
  border-radius: 0.25rem;
  text-align: left;
  font-size: 0.75rem;
  line-height: 1.3;
}
.g-detail-nav button:last-child { text-align: right; }
.g-detail-nav strong { display: block; }

.g-panel--intro { max-width: 40rem; }
.g-eyebrow {
  margin: 0 0 0.9rem; font: 400 0.75rem/1.2 var(--g-mono);
  letter-spacing: 0.18em; text-transform: uppercase; color: var(--g-muted);
}
.g-title { margin: 0 0 1.25rem; font: 400 clamp(2.8rem, 7vw, 5.6rem)/0.98 var(--g-serif); letter-spacing: -0.025em; }
.g-lede { margin: 0 0 1.25rem; font-size: clamp(1.02rem, 1.5vw, 1.18rem); max-width: 34rem; }

.g-slab-name { margin: 0 0 0.65rem; font: 400 2.5rem/1 var(--g-serif); letter-spacing: -0.025em; }
.g-look { margin: 0 0 1.35rem; font-size: 1rem; }
.g-specs {
  margin: 0;
  display: grid;
  grid-template-columns: 1.2fr 1fr 1.2fr;
  column-gap: 0.65rem;
  border-block: 1px solid var(--g-line);
  padding: 1rem 0;

  > div {
    display: grid;
    grid-template-rows: subgrid;
    grid-row: span 2;
  }
}
.g-specs dt { font: 400 0.75rem/1.2 var(--g-mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--g-muted); }
.g-specs dd { margin: 0.25rem 0 0; font-size: 0.92rem; text-wrap: balance; }

.g-h2 { margin: 0 0 1.1rem; font: 500 clamp(2rem, 4.2vw, 3.2rem)/1.05 var(--g-serif); }
.g-columns { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(16rem, 100%), 1fr)); gap: 1.5rem; }
.g-columns p { margin: 0; }
.g-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.5rem; }
.g-button {
  display: inline-flex; align-items: center; min-height: 2.9rem; padding: 0 1.3rem;
  border-radius: 999px; background: var(--g-ink); color: #fff; text-decoration: none; font-weight: 500;
}
.g-button--ghost { background: transparent; color: var(--g-ink); border: 1px solid var(--g-ink); }

@media (hover: hover) {
  .g-button:hover { background: var(--g-accent); }

  .g-button--ghost:hover {
    background: var(--g-ink);
    color: #fff;
  }
}

a:focus-visible, button:focus-visible { outline: 2px solid var(--g-accent); outline-offset: 3px; }

#kontakt:focus { outline: none; }

.g-contact-page { background: var(--g-ivory); }
.g-contact {
  padding: calc(var(--g-header-height) + clamp(2.5rem, 5vw, 5rem)) clamp(1rem, 4vw, 3rem) 0;
}
.g-contact > * {
  width: min(52rem, 100%);
  margin-inline: auto;
}
.g-contact .g-title { font-size: clamp(2.75rem, 6vw, 4.5rem); }
.g-contact .g-lede { max-width: 40rem; }

.ec-contact-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem 1.25rem;
  margin-bottom: 1rem;
  font-size: 0.9rem;
}

.ec-contact-links > :where(a) {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
}

.g-contact :is(.ec-contact-links, .g-contact__info, .ec-quote-mail-hint) :where(a) { text-underline-offset: 0.22em; }
.g-contact #kontakt {
  padding: 0;
  background: transparent;
  scroll-margin-top: calc(var(--g-header-height) + 0.5rem);
}
.g-contact__info {
  grid-template-columns: repeat(auto-fit, minmax(min(14rem, 100%), 1fr));
  margin-block: 2.5rem 1rem;
}
.g-contact__info section {
  border-top: 1px solid var(--g-line);
  padding-top: 1rem;
}
.g-contact__info h2 {
  margin: 0 0 0.5rem;
  font: 500 1.35rem/1.25 var(--g-serif);
}
.g-contact__info p { color: var(--g-muted); }

:is(.over-gallery, .g-contact-page) .g-header a:focus-visible,
.has-gallery-ui:not(.is-list) .g-stage button:focus-visible { outline-color: var(--g-brass); }

.g-footer {
  padding: 2rem clamp(1rem, 4vw, 3rem) 3rem;
  font-size: 0.8rem; color: var(--g-muted);
}

@media (max-width: 1020px) {
  .g-collection { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  .g-header { gap: 0.65rem; padding-inline: 0.8rem; }
  .g-wordmark { font-size: 1.5rem; }
  .g-nav { gap: clamp(0.55rem, 2.6vw, 1rem); font-size: 0.75rem; }
  .g-nav__cta { padding: 0.35rem 0.55rem; text-align: center; line-height: 1.25; }
  .g-view { top: calc(var(--g-header-height) + 0.6rem); }
  .g-controls { inset-block-end: max(0.65rem, env(safe-area-inset-bottom)); }
  .g-caption__name { font-size: clamp(2.25rem, 5.4svh, 2.85rem); }
  .g-caption__open { display: block; min-height: 2rem; margin-inline: auto; }
  .g-walk { width: 100%; gap: 0.3rem; }
  .g-panel--slab {
    inset: auto 0 0;
    width: 100%; max-width: none; max-height: max(45svh, min(20rem, 75svh));
    margin: 0;
    border-radius: 0.75rem 0.75rem 0 0;
    padding: 0.9rem 1.25rem max(0.85rem, calc(env(safe-area-inset-bottom) + 0.55rem));
  }
}

@media (max-width: 600px) {
  :root { --g-header-height: 5.5rem; }
  .g-header {
    display: grid;
    grid-template-columns: 1fr auto;
    row-gap: 0.15rem;
    padding-block: 0.35rem;
  }
  .g-nav {
    grid-column: 1 / -1;
    justify-content: space-between;
    margin: 0;
  }
  .g-nav > a { display: flex; align-items: center; min-height: 2rem; }

  [data-loader] { --ec-poster-top: max(10.75rem, 20svh); }
  [data-stage] > [inert] { visibility: hidden; }

  .ec-gallery-poster {
    position: absolute;
    top: var(--ec-poster-top);
    left: 50%;
    display: block;
    width: auto;
    height: min(35svh, 76vw);
    translate: -50% 0;
    box-shadow: 0 1rem 2.5rem rgb(0 0 0 / 45%);
  }

  .g-loader [data-loader-text] {
    position: absolute;
    top: calc(var(--ec-poster-top) + min(35svh, 76vw) + 0.85rem);
  }
  .g-contact { padding-top: calc(var(--g-header-height) + 1.2rem); }

  .g-contact .g-title {
    margin-bottom: 0.65rem;
    font-size: 2.25rem;
  }

  .g-contact .g-lede {
    margin-bottom: 0.6rem;
    font-size: 0.9375rem;
    line-height: 1.45;
  }

  .ec-contact-intro-detail { display: none; }
  .g-contact #kontakt .g-panel { padding: 0.85rem; }
  .g-contact #kontakt .g-h2 { margin-bottom: 0.45rem; }

  .g-collection { grid-template-columns: minmax(0, 1fr); }

  .g-card__image {
    height: auto;
    aspect-ratio: 3200 / 1546;
    object-fit: cover;
  }

  .g-card .g-specs {
    grid-template-columns: minmax(0, 1fr);
    row-gap: 0.55rem;
  }

  .g-card .g-specs > div {
    grid-template: auto / minmax(0, 1fr) minmax(0, 1fr);
    grid-row: auto;
    align-items: baseline;
    gap: 0.55rem;
  }
  .g-card .g-specs dt { overflow-wrap: anywhere; }

  .g-card .g-specs dd {
    margin: 0;
    text-align: end;
  }
}

@media (width <= 550px) {
  .ec-gallery-swipe {
    display: block;
    margin: 0.15rem 0;
    color: var(--g-brass);
    font-size: 0.6875rem;
    line-height: 1.3;
  }
}

@media (max-width: 760px) and (max-height: 640px) {
  .g-controls { width: calc(100% - 1rem); }
  .g-caption__name { font-size: 1.625rem; }
  .g-caption__open { min-height: 1.5rem; padding-block: 0.15rem; }
  .g-directions { letter-spacing: -0.015em; }
  .g-swatches { padding-block-start: 1rem; }
  .g-progress { margin-top: 0; }
}

@media (prefers-reduced-motion: reduce) {
  :root { --g-slow: 0ms; }
}
