/* Louvre Roof Visualiser: warm neutrals, charcoal and white, one restrained sand accent. White-label colours are CSS variables set from /api/config. */
:root {
  --ink: #242424;
  --ink-2: #4a4a48;
  --muted: #6b6a66;
  --paper: #ffffff;
  --sand-bg: #f5f2ec;
  --sand-bg-2: #ece7de;
  --line: #ddd7cb;
  --accent: #8a6d3b;
  --accent-soft: #b69b78;
  --danger: #a3361f;
  --ok: #2f6b3f;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(36, 36, 36, .06), 0 12px 32px rgba(36, 36, 36, .08);
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, "Helvetica Neue", Arial, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; } }
body { margin: 0; font-family: var(--sans); color: var(--ink); background: var(--paper); line-height: 1.55; font-size: 17px; }
img { max-width: 100%; display: block; }
a { color: var(--ink); text-underline-offset: 3px; }
h1, h2, h3, h4 { margin: 0; line-height: 1.15; font-weight: 500; letter-spacing: -.01em; }
p { margin: 0 0 1rem; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
.wrap { width: min(1180px, 100% - 32px); margin-inline: auto; }
.narrow { width: min(760px, 100% - 32px); }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: #fff; padding: 10px 14px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 8px; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 30; background: rgba(255, 255, 255, .92); backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--line); }
.bar { display: flex; align-items: center; gap: 24px; min-height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 600; letter-spacing: .01em; text-decoration: none; margin-right: auto; font-size: 1.02rem; }
.brand-logo { height: 30px; width: auto; }
.nav { display: flex; gap: 22px; }
.nav a { text-decoration: none; color: var(--ink-2); font-size: .95rem; }
.nav a:hover { color: var(--ink); text-decoration: underline; }
@media (max-width: 760px) { .nav { display: none; } }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 26px; border-radius: 999px; border: 1.5px solid var(--ink); background: var(--ink); color: #fff; font: inherit; font-weight: 600; font-size: 1rem; text-decoration: none; cursor: pointer; transition: transform .15s, background .15s, box-shadow .15s; }
.btn:hover:not(:disabled) { background: #000; transform: translateY(-1px); box-shadow: 0 8px 20px rgba(0, 0, 0, .18); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn-ghost { background: transparent; color: var(--ink); }
.btn-ghost:hover:not(:disabled) { background: var(--sand-bg); box-shadow: none; }
.btn-small { min-height: 40px; padding: 0 18px; font-size: .92rem; }
.btn-block { width: 100%; }
.btn-light { background: #fff; color: var(--ink); border-color: #fff; }
.btn-light:hover:not(:disabled) { background: var(--sand-bg); }
.link-btn { background: none; border: 0; padding: 0; font: inherit; color: var(--ink); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.link-btn:hover { color: var(--accent); }

/* Hero */
.hero { background: linear-gradient(180deg, var(--sand-bg) 0%, #fff 100%); padding: clamp(36px, 6vw, 84px) 0 clamp(36px, 5vw, 72px); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(28px, 4vw, 64px); align-items: center; }
.eyebrow { text-transform: uppercase; letter-spacing: .14em; font-size: .75rem; color: var(--accent); font-weight: 600; margin-bottom: 18px; }
h1 { font-family: var(--serif); font-size: clamp(2.3rem, 4.6vw, 3.8rem); font-weight: 400; letter-spacing: -.02em; line-height: 1.06; margin-bottom: 20px; }
.lead { font-size: 1.15rem; color: var(--ink-2); max-width: 34em; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 28px 0 18px; }
.hero-note { font-size: .88rem; color: var(--muted); }
@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr; } }

/* Sections */
.section { padding: clamp(48px, 7vw, 96px) 0; }
.section.alt { background: var(--sand-bg); }
.section-title { font-family: var(--serif); font-weight: 400; font-size: clamp(1.8rem, 3.2vw, 2.6rem); letter-spacing: -.015em; margin-bottom: 14px; }
.section-sub { color: var(--ink-2); max-width: 44em; margin-bottom: 28px; }
.steps { list-style: none; padding: 0; margin: 32px 0 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.steps li { background: var(--sand-bg); border-radius: var(--radius); padding: 28px; }
.steps h3 { font-size: 1.2rem; margin: 14px 0 8px; }
.steps p { color: var(--ink-2); margin: 0; }
.step-n { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: var(--ink); color: #fff; font-weight: 600; }
@media (max-width: 800px) { .steps { grid-template-columns: 1fr; } }
.benefits { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-top: 28px; }
.benefits article { background: #fff; border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow); }
.benefits h3 { font-size: 1.12rem; margin-bottom: 8px; }
.benefits p { margin: 0; color: var(--ink-2); font-size: .98rem; }
@media (max-width: 1000px) { .benefits { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .benefits { grid-template-columns: 1fr; } }

/* Studio (the product) */
.studio { background: var(--sand-bg); }
.studio-head { margin-bottom: 24px; }
.studio-grid { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 24px; align-items: start; }
@media (max-width: 1000px) { .studio-grid { grid-template-columns: 1fr; } }
.panel { background: #fff; border-radius: var(--radius); padding: clamp(18px, 2.4vw, 30px); box-shadow: var(--shadow); }
.panel + .panel { margin-top: 20px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.panel-head h3 { font-size: 1.25rem; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }
.config { position: sticky; top: 84px; }
@media (max-width: 1000px) { .config { position: static; } }
.config h3 { font-size: 1.25rem; margin-bottom: 18px; }

.dropzone { border: 2px dashed #c9c1b1; border-radius: var(--radius); padding: clamp(28px, 6vw, 64px) 20px; text-align: center; cursor: pointer; background: var(--sand-bg); transition: border-color .15s, background .15s; color: var(--ink); }
.dropzone:hover, .dropzone.drag { border-color: var(--accent); background: #f0ebe0; }
.dz-icon { width: 54px; height: 54px; margin: 0 auto 14px; color: var(--accent); }
.dz-title { font-family: var(--serif); font-size: clamp(1.2rem, 2.2vw, 1.55rem); line-height: 1.3; max-width: 22em; margin: 0 auto 12px; }
.dz-sub { margin: 0 0 6px; color: var(--ink-2); }
.dz-link { text-decoration: underline; font-weight: 600; }
.dz-meta { font-size: .85rem; color: var(--muted); margin: 0; }
.dz-mobile { display: none; }
@media (hover: none) { .dz-desktop { display: none; } .dz-mobile { display: inline; } }
.tips { list-style: none; padding: 0; margin: 18px 0 8px; display: grid; grid-template-columns: 1fr 1fr; gap: 6px 18px; color: var(--ink-2); font-size: .95rem; }
.tips li::before { content: "✓"; color: var(--accent); font-weight: 700; margin-right: 8px; }
@media (max-width: 600px) { .tips { grid-template-columns: 1fr; } }
.sample-row { font-size: .92rem; color: var(--muted); margin-top: 10px; }
.sample-row span { margin-right: 6px; }

.placement { position: relative; border-radius: 10px; overflow: hidden; touch-action: none; cursor: crosshair; background: #ddd; user-select: none; -webkit-user-select: none; }
.placement img { width: 100%; height: auto; pointer-events: none; }
.region { position: absolute; border: 2px solid #fff; outline: 2px dashed var(--ink); outline-offset: -4px; background: rgba(182, 155, 120, .25); display: grid; place-items: center; pointer-events: none; }
.region span { background: var(--ink); color: #fff; font-size: .75rem; padding: 3px 10px; border-radius: 999px; }
.placement-tools { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 12px; flex-wrap: wrap; }
.placement-tools p { margin: 0; color: var(--ink-2); font-size: .92rem; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { border: 1.5px solid var(--line); background: #fff; border-radius: 999px; min-height: 36px; padding: 0 16px; font: inherit; font-size: .9rem; cursor: pointer; }
.chip:hover { border-color: var(--ink); }
.fineprint { font-size: .85rem; color: var(--muted); margin: 10px 0 0; }
.notice { font-size: .9rem; color: var(--ink-2); background: var(--sand-bg); border-radius: 10px; padding: 10px 14px; margin: 14px 0 0; }
.error { color: var(--danger); background: #fbeeea; border-radius: 10px; padding: 10px 14px; margin: 12px 0 0; font-size: .95rem; }
.success { color: var(--ok); background: #eaf4ec; border-radius: 10px; padding: 10px 14px; margin: 12px 0 0; }

/* Config controls */
.field { border: 0; padding: 0; margin: 0 0 20px; min-width: 0; }
.field legend { font-weight: 600; font-size: .92rem; margin-bottom: 8px; padding: 0; }
.seg { display: flex; flex-wrap: wrap; gap: 8px; }
.opt-btn { position: relative; }
.opt-btn input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.opt-btn span { display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px; border: 1.5px solid var(--line); border-radius: 999px; font-size: .94rem; background: #fff; transition: border-color .12s, background .12s; }
.opt-btn input:checked + span { border-color: var(--ink); background: var(--ink); color: #fff; }
.opt-btn input:focus-visible + span { outline: 3px solid var(--accent); outline-offset: 2px; }
.opt-btn input:not(:checked):hover + span { border-color: var(--ink); }
.swatch { width: 16px; height: 16px; border-radius: 50%; border: 1px solid rgba(0, 0, 0, .25); flex: none; }
.extras { border-top: 1px solid var(--line); padding: 14px 0; }
.extras summary { cursor: pointer; font-weight: 600; font-size: .94rem; }
.pill { font-size: .7rem; font-weight: 600; background: var(--sand-bg-2); border-radius: 999px; padding: 2px 8px; margin-left: 6px; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-2); }
.extras label.check-row { display: flex; gap: 10px; align-items: center; margin-top: 12px; font-size: .94rem; }
.dims { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 12px; }
.dims label { font-size: .88rem; display: grid; gap: 4px; }
input, textarea, select { font: inherit; }
.dims input, .quote input:not([type=checkbox]), .quote textarea { width: 100%; min-height: 46px; padding: 10px 14px; border: 1.5px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink); }
.quote textarea { resize: vertical; }
.quote input:focus, .quote textarea:focus, .dims input:focus { outline: 3px solid var(--accent); outline-offset: 1px; border-color: var(--ink); }
.generate { margin-top: 6px; }
.progress { margin-top: 16px; }
.bar-track { height: 6px; border-radius: 999px; background: var(--sand-bg-2); overflow: hidden; }
.bar-fill { height: 100%; width: 40%; background: var(--ink); border-radius: 999px; animation: slide 1.4s ease-in-out infinite; }
@keyframes slide { 0% { margin-left: -40%; } 100% { margin-left: 100%; } }
.progress p { margin: 10px 0 0; font-size: .92rem; color: var(--ink-2); }

/* Concepts strip */
.concepts { margin-top: 22px; }
.concepts h4 { font-size: .95rem; margin-bottom: 10px; }
.concept-list { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.concept { position: relative; border: 2px solid transparent; border-radius: 10px; overflow: hidden; background: var(--sand-bg); }
.concept.active { border-color: var(--ink); }
.concept button.pick { display: block; width: 100%; padding: 0; border: 0; background: none; cursor: pointer; text-align: left; }
.concept img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.concept .meta { font-size: .78rem; padding: 6px 8px 8px; color: var(--ink-2); line-height: 1.3; }
.concept .fav { position: absolute; top: 6px; right: 6px; width: 34px; height: 34px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .92); cursor: pointer; font-size: 1.1rem; line-height: 1; }
.concept .fav[aria-pressed="true"] { background: var(--ink); color: #f5d98b; }

/* Quote */
.quote { margin-top: 24px; }
.quote h3 { font-family: var(--serif); font-weight: 400; font-size: 1.7rem; margin-bottom: 14px; }
.quote label { display: grid; gap: 6px; font-size: .92rem; font-weight: 600; margin-bottom: 14px; }
.quote .opt { font-weight: 400; color: var(--muted); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
@media (max-width: 640px) { .grid2 { grid-template-columns: 1fr; } }
.quote .check { display: flex; gap: 12px; align-items: flex-start; font-weight: 400; font-size: .92rem; }
.quote .check input { width: 22px; height: 22px; margin-top: 2px; flex: none; accent-color: var(--ink); }
.demo-banner { background: #fff6dd; border: 1px solid #ecd28a; border-radius: 10px; padding: 12px 14px; font-size: .92rem; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Compare slider */
.compare-slot { width: 100%; }
.cmp { --pos: 50%; position: relative; width: 100%; aspect-ratio: var(--ratio, 3 / 2); border-radius: 12px; overflow: hidden; background: #cfcac0; user-select: none; -webkit-user-select: none; touch-action: pan-y; cursor: ew-resize; box-shadow: var(--shadow); }
.cmp img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; pointer-events: none; -webkit-user-drag: none; }
.cmp .before { clip-path: inset(0 calc(100% - var(--pos)) 0 0); }
.cmp .tag { position: absolute; top: 12px; padding: 5px 12px; font-size: .74rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; background: rgba(36, 36, 36, .78); color: #fff; border-radius: 999px; pointer-events: none; }
.cmp .tag-before { left: 12px; }
.cmp .tag-after { right: 12px; background: rgba(255, 255, 255, .92); color: var(--ink); }
.cmp .handle { position: absolute; top: 0; bottom: 0; left: var(--pos); width: 44px; margin-left: -22px; display: grid; place-items: center; outline-offset: -3px; }
.cmp .handle::before { content: ""; position: absolute; top: 0; bottom: 0; left: 50%; width: 2px; margin-left: -1px; background: #fff; box-shadow: 0 0 8px rgba(0, 0, 0, .4); }
.cmp .knob { position: relative; width: 44px; height: 44px; border-radius: 50%; background: #fff; box-shadow: 0 2px 12px rgba(0, 0, 0, .35); display: grid; place-items: center; color: var(--ink); font-size: 1rem; letter-spacing: -2px; }
.cmp .handle:focus-visible { outline: 3px solid var(--accent); }
.cmp.dragging { cursor: grabbing; }
.cmp .caption { position: absolute; left: 12px; bottom: 12px; right: 12px; pointer-events: none; }
.cmp .caption span { display: inline-block; background: rgba(255, 255, 255, .92); color: var(--ink); font-size: .72rem; padding: 4px 10px; border-radius: 999px; }

/* Gallery */
.gallery { display: grid; grid-template-columns: repeat(2, 1fr); gap: 28px; }
@media (max-width: 800px) { .gallery { grid-template-columns: 1fr; } }
.scene h3 { font-size: 1.2rem; margin: 16px 0 6px; }
.scene p { color: var(--ink-2); margin: 0 0 10px; font-size: .96rem; }
.scene .chips { margin: 6px 0 12px; }
.tag-chip { font-size: .78rem; background: var(--sand-bg); border-radius: 999px; padding: 3px 10px; color: var(--ink-2); }

/* FAQ, CTA, footer */
details { border-bottom: 1px solid var(--line); padding: 16px 0; }
details summary { cursor: pointer; font-weight: 600; }
details p { margin: 12px 0 0; color: var(--ink-2); }
.cta-band { background: var(--ink); color: #fff; padding: clamp(48px, 7vw, 88px) 0; text-align: center; }
.cta-band h2 { font-family: var(--serif); font-weight: 400; font-size: clamp(1.9rem, 4vw, 3rem); margin-bottom: 26px; }
.site-footer { padding: 36px 0 52px; background: #1a1a1a; color: #cfcac0; font-size: .92rem; }
.site-footer a { color: #fff; }
.site-footer .fineprint { color: #a9a49a; }

/* Lightbox */
.lightbox { position: fixed; inset: 0; background: rgba(10, 10, 10, .96); z-index: 100; display: grid; place-items: center; padding: 56px 16px 16px; }
.lb-inner { width: min(1400px, 100%); max-height: 100%; }
.lb-inner .cmp { width: 100%; max-width: calc((100vh - 110px) * var(--ratio-n, 1.5)); margin-inline: auto; }
.lb-close { position: absolute; top: 10px; right: 14px; width: 44px; height: 44px; border-radius: 50%; border: 0; background: #fff; font-size: 1.8rem; line-height: 1; cursor: pointer; }
.static-page { padding: 56px 0 80px; }
.static-page h1 { font-size: clamp(2rem, 4vw, 2.8rem); }
.static-page h2 { font-size: 1.3rem; margin: 28px 0 8px; font-family: var(--sans); font-weight: 600; }

/* Small screens: keep the header on one line */
.btn-small { white-space: nowrap; }
@media (max-width: 480px) { .bar { gap: 10px; } .brand { font-size: .92rem; line-height: 1.2; } .bar .btn-small { padding: 0 14px; font-size: .85rem; } }
