﻿/* ============ Jordan Canning order platform: white atelier theme ============ */
:root {
    color-scheme: light;
    --bg: #FFFFFF;
    --soft: #F7F7F4;
    --ink: #0B1330;
    --ink-2: #3A4260;
    --muted: #868CA3;
    --line: #ECEBE5;
    --line-2: #F3F2EC;
    --navy: #1B2A5E;
    --gold: #B8902A;
    --gold-hi: #E6C25E;
    --gold-soft: #FBF4DF;
    --ok: #0F8A6C;
    --tint: #1D3FAF;
    --gold-grad: linear-gradient(135deg, #F0D27A 0%, #C9A23A 50%, #A57C18 100%);
    --ic1: #DDE0E8;
    --ic2: #F3F4F8;
    --ic3: #B1B7C8;
    --font: 'IBM Plex Sans Arabic', 'Segoe UI', Tahoma, sans-serif;
    --ease: cubic-bezier(.2, .7, .2, 1);
    --header-h: 76px;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
html { scroll-behavior: smooth; }

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--ink);
    font-size: 15px;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

button, input, textarea { font-family: inherit; color: inherit; }
button { font-size: inherit; cursor: pointer; }
[hidden] { display: none !important; }
.ic { width: 18px; height: 18px; flex: none; }

/* ---------- intro curtain ---------- */
.curtain {
    position: fixed; inset: 0; z-index: 200; background: #fff;
    display: grid; place-content: center; justify-items: center; gap: 22px;
    animation: curtain .9s 1.25s cubic-bezier(.76, 0, .24, 1) forwards;
}
.curtain img { width: min(300px, 62vw); opacity: 0; transform: scale(.94); animation: pop-in .8s .1s var(--ease) forwards; }
.curtain i { display: block; height: 2px; width: 0; border-radius: 2px; background: var(--gold-grad); animation: draw 1s .35s var(--ease) forwards; }
@keyframes pop-in { to { opacity: 1; transform: none; } }
@keyframes draw { to { width: min(220px, 50vw); } }
@keyframes curtain { to { transform: translateY(-101%); visibility: hidden; } }

/* ---------- header ---------- */
.topbar { position: relative; z-index: 30; height: var(--header-h); background: rgba(255,255,255,.9); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); border-bottom: 1px solid var(--line); }
.topbar-in { height: 100%; max-width: 1560px; margin: 0 auto; padding: 0 40px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 24px; }
.brand-logo { height: 40px; width: auto; display: block; }
.top-note { justify-self: end; font-size: 12.5px; color: var(--muted); letter-spacing: .4px; font-weight: 300; }

.stepper { position: relative; display: flex; gap: 40px; list-style: none; margin: 0; padding: 0 0 10px; align-self: center; }
.stepper::before { content: ''; position: absolute; inset-inline: 0; bottom: 0; height: 2px; border-radius: 2px; background: var(--line); }
.stepper::after {
    content: ''; position: absolute; inset-inline-start: 0; bottom: 0; height: 2px; border-radius: 2px;
    width: var(--p, 34%); background: var(--gold-grad); transition: width .9s var(--ease);
}
.stepper li { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 13.5px; font-weight: 400; transition: color .3s; white-space: nowrap; }
.stepper li b {
    display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%;
    border: 1px solid var(--line); background: #fff; font-weight: 500; transition: all .35s var(--ease);
}
.stepper li b i { font-style: normal; font-size: 12.5px; }
.stepper li b .ic { display: none; width: 14px; height: 14px; }
.stepper li.active { color: var(--ink); font-weight: 600; }
.stepper li.active b { background: var(--ink); border-color: var(--ink); color: var(--gold-hi); transform: scale(1.08); }
.stepper li.done { color: var(--ink-2); }
.stepper li.done b { background: var(--gold-grad); border-color: transparent; color: #fff; }
.stepper li.done b i { display: none; }
.stepper li.done b .ic { display: block; }

/* ---------- layout ---------- */
.layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(460px, 560px);
    max-width: 1560px; margin: 0 auto;
    align-items: start;
}

