/* Shared base for DOTforlife demo sites. Each site sets its own tokens in :root (colours, fonts, radius).
   Source: _demo-engine/ (copied into each demo's assets/ by _demo-engine/sync.sh). */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 90px; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 var(--fs, 17px)/1.6 var(--text); -webkit-font-smoothing: antialiased; overflow-x: clip; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3, h4, p, ul, ol, figure, blockquote, dl, dd { margin: 0; }
ul, ol { padding: 0; list-style: none; }
::selection { background: var(--accent); color: var(--accent-ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
.wrap { width: 100%; max-width: calc(var(--wrap, 1280px) + 2 * var(--gut)); margin: 0 auto; padding: 0 var(--gut); }
:root { --gut: clamp(18px, 4.5vw, 56px); --ease: cubic-bezier(.2, .7, .1, 1); --ease-io: cubic-bezier(.65, 0, .35, 1); }
.skip { position: fixed; left: 16px; top: -60px; z-index: 100; background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: 99px; text-decoration: none; }
.skip:focus { top: 16px; }
.display { font-family: var(--display); font-weight: var(--display-w, 600); letter-spacing: var(--display-ls, -.03em); line-height: .98; text-wrap: balance; }
.eyebrow { font: 600 12.5px/1 var(--text); letter-spacing: .16em; text-transform: uppercase; color: var(--accent); }
.muted { color: var(--mute); }
.sec { position: relative; padding: clamp(88px, 12vw, 168px) 0; }

/* nav: transparent over the hero, solid after, hides while scrolling down */
.nav { position: fixed; inset: 0 0 auto; z-index: 50; color: var(--nav-ink, #fff); transition: transform .5s var(--ease), background .4s, color .4s, box-shadow .4s; }
.nav.is-solid { background: color-mix(in srgb, var(--bg) 90%, transparent); color: var(--ink); backdrop-filter: blur(16px) saturate(1.3); -webkit-backdrop-filter: blur(16px) saturate(1.3); box-shadow: 0 1px 0 var(--line); }
.nav.is-hidden { transform: translateY(-100%); }
.nav__bar { display: flex; align-items: center; justify-content: space-between; gap: 20px; height: 76px; }
.nav__links { display: flex; gap: 30px; font-size: 15px; }
.nav__links a { text-decoration: none; opacity: .85; background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat; padding-bottom: 2px; transition: background-size .4s var(--ease), opacity .3s; }
.nav__links a:hover { opacity: 1; background-size: 100% 1px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font: var(--brand-w, 600) 21px/1 var(--display); letter-spacing: -.02em; }
.nav__toggle { display: none; width: 46px; height: 46px; border-radius: 50%; border: 1px solid currentColor; background: transparent; color: inherit; cursor: pointer; }
.nav__toggle span { display: block; width: 16px; height: 1.5px; margin: 4px auto; background: currentColor; transition: transform .35s var(--ease); }
.menu { position: fixed; inset: 0; z-index: 49; display: flex; flex-direction: column; justify-content: center; gap: 8px; padding: 100px var(--gut) 40px; background: var(--bg); color: var(--ink);
  clip-path: inset(0 0 100% 0); visibility: hidden; transition: clip-path .7s var(--ease-io), visibility 0s .7s; }
.menu a { font: var(--display-w, 600) clamp(38px, 10vw, 60px)/1.1 var(--display); letter-spacing: var(--display-ls, -.03em); text-decoration: none; opacity: 0; transform: translateY(24px); transition: opacity .5s, transform .6s var(--ease); }
.menu .btn { margin-top: 24px; align-self: flex-start; font-size: 17px; }
.nav-open .menu { clip-path: inset(0); visibility: visible; transition: clip-path .7s var(--ease-io); }
.nav-open .menu a { opacity: 1; transform: none; transition-delay: calc(var(--i, 0) * 60ms + 250ms); }
.nav-open .nav { color: var(--ink); background: transparent; box-shadow: none; backdrop-filter: none; transform: none; }
.nav-open .nav__toggle span:first-child { transform: translateY(2.75px) rotate(45deg); }
.nav-open .nav__toggle span:last-child { transform: translateY(-2.75px) rotate(-45deg); }
.nav-open { overflow: hidden; }

/* buttons */
.btn { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 12px; height: 54px; padding: 0 26px; border: 0; border-radius: var(--btn-r, 99px); font: 600 16px/1 var(--text); text-decoration: none; cursor: pointer; white-space: nowrap; overflow: hidden; isolation: isolate; transition: transform .3s var(--ease), color .4s; }
.btn::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--btn-hover, var(--ink)); transform: scaleY(0); transform-origin: 50% 100%; transition: transform .5s var(--ease); border-radius: inherit; }
.btn:hover::before { transform: scaleY(1); }
.btn:active { transform: scale(.97); }
.btn--accent { background: var(--accent); color: var(--accent-ink); }
.btn--accent:hover { color: var(--btn-hover-ink, var(--bg)); }
.btn--line { background: transparent; color: inherit; box-shadow: inset 0 0 0 1.5px currentColor; }
.btn--line::before { background: currentColor; }
.btn--line:hover { color: var(--bg); }
.btn--light { background: #fff; color: #111; }
.btn--light::before { background: var(--accent); }
.btn--light:hover { color: var(--accent-ink); }
.btn svg { width: 15px; height: 15px; transition: transform .4s var(--ease); }
.btn:hover svg { transform: translateX(3px); }
.textlink { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; text-decoration: none; background: linear-gradient(currentColor, currentColor) 0 100% / 100% 1.5px no-repeat; padding-bottom: 4px; transition: background-size .45s var(--ease); }
.textlink:hover { background-size: 30% 1.5px; }

/* photo frames */
.ph { position: relative; overflow: hidden; border-radius: var(--r, 0); background: var(--surface); }
.ph img { width: 100%; height: 100%; object-fit: cover; }
.ph--hover img { transition: transform 1.2s var(--ease); }
.ph--hover:hover img { transform: scale(1.04); }

/* marquee */
.marquee { overflow: hidden; white-space: nowrap; mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.marquee__track { display: inline-flex; animation: mq var(--mq-dur, 40s) linear infinite; }
.marquee__track > * { display: inline-flex; align-items: center; gap: var(--mq-gap, 36px); padding-right: var(--mq-gap, 36px); }
@keyframes mq { to { transform: translateX(-50%); } }

/* forms */
.form { display: grid; gap: 18px; }
.form .row { display: grid; gap: 18px; }
@media (min-width: 640px) { .form .row { grid-template-columns: 1fr 1fr; } }
.field { display: grid; gap: 8px; }
.field label { font-size: 14px; font-weight: 500; color: var(--mute); }
.field input, .field textarea, .field select { width: 100%; font: 400 17px/1.4 var(--text); color: var(--ink); background: var(--field, transparent); border: 1.5px solid var(--line-strong, var(--line)); border-radius: var(--field-r, 12px); padding: 15px 16px; transition: border-color .25s, box-shadow .25s; }
.field textarea { min-height: 110px; resize: vertical; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 22%, transparent); }
.field[data-bad] input, .field[data-bad] textarea { border-color: #d0342c; }
.field__err { font-size: 13px; color: #d0342c; }
.form__status { font-size: 15px; font-weight: 500; min-height: 1em; }
.form__status:not(:empty) { padding: 14px 16px; border-radius: 12px; background: color-mix(in srgb, var(--accent) 12%, transparent); }

/* footer */
.foot { padding: 72px 0 28px; background: var(--foot-bg, var(--ink)); color: var(--foot-ink, var(--bg)); }
.foot a { text-decoration: none; opacity: .8; } .foot a:hover { opacity: 1; }
.foot__top { display: grid; gap: 36px; }
@media (min-width: 900px) { .foot__top { grid-template-columns: 2fr 1fr 1fr; } }
.foot h4 { margin-bottom: 14px; font: 600 12px/1 var(--text); letter-spacing: .16em; text-transform: uppercase; opacity: .6; }
.foot ul { display: grid; gap: 10px; }
.foot__legal { margin-top: 56px; padding-top: 22px; border-top: 1px solid color-mix(in srgb, currentColor 18%, transparent); display: flex; flex-wrap: wrap; gap: 10px 22px; justify-content: space-between; font-size: 13px; opacity: .75; }
.foot__legal nav { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.demo-note { display: inline-flex; align-items: center; gap: 8px; }
.demo-note::before { content: "DEMO"; font: 700 10px/1 var(--text); letter-spacing: .12em; padding: 4px 7px; border-radius: 4px; background: color-mix(in srgb, currentColor 16%, transparent); }

/* mobile action bar */
.mbar { position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 40; display: none; transform: translateY(140%); transition: transform .6s var(--ease); }
.mbar .btn { width: 100%; box-shadow: 0 18px 40px -12px rgba(0, 0, 0, .45); }
.mbar.is-on { transform: none; }
@media (max-width: 899px) {
  .nav__links, .nav__cta { display: none; }
  .nav__toggle { display: block; }
  .mbar { display: block; }
  .foot { padding-bottom: 96px; }
}

/* ---------- motion layer (only with JS; everything is visible without it) ---------- */
.js [data-rv] { opacity: 0; transform: translateY(34px); transition: opacity 1s var(--ease), transform 1.1s var(--ease); transition-delay: calc(var(--d, 0) * 90ms); }
.js [data-rv="left"] { transform: translateX(-40px); }
.js [data-rv="right"] { transform: translateX(40px); }
.js [data-rv="scale"] { transform: scale(.92); }
.js [data-rv="fade"] { transform: none; }
.js [data-rv].in { opacity: 1; transform: none; }
/* headlines split into words that rise in */
.js [data-split] .w { display: inline-block; overflow: clip; vertical-align: top; padding-bottom: .12em; margin-bottom: -.12em; }
.js [data-split] .w > span { display: inline-block; transform: translateY(110%); transition: transform 1.1s var(--ease); transition-delay: calc(var(--wi) * 55ms + var(--d, 0) * 90ms); }
.js [data-split].in .w > span { transform: none; }
/* photos open like a curtain, then settle */
.js [data-unveil] { clip-path: inset(100% 0 0 0); transition: clip-path 1.3s var(--ease-io); transition-delay: calc(var(--d, 0) * 110ms); }
.js [data-unveil="left"] { clip-path: inset(0 100% 0 0); }
.js [data-unveil] img { transform: scale(1.22); transition: transform 1.8s var(--ease); transition-delay: calc(var(--d, 0) * 110ms); }
.js [data-unveil].in { clip-path: inset(0 0 0 0); }
.js [data-unveil].in img { transform: scale(1); }
/* parallax: JS sets --py on the frame, the image moves inside it */
[data-parallax] { overflow: hidden; }
[data-parallax] img { height: calc(100% + var(--pr, 18%)); margin-top: calc(var(--pr, 18%) / -2); transform: translate3d(0, var(--py, 0px), 0); will-change: transform; }
.js [data-unveil][data-parallax].in img { transform: translate3d(0, var(--py, 0px), 0); }
/* a line that draws itself */
.js [data-draw] { transform: scaleX(0); transform-origin: 0 50%; transition: transform 1.4s var(--ease-io); transition-delay: calc(var(--d, 0) * 90ms); }
.js [data-draw].in { transform: none; }
@media (prefers-reduced-motion: reduce) {
  /* less motion asked for: nothing slides, zooms or drifts; things fade in place instead */
  html { scroll-behavior: auto; }
  .marquee__track, .hero__ph img, .tag, .float, .price-badge, .gal-hint svg { animation: none !important; }
  .js [data-rv] { transform: none !important; transition: opacity .9s ease; }
  .js [data-split] .w > span { transform: none !important; opacity: 0; transition: opacity .9s ease; transition-delay: calc(var(--wi) * 45ms); }
  .js [data-split].in .w > span { opacity: 1; }
  .js [data-unveil] { clip-path: none !important; opacity: 0; transition: opacity 1.1s ease; }
  .js [data-unveil].in { opacity: 1; }
  .js [data-unveil] img, [data-parallax] img { transform: none !important; }
  .js [data-draw] { transform: none; opacity: 0; transition: opacity .8s ease; }
  .js [data-draw].in { opacity: 1; }
}
