:root {
  --navy: #0F1E2B; --sea: #3D5A57; --glass: #DCE7E4; --sand: #EFE7DA; --salt: #F7F5F0; --white: #fff;
  --wall: #DCE7E4; --floor: #EFE7DA; --sofa: #1A2E3E;
  --radius: 14px;
  font-family: 'Jost', system-ui, sans-serif; color: var(--navy); background: var(--salt);
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; background: var(--salt); -webkit-font-smoothing: antialiased; }
em, i { font-family: 'Cormorant Garamond', serif; font-style: italic; font-weight: 500; }
button { font: inherit; color: inherit; }

.bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 20px; border-bottom: 1px solid #E3E0D8; background: var(--salt); position: sticky; top: 0; z-index: 5; }
.logo { display: flex; align-items: center; gap: 10px; color: var(--navy); text-decoration: none; font-weight: 300; font-size: 22px; }
.steps { display: flex; gap: 14px; list-style: none; margin: 0; padding: 0; font-size: 12px; letter-spacing: .18em; text-transform: uppercase; color: #8A9592; }
.steps li.on { color: var(--navy); }
@media (max-width: 520px) { .steps { display: none; } }

main { max-width: 760px; margin: 0 auto; padding: 28px 16px 64px; }
.step { display: none; }
.step.on { display: block; animation: in .25s ease; }
@keyframes in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

h1 { font-weight: 300; font-size: clamp(38px, 8vw, 60px); line-height: 1.04; margin: 8px 0 16px; }
h1 em { font-size: 1.1em; }
h2 { font-weight: 300; font-size: 30px; margin: 4px 0 8px; }
h3 { font-weight: 400; font-size: 22px; margin: 0 0 6px; }
.eyebrow { font-size: 12px; letter-spacing: .38em; text-transform: uppercase; color: var(--sea); margin: 0; }
.eyebrow.small { letter-spacing: .2em; margin: 18px 0 8px; }
.lead { font-weight: 300; font-size: 19px; line-height: 1.5; max-width: 560px; }
.lead.small { font-size: 16px; margin-top: 0; }
.fine { font-size: 13px; color: #5D6B68; line-height: 1.5; }
.center { text-align: center; }
.warn { background: #FFF6E5; border: 1px solid #F0DDB5; color: #6B4E12; padding: 10px 12px; border-radius: 10px; font-size: 14px; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid var(--navy); background: transparent; border-radius: 999px; padding: 12px 22px; font-size: 15px; cursor: pointer; text-decoration: none; transition: background .15s, color .15s, opacity .15s; }
.btn.primary { background: var(--navy); color: var(--salt); }
.btn.primary:hover { background: #1C3347; }
.btn.ghost:hover { background: var(--glass); }
.btn.big { padding: 17px 30px; font-size: 17px; font-weight: 500; }
.btn.small { padding: 7px 14px; font-size: 13px; }
.btn.full { width: 100%; }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
.link { background: none; border: 0; padding: 6px 0; color: var(--sea); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; font-size: 14px; }
.row { display: flex; align-items: center; }
.row.between { justify-content: space-between; }
.row.gap { gap: 12px; flex-wrap: wrap; margin-top: 18px; }
.row.wrap { flex-wrap: wrap; gap: 10px; }
.rights { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; color: #5D6B68; margin-top: 18px; }

/* the viewer takes the clip's own shape (--clip-ar, set from the video or photo); tall clips are capped at 70% of the screen height */
.viewer { position: relative; background: #0b141c; border-radius: var(--radius); overflow: hidden; aspect-ratio: var(--clip-ar, 16 / 9); width: min(100%, calc(70vh * var(--clip-ar, 16 / 9))); margin-inline: auto; }
.viewer video, .viewer img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; display: block; }
#scrub { width: 100%; margin: 14px 0 6px; accent-color: var(--navy); }
.suggest { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.suggest button { border: 2px solid transparent; border-radius: 10px; padding: 0; overflow: hidden; background: #0b141c; cursor: pointer; aspect-ratio: var(--clip-ar, 16 / 9); width: min(100%, calc(240px * var(--clip-ar, 16 / 9))); justify-self: center; }
.suggest button.on { border-color: var(--navy); }
.suggest img { width: 100%; height: 100%; object-fit: contain; display: block; }
.notes { margin-top: 18px; font-size: 14px; }
.notes summary { cursor: pointer; color: var(--sea); }
textarea { width: 100%; min-height: 84px; margin-top: 8px; border: 1px solid #CFD6D3; border-radius: 10px; padding: 10px 12px; font: inherit; font-size: 15px; background: var(--white); }
.field { width: 100%; margin-top: 8px; border: 1px solid #CFD6D3; border-radius: 10px; padding: 10px 12px; font: inherit; font-size: 16px; background: var(--white); }

.spinner { width: 54px; height: 54px; border-radius: 50%; border: 3px solid var(--glass); border-top-color: var(--navy); animation: spin 1s linear infinite; margin: 40px 0 20px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---- the room ---- */
.room { position: relative; border-radius: var(--radius); overflow: hidden; aspect-ratio: 4 / 3; background: var(--wall); }
.wall { position: absolute; inset: 0 0 18% 0; background: radial-gradient(120% 90% at 60% 20%, #E8EFED 0%, var(--wall) 55%, #D0DDD9 100%); display: flex; justify-content: center; }
.canvas-wrap { position: absolute; bottom: 41%; left: 50%; transform: translateX(-50%); transition: width .35s ease, height .35s ease; }
.canvas-wrap canvas { width: 100%; height: 100%; display: block; box-shadow: 0 14px 22px -10px rgba(15,30,43,.45), 6px 6px 18px rgba(15,30,43,.12); }
.canvas-wrap.framed { padding: 2.2%; background: #fff; outline: 5px solid #1b1b1b; box-shadow: 0 14px 22px -10px rgba(15,30,43,.45); }
.canvas-wrap.framed canvas { box-shadow: none; }
.floor { position: absolute; left: 0; right: 0; bottom: 0; height: 18%; background: linear-gradient(var(--floor), #E4D9C6); border-top: 6px solid var(--salt); }
.sofa { position: absolute; left: 50%; transform: translateX(-50%); bottom: 14%; width: 62%; height: 25%; }
.sofa::before { content: ''; position: absolute; inset: 0 4% 22% 4%; background: var(--sofa); border-radius: 18px 18px 6px 6px; }
.sofa::after { content: ''; position: absolute; left: 0; right: 0; bottom: 6%; height: 46%; background: #152838; border-radius: 16px; box-shadow: 0 8px 10px -6px rgba(0,0,0,.35); }
.cushion { position: absolute; z-index: 1; bottom: 40%; width: 15%; height: 34%; border-radius: 10px; }
.cushion.a { left: 9%; background: repeating-linear-gradient(90deg, var(--navy) 0 7px, var(--salt) 7px 14px); transform: rotate(-7deg); }
.cushion.b { right: 22%; background: var(--glass); transform: rotate(-3deg); }
.cushion.c { right: 9%; background: var(--sand); transform: rotate(6deg); }

.panel { background: var(--white); border: 1px solid #E3E0D8; border-radius: var(--radius); padding: 18px; margin-top: 16px; display: grid; gap: 14px; }
.tabs { display: flex; gap: 6px; background: var(--salt); padding: 4px; border-radius: 999px; }
.tabs button { flex: 1; border: 0; background: transparent; border-radius: 999px; padding: 9px 6px; cursor: pointer; font-size: 14px; }
.tabs button.on { background: var(--navy); color: var(--salt); }
.sizes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.sizes button { text-align: left; border: 1px solid #D5DCD9; background: var(--white); border-radius: 12px; padding: 10px 12px; cursor: pointer; display: grid; gap: 2px; }
.sizes button.on { border-color: var(--navy); box-shadow: inset 0 0 0 1px var(--navy); }
.sizes button[disabled] { opacity: .4; cursor: not-allowed; }
.sizes .s-label { font-size: 15px; }
.sizes .s-price { font-size: 14px; color: var(--sea); }
.sizes .s-note { font-size: 11px; color: #8a6a24; }
.seg { display: inline-flex; border: 1px solid #D5DCD9; border-radius: 999px; overflow: hidden; }
.seg button { border: 0; background: transparent; padding: 7px 14px; font-size: 13px; cursor: pointer; }
.seg button.on { background: var(--glass); }
.seg button[disabled] { opacity: .4; cursor: not-allowed; }
.price-row { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; flex-wrap: wrap; }
#price { font-size: 26px; font-weight: 400; }
.links { margin-top: -4px; }

dialog { border: 0; border-radius: 18px; padding: 20px; width: min(640px, calc(100vw - 24px)); color: var(--navy); }
dialog::backdrop { background: rgba(15,30,43,.55); }
.crop-stage, .pin-stage { position: relative; background: #0b141c; border-radius: 10px; overflow: hidden; touch-action: none; }
.crop-stage canvas { display: block; width: 100%; height: auto; cursor: grab; }
.pin-stage img { display: block; width: 100%; height: auto; cursor: crosshair; }
.pin { position: absolute; width: 22px; height: 22px; margin: -11px 0 0 -11px; border-radius: 50%; background: #E4572E; border: 3px solid #fff; box-shadow: 0 2px 6px rgba(0,0,0,.4); pointer-events: none; }
#crop-zoom { width: 100%; margin: 14px 0 4px; accent-color: var(--navy); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips button { border: 1px solid #D5DCD9; background: var(--white); border-radius: 999px; padding: 6px 12px; font-size: 13px; cursor: pointer; }
.chips button.on { background: var(--navy); color: var(--salt); border-color: var(--navy); }

.toast { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%) translateY(30px); opacity: 0; background: var(--navy); color: var(--salt); padding: 12px 18px; border-radius: 999px; font-size: 14px; transition: .25s; pointer-events: none; max-width: calc(100vw - 32px); text-align: center; }
.toast.on { opacity: 1; transform: translateX(-50%); }

/* ---- realistic room photos ---- */
.room-tabs { display: flex; gap: 6px; margin-bottom: 10px; flex-wrap: wrap; }
.room-tabs button { border: 1px solid #D5DCD9; background: var(--white); border-radius: 999px; padding: 6px 14px; font-size: 13px; cursor: pointer; }
.room-tabs button.on { background: var(--navy); color: var(--salt); border-color: var(--navy); }
.room.photo { background: #ddd; }
.room.photo .wall, .room.photo .sofa, .room.photo .floor { display: none; }
.room-photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.room.photo .art-photo { position: absolute; transition: all .35s ease; }
.art-photo canvas { width: 100%; height: 100%; display: block; }
/* stretched canvas: 38 mm side + soft shadow cast away from the light */
.art-photo.canvas::before { content: ''; position: absolute; top: 0; bottom: 0; right: -1.2%; width: 1.2%; background: linear-gradient(90deg, rgba(0,0,0,.45), rgba(0,0,0,.25)); transform: skewY(40deg); transform-origin: left top; }
.art-photo { box-shadow: var(--art-shadow, 10px 14px 18px -6px rgba(0,0,0,.35)); }
.art-photo::after { content: ''; position: absolute; inset: 0; pointer-events: none; background: var(--art-light, linear-gradient(115deg, rgba(255,255,255,.10), rgba(255,255,255,0) 45%, rgba(0,0,0,.06))); mix-blend-mode: soft-light; }
/* framed print, drawn to real scale: moulding (--frame-px), white mount (--mount-px), bevel round the picture */
.art-photo.framed { box-sizing: border-box; border: var(--frame-px) solid var(--frame-col, #C9A47A); padding: var(--mount-px); background: #FBFAF7;
  box-shadow: var(--art-shadow), inset 0 0 calc(var(--frame-px) * .9) rgba(0,0,0,.16); }
/* moulding: light from the top-left, a crisp outer and inner edge */
.art-photo.framed::before { content: ''; position: absolute; inset: calc(var(--frame-px) * -1); pointer-events: none;
  border: var(--frame-px) solid transparent; border-image: linear-gradient(135deg, rgba(255,255,255,.30), rgba(255,255,255,0) 35%, rgba(0,0,0,.14) 100%) 1;
  box-shadow: inset 0 0 0 .5px rgba(0,0,0,.35), 0 0 0 .5px rgba(0,0,0,.25); }
.art-photo.framed.frame-light::before { box-shadow: inset 0 0 0 .5px rgba(0,0,0,.22), 0 0 0 .5px rgba(0,0,0,.18); }
/* mount bevel: a thin bright cut edge with a hairline shadow inside it */
.art-photo.framed canvas { box-shadow: 0 0 0 var(--bevel-px) #EFEBE2, 0 0 0 calc(var(--bevel-px) + .5px) rgba(0,0,0,.10), inset 0 0 0 .5px rgba(0,0,0,.2); }
.art-photo.framed::after { inset: 0; }
.canvas-wrap.framed { outline-color: var(--frame-col, #1b1b1b); }

/* objects in front of the wall (plants, candles, lights) sit above the artwork */
.room.photo .art-photo { z-index: 1; }
.room-overlay { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; z-index: 2; pointer-events: none; }

/* frame colour picker */
.frame-colours { display: flex; gap: 6px; flex-wrap: wrap; margin: 10px 0 2px; }
.frame-colours button { display: inline-flex; align-items: center; gap: 8px; border: 1px solid #D5DCD9; background: var(--white); border-radius: 999px; padding: 6px 14px 6px 8px; font-size: 13px; cursor: pointer; }
.frame-colours button.on { border-color: var(--navy); box-shadow: 0 0 0 1px var(--navy); }
.frame-colours .swatch { width: 18px; height: 18px; border-radius: 50%; border: 1px solid rgba(0,0,0,.2); }

/* digital file: just the restored image, large and centred */
.digital-view { background: #F7F5F0; border-radius: var(--radius); padding: clamp(16px, 5vw, 40px); display: grid; place-items: center; }
.digital-view canvas { max-width: 100%; max-height: 70vh; width: auto; height: auto; display: block; box-shadow: 0 18px 40px -18px rgba(15,30,43,.45), 0 4px 12px rgba(15,30,43,.10); }
[hidden] { display: none !important; }
