/* Styles for the 3D design studio, process steps, payment band, policy pages,
   branded scroll indicator and the mobile contact bar. Uses the colour and
   radius tokens defined in site.css. */

/* ---------- Branded scroll indicator ---------- */
.scroll-progress { position: fixed; inset: 0 0 auto 0; z-index: 2100; height: 3px; pointer-events: none; }
.scroll-progress span { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), var(--gold)); transform: scaleX(0); transform-origin: 0 50%; }

.brand-scroll { position: fixed; left: 20px; bottom: 20px; z-index: 1280; display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; background: var(--surface); color: var(--brand); box-shadow: var(--shadow-soft); opacity: 0; visibility: hidden; transform: translateY(10px); transition: opacity var(--transition), transform var(--transition), visibility var(--transition); }
.brand-scroll.is-visible { opacity: 1; visibility: visible; transform: none; }
.brand-scroll:hover { color: var(--accent-strong); }
.brand-scroll:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.brand-scroll__ring { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); fill: none; stroke-width: 3; }
.brand-scroll__ring circle { stroke: var(--border); }
.brand-scroll__ring circle + circle { stroke: var(--accent); stroke-linecap: round; }
.brand-scroll__icon { width: 22px; height: 22px; }

/* ---------- Scroll reveal (hidden state is only ever applied by experience.js) ---------- */
.will-reveal { opacity: 0; transform: translateY(18px); }
.will-reveal.is-revealed { opacity: 1; transform: none; transition: opacity 480ms ease, transform 480ms ease; }

/* ---------- Mobile contact bar ---------- */
.mobile-cta { display: none; }

/* ---------- Process ---------- */
.process-icon { display: inline-grid; place-items: center; flex-shrink: 0; width: 52px; height: 52px; border-radius: var(--radius-sm); background: var(--accent-soft); color: var(--accent-strong); }
.process-icon svg { width: 26px; height: 26px; }

.home-process--icons { margin: 0; padding: 0; list-style: none; counter-reset: none; }
.home-process--icons li { position: relative; padding-top: 24px; border-top: 2px solid var(--border); }
.home-process--icons li::before { content: ""; position: absolute; top: -2px; left: 0; width: 52px; height: 2px; background: var(--accent); }
.home-process--icons .eyebrow { display: flex; margin: 16px 0 0; }
.home-process--icons .eyebrow::before { display: none; }

.process-timeline { display: grid; gap: 0; max-width: 860px; margin: 0; padding: 0; list-style: none; }
.process-step { position: relative; display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 22px; padding-bottom: 34px; }
.process-step::before { content: ""; position: absolute; top: 52px; bottom: 0; left: 25px; width: 2px; background: var(--border); }
.process-step:last-child { padding-bottom: 0; }
.process-step:last-child::before { display: none; }
.process-step__body { padding: 20px 22px; border: 1px solid rgba(69, 51, 66, 0.08); border-radius: var(--radius-md); background: var(--surface); box-shadow: var(--shadow-soft); }
.process-step__body .eyebrow { margin-bottom: 6px; }
.process-step__body .eyebrow::before { display: none; }
.process-step__body h3 { margin: 0 0 8px; font-size: 1.25rem; }
.process-step__body p { margin: 0; color: var(--muted-strong); }
.process-step__body .process-step__outcome { margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--border); color: var(--text); }