/* ---------- stage ---------- */
.stage-col { position: sticky; top: 0; height: calc(100vh - var(--header-h)); min-height: 560px; }
.stage {
    position: absolute; inset: 0; container-type: inline-size; overflow: hidden;
    background:
        radial-gradient(ellipse 55% 48% at 50% 44%, #FFFFFF 0%, rgba(255,255,255,0) 100%),
        radial-gradient(ellipse 70% 38% at 50% 78%, color-mix(in srgb, var(--tint) 11%, transparent) 0%, transparent 100%),
        linear-gradient(180deg, #FBFBF9 0%, #F4F3EE 64%, #ECEAE3 100%);
    transition: background .8s;
}
.stage::before { /* soft floor line */
    content: ''; position: absolute; inset-inline: 0; top: 70%; height: 1px; z-index: 0;
    background: linear-gradient(90deg, transparent, rgba(11,19,48,.07) 20%, rgba(11,19,48,.07) 80%, transparent);
}
.stage canvas { position: relative; z-index: 2; width: 100%; height: 100%; display: block; touch-action: none; cursor: grab; }
.stage canvas:active { cursor: grabbing; }

.mark {
    position: absolute; z-index: 1; inset-inline: 0; top: 38%; transform: translateY(-50%); text-align: center; direction: ltr; pointer-events: none;
    font-weight: 100; font-size: clamp(70px, 15cqw, 260px); line-height: 1; letter-spacing: -.04em; white-space: nowrap;
    color: transparent; -webkit-text-stroke: 1.5px rgba(11,19,48,.09);
    user-select: none;
}
.mark.pop { animation: mark-in .9s var(--ease) both; }
@keyframes mark-in { from { opacity: 0; transform: translateY(-46%) scale(.96); letter-spacing: .02em; } to { opacity: 1; transform: translateY(-50%); letter-spacing: -.04em; } }

.stage-info { position: absolute; z-index: 3; top: 30px; inset-inline-start: 40px; max-width: 62%; pointer-events: none; }
.stage-info small { display: flex; align-items: center; gap: 9px; color: var(--gold); font-size: 12px; letter-spacing: 1.6px; font-weight: 600; }
.stage-info small::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 4px rgba(184,144,42,.16); animation: pulse 2.4s ease-in-out infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 8px rgba(184,144,42,0); } }
.stage-info strong { display: block; margin: 6px 0 12px; font-size: 26px; font-weight: 300; line-height: 1.35; letter-spacing: -.2px; }
.dim-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.dim-chips span {
    background: rgba(255,255,255,.85); border: 1px solid var(--line); border-radius: 999px;
    padding: 2px 14px; font-size: 12.5px; color: var(--ink-2); box-shadow: 0 2px 8px rgba(11,19,48,.04);
}

.dock {
    position: absolute; z-index: 3; bottom: 44px; left: 50%; transform: translateX(-50%);
    display: flex; gap: 2px; padding: 5px; max-width: calc(100% - 24px);
    background: rgba(255,255,255,.78); border: 1px solid var(--line); border-radius: 999px;
    -webkit-backdrop-filter: blur(18px) saturate(1.4); backdrop-filter: blur(18px) saturate(1.4);
    box-shadow: 0 1px 0 #fff inset, 0 18px 40px -14px rgba(11,19,48,.28);
}
.vbtn { display: flex; align-items: center; gap: 7px; border: 0; background: transparent; color: var(--ink-2); border-radius: 999px; padding: 9px 16px; font-size: 13px; font-weight: 500; transition: background .25s, color .25s, transform .2s; }
.vbtn:hover { background: var(--soft); color: var(--ink); }
.vbtn:active { transform: scale(.96); }
.vbtn.active { background: var(--ink); color: #fff; }
.vbtn.active .ic { color: var(--gold-hi); }
.vbtn .ic { width: 16px; height: 16px; }
.stage-hint { position: absolute; z-index: 3; bottom: 16px; inset-inline: 0; text-align: center; font-size: 11.5px; color: var(--muted); font-weight: 300; pointer-events: none; }

@container (max-width: 560px) {
    .vbtn:not(.active) span { display: none; }
    .vbtn { padding: 9px 13px; }
    .stage-info strong { font-size: 20px; }
    .stage-info { inset-inline-start: 24px; top: 22px; }
}

/* ---------- panel ---------- */
.panel-col { padding: 44px 48px 28px; border-inline-start: 1px solid var(--line); min-height: calc(100vh - var(--header-h)); background: var(--bg); }

.step-pane { display: none; }
.step-pane.active { display: block; counter-reset: sec; }
.step-pane.active > * { animation: rise .7s var(--ease) both; }
.step-pane.active > :nth-child(2) { animation-delay: .06s; }
.step-pane.active > :nth-child(3) { animation-delay: .12s; }
.step-pane.active > :nth-child(4) { animation-delay: .18s; }
.step-pane.active > :nth-child(5) { animation-delay: .24s; }
@keyframes rise { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: none; } }

.pane-intro { margin: 0 0 30px; }
.pane-intro small { color: var(--gold); font-weight: 600; letter-spacing: .8px; font-size: 12.5px; }
.pane-intro h1 { margin: 6px 0 0; font-size: clamp(34px, 3.4vw, 50px); font-weight: 200; line-height: 1.2; letter-spacing: -.5px; }
.pane-intro h1 b { font-weight: 700; background: linear-gradient(transparent 82%, rgba(230,194,94,.55) 82%); padding-inline: 2px; }
.pane-intro p { margin: 14px 0 0; color: var(--muted); font-weight: 300; font-size: 15.5px; }

