/* =========================================================
   Studio Vela — demo-styles.css
   Shared layout for all 6 concept demos.
   Each demo sets its own palette + fonts via body[data-demo].
   ========================================================= */

:root {
  --d-maxw: 1100px;
  --d-radius: 12px;
  --d-radius-lg: 20px;
  --d-pill: 50px;
  --ds-1: 4px; --ds-2: 8px; --ds-3: 12px; --ds-4: 16px;
  --ds-5: 24px; --ds-6: 32px; --ds-7: 48px; --ds-8: 64px; --ds-9: 96px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--body-font, system-ui, sans-serif);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
h1, h2, h3, h4 { font-family: var(--head-font, var(--body-font)); line-height: 1.08; font-weight: 700; letter-spacing: -0.01em; }

.d-container { width: 100%; max-width: var(--d-maxw); margin: 0 auto; padding: 0 20px; }
.d-section { padding: var(--ds-8) 0; }

:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.d-skip { position: absolute; left: -999px; top: 0; background: var(--text); color: var(--bg); padding: 10px 16px; z-index: 200; }
.d-skip:focus { left: 0; }

/* Demo ribbon (top) */
.demo-ribbon {
  background: var(--accent);
  color: var(--accent-ink, #fff);
  text-align: center;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 8px 16px;
  letter-spacing: 0.02em;
}
.demo-ribbon a { text-decoration: underline; font-weight: 700; }

/* Header */
.d-header {
  position: sticky; top: 0; z-index: 100;
  background: var(--bg-blur);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.d-nav { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.d-logo { font-family: var(--head-font, var(--body-font)); font-weight: 800; font-size: 1.2rem; letter-spacing: 0.02em; display: inline-flex; align-items: center; gap: 8px; }
.d-logo .lmark { width: 30px; height: 30px; border-radius: 8px; background: var(--accent); color: var(--accent-ink, #fff); display: grid; place-items: center; font-size: 0.9rem; }
.d-nav-links { display: none; gap: var(--ds-6); font-size: 0.92rem; font-weight: 500; }
.d-nav-links a { color: var(--muted); transition: color 0.2s; }
.d-nav-links a:hover { color: var(--text); }

/* Buttons */
.d-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--body-font); font-weight: 600; font-size: 0.95rem;
  padding: 13px 24px; border-radius: var(--d-pill); border: 1.5px solid transparent;
  cursor: pointer; transition: transform 0.2s, box-shadow 0.2s, background 0.2s, color 0.2s;
  min-height: 46px;
}
.d-btn-lg { padding: 16px 30px; font-size: 1.02rem; }
.d-btn-primary { background: var(--accent); color: var(--accent-ink, #fff); }
.d-btn-primary:hover { transform: translateY(-2px); box-shadow: 0 16px 36px -18px var(--accent); filter: brightness(1.05); }
.d-btn-ghost { background: transparent; border-color: currentColor; color: var(--text); }
.d-btn-ghost:hover { background: var(--text); color: var(--bg); transform: translateY(-2px); }

/* Hero */
.d-hero { position: relative; padding: var(--ds-8) 0 var(--ds-7); overflow: hidden; }
.d-eyebrow { display: inline-block; font-size: 0.76rem; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: var(--accent); margin-bottom: var(--ds-4); }
.d-hero h1 { font-size: clamp(2.3rem, 7vw, 4rem); margin-bottom: var(--ds-4); }
.d-hero .d-lead { font-size: clamp(1.05rem, 2.5vw, 1.2rem); color: var(--muted); max-width: 34em; margin-bottom: var(--ds-6); }
.d-hero-actions { display: flex; flex-wrap: wrap; gap: var(--ds-3); }

/* Trust strip */
.d-strip { background: var(--strip-bg, var(--text)); color: var(--strip-text, var(--bg)); }
.d-strip-inner { display: flex; flex-wrap: wrap; gap: var(--ds-5); justify-content: center; padding: var(--ds-5) 20px; font-size: 0.92rem; font-weight: 500; text-align: center; }
.d-strip-inner span { display: inline-flex; align-items: center; gap: 8px; }

/* Section heads */
.d-head { max-width: 40em; margin-bottom: var(--ds-7); }
.d-tag { display: inline-block; font-size: 0.76rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent); margin-bottom: var(--ds-3); }
.d-head h2 { font-size: clamp(1.7rem, 4.5vw, 2.6rem); margin-bottom: var(--ds-3); }
.d-head p { color: var(--muted); font-size: 1.05rem; }
.d-center { text-align: center; margin-left: auto; margin-right: auto; }

/* Cards / grids */
.d-grid-2 { display: grid; grid-template-columns: 1fr; gap: var(--ds-5); }
.d-grid-3 { display: grid; grid-template-columns: 1fr; gap: var(--ds-4); }
.d-card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--d-radius-lg); padding: var(--ds-6) var(--ds-5);
  transition: transform 0.25s, box-shadow 0.25s;
}
.d-card:hover { transform: translateY(-5px); box-shadow: 0 24px 50px -30px rgba(0,0,0,0.5); }
.d-card h3 { font-size: 1.2rem; margin-bottom: var(--ds-2); }
.d-card p { color: var(--muted); font-size: 0.95rem; }

/* Price list rows */
.d-pricelist { display: flex; flex-direction: column; gap: var(--ds-2); }
.d-price-row { display: flex; justify-content: space-between; align-items: baseline; gap: var(--ds-4); padding: var(--ds-4) 0; border-bottom: 1px dashed var(--line); }
.d-price-row .pr-name { font-weight: 600; font-size: 1.02rem; }
.d-price-row .pr-desc { color: var(--muted); font-size: 0.88rem; display: block; font-weight: 400; }
.d-price-row .pr-val { font-family: var(--head-font, var(--body-font)); font-weight: 700; color: var(--accent); white-space: nowrap; }

/* Gallery tiles (CSS-only, no images) */
.d-gallery { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--ds-3); }
.d-tile { aspect-ratio: 1/1; border-radius: var(--d-radius); position: relative; overflow: hidden; display: grid; place-items: center; font-size: 0.8rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; }
.d-tile span { position: relative; z-index: 2; opacity: 0.85; }
.d-tile::after { content: ""; position: absolute; inset: 0; opacity: 0.5; }

/* Steps */
.d-steps { display: grid; grid-template-columns: 1fr; gap: var(--ds-5); counter-reset: dstep; }
.d-step { position: relative; padding-left: 56px; }
.d-step::before {
  counter-increment: dstep; content: counter(dstep, decimal-leading-zero);
  position: absolute; left: 0; top: 0;
  font-family: var(--head-font, var(--body-font)); font-weight: 800; font-size: 1.6rem; color: var(--accent);
}
.d-step h3 { font-size: 1.1rem; margin-bottom: var(--ds-1); }
.d-step p { color: var(--muted); font-size: 0.93rem; }

/* Hours table */
.d-hours { display: flex; flex-direction: column; gap: var(--ds-1); max-width: 420px; }
.d-hours div { display: flex; justify-content: space-between; padding: var(--ds-3) 0; border-bottom: 1px solid var(--line); font-size: 0.97rem; }
.d-hours div span:last-child { color: var(--muted); }

/* Zones / tags */
.d-tags { display: flex; flex-wrap: wrap; gap: var(--ds-2); }
.d-tagchip { background: var(--surface); border: 1px solid var(--line); padding: 8px 16px; border-radius: var(--d-pill); font-weight: 500; font-size: 0.9rem; }

/* FAQ */
.d-faq { max-width: 760px; }
.d-faq details { border-bottom: 1px solid var(--line); }
.d-faq summary { display: flex; justify-content: space-between; align-items: center; gap: var(--ds-4); padding: var(--ds-5) 0; cursor: pointer; font-family: var(--head-font, var(--body-font)); font-weight: 700; font-size: 1.05rem; list-style: none; }
.d-faq summary::-webkit-details-marker { display: none; }
.d-faq summary::after { content: "+"; font-size: 1.4rem; color: var(--accent); transition: transform 0.25s; line-height: 1; }
.d-faq details[open] summary::after { transform: rotate(45deg); }
.d-faq .d-faq-body { padding-bottom: var(--ds-5); color: var(--muted); font-size: 0.98rem; }

/* Banner CTA */
.d-banner { background: var(--accent); color: var(--accent-ink, #fff); text-align: center; }
.d-banner h2 { color: inherit; font-size: clamp(1.6rem, 4.5vw, 2.5rem); margin-bottom: var(--ds-3); }
.d-banner p { opacity: 0.9; margin-bottom: var(--ds-5); font-size: 1.05rem; }
.d-banner .d-btn-primary { background: var(--bg); color: var(--text); }
.d-banner .d-btn-primary:hover { filter: none; background: var(--text); color: var(--bg); }

/* Disclaimer note */
.d-disclaimer { background: var(--surface); border: 1px dashed var(--line); border-radius: var(--d-radius); padding: var(--ds-4) var(--ds-5); font-size: 0.9rem; color: var(--muted); margin-top: var(--ds-6); }

/* Footer */
.d-footer { background: var(--footer-bg, var(--text)); color: var(--footer-text, rgba(255,255,255,0.7)); padding: var(--ds-8) 0 var(--ds-6); }
.d-footer-grid { display: grid; grid-template-columns: 1fr; gap: var(--ds-6); padding-bottom: var(--ds-6); border-bottom: 1px solid var(--footer-line, rgba(255,255,255,0.14)); }
.d-footer h4 { color: var(--footer-h, #fff); font-family: var(--body-font); font-size: 0.78rem; letter-spacing: 0.12em; text-transform: uppercase; margin-bottom: var(--ds-4); }
.d-footer ul { display: flex; flex-direction: column; gap: var(--ds-2); font-size: 0.92rem; }
.d-footer-about { font-size: 0.92rem; max-width: 26em; }
.d-footer .d-logo { color: var(--footer-h, #fff); margin-bottom: var(--ds-3); }
.d-studio-note { display: flex; flex-wrap: wrap; gap: var(--ds-2) var(--ds-4); justify-content: space-between; align-items: center; padding-top: var(--ds-5); font-size: 0.85rem; }
.d-studio-note a { color: var(--accent); font-weight: 600; text-decoration: underline; }

/* Sticky mobile CTA bar (used by urgent/booking demos) */
.d-mobile-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 90; display: flex; gap: 1px; background: var(--line); box-shadow: 0 -10px 30px -20px rgba(0,0,0,0.5); }
.d-mobile-bar a { flex: 1; text-align: center; padding: 15px 8px; font-weight: 700; font-size: 0.92rem; min-height: 52px; display: flex; align-items: center; justify-content: center; }
.d-mbar-primary { background: var(--accent); color: var(--accent-ink, #fff); }
.d-mbar-secondary { background: var(--surface); color: var(--text); }
.has-mobile-bar .d-footer { padding-bottom: 84px; }

/* Reveal */
.d-reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.7s cubic-bezier(0.2,0.7,0.2,1), transform 0.7s cubic-bezier(0.2,0.7,0.2,1); }
.d-reveal.in { opacity: 1; transform: none; }

/* Responsive */
@media (min-width: 640px) {
  .d-container { padding: 0 28px; }
  .d-grid-2 { grid-template-columns: 1fr 1fr; }
  .d-grid-3 { grid-template-columns: 1fr 1fr; }
  .d-gallery { grid-template-columns: repeat(3, 1fr); }
  .d-steps { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 1024px) {
  .d-nav-links { display: flex; }
  .d-grid-3 { grid-template-columns: repeat(3, 1fr); }
  .d-steps { grid-template-columns: repeat(4, 1fr); }
  .d-footer-grid { grid-template-columns: 1.6fr 1fr 1fr; }
  .d-mobile-bar { display: none; }
  .has-mobile-bar .d-footer { padding-bottom: var(--ds-6); }
  .d-split { display: grid; grid-template-columns: 1fr 1fr; gap: var(--ds-7); align-items: center; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .d-reveal { opacity: 1; transform: none; }
}

/* ============================================================
   ENRICHMENT COMPONENTS (forms, media, badges, testimonials)
   ============================================================ */

/* Media placeholder panels (not empty gray boxes) */
.d-media {
  position: relative; border-radius: var(--d-radius-lg); overflow: hidden;
  display: flex; align-items: flex-end; min-height: 200px;
  border: 1px solid var(--line);
}
.d-media::before { content: ""; position: absolute; inset: 0; opacity: 0.9; }
.d-media::after {
  content: ""; position: absolute; inset: 0; z-index: 1;
  background-image: radial-gradient(circle at 1px 1px, rgba(255,255,255,0.12) 1px, transparent 0);
  background-size: 22px 22px; opacity: 0.5;
}
.d-media-label {
  position: relative; z-index: 3; margin: var(--ds-4);
  background: rgba(0,0,0,0.55); backdrop-filter: blur(4px);
  color: #fff; font-size: 0.78rem; font-weight: 500; line-height: 1.4;
  padding: 8px 12px; border-radius: 8px; max-width: 92%;
}
.d-media-label b { display: block; font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; opacity: 0.7; margin-bottom: 2px; }
.d-media-tall { min-height: 320px; }
.d-media-wide { min-height: 240px; }

/* Service detail card with price + duration chips */
.d-svc-detail {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--d-radius-lg); padding: var(--ds-6) var(--ds-5);
  display: flex; flex-direction: column; gap: var(--ds-3);
  transition: transform 0.25s, box-shadow 0.25s;
}
.d-svc-detail:hover { transform: translateY(-4px); box-shadow: 0 22px 46px -28px rgba(0,0,0,0.45); }
.d-svc-head { display: flex; justify-content: space-between; align-items: baseline; gap: var(--ds-3); }
.d-svc-head h3 { font-size: 1.18rem; }
.d-svc-price { font-family: var(--head-font, var(--body-font)); font-weight: 700; color: var(--accent); white-space: nowrap; font-size: 1.05rem; }
.d-svc-detail p { color: var(--muted); font-size: 0.93rem; }
.d-svc-for { font-size: 0.85rem; color: var(--text); opacity: 0.75; }
.d-chips { display: flex; flex-wrap: wrap; gap: var(--ds-2); margin-top: auto; padding-top: var(--ds-2); }
.d-chip { font-size: 0.76rem; font-weight: 600; padding: 5px 11px; border-radius: var(--d-pill); background: var(--bg); border: 1px solid var(--line); color: var(--muted); }
.d-chip-accent { background: var(--accent); color: var(--accent-ink, #fff); border-color: transparent; }

/* Forms */
.d-form { background: var(--surface); border: 1px solid var(--line); border-radius: var(--d-radius-lg); padding: var(--ds-6); }
.d-form-grid { display: grid; grid-template-columns: 1fr; gap: var(--ds-4); }
.d-field { display: flex; flex-direction: column; gap: 6px; }
.d-field.d-col-2 { grid-column: auto; }
.d-field label { font-size: 0.85rem; font-weight: 600; color: var(--text); }
.d-field input, .d-field select, .d-field textarea {
  width: 100%; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px;
  font-family: inherit; font-size: 0.95rem; background: var(--bg); color: var(--text);
  transition: border-color 0.2s; min-height: 46px;
}
.d-field input:focus, .d-field select:focus, .d-field textarea:focus { outline: none; border-color: var(--accent); }
.d-field textarea { min-height: 96px; resize: vertical; }
.d-upload {
  border: 1.5px dashed var(--line); border-radius: 10px; padding: var(--ds-4);
  text-align: center; font-size: 0.88rem; color: var(--muted); cursor: not-allowed;
}
.d-form-note { font-size: 0.82rem; color: var(--muted); margin-top: var(--ds-3); display: flex; align-items: center; gap: 8px; }
.d-form-note::before { content: "ⓘ"; color: var(--accent); font-style: normal; }
.d-form-status {
  margin-top: var(--ds-3); padding: var(--ds-3) var(--ds-4); border-radius: 10px;
  background: var(--accent); color: var(--accent-ink, #fff); font-size: 0.9rem; font-weight: 500;
}
.d-form .d-btn { margin-top: var(--ds-2); }

/* Problem selector (plumber) */
.d-selector { display: flex; flex-wrap: wrap; gap: var(--ds-2); }
.d-select-chip {
  background: var(--surface); border: 1.5px solid var(--line); color: var(--text);
  padding: 12px 18px; border-radius: var(--d-pill); font-family: inherit; font-weight: 600;
  font-size: 0.92rem; cursor: pointer; transition: border-color 0.2s, background 0.2s; min-height: 46px;
}
.d-select-chip[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink, #fff); border-color: transparent; }
.d-select-result { margin-top: var(--ds-4); padding: var(--ds-4); background: var(--surface); border: 1px solid var(--line); border-radius: var(--d-radius); font-size: 0.95rem; }
.d-select-result .d-select-output { font-weight: 700; color: var(--accent); }

/* Badges / values */
.d-values { display: grid; grid-template-columns: 1fr; gap: var(--ds-4); }
.d-value { display: flex; gap: var(--ds-3); align-items: flex-start; }
.d-value-ic { width: 40px; height: 40px; border-radius: 10px; background: var(--accent); color: var(--accent-ink, #fff); display: grid; place-items: center; flex: none; font-weight: 700; font-family: var(--head-font, var(--body-font)); }
.d-value h4 { font-size: 1rem; margin-bottom: 2px; }
.d-value p { font-size: 0.9rem; color: var(--muted); }

/* Testimonials (clearly fictional) */
.d-testi-note { font-size: 0.8rem; color: var(--muted); font-style: italic; margin-bottom: var(--ds-5); }
.d-testi-grid { display: grid; grid-template-columns: 1fr; gap: var(--ds-4); }
.d-testi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--d-radius-lg); padding: var(--ds-5); }
.d-testi p { font-size: 0.96rem; margin-bottom: var(--ds-4); }
.d-testi-who { display: flex; align-items: center; gap: var(--ds-3); }
.d-testi-av { width: 40px; height: 40px; border-radius: 50%; background: var(--accent); color: var(--accent-ink, #fff); display: grid; place-items: center; font-weight: 700; }
.d-testi-who b { font-size: 0.9rem; }
.d-testi-who span { display: block; font-size: 0.8rem; color: var(--muted); }

/* Info / hours panel pairing */
.d-info-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--d-radius-lg); padding: var(--ds-6); }
.d-info-card h3 { font-size: 1.1rem; margin-bottom: var(--ds-4); }
.d-info-row { display: flex; gap: var(--ds-3); align-items: flex-start; padding: var(--ds-2) 0; font-size: 0.95rem; }
.d-info-row .d-info-k { font-weight: 600; min-width: 90px; }
.d-info-row .d-info-v { color: var(--muted); }
.d-info-v a { color: var(--accent); }

/* Demo clarity banner (in-page) */
.d-demo-note {
  background: var(--surface); border: 1px dashed var(--line); border-radius: var(--d-radius);
  padding: var(--ds-4) var(--ds-5); font-size: 0.88rem; color: var(--muted); line-height: 1.5;
}
.d-demo-note strong { color: var(--text); }

/* Newsletter (boutique) */
.d-news { display: flex; flex-direction: column; gap: var(--ds-3); max-width: 460px; }
.d-news-row { display: flex; gap: var(--ds-2); }
.d-news-row input { flex: 1; padding: 13px 16px; border: 1px solid var(--line); border-radius: var(--d-pill); background: var(--bg); color: var(--text); font-family: inherit; min-height: 46px; }
.d-news-row input:focus { outline: none; border-color: var(--accent); }

/* Section rhythm helpers */
.d-pad-sm { padding: var(--ds-7) 0; }
.d-bleed { border-radius: var(--d-radius-lg); }

@media (min-width: 640px) {
  .d-form-grid { grid-template-columns: 1fr 1fr; }
  .d-field.d-col-2 { grid-column: 1 / -1; }
  .d-values { grid-template-columns: 1fr 1fr; }
  .d-testi-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 1024px) {
  .d-values { grid-template-columns: repeat(4, 1fr); }
}
