/* Camellia Silk: quiet luxury on the brand's ivory. Light only, on purpose (ivory brand, black line-drawn logo).
   Fonts are self-hosted (no CDN: the CSP allows 'self' only). Black and ivory, no other accent.
   Shape rule: photos and panels square, buttons and inputs 2px, swatches round. */
@font-face { font-family: "Cormorant Garamond"; src: url(/static/fonts/cormorant-garamond-latin-500-normal.woff2) format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Cormorant Garamond"; src: url(/static/fonts/cormorant-garamond-latin-500-italic.woff2) format("woff2"); font-weight: 500; font-style: italic; font-display: swap; }
@font-face { font-family: "Jost"; src: url(/static/fonts/jost-latin-400-normal.woff2) format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Jost"; src: url(/static/fonts/jost-latin-500-normal.woff2) format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }

:root {
  --ivory: #faf7f2;
  --oat: #f1ebe1;
  --line: #e2d7c6;
  --muted: #6b5e54;   /* 5.9:1 on ivory */
  --ink: #2f2924;
  --accent: #2f2924;  /* black and ivory (user 2026-11-20): buttons, focus, cart badge, shipping line */
  --accent-deep: #14110f;
  --serif: "Cormorant Garamond", "Iowan Old Style", Palatino, Georgia, serif;
  --sans: "Jost", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --pad: 1.25rem;
  /* the page's one left and right edge: full-width bands (header, colours, newsletter, footer) line up with .wrap's content */
  --gutter: max(var(--pad), calc(50% - 38rem + var(--pad)));
  --ease: cubic-bezier(.16, 1, .3, 1);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 5rem; }
body { margin: 0; background: var(--ivory); color: var(--ink); font: 400 1.0625rem/1.65 var(--sans); -webkit-font-smoothing: antialiased; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
h1, h2, h3, .price { font-family: var(--serif); font-weight: 500; line-height: 1.08; margin: 0; font-variant-numeric: lining-nums; }
h1 { font-size: clamp(2.6rem, 5.6vw, 4.5rem); letter-spacing: -.01em; }
h2 { font-size: clamp(2rem, 3.4vw, 2.75rem); }
h3 { font-size: 1.5rem; line-height: 1.2; }
p { margin: 0 0 1rem; }
ul { margin: 0; padding: 0; list-style: none; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }

/* ---------- shell ---------- */
.preview, .announce { margin: 0; text-align: center; font-size: .8rem; letter-spacing: .04em; padding: .5rem var(--pad); }
.preview { background: var(--line); }
.announce { background: var(--accent); color: var(--ivory); }
.wide { display: none; }
.top { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; justify-content: space-between; gap: 1rem; height: 4rem; padding: 0 var(--gutter); background: var(--ivory); border-bottom: 1px solid var(--line); }
.logo { display: inline-flex; align-items: center; gap: .6rem; }
.logo .mark { height: 2.25rem; width: auto; }
.logo .word { height: .72rem; width: auto; }
nav { display: flex; align-items: center; gap: 1.4rem; font-size: .82rem; letter-spacing: .1em; text-transform: uppercase; white-space: nowrap; }
nav a { text-decoration: none; padding: .4rem 0; }
#count { display: inline-block; min-width: 1.35rem; margin-left: .2rem; padding: 0 .35rem; border-radius: 1rem; background: var(--accent); color: var(--ivory); font-size: .72rem; line-height: 1.35rem; letter-spacing: 0; text-align: center; }
#count:empty { display: none; }

.wrap { max-width: 76rem; margin: 0 auto; padding: 3.5rem var(--pad); }
.narrow { max-width: 44rem; }

.btn { display: inline-block; background: var(--accent); color: var(--ivory); border: 0; border-radius: 2px; padding: 1.05rem 2.2rem; font: 500 .8rem/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; text-decoration: none; text-align: center; white-space: nowrap; cursor: pointer; transition: background .25s var(--ease), transform .15s var(--ease); }
.btn:hover { background: var(--accent-deep); color: var(--ivory); }
.btn:active { transform: translateY(1px); }
.btn:disabled { background: var(--line); color: var(--muted); cursor: not-allowed; }
.wide-btn { width: 100%; }
button.link { background: none; border: 0; padding: 0; color: var(--muted); text-decoration: underline; text-underline-offset: 3px; font: inherit; font-size: .875rem; cursor: pointer; }
button.link:hover { color: var(--accent); }

.ph { background: linear-gradient(160deg, var(--oat), var(--line)); aspect-ratio: 4 / 5; }

/* ---------- home ---------- */
.hero { display: flex; flex-direction: column-reverse; }
.hero-img { width: 100%; height: 46dvh; min-height: 280px; object-fit: cover; object-position: 78% 50%; }
.hero-text { padding: 2rem var(--pad) 2.5rem; }
.eyebrow { text-transform: uppercase; letter-spacing: .2em; font-size: .75rem; color: var(--muted); margin: 0 0 1rem; }
.hero h1 { line-height: 1.1; padding-bottom: .1em; }
.hero h1 em { font-style: italic; }
.lede { font-size: 1.15rem; max-width: 26rem; margin: 1rem 0 1.75rem; }

.collection { display: grid; grid-template-columns: 1fr 1fr; gap: 2.5rem 1rem; }
.collection .intro, .collection .lead { grid-column: 1 / -1; }
/* phones: the pillowcase leads at full width, the three others in one swipeable row */
.collection .rest { grid-column: 1 / -1; display: grid; grid-auto-flow: column; grid-auto-columns: 44vw; gap: 1rem; margin: 0 calc(-1 * var(--pad)); padding: 0 var(--pad); overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-left: var(--pad); scrollbar-width: none; }
.collection .rest::-webkit-scrollbar { display: none; }
.collection .rest .card { scroll-snap-align: start; }
.intro p { margin: 1rem 0 0; color: var(--muted); max-width: 21rem; font: italic 500 clamp(1.35rem, 2.2vw, 1.9rem)/1.3 var(--serif); }
.rest { display: contents; }
.card { display: block; text-decoration: none; min-width: 0; }
.card:hover { color: inherit; }
.frame { display: block; overflow: hidden; background: var(--oat); }
.shot { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.card h3 { margin: .9rem 0 .15rem; font-size: 1.35rem; }
.card p { margin: 0; font-size: .92rem; }
.card .meta { display: flex; align-items: center; gap: .75rem; margin-top: .5rem; font-size: 1rem; }
.dots { display: inline-flex; gap: .3rem; margin-left: auto; }
.dots i { width: .7rem; height: .7rem; border-radius: 50%; border: 1px solid rgba(47, 41, 36, .18); }

/* the shop's reason, in one breath, between the products and the colours */
.story { padding: 1rem var(--gutter) 4rem; }
.story p { max-width: 46rem; margin: 0 0 1.25rem; font: 500 clamp(1.6rem, 3vw, 2.4rem)/1.25 var(--serif); }
.story a { font-size: .82rem; letter-spacing: .1em; text-transform: uppercase; }

.colours { padding: 1rem 0 3.5rem; }
.colours h2 { padding: 0 var(--gutter); margin-bottom: 1.5rem; }
.strip { display: grid; grid-auto-flow: column; grid-auto-columns: 38vw; gap: .5rem; padding: 0 var(--gutter); overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-left: var(--pad); scrollbar-width: none; }
.strip a { display: block; text-decoration: none; }
.strip::-webkit-scrollbar { display: none; }
.strip li { scroll-snap-align: start; font-size: .82rem; letter-spacing: .1em; text-transform: uppercase; }
.chip { display: block; aspect-ratio: 3 / 4; margin-bottom: .7rem; background-color: var(--oat); border: 1px solid rgba(47, 41, 36, .1);
  /* a soft diagonal sheen, like light across satin */
  background-image: linear-gradient(118deg, rgba(255, 255, 255, .34) 0%, rgba(255, 255, 255, 0) 38%, rgba(0, 0, 0, .05) 62%, rgba(255, 255, 255, .16) 100%); }

.why { display: grid; gap: 2rem; border-top: 1px solid var(--line); }
.why-img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.points { margin: 1.25rem 0 1.5rem; }
.points li { padding: 1.4rem 0; border-top: 1px solid var(--line); }
.points li:first-child { border-top: 0; padding-top: .5rem; }
.points h3 { margin-bottom: .4rem; }
.points p { margin: 0; max-width: 34rem; }

/* ---------- product ---------- */
.product { display: grid; gap: 2rem; }
.gallery { margin: 0; }
.gallery figcaption { margin-top: .6rem; }
.buy h1 { font-size: clamp(2.3rem, 4.4vw, 3.4rem); }
.price { font-size: 1.7rem; margin: .5rem 0 1.25rem; }
fieldset { border: 0; padding: 0; margin: 1.75rem 0 1.5rem; min-width: 0; }
legend, .label { padding: 0; font-size: .78rem; text-transform: uppercase; letter-spacing: .14em; color: var(--muted); }
legend { margin-bottom: .9rem; }
legend span { color: var(--ink); }
.swatches { display: flex; flex-wrap: wrap; gap: .9rem 1rem; }
.swatch { position: relative; display: flex; flex-direction: column; align-items: center; gap: .4rem; min-width: 3.2rem; font-size: .78rem; cursor: pointer; }
.swatch input { position: absolute; opacity: 0; }
.dot { width: 2.6rem; height: 2.6rem; border-radius: 50%; border: 1px solid rgba(47, 41, 36, .18); outline: 1px solid transparent; outline-offset: 3px; transition: outline-color .2s; }
.swatch input:checked + .dot { outline-color: var(--ink); }
.swatch input:focus-visible + .dot { outline: 2px solid var(--accent); }
.swatch input:disabled + .dot { opacity: .3; }
.swatch input:disabled ~ .sw-name { color: var(--muted); }
.qty { display: flex; align-items: center; gap: 1rem; margin: 0 0 1.5rem; }
.low { font-size: .9rem; color: var(--accent); }
.stepper { display: inline-flex; align-items: stretch; border: 1px solid var(--line); border-radius: 2px; background: #fffdfa; }
.stepper button { width: 2.75rem; height: 2.75rem; border: 0; background: none; color: var(--ink); font: 400 1.2rem/1 var(--sans); cursor: pointer; }
.stepper button:hover { color: var(--accent); background: var(--oat); }
.stepper input { width: 2.6rem; border: 0; background: none; color: var(--ink); font: inherit; text-align: center; -moz-appearance: textfield; appearance: textfield; }
.stepper input::-webkit-outer-spin-button, .stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
#added { min-height: 1.65em; margin: .8rem 0 0; font-size: .95rem; }
.assure { margin-top: .5rem; line-height: 1.9; }

.facts { margin-top: 1.5rem; border-bottom: 1px solid var(--line); }
details { border-top: 1px solid var(--line); }
summary { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 1rem 0; cursor: pointer; list-style: none; font-size: .82rem; letter-spacing: .12em; text-transform: uppercase; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; font-size: 1.2rem; line-height: 1; color: var(--muted); }
details[open] summary::after { content: "\2212"; }
details p { margin: 0 0 1.2rem; max-width: 36rem; }
.prose .facts summary { font-size: 1.05rem; letter-spacing: 0; text-transform: none; }

.also { border-top: 1px solid var(--line); }
.also h2 { margin-bottom: 1.75rem; }
/* phones: the three others in one swipeable row, so no card sits alone on a second line */
.also .rest { display: grid; grid-auto-flow: column; grid-auto-columns: 60vw; gap: 1rem; margin: 0 calc(-1 * var(--pad)); padding: 0 var(--pad); overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-left: var(--pad); scrollbar-width: none; }
.also .rest::-webkit-scrollbar { display: none; }
.also .card { scroll-snap-align: start; }

/* ---------- cart ---------- */
.cart h1 { margin-bottom: 1.5rem; }
.cart-grid { display: grid; gap: 2rem; }
.cart-grid.empty #lines { padding: 1.5rem 0 3rem; }
.line { display: grid; grid-template-columns: 4.5rem 1fr auto; gap: .6rem 1rem; align-items: center; padding: 1.25rem 0; border-top: 1px solid var(--line); }
.line:last-child { border-bottom: 1px solid var(--line); }
.line .thumb { grid-row: 1 / 3; width: 4.5rem; aspect-ratio: 4 / 5; object-fit: cover; align-self: start; }
.line .name { font-family: var(--serif); font-size: 1.3rem; line-height: 1.2; }
.line .colour { display: flex; align-items: center; gap: .4rem; font-size: .88rem; color: var(--muted); }
.line .colour i { width: .75rem; height: .75rem; border-radius: 50%; border: 1px solid rgba(47, 41, 36, .18); }
.line .amount { text-align: right; align-self: start; padding-top: .2rem; }
.line .controls { grid-column: 2 / 4; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.line .stepper button { width: 2.4rem; height: 2.4rem; }
.summary { background: var(--oat); padding: 1.75rem 1.5rem; align-self: start; }
.summary h2 { font-size: 1.7rem; margin-bottom: 1.25rem; }
.totals { display: grid; grid-template-columns: 1fr auto; gap: .5rem; margin: 0 0 1rem; }
.totals dd { margin: 0; }
.nudge { color: var(--accent); font-size: .95rem; padding-top: 1rem; border-top: 1px solid var(--line); }
.summary .small { margin: 1rem 0 0; }

/* ---------- reading pages ---------- */
.prose { max-width: 40rem; }
.wrap.prose { max-width: 44rem; }
.prose h1 { font-size: clamp(2.4rem, 4.6vw, 3.4rem); margin-bottom: 1.5rem; }
.prose h2 { font-size: 1.9rem; margin: 2.75rem 0 1rem; }
.prose ul { list-style: disc; padding-left: 1.2rem; margin-bottom: 1rem; }
.prose li { margin-bottom: .5rem; }
.prose li::marker { color: var(--muted); }
.about { display: grid; gap: 2rem; }
.about-img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }

/* ---------- newsletter ---------- */
.signup { display: grid; gap: 1.75rem; padding: 3.5rem var(--gutter); border-top: 1px solid var(--line); }
.signup h2 em { font-style: italic; }
.signup div p { margin: .75rem 0 0; color: var(--muted); font-size: 1.1rem; }
.signup label { display: block; margin-bottom: .7rem; font-size: .78rem; text-transform: uppercase; letter-spacing: .14em; color: var(--muted); }
.field { display: flex; flex-wrap: wrap; gap: .5rem; }
.field input { flex: 1 1 13rem; min-width: 0; height: 3rem; padding: 0 1rem; border: 1px solid var(--muted); border-radius: 2px; background: #fffdfa; color: var(--ink); font: inherit; }
.field input::placeholder { color: var(--muted); opacity: .7; }
.field .btn { flex: 1 0 auto; }
.signup .small { margin: .9rem 0 0; }
.hp { position: absolute; left: -9999px; }

/* ---------- footer ---------- */
footer { display: grid; gap: 2rem; padding: 3rem var(--gutter); background: var(--oat); font-size: .92rem; }
footer a { display: block; width: fit-content; margin-bottom: .45rem; }
footer p { margin: .5rem 0 0; color: var(--muted); }

/* ---------- wider screens ---------- */
@media (min-width: 600px) {
  .wide { display: inline; }
  .strip { grid-auto-columns: 26vw; }
}
@media (min-width: 900px) {
  :root { --pad: 3rem; }
  .top { height: 4.5rem; }
  .logo .mark { height: 2.6rem; }
  .logo .word { height: .85rem; }
  nav { gap: 2.2rem; }
  .wrap { padding-top: 6rem; padding-bottom: 6rem; }

  .hero { padding-left: var(--gutter); display: grid; grid-template-columns: 42fr 58fr; height: calc(100dvh - 6.6rem); min-height: 30rem; max-height: 46rem; }
  .hero-text { align-self: center; padding: 2rem 3rem 3rem 0; }
  .hero-img { height: 100%; object-position: 100% 50%; }
  .lede { font-size: 1.25rem; margin-bottom: 2.25rem; }

  .collection { grid-template-columns: 4fr 7fr; grid-template-rows: 1fr auto; gap: 2.5rem 3.5rem; }
  .collection .intro { grid-column: 2; grid-row: 1; }
  .collection .lead { grid-column: 1; grid-row: 1 / 3; }
  .collection .rest { grid-column: 2; grid-row: 2; grid-auto-flow: row; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; align-items: start; margin: 0; padding: 0; overflow: visible; }
  .card.lead h3 { font-size: 1.9rem; margin-top: 1.1rem; }
  .card.lead p { font-size: 1rem; }

  .story { padding-bottom: 6.5rem; }
  .colours { padding-bottom: 6rem; }
  .colours h2 { margin-bottom: 2rem; }
  .strip { grid-auto-columns: 1fr; gap: .75rem; overflow: visible; }
  .chip { aspect-ratio: 1; }

  .why { grid-template-columns: 5fr 7fr; gap: 4.5rem; align-items: center; }
  .why-img { aspect-ratio: 4 / 5; }

  .product { grid-template-columns: 1.1fr 1fr; gap: 4.5rem; align-items: start; padding-top: 3.5rem; }
  .gallery { position: sticky; top: 6rem; }
  .gallery .shot { max-height: calc(100dvh - 10rem); }
  .also .rest { grid-auto-flow: row; grid-template-columns: repeat(3, 1fr); gap: 2rem; margin: 0; padding: 0; overflow: visible; }

  .cart-grid { grid-template-columns: 1fr 22rem; gap: 4rem; align-items: start; }
  .line { grid-template-columns: 5.5rem 1fr auto; column-gap: 1.5rem; }
  .line .thumb { width: 5.5rem; }
  .summary { position: sticky; top: 6.5rem; }

  .about { grid-template-columns: 5fr 6fr; gap: 4.5rem; align-items: start; }
  .about-img { position: sticky; top: 7rem; }
  .about-img { aspect-ratio: 4 / 5; }
  .signup { grid-template-columns: 5fr 7fr; gap: 4.5rem; align-items: center; padding: 5rem var(--gutter); }
  .signup form { max-width: 34rem; }
  .field .btn { flex: 0 0 auto; }
  footer { grid-template-columns: 2fr 1fr 1.4fr; padding: 4rem var(--gutter); }
}

/* ---------- motion: small, and only for people who haven't asked for less ---------- */
@media (prefers-reduced-motion: no-preference) {
  .shot { transition: transform .9s var(--ease); }
  .card:hover .shot { transform: scale(1.03); }
  .hero-text > * { animation: rise .8s var(--ease) both; }
  .hero-text > :nth-child(2) { animation-delay: .08s; }
  .hero-text > :nth-child(3) { animation-delay: .16s; }
  .hero-text > :nth-child(4) { animation-delay: .24s; }
  @keyframes rise { from { opacity: 0; transform: translateY(14px); } }
  .chip { transition: transform .5s var(--ease); }
  .strip a:hover .chip { transform: translateY(-4px); }
  /* each section settles into place as it scrolls into view; browsers without scroll timelines just show it */
  @supports (animation-timeline: view()) {
    .collection, .story, .colours, .why, .also, .signup { animation: rise linear both; animation-timeline: view(); animation-range: entry 0% entry 40%; }
  }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