.card {
    background: #fff; border: 1px solid var(--line); border-radius: 24px; padding: 26px; margin-bottom: 18px;
    counter-increment: sec;
    box-shadow: 0 1px 0 rgba(11,19,48,.02), 0 30px 50px -36px rgba(11,19,48,.2);
    transition: box-shadow .4s, border-color .4s;
}
.card:hover { border-color: #E3E1D8; box-shadow: 0 1px 0 rgba(11,19,48,.02), 0 34px 56px -34px rgba(11,19,48,.26); }
.card h2 { display: flex; align-items: center; gap: 12px; margin: 0 0 18px; font-size: 18px; font-weight: 600; }
.card h2:not(.plain)::before {
    content: counter(sec, decimal-leading-zero);
    font-weight: 200; font-size: 22px; color: var(--gold); letter-spacing: 1px; padding-inline-end: 12px; border-inline-end: 1px solid var(--line);
}
.sub-label { margin: 22px 0 10px; font-size: 12.5px; color: var(--muted); font-weight: 500; letter-spacing: .4px; }
.muted { color: var(--muted); font-size: 13.5px; margin: 0 0 16px; font-weight: 300; }
.center { text-align: center; }

/* chips */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 7px 17px; font-size: 13.5px; font-weight: 400; transition: all .25s var(--ease); }
.chip:hover { border-color: var(--ink); transform: translateY(-1px); }
.chip small { color: var(--muted); margin-inline-start: 6px; font-size: 12px; }
.chip.active { background: var(--ink); border-color: var(--ink); color: #fff; box-shadow: 0 10px 20px -10px rgba(11,19,48,.6); }
.chip.active small { color: var(--gold-hi); }
.chips.small .chip { padding: 4px 13px; font-size: 12.5px; }

/* size cards */
/* step 1: shape first, then the sizes of that shape */
.shape-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.shape-card {
    display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 12px 6px 10px; border: 1px solid var(--line); border-radius: 18px; background: #fff;
    transition: border-color .25s, box-shadow .25s, transform .25s var(--ease);
}
.shape-card svg { width: 44px; height: 44px; margin-bottom: 2px; }
.shape-card svg > * { fill: var(--ic2); stroke: var(--ic3); stroke-width: 1.6; stroke-linejoin: round; transition: fill .25s, stroke .25s; }
.shape-card b { font-size: 14px; font-weight: 600; }
.shape-card small { font-size: 11.5px; color: var(--muted); font-weight: 300; }
.shape-card:hover { border-color: #D8D4C4; transform: translateY(-2px); }
.shape-card.active { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink), 0 16px 28px -18px rgba(11,19,48,.45); background: #FFFDF6; }
.shape-card.active svg > * { fill: #F3DE9C; stroke: #B48A1C; }
.size-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 22px; }
.size-head .sub-label { margin: 0; }
.switch-row.mini { margin: 0; gap: 10px; font-size: 13px; color: var(--ink-2); }
.switch-row.mini small { color: var(--muted); }
.size-head + .size-grid { margin-top: 12px; }

.size-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(144px, 1fr)); gap: 14px;
    margin-top: 18px; max-height: 500px; overflow: auto; padding: 6px 6px 10px; margin-inline: -6px;
    scrollbar-width: thin; scrollbar-color: var(--gold) transparent;
}
.size-grid::-webkit-scrollbar { width: 6px; }
.size-grid::-webkit-scrollbar-thumb { background: var(--gold); border-radius: 6px; }
.size-card, .opt, .upload { --mx: 50%; --my: -40%; }
.size-card {
    position: relative; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 18px 10px 14px; text-align: center;
    border: 1px solid var(--line); border-radius: 20px;
    background: radial-gradient(220px circle at var(--mx) var(--my), rgba(230,194,94,.28), transparent 62%), #fff;
    transform: perspective(800px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateY(var(--ty, 0));
    transition: transform .25s var(--ease), border-color .3s, box-shadow .3s;
    will-change: transform;
}
.size-card:hover { --ty: -4px; border-color: #D8D4C4; box-shadow: 0 26px 44px -26px rgba(11,19,48,.34); }
.size-card.active { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink), 0 26px 46px -26px rgba(11,19,48,.4); background: radial-gradient(220px circle at var(--mx) var(--my), rgba(230,194,94,.3), transparent 62%), #FFFDF6; }
.size-card.active::after {
    content: ''; position: absolute; top: 10px; inset-inline-end: 10px; width: 22px; height: 22px; border-radius: 50%;
    background: no-repeat center / 12px url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m5 12.5 4.5 4.5L19 7.5' fill='none' stroke='%23E6C25E' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"), var(--ink);
    animation: pop-in .35s var(--ease) both;
}
.size-card b { font-size: 13.5px; line-height: 1.4; font-weight: 600; }
.size-card span { font-size: 12px; color: var(--muted); direction: ltr; font-weight: 300; }
.size-card em { font-style: normal; font-size: 11.5px; color: var(--ok); margin-top: 3px; font-weight: 500; }

.pack-ic { width: 76px; height: 76px; margin-bottom: 4px; filter: drop-shadow(0 10px 8px rgba(11,19,48,.13)); transition: transform .4s var(--ease); }
.size-card:hover .pack-ic { transform: translateY(-3px) scale(1.06); }
.ic-front { fill: var(--ic1); stroke: var(--ic3); stroke-width: 1; stroke-linejoin: round; }
.ic-top { fill: var(--ic2); stroke: var(--ic3); stroke-width: 1; stroke-linejoin: round; }
.ic-side { fill: var(--ic3); stroke: #959CB1; stroke-width: 1; stroke-linejoin: round; }
.size-card.active .ic-front { fill: #E7CE82; stroke: #B48A1C; }
.size-card.active .ic-top { fill: #FBF0C8; stroke: #B48A1C; }
.size-card.active .ic-side { fill: #C9A23A; stroke: #A57C18; }

/* variants */
.opt-list { display: grid; gap: 10px; }
.opt {
    text-align: start; border: 1px solid var(--line); border-radius: 18px; padding: 14px 18px; display: flex; flex-direction: column; gap: 3px;
    background: radial-gradient(260px circle at var(--mx) var(--my), rgba(230,194,94,.22), transparent 62%), #fff; transition: border-color .25s, box-shadow .25s, transform .25s var(--ease);
}
.opt:hover { border-color: #D8D4C4; transform: translateY(-1px); }
.opt.active { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); background: radial-gradient(260px circle at var(--mx) var(--my), rgba(230,194,94,.26), transparent 62%), #FFFDF6; }
.opt b { font-weight: 600; }
.opt small { color: var(--muted); font-size: 12.5px; font-weight: 300; }
.tag { align-self: flex-start; background: #E6F6F0; color: var(--ok); border-radius: 999px; padding: 0 11px; font-size: 12px; font-weight: 500; }

/* window lids: filter chip, badge on size cards, lid picture on variant cards */
.chip-win { border-color: #BFE3F2; background: linear-gradient(135deg, #F4FBFE, #E7F4FA); }
.chip-win.active { background: var(--ink); border-color: var(--ink); }
.win-badge {
    position: absolute; top: 10px; inset-inline-start: 10px; font-style: normal; font-size: 10.5px; font-weight: 600; letter-spacing: .3px;
    padding: 1px 9px; border-radius: 999px; color: #11607E; background: linear-gradient(135deg, #EAF7FD, #D4EEF9); border: 1px solid #BFE3F2;
}
.opt-pic { flex-direction: row; align-items: center; gap: 14px; padding: 10px 14px; }
.opt-txt { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.lid-ic { width: 52px; height: 52px; flex: none; }
.li-lid { fill: #E4E7EE; stroke: #B1B7C8; stroke-width: 1; }
.li-in { fill: #F3F4F8; stroke: #D3D7E1; stroke-width: .8; }
.li-win { fill: #CFEAF6; stroke: #6FA9C2; stroke-width: 1.1; }
.li-shine { stroke: #fff; stroke-width: 2; stroke-linecap: round; opacity: .9; }
.opt.active .li-lid { fill: #E7CE82; stroke: #B48A1C; }
.opt.active .li-in { fill: #FBF0C8; stroke: #D9BC63; }
.opt.is-win .tag { background: #E3F3FA; color: #11607E; }

.win-note { margin: 14px 0 0; padding: 11px 14px; border-radius: 14px; background: #EEF8FC; color: #11607E; font-size: 13px; border: 1px solid #CDE9F4; }

/* heights: bars to scale */
.hcards { display: grid; grid-template-columns: repeat(auto-fill, minmax(86px, 1fr)); gap: 10px; }
.hcard {
    display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 12px 6px 10px; border: 1px solid var(--line); border-radius: 18px; background: #fff;
    transition: border-color .25s, box-shadow .25s, transform .25s var(--ease);
}
.hcard:hover { border-color: #D8D4C4; transform: translateY(-2px); }
.hcard .hbar { display: flex; align-items: flex-end; justify-content: center; width: 100%; height: 54px; margin-bottom: 6px; }
.hcard .hbar i {
    display: block; width: 30px; border-radius: 4px 4px 3px 3px; background: linear-gradient(90deg, var(--ic3), var(--ic1) 45%, var(--ic2) 60%, var(--ic3));
    border-top: 4px solid #9AA1B6; transition: height .5s var(--ease), background .3s;
}
.hcard b { font-size: 15px; font-weight: 600; }
.hcard small { font-size: 10.5px; color: var(--muted); font-weight: 400; }
.hcard.active { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink), 0 16px 28px -18px rgba(11,19,48,.45); background: #FFFDF6; }
.hcard.active .hbar i { background: linear-gradient(90deg, #C9A23A, #F0D27A 45%, #FBF0C8 60%, #B48A1C); border-top-color: #8F6B12; }
.one-height { grid-column: 1 / -1; margin: 0; padding: 12px 16px; border-radius: 14px; background: var(--soft); font-size: 14px; color: var(--ink-2); }

/* collapsible "optional" sections */
details.fold { margin-top: 18px; border-top: 1px dashed var(--line); padding-top: 4px; }
details.card.fold { margin-top: 0; border-top: 1px solid var(--line); padding-top: 22px; }
details.fold > summary {
    list-style: none; cursor: pointer; display: flex; align-items: center; gap: 10px; padding: 10px 0; font-size: 14.5px; font-weight: 600; color: var(--ink-2);
}
details.fold > summary::-webkit-details-marker { display: none; }
details.fold > summary small { color: var(--muted); font-weight: 300; font-size: 12px; }
details.fold > summary::after {
    content: ''; margin-inline-start: auto; width: 8px; height: 8px; border-right: 1.6px solid var(--muted); border-bottom: 1.6px solid var(--muted);
    transform: translateY(-2px) rotate(45deg); transition: transform .25s var(--ease);
}
details.fold[open] > summary::after { transform: translateY(2px) rotate(-135deg); }
details.fold .spec-table { margin-top: 8px; }
details.fold .switch-row { margin: 12px 0 18px; }

.spec-table { margin-top: 22px; border-radius: 18px; background: var(--soft); padding: 6px 18px; }
.spec-table div { display: flex; justify-content: space-between; gap: 14px; padding: 11px 0; border-bottom: 1px dashed #DEDACB; font-size: 13.5px; }
.spec-table div:last-child { border-bottom: 0; }
.spec-table span { color: var(--muted); font-weight: 300; }
.spec-table b { font-weight: 600; text-align: end; }

/* form fields */
.field { display: block; margin-bottom: 16px; }
.field > span { display: block; margin-bottom: 7px; font-size: 13px; color: var(--muted); font-weight: 500; }
.field > span b { color: var(--ink); margin-inline-start: 6px; }
.field input[type=text], .field input[type=number], .field input[type=tel], .field textarea {
    width: 100%; border: 1px solid transparent; border-radius: 14px; padding: 13px 16px; background: var(--soft); font-size: 15px;
    transition: border-color .25s, box-shadow .25s, background .25s;
}
.field input:focus, .field textarea:focus { outline: 0; background: #fff; border-color: var(--ink); box-shadow: 0 0 0 4px rgba(11,19,48,.07); }
.field textarea::placeholder { color: #B2B6C6; }
input[type=range] { width: 100%; accent-color: var(--ink); }

/* switch */
.switch-row { display: flex; align-items: center; gap: 14px; margin: 22px 0; font-size: 14.5px; cursor: pointer; }
.switch-row input { position: absolute; opacity: 0; pointer-events: none; }
.switch-ui { position: relative; width: 46px; height: 26px; border-radius: 999px; background: #DAD8CF; transition: background .3s; flex: none; }
.switch-ui::after { content: ''; position: absolute; top: 3px; inset-inline-start: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 2px 5px rgba(0,0,0,.25); transition: inset-inline-start .3s var(--ease); }
.switch-row input:checked + .switch-ui { background: var(--ink); }
.switch-row input:checked + .switch-ui::after { inset-inline-start: 23px; background: var(--gold-hi); }
.switch-row input:focus-visible + .switch-ui { box-shadow: 0 0 0 4px rgba(11,19,48,.12); }

.swatches { display: flex; gap: 8px; flex-wrap: wrap; }
.swatch { display: flex; flex-direction: column; align-items: center; gap: 6px; border: 1px solid transparent; background: none; border-radius: 16px; padding: 8px 10px; font-size: 12px; min-width: 64px; font-weight: 400; transition: all .25s var(--ease); }
.swatch i { width: 36px; height: 36px; border-radius: 50%; border: 1px solid rgba(0,0,0,.12); box-shadow: inset 0 -7px 10px rgba(0,0,0,.12), 0 6px 12px -4px rgba(11,19,48,.3); transition: transform .3s var(--ease); }
.swatch:hover { background: var(--soft); }
.swatch:hover i { transform: scale(1.1); }
.swatch.active { border-color: var(--ink); font-weight: 600; box-shadow: 0 0 0 1px var(--ink); }

.seg { display: flex; padding: 4px; gap: 4px; background: var(--soft); border-radius: 16px; margin-bottom: 18px; }
.seg button { flex: 1; border: 0; background: transparent; border-radius: 12px; padding: 11px 8px; font-size: 13.5px; font-weight: 500; color: var(--ink-2); transition: all .3s var(--ease); }
.seg button.active { background: var(--ink); color: #fff; box-shadow: 0 10px 20px -10px rgba(11,19,48,.6); }

/* uploads */
.upload-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 12px; }
.upload {
    position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-height: 150px; padding: 16px 8px; text-align: center;
    border: 1.5px dashed #D3CFBF; border-radius: 20px; cursor: pointer;
    background: radial-gradient(200px circle at var(--mx) var(--my), rgba(230,194,94,.25), transparent 62%), #FDFDFB;
    transition: border-color .3s, transform .3s var(--ease), box-shadow .3s;
}
.upload:hover { border-color: var(--gold); transform: translateY(-3px); box-shadow: 0 22px 36px -24px rgba(11,19,48,.35); }
.upload input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; }
.up-ic { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%; background: var(--gold-soft); color: var(--gold); margin-bottom: 6px; transition: transform .35s var(--ease); }
.upload:hover .up-ic { transform: translateY(-3px); }
.up-ic .ok { display: none; }
.upload b { font-size: 15px; font-weight: 600; }
.up-status { font-size: 12.5px; color: var(--ink-2); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.upload small { font-size: 11px; color: var(--muted); min-height: 16px; font-weight: 300; }
.upload.has-file { border-style: solid; border-color: var(--ok); background: #F3FBF8; }
.upload.has-file .up-ic { background: var(--ok); color: #fff; }
.upload.has-file .up-ic .ic:not(.ok) { display: none; }
.upload.has-file .up-ic .ok { display: block; }
.upload.has-file .up-status { color: var(--ok); font-weight: 600; }

/* buttons */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 12px; border: 1px solid var(--line); background: #fff; border-radius: 16px;
    padding: 16px 26px; font-weight: 600; font-size: 15px; transition: transform .3s var(--ease), box-shadow .3s, border-color .3s, background .3s;
}
.btn.primary {
    flex: 1; border-color: var(--ink); color: #fff; position: relative; overflow: hidden;
    background: linear-gradient(135deg, #1B2A5E 0%, var(--ink) 70%);
    box-shadow: 0 18px 30px -14px rgba(11,19,48,.75), inset 0 1px 0 rgba(255,255,255,.14);
}
.btn.primary::before { content: ''; position: absolute; inset: 0; background: linear-gradient(110deg, transparent 30%, rgba(230,194,94,.35) 50%, transparent 70%); transform: translateX(120%); transition: transform .8s var(--ease); }
.btn.primary:hover:not(:disabled)::before { transform: translateX(-120%); }
.btn.primary:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 26px 38px -16px rgba(11,19,48,.85), inset 0 1px 0 rgba(255,255,255,.14); }
.btn.primary:active:not(:disabled) { transform: translateY(0) scale(.99); }
.btn.primary:disabled { opacity: .35; cursor: not-allowed; box-shadow: none; }
.btn.primary .arrow { color: var(--gold-hi); transition: transform .3s var(--ease); }
.btn.primary:hover:not(:disabled) .arrow { transform: translateX(-4px); }
.btn.ghost:hover { border-color: var(--ink); }
.btn.link { border: 0; background: none; color: var(--ink); padding: 4px 0; font-weight: 500; text-decoration: underline; text-underline-offset: 5px; text-decoration-color: var(--gold); }

.nav-row {
    position: sticky; bottom: 0; z-index: 10; display: flex; gap: 12px; margin: 10px -48px 0; padding: 26px 48px 18px;
    background: linear-gradient(180deg, rgba(255,255,255,0), #fff 42%);
}

/* summary & pricing */
.summary { margin: 0; }
.summary > div { display: flex; justify-content: space-between; gap: 18px; padding: 12px 0; border-bottom: 1px dashed var(--line); font-size: 14.5px; }
.summary > div:last-child { border-bottom: 0; }
.summary dt { color: var(--muted); font-weight: 300; }
.summary dd { margin: 0; text-align: end; font-weight: 600; }

.pricing { position: relative; overflow: hidden; border-color: rgba(184,144,42,.55); background: linear-gradient(160deg, #FFFEFA, #FCF5DE); }
.pricing::before { content: ''; position: absolute; inset: 0; background: linear-gradient(110deg, transparent 35%, rgba(255,255,255,.8) 50%, transparent 65%); transform: translateX(-100%); animation: shine 5s ease-in-out infinite; pointer-events: none; }
@keyframes shine { 55%, 100% { transform: translateX(100%); } }
.pricing-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.pricing-head h2 { margin: 0; }
.ic.gold { color: var(--gold); }
.badge-est { background: var(--soft); color: var(--muted); border-radius: 999px; padding: 3px 12px; font-size: 12px; font-weight: 500; }
.badge-dev { background: var(--ink); color: var(--gold-hi); border-radius: 999px; padding: 4px 16px; font-size: 12.5px; font-weight: 600; letter-spacing: .3px; }
.quote-box { position: relative; display: flex; gap: 16px; align-items: flex-start; padding: 18px 20px; border-radius: 18px; background: #fff; border: 1px solid var(--line); }
.quote-ic { display: grid; place-items: center; width: 44px; height: 44px; flex: none; border-radius: 14px; background: var(--ink); color: var(--gold-hi); }
.quote-ic .ic { width: 22px; height: 22px; }
.quote-box strong { display: block; font-size: 16.5px; font-weight: 600; line-height: 1.6; margin-bottom: 4px; }
.quote-box p { margin: 0; color: var(--ink-2); font-size: 13.5px; font-weight: 300; }

/* footer */
.foot { display: flex; justify-content: center; align-items: center; gap: 14px; padding: 22px 8px 12px; color: var(--muted); font-size: 12px; letter-spacing: 1px; font-weight: 300; }
.foot span:first-child { font-weight: 600; letter-spacing: 3px; color: var(--ink-2); }
.foot i { width: 4px; height: 4px; background: var(--gold); transform: rotate(45deg); }

/* toast */
.toast {
    position: fixed; top: calc(var(--header-h) + 14px); inset-inline: 0; margin: 0 auto; width: fit-content; max-width: 90vw; z-index: 90;
    background: #fff; color: var(--ink); padding: 13px 24px; border-radius: 16px; font-size: 14px; font-weight: 500;
    border: 1px solid var(--line); border-inline-start: 3px solid var(--gold);
    box-shadow: 0 24px 50px -18px rgba(11,19,48,.4);
    opacity: 0; transform: translateY(-16px); pointer-events: none; transition: opacity .3s, transform .3s var(--ease);
}
.toast.show { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
    .curtain { display: none; }
    *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------- laptop ---------- */
@media (max-width: 1280px) {
    .layout { grid-template-columns: minmax(0, 1fr) 500px; }
    .panel-col { padding: 36px 32px 24px; }
    .nav-row { margin-inline: -32px; padding-inline: 32px; }
    .topbar-in { padding: 0 24px; }
    .stepper { gap: 24px; }
}

/* ---------- tablet & mobile: preview stays pinned on top ---------- */
@media (max-width: 1000px) {
    :root { --header-h: 64px; }
    .layout { grid-template-columns: 1fr; }
    .stage-col { position: sticky; top: 0; z-index: 20; height: 42vh; min-height: 300px; max-height: 460px; border-bottom: 1px solid var(--line); box-shadow: 0 20px 30px -24px rgba(11,19,48,.3); }
    .topbar { position: relative; }
    .topbar-in { grid-template-columns: auto 1fr; padding: 0 16px; gap: 12px; }
    .top-note { display: none; }
    .brand-logo { height: 32px; }
    .stepper { justify-self: end; gap: 14px; }
    .stepper li span { display: none; }
    .stepper li.active span { display: inline; }
    .panel-col { padding: 26px 18px 16px; border-inline-start: 0; min-height: 0; }
    .nav-row { margin-inline: -18px; padding-inline: 18px; }
    .mark { font-size: clamp(48px, 15cqw, 200px); top: 44%; }
}
/* phones: the title and size chips sit in one compact block above the tin */
@media (max-width: 560px) {
    .stage-info { max-width: calc(100% - 32px); }
    .stage-info strong { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
    .dim-chips { gap: 5px; }
    .dim-chips span { padding: 0 9px; font-size: 11px; }
}
/* short phones (iPhone SE and similar): give the form more room under the 3D view */
@media (max-width: 1000px) and (max-height: 760px) {
    .stage-col { height: 38vh; min-height: 230px; }
}
@media (max-width: 380px) {
    .nav-row { gap: 8px; }
    .nav-row .btn { padding: 14px 14px; font-size: 14px; gap: 8px; }
    .stage-info strong { font-size: 14.5px; margin-bottom: 6px; }
}

/* small phones: the logo and the step indicator must fit side by side */
@media (max-width: 420px) {
    .topbar-in { gap: 8px; padding: 0 12px; }
    .brand-logo { height: 26px; }
    .stepper { gap: 8px; }
    .stepper li { gap: 6px; font-size: 12.5px; }
    .install-bar > div span { display: none; }
}
/* the install suggestion shows on the first screen and after the order is sent, not in the middle of ordering */
body[data-step="2"] .install-bar, body[data-step="3"] .install-bar { display: none !important; }
@media (max-width: 380px) {
    .stepper li.active span { display: none; }
}
@media (max-width: 560px) {
    .hcards { grid-template-columns: repeat(auto-fill, minmax(68px, 1fr)); gap: 8px; }
    .hcard { padding: 9px 4px 8px; border-radius: 14px; }
    .hcard .hbar { height: 38px; margin-bottom: 4px; }
    .hcard .hbar i { width: 22px; }
    .hcard b { font-size: 13.5px; }
    .stage-info small { display: none; }
    .stage-info strong { font-size: 16px; margin: 0 0 8px; }
    .stage-info { top: 12px; inset-inline-start: 16px; }
    .dim-chips span { padding: 0 10px; font-size: 11.5px; }
    .dock { bottom: 12px; }
    .stage-hint { display: none; }
    .vbtn { padding: 8px 12px; }
    .upload-grid { grid-template-columns: 1fr; }
    .upload { min-height: 84px; flex-direction: row; justify-content: flex-start; gap: 12px; text-align: start; padding-inline: 16px; }
    .up-ic { margin: 0; }
    .up-status { flex: none; }
    .upload small { margin-inline-start: auto; min-height: 0; text-align: end; }
    .card { padding: 20px 18px; border-radius: 22px; }
    .size-grid { grid-template-columns: repeat(2, 1fr); }
    .shape-grid { gap: 8px; }
    .shape-card { padding: 10px 2px 8px; border-radius: 14px; }
    .shape-card svg { width: 36px; height: 36px; }
    .shape-card b { font-size: 12.5px; }
    .shape-card small { font-size: 10.5px; }
    .pane-intro h1 { font-size: 32px; }
}

/* ---------- order form extras ---------- */
.req { color: #C0392B; font-style: normal; }
.hp { position: absolute !important; inset-inline-start: -9999px; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.field input[type=email] {
    width: 100%; border: 1px solid transparent; border-radius: 14px; padding: 13px 16px; background: var(--soft); font-size: 15px;
    transition: border-color .25s, box-shadow .25s, background .25s;
}
.field input[type=email]:focus { outline: 0; background: #fff; border-color: var(--ink); box-shadow: 0 0 0 4px rgba(11,19,48,.07); }
.field input.rtl-val { unicode-bidi: plaintext; text-align: right; }
.field input.rtl-val::placeholder { text-align: right; }
.field input[type=number] { text-align: right; }
.field input.bad { border-color: #C0392B !important; background: #FFF6F5 !important; box-shadow: 0 0 0 4px rgba(192,57,43,.1) !important; }
.form-error { margin: 4px 0 0; padding: 11px 16px; border-radius: 12px; background: #FFF1EF; color: #A42E22; font-size: 13.5px; font-weight: 500; }
.btn.link.inline { display: inline; padding: 0; font-size: inherit; }
.nav-row.static { position: static; margin: 18px 0 0; padding: 0; background: none; }

/* success */
.done-card { text-align: center; padding: 30px 6px 10px; }
.done-ring {
    display: grid; place-items: center; width: 84px; height: 84px; margin: 0 auto 20px; border-radius: 50%;
    background: var(--gold-grad); color: #fff; box-shadow: 0 0 0 10px rgba(201,162,58,.16), 0 24px 40px -18px rgba(168,124,24,.7);
    animation: pop-in .7s var(--ease) both;
}
.done-ring .ic { width: 38px; height: 38px; }
.done-card small { display: block; color: var(--gold); font-weight: 600; letter-spacing: .8px; }
.done-card h1 { margin: 6px 0 22px; font-size: 40px; font-weight: 200; letter-spacing: -.5px; }
.done-card h1 b { font-weight: 700; }
.done-num {
    display: inline-flex; flex-direction: column; gap: 2px; padding: 16px 42px; border-radius: 20px;
    border: 1px dashed var(--gold); background: linear-gradient(160deg, #FFFEFA, #FCF5DE); margin-bottom: 22px;
}
.done-num span { font-size: 12.5px; color: var(--muted); }
.done-num strong { font-size: 28px; font-weight: 600; letter-spacing: 3px; }
.done-card img { display: block; width: min(100%, 360px); margin: 0 auto 18px; border-radius: 20px; border: 1px solid var(--line); background: #fff; }
.done-card p { color: var(--ink-2); font-weight: 300; max-width: 420px; margin: 0 auto; }

.demo-chip { display: inline-block; margin-top: 6px; padding: 2px 12px; border-radius: 999px; background: #FFF4D6; color: #7A5A00; font-size: 11.5px; letter-spacing: 0; font-weight: 500; }

/* ---------- form-only version (html.lite): the 3D area shows "under development" ---------- */
.lite-panel { display: none; }
html.lite .lite-panel {
    position: absolute; inset: 0; z-index: 3; display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 22px; padding: 0 32px 40px; text-align: center; pointer-events: none;
}
html.lite #can3dCanvas, html.lite .dock, html.lite .stage-hint, html.lite .preview-only { display: none !important; }
html.lite .mark { top: 42%; }

.lite-icon svg { width: min(440px, 70cqw); height: auto; aspect-ratio: 1; overflow: visible; filter: drop-shadow(0 34px 24px rgba(11,19,48,.22)); animation: float 6s ease-in-out infinite; }
.lite-icon .ic-front { fill: #E7CE82; stroke: #B48A1C; }
.lite-icon .ic-top { fill: #FBF0C8; stroke: #B48A1C; }
.lite-icon .ic-side { fill: #C9A23A; stroke: #A57C18; }
@keyframes float { 50% { transform: translateY(-10px); } }

.lite-badge {
    display: inline-flex; align-items: center; gap: 10px; padding: 9px 22px; border-radius: 999px;
    background: rgba(255,255,255,.88); border: 1px solid var(--line); font-size: 14px; color: var(--ink-2); font-weight: 400;
    -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
    box-shadow: 0 18px 36px -18px rgba(11,19,48,.35);
}
.lite-badge i { width: 8px; height: 8px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 4px rgba(184,144,42,.18); animation: pulse 2.4s ease-in-out infinite; }
.lite-badge b { background: var(--ink); color: var(--gold-hi); border-radius: 999px; padding: 2px 14px; font-size: 12.5px; font-weight: 600; }
.lite-panel p { margin: 0; color: var(--muted); font-weight: 300; font-size: 14px; max-width: 340px; }

@media (max-width: 1000px) {
    .lite-icon svg { width: min(230px, 56cqw); }
    html.lite .lite-panel { gap: 10px; padding-bottom: 14px; }
    html.lite .lite-panel p { display: none; }
    .lite-badge { font-size: 12.5px; padding: 6px 16px; }
}


/* ---------- installable app (js/pwa.js) ---------- */
.btn.sm { padding: 9px 16px; font-size: 13px; border-radius: 12px; }
.btn.wide { width: 100%; }
.install-bar {
    display: flex; align-items: center; gap: 12px; margin-bottom: 22px; padding: 12px 14px; border-radius: 18px;
    border: 1px solid rgba(184,144,42,.45); background: linear-gradient(160deg, #FFFEFA, #FCF5DE);
}
.install-bar img { width: 42px; height: 42px; border-radius: 11px; border: 1px solid var(--line); flex: none; }
.install-bar > div { flex: 1; min-width: 0; line-height: 1.45; }
.install-bar b { display: block; font-size: 14px; font-weight: 600; }
.install-bar span { font-size: 12.5px; color: var(--muted); font-weight: 300; }
.install-bar .btn { flex: none; gap: 8px; padding: 9px 14px; box-shadow: 0 10px 18px -12px rgba(11,19,48,.7); }
.install-bar .btn span { color: inherit; font-size: inherit; font-weight: inherit; }
.install-bar .btn .ic { color: var(--gold-hi); }
.install-x { display: grid; place-items: center; width: 32px; height: 32px; flex: none; border: 0; border-radius: 50%; background: none; color: var(--muted); }
.install-x:hover { background: rgba(11,19,48,.06); color: var(--ink); }

.ios-install {
    position: fixed; inset: 0; z-index: 150; display: flex; align-items: flex-end; justify-content: center; padding: 16px;
    background: rgba(11,19,48,.35); opacity: 0; pointer-events: none; transition: opacity .25s;
}
.ios-install.show { opacity: 1; pointer-events: auto; }
.ios-install-card {
    width: min(420px, 100%); padding: 26px 22px 20px; border-radius: 26px; background: #fff; text-align: center;
    box-shadow: 0 30px 60px -20px rgba(11,19,48,.5); transform: translateY(24px); transition: transform .3s var(--ease);
}
.ios-install.show .ios-install-card { transform: none; }
.ios-install-card img { width: 64px; height: 64px; border-radius: 16px; border: 1px solid var(--line); }
.ios-install-card h3 { margin: 10px 0 12px; font-size: 18px; font-weight: 600; }
.ios-install-card ol { margin: 0 0 18px; padding-inline-start: 22px; text-align: start; color: var(--ink-2); font-size: 14px; line-height: 2; }
.ios-install-card ol .ic { width: 18px; height: 18px; vertical-align: -3px; color: var(--tint); }

/* running as an installed app: no intro curtain on every launch, room for the phone's home bar */
html.app .curtain { display: none; }
@supports (padding: env(safe-area-inset-bottom)) {
    html.app .nav-row { padding-bottom: calc(18px + env(safe-area-inset-bottom)); }
}
