:root {
  --navy: #1f3263;
  --navy-deep: #15244a;
  --orange: #ee8a1e;
  --orange-ink: #b85f00;
  --quilt: #f4f7fa;
  --mist: #dce5ee;
  --ink: #18213a;
  --muted: #56617a;
  --line: #c9d4e0;
  --ok: #2f7d4f;
  --err: #b3261e;
  --display: "Bricolage Grotesque", "Arial Rounded MT Bold", system-ui, sans-serif;
  --body: "Atkinson Hyperlegible", system-ui, sans-serif;
  --r-sm: 6px;
  --r-lg: 18px;
  --wrap: 1120px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--quilt); color: var(--ink); font: 17px/1.6 var(--body); }
img { max-width: 100%; display: block; }
a { color: var(--navy); }
:focus-visible { outline: 3px solid var(--orange); outline-offset: 2px; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 16px; }
h1, h2, h3 { font-family: var(--display); line-height: 1.08; margin: 0 0 .5em; letter-spacing: -0.01em; }
h1 { font-size: clamp(2.4rem, 6.5vw, 4.6rem); font-weight: 800; }
h2 { font-size: clamp(1.8rem, 4vw, 2.6rem); font-weight: 700; color: var(--navy); }
h3 { font-size: 1.25rem; font-weight: 700; }
p { margin: 0 0 1em; max-width: 64ch; }
.muted { color: var(--muted); }

/* test banner */
.testbar { background: var(--orange); color: var(--ink); text-align: center; font-size: 14px; padding: 6px 16px; }

