/* FlickerNest storefront. One stylesheet for every page.
   Direction: deep brand plum in large blocks, sand and oat surfaces, Epilogue only,
   rounded shapes, one breathing ember on the home hero. */

:root {
  --sand: #E8DCC7;
  --oat: #D4B895;
  --plum: #4B2E39;
  --plum-deep: #38212A;
  --ochre: #C08E3A;
  --terracotta: #C66B3D;
  --sage: #8B9D83;
  --clay: #B08B6E;
  --soft: #6A5156;
  --line: rgba(75, 46, 57, 0.2);
  --line-light: rgba(232, 220, 199, 0.2);
  --r-s: 16px;
  --r-m: 24px;
  --r-l: 32px;
  --gut: 20px;
  --max: 1200px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--sand);
  color: var(--plum);
  font: 400 1.0625rem/1.55 "Epilogue", "Segoe UI", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}
body::after {
  content: ""; position: fixed; inset: 0; z-index: 50; pointer-events: none; opacity: 0.05; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
img, svg { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-underline-offset: 0.2em; }
h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; padding: 0; }
ul { list-style: none; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid currentColor; outline-offset: 3px; }
.wrap { width: min(var(--max), 100% - 2 * var(--gut)); margin-inline: auto; }
.skip { position: absolute; left: -999px; top: 0; background: var(--sand); color: var(--plum); padding: 12px 16px; border-radius: 0 0 var(--r-s) 0; }
.skip:focus { left: 0; z-index: 60; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* Draft markers: for the shop owner only, removed before launch */
.draft-bar { background: var(--oat); color: var(--plum); font-size: 0.875rem; padding: 10px 0; }
.draft { text-decoration: underline dotted; text-underline-offset: 0.22em; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 60px; padding: 0 34px; border-radius: 999px; border: 0;
  font-family: inherit; font-weight: 700; font-size: 1.0625rem; line-height: 1.1; text-decoration: none; cursor: pointer;
  transition: transform 0.3s var(--ease), background-color 0.3s var(--ease);
}
.btn:hover { transform: translateY(-2px); }
.btn-light { background: var(--sand); color: var(--plum); }
.btn-dark { background: var(--plum); color: var(--sand); }
.btn-dark:hover { background: var(--plum-deep); }
.btn-ghost { background: none; box-shadow: inset 0 0 0 1.5px var(--plum); color: var(--plum); }
.btn-wide { width: 100%; min-height: 64px; font-size: 1.125rem; }
.btn[disabled] { opacity: 0.55; cursor: default; transform: none; }

/* Top of every page */
.site-top { background: var(--plum); color: var(--sand); position: relative; }
.notice { font-size: 0.875rem; padding: 12px 0; border-bottom: 1px solid var(--line-light); }
.top { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 20px 0; flex-wrap: wrap; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-size: 1.375rem; font-weight: 800; letter-spacing: -0.03em; text-decoration: none; }
.brand i { width: 12px; height: 12px; border-radius: 50%; background: var(--ochre); box-shadow: 0 0 0 5px rgba(198, 107, 61, 0.35); }
.nav { order: 3; width: 100%; display: flex; gap: 22px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
.nav::-webkit-scrollbar { display: none; }
.nav a { font-size: 0.9375rem; font-weight: 500; text-decoration: none; white-space: nowrap; }
.nav a:hover, .nav a[aria-current="page"] { text-decoration: underline; }
.cart-link {
  display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 8px 0 18px; border-radius: 999px;
  box-shadow: inset 0 0 0 1.5px rgba(232, 220, 199, 0.5); font-weight: 600; font-size: 0.9375rem; text-decoration: none;
}
.cart-link b { min-width: 28px; height: 28px; padding: 0 8px; border-radius: 999px; background: var(--sand); color: var(--plum); display: inline-flex; align-items: center; justify-content: center; font-weight: 800; font-size: 0.875rem; font-variant-numeric: tabular-nums; }

/* Home hero */
.hero { padding-bottom: 96px; overflow: hidden; }
.hero-grid { display: grid; gap: 44px; padding-top: 20px; align-items: center; }
h1 { font-size: clamp(2.75rem, 10.5vw, 5.25rem); line-height: 0.98; font-weight: 800; letter-spacing: -0.04em; max-width: 11ch; }
.sub { margin-top: 22px; font-size: 1.1875rem; line-height: 1.45; max-width: 32ch; color: rgba(232, 220, 199, 0.88); }
.hero-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 22px; margin-top: 32px; }
.hero-cta p { font-size: 0.9375rem; font-weight: 500; }
.hero-photo { position: relative; width: min(440px, 88%); margin-inline: auto; }
.ember {
  position: absolute; left: -16%; right: -16%; top: -10%; aspect-ratio: 1 / 1; border-radius: 50%;
  background: radial-gradient(circle, rgba(198, 107, 61, 0.9) 0%, rgba(192, 142, 58, 0.55) 40%, rgba(192, 142, 58, 0) 68%);
  filter: blur(10px);
  animation: breathe 7s ease-in-out infinite alternate;
}
@keyframes breathe { from { transform: scale(0.93); opacity: 0.7; } to { transform: scale(1.05); opacity: 1; } }
.arch { position: relative; width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 999px 999px var(--r-l) var(--r-l); }

/* Sand sheet that slides over the plum top */
.sheet { position: relative; background: var(--sand); border-radius: var(--r-l) var(--r-l) 0 0; margin-top: -40px; padding: 64px 0 72px; }
.page-top { padding-bottom: 72px; }
.page-top + .sheet { padding-top: 48px; }

h2 { font-size: clamp(2rem, 6.4vw, 3.5rem); line-height: 1.02; font-weight: 800; letter-spacing: -0.035em; max-width: 16ch; }
.h-page { font-size: clamp(2.25rem, 7.5vw, 4rem); line-height: 1; font-weight: 800; letter-spacing: -0.04em; max-width: 14ch; }
h3 { font-size: 1.5rem; line-height: 1.15; font-weight: 800; letter-spacing: -0.03em; }
.lede { margin-top: 16px; max-width: 54ch; color: var(--soft); }
.block { padding: 88px 0; }
.block-tight { padding: 56px 0; }

/* Product cards */
.cards { display: grid; gap: 14px; margin-top: 36px; }
.card { display: flex; flex-direction: column; background: var(--oat); border-radius: var(--r-l); overflow: hidden; text-decoration: none; transition: transform 0.4s var(--ease); }
.card:hover { transform: translateY(-4px); }
.card img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.card div { padding: 22px 24px 26px; }
.card b { display: block; font-size: 1.375rem; font-weight: 800; letter-spacing: -0.03em; line-height: 1.15; }
.card span { display: block; margin-top: 6px; font-size: 0.9375rem; }
.card em { display: block; margin-top: 14px; font-style: normal; font-weight: 700; font-size: 1.125rem; font-variant-numeric: tabular-nums; }

/* Product page */
.pdp { display: grid; gap: 28px; margin-top: 36px; }
.gallery-main { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; border-radius: var(--r-l); background: var(--oat); }
.thumbs { display: flex; gap: 10px; margin-top: 10px; }
.thumbs button { padding: 0; border: 0; background: none; width: 76px; height: 76px; border-radius: var(--r-s); overflow: hidden; cursor: pointer; box-shadow: inset 0 0 0 0 var(--plum); opacity: 0.7; }
.thumbs button[aria-pressed="true"] { opacity: 1; outline: 2.5px solid var(--plum); outline-offset: 2px; }
.thumbs button img { width: 100%; height: 100%; object-fit: cover; }
.photo-note { margin-top: 14px; font-size: 0.875rem; color: var(--soft); }

.plan-card { background: var(--oat); border-radius: var(--r-l); padding: 24px 20px 20px; }
.dims { font-size: clamp(3rem, 15vw, 5rem); line-height: 0.95; font-weight: 800; letter-spacing: -0.05em; font-variant-numeric: tabular-nums; }
.dims small { font-size: 0.3em; letter-spacing: -0.01em; margin-left: 0.3em; }
.plan-card .fit { margin-top: 10px; font-weight: 500; max-width: 36ch; }
.plan { width: 100%; margin-top: 12px; }
.plan .mattress { fill: var(--sage); opacity: 0.6; }
.plan .pillow { fill: var(--sand); }
.plan .person { fill: var(--clay); }
.plan .bl { fill: none; stroke: var(--plum); stroke-width: 0.35; stroke-dasharray: 1.6 1.8; opacity: 0.55; transition: all 0.4s var(--ease); }
.plan .bl.on { fill: rgba(192, 142, 58, 0.32); stroke-width: 0.9; stroke-dasharray: none; opacity: 1; }
.plan .dim line { stroke: var(--plum); stroke-width: 0.35; }
.plan text { font: 800 6px "Epilogue", "Segoe UI", sans-serif; fill: var(--plum); letter-spacing: -0.03em; }

fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
fieldset + fieldset { margin-top: 28px; }
legend { padding: 0; font-weight: 700; font-size: 1rem; margin-bottom: 12px; }
.opt input { position: absolute; opacity: 0; pointer-events: none; }
.opt input:focus-visible + label { outline: 3px solid var(--plum); outline-offset: 3px; }
.sizes { display: grid; gap: 10px; }
.sizes label {
  display: grid; grid-template-columns: 1fr auto; gap: 4px 16px; align-items: center;
  padding: 16px 20px; border-radius: var(--r-m); cursor: pointer;
  box-shadow: inset 0 0 0 1.5px rgba(75, 46, 57, 0.28);
  transition: background-color 0.3s var(--ease), color 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.sizes b { font-size: 1.3125rem; font-weight: 800; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.sizes em { font-style: normal; font-weight: 700; font-size: 1.125rem; font-variant-numeric: tabular-nums; grid-row: span 2; }
.sizes span { font-size: 0.9375rem; line-height: 1.4; color: var(--soft); }
/* Same look as the size choices, used as plain links on the home page */
.size-links { margin-top: 28px; }
.size-links a {
  display: grid; grid-template-columns: 1fr auto; gap: 4px 16px; align-items: center;
  padding: 16px 20px; border-radius: var(--r-m); text-decoration: none;
  box-shadow: inset 0 0 0 1.5px rgba(75, 46, 57, 0.28);
  transition: background-color 0.3s var(--ease), color 0.3s var(--ease);
}
.size-links a:hover { background: var(--plum); color: var(--sand); }
.size-links a:hover span { color: rgba(232, 220, 199, 0.85); }
.photo-wide { border-radius: var(--r-l); width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.sizes input:checked + label { background: var(--plum); color: var(--sand); box-shadow: none; }
.sizes input:checked + label span { color: rgba(232, 220, 199, 0.85); }
.swatches { display: flex; flex-wrap: wrap; gap: 10px; }
.swatches label {
  display: inline-flex; align-items: center; gap: 10px; min-height: 48px; padding: 6px 18px 6px 8px;
  border-radius: 999px; cursor: pointer; font-weight: 500; font-size: 0.9375rem;
  box-shadow: inset 0 0 0 1.5px rgba(75, 46, 57, 0.28); transition: box-shadow 0.3s var(--ease), background-color 0.3s var(--ease);
}
.swatches label i { width: 32px; height: 32px; border-radius: 50%; background: var(--sw); box-shadow: inset 0 0 0 1px rgba(75, 46, 57, 0.18); }
.swatches input:checked + label { background: var(--oat); box-shadow: inset 0 0 0 2.5px var(--plum); }
.color-note { margin-top: 10px; font-size: 0.875rem; color: var(--soft); }

.total { display: flex; align-items: baseline; gap: 14px; margin-top: 30px; }
.price { font-size: 2.5rem; line-height: 1; font-weight: 800; letter-spacing: -0.04em; font-variant-numeric: tabular-nums; }
.total span { color: var(--soft); font-size: 0.9375rem; }
.buy-row { display: flex; gap: 10px; margin-top: 18px; align-items: stretch; }
.buy-row .btn { flex: 1; }
.added { margin-top: 14px; padding: 14px 18px; border-radius: var(--r-s); background: var(--oat); font-weight: 500; }
.added[hidden] { display: none; }
.after-buy { margin-top: 18px; font-size: 0.9375rem; }
.after-buy li { padding-left: 22px; position: relative; }
.after-buy li + li { margin-top: 6px; }
.after-buy li::before { content: ""; position: absolute; left: 2px; top: 0.55em; width: 8px; height: 8px; border-radius: 50%; background: var(--ochre); }

.upsell { margin-top: 26px; padding: 22px; border-radius: var(--r-m); background: var(--oat); }
.upsell b { display: block; font-size: 1.1875rem; font-weight: 800; letter-spacing: -0.02em; }
.upsell p { margin-top: 6px; font-size: 0.9375rem; }
.upsell a { display: inline-block; margin-top: 12px; font-weight: 700; }

/* Quantity stepper */
.qty { display: inline-flex; align-items: center; border-radius: 999px; box-shadow: inset 0 0 0 1.5px rgba(75, 46, 57, 0.28); }
.qty button { width: 44px; height: 44px; border: 0; background: none; cursor: pointer; font-size: 1.25rem; font-weight: 600; border-radius: 50%; }
.qty output { min-width: 28px; text-align: center; font-weight: 700; font-variant-numeric: tabular-nums; }

/* Promise, photos, specs, panels */
.promise p { font-size: clamp(1.625rem, 4.6vw, 3rem); line-height: 1.14; font-weight: 700; letter-spacing: -0.03em; max-width: 32ch; }
.photos { display: grid; gap: 12px; }
.photos img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; border-radius: var(--r-l); }
.split { display: grid; gap: 32px; }
.spec div { display: grid; gap: 4px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.spec div:first-child { border-top: 1px solid var(--line); }
.spec dt { font-weight: 700; font-size: 1.125rem; letter-spacing: -0.02em; }
.spec dd { color: var(--soft); }
.panels { display: grid; gap: 14px; margin-top: 36px; }
.panel { background: var(--oat); border-radius: var(--r-l); padding: 30px 26px; }
.panel h3 { margin-bottom: 12px; }
.panel p + p { margin-top: 10px; }
.warning { margin-top: 28px; padding: 22px 24px; border-radius: var(--r-m); box-shadow: inset 0 0 0 2px var(--plum); }
.warning b { display: block; font-weight: 800; margin-bottom: 6px; }

/* Questions */
.faq { margin-top: 36px; }
details { border-bottom: 1px solid var(--line); }
details:first-child { border-top: 1px solid var(--line); }
summary { cursor: pointer; list-style: none; position: relative; padding: 22px 56px 22px 0; font-weight: 700; font-size: 1.1875rem; letter-spacing: -0.02em; line-height: 1.3; }
summary::-webkit-details-marker { display: none; }
summary::after {
  content: "+"; position: absolute; right: 0; top: 50%; transform: translateY(-50%);
  width: 36px; height: 36px; border-radius: 50%; background: var(--oat);
  display: flex; align-items: center; justify-content: center; font-size: 1.375rem; font-weight: 500; line-height: 1;
}
details[open] summary::after { content: "\2212"; background: var(--plum); color: var(--sand); }
details p { padding: 0 0 24px; max-width: 60ch; color: var(--soft); }

/* Cart */
.cart-grid { display: grid; gap: 28px; margin-top: 36px; }
.cart-line { display: grid; grid-template-columns: 88px 1fr; gap: 16px; padding: 20px 0; border-bottom: 1px solid var(--line); }
.cart-line:first-child { border-top: 1px solid var(--line); }
.cart-line img { width: 88px; height: 88px; object-fit: cover; border-radius: var(--r-s); }
.cart-line a { font-weight: 800; font-size: 1.1875rem; letter-spacing: -0.02em; text-decoration: none; }
.cart-line a:hover { text-decoration: underline; }
.cart-line p { font-size: 0.9375rem; color: var(--soft); margin-top: 2px; }
.cart-line .row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 12px; flex-wrap: wrap; }
.cart-line .line-price { font-weight: 800; font-size: 1.1875rem; font-variant-numeric: tabular-nums; }
.link-btn { border: 0; background: none; padding: 8px 0; cursor: pointer; text-decoration: underline; text-underline-offset: 0.2em; font-size: 0.9375rem; color: var(--soft); }
.summary { background: var(--oat); border-radius: var(--r-l); padding: 28px 24px; }
.summary dl div { display: flex; justify-content: space-between; gap: 16px; padding: 8px 0; }
.summary dl div.grand { margin-top: 10px; padding-top: 18px; border-top: 1px solid var(--line); font-weight: 800; font-size: 1.5rem; letter-spacing: -0.03em; }
.summary dd { font-variant-numeric: tabular-nums; font-weight: 700; }
.summary .btn { margin-top: 20px; }
.summary .after-buy { margin-top: 18px; }
.summary .msg { margin-top: 14px; font-size: 0.9375rem; font-weight: 500; }
.empty { margin-top: 36px; padding: 40px 28px; border-radius: var(--r-l); background: var(--oat); }
.empty p { margin: 10px 0 22px; }
.more { margin-top: 40px; }
.more h3 { margin-bottom: 4px; }
.mini { display: grid; grid-template-columns: 72px 1fr auto; gap: 14px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--line); }
.mini img { width: 72px; height: 72px; object-fit: cover; border-radius: var(--r-s); }
.mini b { display: block; font-weight: 700; }
.mini span { font-size: 0.9375rem; color: var(--soft); }
.mini .btn { min-height: 44px; padding: 0 18px; font-size: 0.9375rem; }

/* Long text pages */
.prose { max-width: 68ch; }
.prose h2 { font-size: 1.75rem; letter-spacing: -0.03em; margin-top: 44px; max-width: none; }
.prose h3 { font-size: 1.25rem; margin-top: 28px; }
.prose p, .prose ul, .prose ol { margin-top: 14px; }
.prose ul { list-style: disc; padding-left: 1.25em; }
.prose ol { padding-left: 1.25em; }
.prose li + li { margin-top: 6px; }
.prose table { width: 100%; border-collapse: collapse; margin-top: 18px; font-size: 0.9375rem; }
.prose th, .prose td { text-align: left; padding: 12px 12px 12px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.prose .updated { color: var(--soft); font-size: 0.9375rem; }

/* Footer */
.site-foot { background: var(--plum); color: var(--sand); border-radius: var(--r-l) var(--r-l) 0 0; padding: 72px 0 112px; margin-top: 40px; }
.site-foot h2 { max-width: 14ch; }
.site-foot .lede { color: rgba(232, 220, 199, 0.88); font-size: 1.1875rem; line-height: 1.45; }
.foot-grid { display: grid; gap: 32px; margin-top: 44px; padding-top: 32px; border-top: 1px solid var(--line-light); font-size: 0.9375rem; }
.foot-grid b { display: block; font-weight: 700; margin-bottom: 10px; }
.foot-grid li + li { margin-top: 8px; }
.foot-grid a { text-decoration: none; }
.foot-grid a:hover { text-decoration: underline; }
.foot-note { margin-top: 36px; color: rgba(232, 220, 199, 0.75); font-size: 0.875rem; max-width: 70ch; }

/* Floating buy bar on the blanket page */
.bar {
  position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 40;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: var(--plum); color: var(--sand); border-radius: 999px; padding: 8px 8px 8px 24px;
  box-shadow: 0 12px 32px rgba(56, 33, 42, 0.35);
  transform: translateY(140%); transition: transform 0.45s var(--ease);
}
.bar.show { transform: none; }
.bar b { font-weight: 800; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.bar .btn { min-height: 48px; padding: 0 24px; font-size: 1rem; }

@media (max-width: 719px) {
  .plan text { font-size: 7.5px; }
}
@media (min-width: 720px) {
  :root { --gut: 36px; }
  .top { flex-wrap: nowrap; }
  .nav { order: 0; width: auto; overflow: visible; gap: 28px; margin-left: auto; padding-bottom: 0; }
  .cards { grid-template-columns: repeat(3, 1fr); }
  .photos { grid-template-columns: 2fr 1fr; grid-template-rows: 1fr 1fr; }
  .photos img:first-child { grid-row: span 2; height: 100%; }
  .panels { grid-template-columns: 1fr 1fr; }
  .panel { padding: 40px 36px; }
  .plan-card { padding: 34px 34px 26px; }
  .bar { left: auto; right: 24px; bottom: 24px; width: 440px; }
  .cart-line { grid-template-columns: 112px 1fr; gap: 22px; }
  .cart-line img { width: 112px; height: 112px; }
  .foot-grid { grid-template-columns: 2fr 1fr 1fr; }
  .summary { padding: 36px 32px; }
}
@media (min-width: 960px) {
  .hero { padding-bottom: 120px; }
  .hero-grid { grid-template-columns: 7fr 5fr; gap: 56px; padding-top: 28px; }
  .hero-photo { width: 100%; max-width: 460px; }
  .sheet { padding: 96px 0; }
  .page-top + .sheet { padding-top: 64px; }
  .pdp { grid-template-columns: 7fr 5fr; gap: 48px; align-items: start; margin-top: 48px; }
  .pdp .sticky { position: sticky; top: 24px; }
  .block { padding: 120px 0; }
  .split { grid-template-columns: 5fr 7fr; gap: 56px; }
  .cart-grid { grid-template-columns: 7fr 5fr; gap: 48px; align-items: start; }
  .cart-grid .summary { position: sticky; top: 24px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .ember { animation: none; }
  .btn, .bar, .card, .plan .bl, .sizes label, .swatches label { transition: none; }
}