.payment-band { margin-top: 36px; padding: 26px; border-radius: var(--radius-md); background: var(--brand); color: #f4ecef; }
.section-heading + .payment-band { margin-top: 0; }
.payment-band ul { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; margin: 0; padding: 0; list-style: none; }
.payment-band li { display: flex; gap: 16px; align-items: flex-start; }
.payment-band .process-icon { background: rgba(255, 255, 255, 0.12); color: #ffd9a8; }
.payment-band h3 { margin: 2px 0 6px; color: #fff; font-size: 1.05rem; }
.payment-band p { margin: 0; color: #dccfd6; font-size: 0.95rem; }
.payment-band__links { display: flex; flex-wrap: wrap; gap: 10px 28px; margin-top: 22px; padding-top: 18px; border-top: 1px solid rgba(255, 255, 255, 0.16); }
.payment-band__links .text-link { color: #ffd9a8; }
.payment-band__links .text-link:hover { text-decoration: underline; text-underline-offset: 4px; }

/* ---------- 3D design studio ---------- */
.studio3d__layout { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 32px; align-items: start; }
.studio3d__tabs { display: flex; gap: 8px; margin-bottom: 14px; overflow-x: auto; scrollbar-width: none; }
.studio3d__tabs::-webkit-scrollbar { display: none; }
.studio3d__tabs button { flex-shrink: 0; min-height: 44px; padding: 8px 18px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); color: var(--muted-strong); font-weight: 600; transition: background var(--transition), color var(--transition), border-color var(--transition); }
.studio3d__tabs button.is-active { border-color: var(--brand); background: var(--brand); color: #fff; }

.studio3d__view { position: relative; overflow: hidden; aspect-ratio: 4 / 3; border: 1px solid rgba(69, 51, 66, 0.08); border-radius: var(--radius-lg); background: radial-gradient(120% 90% at 50% 20%, #fffaf5 0%, #f3e8e2 60%, #e6d6d0 100%); box-shadow: var(--shadow-soft); }
.studio3d__view picture, .studio3d__poster { position: absolute; inset: 0; width: 100%; height: 100%; }
.studio3d__poster { object-fit: cover; }
.studio3d__poster[hidden], .studio3d__view picture:has(> img[hidden]) { display: none; }
.studio3d.is-live .studio3d__view picture, .studio3d.is-live .studio3d__poster { display: none; }
.studio3d__view canvas { position: absolute; inset: 0; width: 100%; height: 100%; cursor: grab; touch-action: pan-y; outline-offset: -4px; }
.studio3d__view canvas.is-dragging { cursor: grabbing; }
.studio3d__view canvas:focus-visible { outline: 2px solid var(--accent); }
.studio3d__status { position: absolute; inset: auto 14px 14px 14px; margin: 0; padding: 10px 14px; border-radius: 12px; background: rgba(47, 37, 51, 0.82); color: #fff; font-size: 0.9rem; text-align: center; }
.studio3d__start { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); }
.studio3d__hint, .studio3d__zoom { display: none; position: absolute; bottom: 14px; }
.studio3d.is-live .studio3d__hint, .studio3d.is-live .studio3d__zoom { display: flex; }
.studio3d__hint { left: 14px; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px; background: rgba(255, 255, 255, 0.88); color: var(--muted-strong); font-size: 0.85rem; font-weight: 600; pointer-events: none; }
.studio3d__hint svg { width: 16px; height: 16px; }
.studio3d__zoom { right: 14px; gap: 6px; }
.studio3d__zoom button { display: grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: 14px; background: rgba(255, 255, 255, 0.92); color: var(--brand); font-size: 1.3rem; line-height: 1; box-shadow: var(--shadow-soft); }
.studio3d__zoom svg { width: 18px; height: 18px; }
.studio3d__note { margin: 12px 0 0; color: var(--muted); font-size: 0.85rem; }

.studio3d__panel { display: grid; gap: 22px; padding: 26px; border: 1px solid rgba(69, 51, 66, 0.08); border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--shadow-soft); }
.studio3d__info h3 { margin: 0 0 8px; font-size: 1.35rem; }
.studio3d__info p { margin: 0 0 12px; color: var(--muted-strong); }
.studio3d__info ul { margin: 0 0 14px; padding-left: 20px; color: var(--muted-strong); }
.studio3d__info li + li { margin-top: 4px; }
.studio3d__control { padding-top: 20px; border-top: 1px solid var(--border); }
.studio3d__control h4 { margin: 0 0 12px; color: var(--muted); font-size: 0.78rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; }
.studio3d__steps { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.studio3d__steps button, .studio3d__swatches button { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 8px 12px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); color: var(--muted-strong); font-size: 0.92rem; font-weight: 600; text-align: left; transition: background var(--transition), border-color var(--transition), color var(--transition); }
.studio3d__steps button span { display: grid; place-items: center; flex-shrink: 0; width: 24px; height: 24px; border-radius: 50%; background: var(--surface-muted); font-size: 0.8rem; }
.studio3d__steps button.is-active, .studio3d__swatches button.is-active { border-color: var(--accent); background: var(--accent-soft); color: var(--brand-deep); }
.studio3d__steps button.is-active span { background: var(--accent); color: #fff; }
.studio3d__stage-text { margin: 12px 0 0; color: var(--muted-strong); font-size: 0.95rem; }
.studio3d__swatches { display: flex; flex-wrap: wrap; gap: 8px; }
.studio3d__swatches button span { width: 20px; height: 20px; border-radius: 50%; box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.7); }
.studio3d__panel .detail-actions { margin: 0; }
.studio3d button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------- Compact page hero and policy pages ---------- */
.page-hero--compact { padding: 44px 0 20px; }
.page-hero--compact h1 { max-width: 820px; }
.page-hero--compact .lead { max-width: 760px; margin-top: 14px; }
.legal-updated { margin: 14px 0 0; color: var(--muted); font-size: 0.9rem; }

.legal-layout { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 48px; align-items: start; }
.legal-toc { position: sticky; top: 200px; padding: 22px; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface); }
.legal-toc h2 { margin: 0 0 10px; color: var(--muted); font-size: 0.78rem; letter-spacing: 0.14em; text-transform: uppercase; }
.legal-toc ol, .legal-toc ul { margin: 0 0 20px; padding: 0; list-style: none; }
.legal-toc ul { margin-bottom: 0; }
.legal-toc a { display: block; padding: 6px 0; color: var(--muted-strong); font-size: 0.94rem; }
.legal-toc a:hover { color: var(--accent-strong); }
.legal-copy { display: grid; gap: 34px; max-width: 760px; }
.legal-copy h2 { margin: 0 0 12px; font-size: clamp(1.3rem, 2.2vw, 1.6rem); }
.legal-copy p, .legal-copy li { color: var(--muted-strong); font-size: 1.02rem; line-height: 1.8; }
.legal-copy p { margin: 0 0 12px; }
.legal-copy ul { margin: 0 0 12px; padding-left: 22px; }
.legal-copy li + li { margin-top: 8px; }
.legal-copy section > :last-child { margin-bottom: 0; }

.premium-footer__legal { padding: 20px 0; border-top: 1px solid #63505f; }
.premium-footer__legal ul { display: flex; flex-wrap: wrap; gap: 8px 24px; margin: 0; padding: 0; list-style: none; font-size: 13px; }
.form-meta a { text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Icon ribbon (replaces the text-only brand ribbon) ---------- */
.brand-ribbon__window { padding: 16px 0; }
.brand-ribbon__track { animation-duration: 48s; }
.brand-ribbon__group { gap: 14px; padding-right: 14px; }
.brand-ribbon__item { display: inline-flex; align-items: center; gap: 12px; padding: 8px 20px 8px 8px; border: 1px solid rgba(255, 255, 255, 0.16); border-radius: 999px; background: rgba(255, 255, 255, 0.06); color: #fff; font-family: var(--font-heading); font-size: 0.98rem; font-weight: 700; white-space: nowrap; }
.brand-ribbon__icon { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--accent); color: #fff; }
.brand-ribbon__icon svg { width: 22px; height: 22px; }
.brand-ribbon__logo { display: grid; place-items: center; height: 56px; padding: 0 22px; border-radius: 999px; background: #fff; }
.brand-ribbon__logo img { width: auto; height: 34px; }

/* The 3D studio now opens the home page, directly under the ribbon. */
.brand-ribbon + .studio3d { padding-top: 52px; background: linear-gradient(180deg, #fff 0%, var(--bg) 100%); }
.studio3d__swatches button { min-height: 44px; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .studio3d__layout { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .payment-band ul { grid-template-columns: 1fr; gap: 18px; }
  .legal-layout { grid-template-columns: 1fr; gap: 28px; }
  .legal-toc { position: static; }
}

@media (max-width: 640px) {
  /* Thumb-reach contact bar. The WhatsApp bubble is hidden because the bar repeats it. */
  body { padding-bottom: calc(60px + env(safe-area-inset-bottom)); }
  .mobile-cta { position: fixed; inset: auto 0 0 0; z-index: 1270; display: grid; grid-template-columns: 1fr 1fr 1.25fr; padding-bottom: env(safe-area-inset-bottom); border-top: 1px solid var(--border); background: var(--surface); box-shadow: 0 -8px 24px rgba(46, 27, 39, 0.1); }
  .mobile-cta a { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 60px; color: var(--brand); font-size: 0.92rem; font-weight: 700; }
  .mobile-cta a + a { border-left: 1px solid var(--border); }
  .mobile-cta svg { width: 20px; height: 20px; }
  .mobile-cta .mobile-cta__whatsapp { color: #128c4b; }
  .mobile-cta .mobile-cta__primary { border-left: 0; background: var(--accent); color: #fff; }
  .floating-stack { bottom: calc(72px + env(safe-area-inset-bottom)); }
  .floating-stack .fab--whatsapp { display: none; }
  .support-drawer { bottom: calc(128px + env(safe-area-inset-bottom)); }
  .brand-scroll { left: 14px; bottom: calc(72px + env(safe-area-inset-bottom)); width: 44px; height: 44px; }

  .studio3d__view { aspect-ratio: 1 / 1; border-radius: var(--radius-md); }
  .studio3d .section-heading h2 { font-size: clamp(1.6rem, 7vw, 2rem); }
  .brand-ribbon + .studio3d { padding-top: 32px; }
  .brand-ribbon__window { padding: 12px 0; }
  .brand-ribbon__item { gap: 10px; padding: 6px 16px 6px 6px; font-size: 0.9rem; }
  .brand-ribbon__icon { width: 34px; height: 34px; }
  .brand-ribbon__icon svg { width: 19px; height: 19px; }
  .brand-ribbon__logo { height: 46px; padding: 0 16px; }
  .brand-ribbon__logo img { height: 28px; }
  .studio3d__steps button, .studio3d__swatches button { padding: 8px 10px; font-size: 0.88rem; }
  /* Keep the cookie notice to one tidy row on phones. */
  .cookie-bar__inner { justify-content: space-between; text-align: left; line-height: 1.35; }
  .cookie-bar__link { flex-shrink: 0; white-space: nowrap; }
  .studio3d__panel { padding: 20px; }
  .studio3d__hint { font-size: 0.8rem; }
  .process-step { grid-template-columns: 44px minmax(0, 1fr); gap: 14px; padding-bottom: 22px; }
  .process-step::before { top: 44px; left: 21px; }
  .process-step .process-icon { width: 44px; height: 44px; }
  .process-step .process-icon svg { width: 22px; height: 22px; }
  .process-step__body { padding: 16px; }
  .payment-band { padding: 20px; }
  .page-hero--compact { padding: 28px 0 12px; }
}

@media (prefers-reduced-motion: reduce) {
  .will-reveal { opacity: 1; transform: none; }
}

/* Buttons and overlays set display themselves, so the hidden attribute needs restating. */
.studio3d [hidden] { display: none !important; }
.studio3d__stage, .studio3d__panel { min-width: 0; }