/* header */
.site-head { background: var(--navy); color: #fff; position: sticky; top: 0; z-index: 20; }
.site-head .wrap { display: flex; align-items: center; gap: 16px; min-height: 64px; }
.mark { font-family: var(--display); font-weight: 800; font-size: 1.25rem; color: #fff; text-decoration: none; line-height: 1; display: flex; align-items: center; gap: 10px; }
.mark svg { flex: none; }
.mark small { display: block; font-family: var(--body); font-weight: 400; font-size: 12px; opacity: .75; margin-top: 3px; }
.nav { margin-left: auto; display: flex; gap: 4px; align-items: center; }
.nav a { white-space: nowrap; color: #fff; text-decoration: none; padding: 8px 10px; border-radius: var(--r-sm); font-size: 15px; }
.nav a:hover { background: rgba(255,255,255,.1); }
.cart-link { background: var(--orange); color: var(--ink) !important; font-weight: 700; }
.cart-link:hover { background: #f59c3a !important; }
@media (max-width: 640px) { .nav .hide-sm { display: none; } .mark small { display: none; } .mark { font-size: 1.05rem; } }
@media (max-width: 420px) { .nav .hide-xs { display: none; } }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; cursor: pointer; font: 700 16px/1 var(--body); padding: 14px 22px; border-radius: 999px; text-decoration: none; }
.btn-primary { background: var(--orange); color: var(--ink); }
.btn-primary:hover { background: #f59c3a; }
.btn-navy { background: var(--navy); color: #fff; }
.btn-navy:hover { background: var(--navy-deep); }
.btn-ghost { background: transparent; color: var(--navy); box-shadow: inset 0 0 0 2px var(--navy); }
.btn[disabled] { opacity: .5; cursor: not-allowed; }

/* hero */
.hero { position: relative; background: var(--navy-deep); color: #fff; overflow: hidden; }
.hero img { width: 100%; height: min(78vh, 720px); object-fit: cover; object-position: 50% 50%; opacity: .92; }
.hero-copy { position: absolute; inset: auto 0 0 0; padding: 120px 0 40px; background: linear-gradient(to top, rgba(14,24,50,.92), rgba(14,24,50,0)); }
.hero-copy p { font-size: 1.15rem; max-width: 46ch; }
.hero-copy .btn { margin-top: 8px; }
@media (max-width: 640px) { .hero img { height: 44vh; } .hero-copy { position: static; background: var(--navy-deep); padding: 24px 0 32px; } }

/* stitched quilt divider — the one decorative motif, taken from the mattress cover */
.quilt-edge { height: 18px; background:
  radial-gradient(circle at 9px 0, transparent 8px, var(--mist) 8.5px, var(--mist) 9.5px, transparent 10px) 0 0 / 18px 18px repeat-x; }

section { padding: 72px 0; }
.split { display: grid; grid-template-columns: 1.1fr 1fr; gap: 48px; align-items: center; }
@media (max-width: 820px) { .split { grid-template-columns: 1fr; gap: 28px; } section { padding: 52px 0; } }
.photo { border-radius: var(--r-lg); overflow: hidden; }
.photo img { width: 100%; height: 100%; object-fit: cover; }
.facts { list-style: none; padding: 0; margin: 20px 0 0; display: grid; gap: 10px; }
.facts li { padding-left: 30px; position: relative; }
.facts li::before { content: ""; position: absolute; left: 0; top: .45em; width: 16px; height: 10px; border-left: 3px solid var(--orange); border-bottom: 3px solid var(--orange); transform: rotate(-45deg); }

/* size finder */
.sizes { background: #fff; }
.finder { display: grid; grid-template-columns: 340px 1fr; gap: 40px; align-items: start; margin-top: 28px; }
@media (max-width: 900px) { .finder { grid-template-columns: 1fr; } }
.finder-form { background: var(--quilt); border-radius: var(--r-lg); padding: 24px; }
.field { display: grid; gap: 6px; margin-bottom: 16px; }
.field label, .field .lbl { font-weight: 700; font-size: 15px; }
.field .hint { font-size: 14px; color: var(--muted); }
input[type=text], input[type=email], input[type=tel], input[type=number], input[type=password], select, textarea {
  font: 17px/1.3 var(--body); padding: 12px 14px; border: 2px solid var(--line); border-radius: var(--r-sm); background: #fff; color: var(--ink); width: 100%; }
input:focus, select:focus, textarea:focus { border-color: var(--navy); outline: none; }
.len-row { display: flex; align-items: center; gap: 10px; }
.len-row input { width: 120px; }
.seg { display: inline-flex; background: #fff; border: 2px solid var(--line); border-radius: 999px; padding: 3px; }
.seg button { border: 0; background: transparent; font: 700 15px var(--body); padding: 8px 16px; border-radius: 999px; cursor: pointer; color: var(--ink); }
.seg button[aria-pressed=true] { background: var(--navy); color: #fff; }
.reco { margin-top: 8px; padding: 14px 16px; border-radius: var(--r-sm); background: #fff; border-left: 5px solid var(--orange); min-height: 3.2em; }
.reco strong { font-family: var(--display); font-size: 1.2rem; }

.plan { width: 100%; height: auto; display: block; }
.plan .bed { fill: #fff; stroke: var(--line); stroke-width: 3; transition: fill .25s, stroke .25s; cursor: pointer; }
.plan .bed.on { fill: #fdebd6; stroke: var(--orange); stroke-width: 5; }
.plan .tag { font: 700 30px var(--body); fill: var(--muted); pointer-events: none; }
.plan .tag.on { fill: var(--orange-ink); }
.plan .dim { font: 26px var(--body); fill: var(--navy); }
.plan .floor { fill: var(--quilt); }
.plan-cap { font-size: 14px; color: var(--muted); margin-top: 6px; }

.size-list { margin-top: 36px; display: grid; gap: 10px; }
.size-row { display: grid; grid-template-columns: 90px 1fr auto auto; gap: 18px; align-items: center; padding: 14px 18px; border: 2px solid var(--line); border-radius: var(--r-sm); background: #fff; }
.size-row.on { border-color: var(--orange); background: #fffaf3; }
.size-row .code { font-family: var(--display); font-weight: 800; font-size: 1.6rem; color: var(--navy); }
.size-row .meta { font-size: 15px; color: var(--muted); }
.size-row .name { font-weight: 700; }
.size-row .price { font-family: var(--display); font-weight: 700; font-size: 1.3rem; white-space: nowrap; }
.qty { display: inline-flex; align-items: center; border: 2px solid var(--line); border-radius: 999px; }
.qty button { border: 0; background: none; width: 36px; height: 36px; font-size: 20px; cursor: pointer; color: var(--navy); border-radius: 999px; }
.qty span { min-width: 22px; text-align: center; font-weight: 700; }
.add-wrap { display: flex; gap: 10px; align-items: center; }
@media (max-width: 720px) {
  .size-row { grid-template-columns: 64px 1fr; }
  .size-row .price { grid-column: 2; }
  .size-row .add-wrap { grid-column: 1 / -1; justify-content: flex-end; }
}

/* steps */
.steps { list-style: none; padding: 0; margin: 28px 0 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; counter-reset: s; }
.steps li { counter-increment: s; border-top: 3px solid var(--navy); padding-top: 18px; }
.steps li::before { content: counter(s); font-family: var(--display); font-weight: 800; font-size: 2.6rem; color: var(--orange); line-height: 1; display: block; margin-bottom: 8px; }
@media (max-width: 760px) { .steps { grid-template-columns: 1fr; } }

/* gallery */
.gallery { display: grid; grid-template-columns: repeat(6, 1fr); grid-auto-rows: 170px; gap: 10px; margin-top: 24px; }
.gallery figure { margin: 0; border-radius: var(--r-sm); overflow: hidden; }
.gallery img { width: 100%; height: 100%; object-fit: cover; }
.g-a { grid-column: span 3; grid-row: span 2; } .g-b { grid-column: span 3; grid-row: span 1; }
.g-c { grid-column: span 2; } .g-d { grid-column: span 2; grid-row: span 1; }
.g-e { grid-column: span 3; grid-row: span 2; }
@media (max-width: 720px) { .gallery { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 140px; } .g-a, .g-b, .g-c, .g-d { grid-column: span 1; grid-row: span 1; } .g-a, .g-e { grid-column: span 2; grid-row: span 2; } .g-m2 { grid-column: span 2; } }

/* faq */
.faq details { border-bottom: 1px solid var(--line); padding: 16px 0; }
.faq summary { font-weight: 700; cursor: pointer; font-size: 1.05rem; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::after { content: "+"; font-family: var(--display); font-size: 1.5rem; line-height: 1; color: var(--orange-ink); }
.faq details[open] summary::after { content: "–"; }
.faq details p { margin: 10px 0 0; }

footer { background: var(--navy-deep); color: #cfd8e6; padding: 40px 0; font-size: 15px; }
footer a { color: #fff; }
footer .wrap { display: flex; flex-wrap: wrap; gap: 24px; justify-content: space-between; }

/* toast */
.toast { position: fixed; left: 50%; bottom: 20px; transform: translate(-50%, 140%); background: var(--ink); color: #fff; padding: 12px 14px 12px 18px; border-radius: 999px; display: flex; gap: 14px; align-items: center; transition: transform .3s; z-index: 50; max-width: calc(100% - 32px); }
.toast.show { transform: translate(-50%, 0); }
.toast a { color: var(--ink); background: var(--orange); padding: 8px 14px; border-radius: 999px; text-decoration: none; font-weight: 700; white-space: nowrap; }

/* checkout / track / admin */
.page { padding: 40px 0 72px; }
.panel { background: #fff; border-radius: var(--r-lg); padding: 24px; }
.co-grid { display: grid; grid-template-columns: 1fr 380px; gap: 28px; align-items: start; }
@media (max-width: 880px) { .co-grid { grid-template-columns: 1fr; } }
.line-items { list-style: none; margin: 0; padding: 0; }
.line-items li { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; padding: 12px 0; border-bottom: 1px solid var(--mist); }
.line-items .controls { display: flex; gap: 10px; align-items: center; font-size: 14px; }
.linkbtn { background: none; border: 0; color: var(--err); cursor: pointer; font: 14px var(--body); text-decoration: underline; padding: 0; }
.totals { display: grid; grid-template-columns: 1fr auto; gap: 6px; margin-top: 16px; }
.totals .grand { font-family: var(--display); font-size: 1.5rem; font-weight: 800; padding-top: 8px; border-top: 2px solid var(--ink); }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
@media (max-width: 520px) { .two { grid-template-columns: 1fr; } }
.radio-list { display: grid; gap: 8px; }
.radio-list label { display: flex; gap: 12px; align-items: center; padding: 12px 14px; border: 2px solid var(--line); border-radius: var(--r-sm); cursor: pointer; font-weight: 400; }
.radio-list label:has(input:checked) { border-color: var(--navy); background: #f1f5fb; }
.radio-list .fee { margin-left: auto; font-weight: 700; white-space: nowrap; }
.err { color: var(--err); font-weight: 700; }
.note { background: #f1f5fb; border-radius: var(--r-sm); padding: 12px 14px; font-size: 15px; }
.empty { text-align: center; padding: 40px 0; }

.timeline { list-style: none; padding: 0; margin: 20px 0 0; }
.timeline li { position: relative; padding: 0 0 22px 34px; }
.timeline li::before { content: ""; position: absolute; left: 6px; top: 6px; width: 14px; height: 14px; border-radius: 50%; background: var(--mist); border: 3px solid var(--line); }
.timeline li::after { content: ""; position: absolute; left: 13px; top: 24px; bottom: 0; width: 2px; background: var(--mist); }
.timeline li:last-child::after { display: none; }
.timeline li.done::before { background: var(--navy); border-color: var(--navy); }
.timeline li.now::before { background: var(--orange); border-color: var(--orange); box-shadow: 0 0 0 5px #fde3c4; }
.timeline .when { font-size: 14px; color: var(--muted); }

table.orders { width: 100%; border-collapse: collapse; font-size: 15px; }
table.orders th, table.orders td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--mist); vertical-align: top; }
table.orders td:nth-child(3) { white-space: nowrap; }
table.orders th { font-size: 13px; color: var(--muted); font-weight: 700; }
.pill { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 13px; font-weight: 700; background: var(--mist); color: var(--navy); white-space: nowrap; }
.pill.paid { background: #fde3c4; color: var(--orange-ink); }
.pill.in_production { background: #dfe8fb; }
.pill.completed { background: #dcefe3; color: var(--ok); }
.pill.cancelled { background: #f6dcda; color: var(--err); }
.tabs { display: flex; gap: 6px; margin-bottom: 18px; flex-wrap: wrap; }
.tabs button { border: 2px solid var(--line); background: #fff; padding: 8px 16px; border-radius: 999px; font: 700 15px var(--body); cursor: pointer; }
.tabs button[aria-selected=true] { background: var(--navy); border-color: var(--navy); color: #fff; }
.scroll-x { overflow-x: auto; }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }
@media print { .site-head, .testbar, footer, .no-print { display: none !important; } body { background: #fff; } .panel { padding: 0; } }

.fb-cta { margin-top: 18px; font-weight: 600; } .fb-cta a { color: #1877f2; text-decoration: none; } .fb-cta a:hover { text-decoration: underline; }
