/* Homespun Bebe. Tokens follow the brand guidelines. */
:root {
  --paper: #FBF9FC;
  --heather: #EFEAF4;
  --blush: #F2DCD8;
  --line: #DCD3E3;
  --plum: #3B2342;
  --plum-muted: #6A5670;
  --yarn-rose: #C4888B;
  --rose-ink: #8A5560;
  --wood: #C9A77C;
  --sage: #5F7A62;
  --on-plum: #FBF9FC;
  --focus: #8A5560;
  --display: "Cormorant Garamond", "Cormorant", Garamond, Georgia, serif;
  --body: "Jost", "Futura", "Century Gothic", system-ui, sans-serif;
  --gutter: clamp(16px, 5vw, 64px);
  --radius-tag: 4px; --radius-card: 16px; --radius-soft: 28px; --radius-pill: 999px;
  --shadow-lift: 0 10px 24px -14px rgba(59, 35, 66, 0.35);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--paper); color: var(--plum); font: 400 1rem/1.6 var(--body); -webkit-font-smoothing: antialiased; }
img, svg, canvas { display: block; max-width: 100%; }
[hidden] { display: none !important; }
a { color: var(--rose-ink); text-underline-offset: 3px; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--plum); color: var(--on-plum); padding: 8px 14px; border-radius: 6px; }
.skip:focus { left: 8px; z-index: 10; }

h1, h2, h3 { font-family: var(--display); font-weight: 500; line-height: 1.1; margin: 0; text-wrap: balance; }
h2 { font-size: clamp(2.2rem, 4.5vw, 2.9rem); margin-bottom: 1.2rem; }
h3 { font-size: 1.6rem; margin-bottom: .3rem; }
p { margin: 0; max-width: 64ch; }
.wrap { max-width: 1200px; margin: 0 auto; }

/* header */
.site-header { display: flex; align-items: center; justify-content: space-between; gap: 16px 28px; flex-wrap: wrap; padding: 18px var(--gutter); max-width: 1328px; margin: 0 auto; }
.brand img { width: 196px; height: auto; }
.site-header nav { display: flex; gap: clamp(14px, 3vw, 32px); flex-wrap: wrap; }
.site-header nav a { color: var(--plum-muted); text-decoration: none; font-weight: 500; font-size: .98rem; }
.site-header nav a:hover { color: var(--plum); text-decoration: underline; text-decoration-color: var(--yarn-rose); }

/* hero */
.hero { display: grid; grid-template-columns: 1.15fr .85fr; align-items: center; gap: 32px; padding: clamp(24px, 5vw, 64px) var(--gutter) clamp(48px, 8vw, 96px); max-width: 1328px; margin: 0 auto; }
.hero h1 { font-size: clamp(3rem, 8vw, 6.4rem); line-height: 1; letter-spacing: -.01em; }
.lede { font-size: clamp(1.08rem, 1.6vw, 1.25rem); color: var(--plum-muted); margin-top: 1.4rem; max-width: 44ch; }
.hero-ball { width: min(100%, 420px); height: auto; justify-self: center; filter: drop-shadow(0 18px 24px rgba(59, 35, 66, .18)); }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 2rem; }

.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 12px 26px; border-radius: var(--radius-pill); border: 1.5px solid var(--plum); font: 500 .98rem/1 var(--body); letter-spacing: .02em; text-decoration: none; cursor: pointer; transition: background-color .15s ease, color .15s ease; }
.btn-primary { background: var(--plum); color: var(--on-plum); }
.btn-primary:hover { background: var(--plum-muted); border-color: var(--plum-muted); }
.btn-secondary { background: transparent; color: var(--plum); }
.btn-secondary:hover { background: var(--heather); }

/* bands */
.band { padding: clamp(56px, 8vw, 96px) var(--gutter); }
.make { background: var(--heather); border-radius: var(--radius-soft) var(--radius-soft) 0 0; }
.products { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(20px, 3vw, 40px); }
.product img { width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: contain; border-radius: var(--radius-card); box-shadow: var(--shadow-lift); margin-bottom: 18px; background: var(--paper); }
.product p { color: var(--plum-muted); }
.more { margin-top: 2.4rem; padding-top: 1.4rem; border-top: 1px solid var(--line); max-width: none; color: var(--plum-muted); }
.more strong { color: var(--plum); font-weight: 500; }

/* designer */
.designer { background: var(--paper); }
.intro { color: var(--plum-muted); font-size: 1.1rem; margin-bottom: 2rem; }
.studio { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: clamp(24px, 4vw, 56px); align-items: start; }
.preview-col { position: sticky; top: 16px; }
.preview { position: relative; background: #FBF9FC; border: 1px solid var(--line); border-radius: var(--radius-card); box-shadow: var(--shadow-lift); aspect-ratio: 4 / 3; display: grid; place-items: center; overflow: hidden; }
.preview .photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; padding: 3%; }
.preview .pv { width: 88%; height: auto; }
.note { font-size: .85rem; color: var(--plum-muted); margin-top: 12px; }

.controls { display: grid; gap: 26px; }
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
legend { font-family: var(--display); font-size: 1.45rem; font-weight: 500; margin-bottom: 12px; padding: 0; }
.pieces { display: flex; flex-wrap: wrap; gap: 10px; }
.pieces legend { width: 100%; }
.pieces label { position: relative; }
.pieces input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.pieces span { display: inline-block; padding: 10px 20px; border: 1.5px solid var(--line); border-radius: var(--radius-pill); font-weight: 500; cursor: pointer; }
.pieces input:checked + span { border-color: var(--plum); background: var(--plum); color: var(--on-plum); }
.pieces input:focus-visible + span { outline: 2px solid var(--focus); outline-offset: 2px; }

.slots { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 14px; }
.slot { display: flex; align-items: center; gap: 10px; padding: 8px 16px 8px 8px; border: 1.5px solid var(--line); border-radius: var(--radius-pill); background: var(--paper); color: var(--plum); font: inherit; cursor: pointer; text-align: left; }
.slot[aria-pressed="true"] { border-color: var(--plum); box-shadow: inset 0 0 0 1px var(--plum); }
.slot-dot { width: 30px; height: 30px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(59, 35, 66, .18); flex: none; }
.slot-dot.none { background: repeating-linear-gradient(135deg, var(--paper) 0 5px, var(--line) 5px 7px); }
.slot-text { display: grid; line-height: 1.2; }
.slot-label { font-size: .75rem; color: var(--plum-muted); }
.slot-value { font-weight: 500; }

.swatch-card { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 10px; padding: 16px; background: var(--heather); border-radius: var(--radius-card); }
.swatch-extra { margin-top: 12px; }
.chip-dot.none { background: repeating-linear-gradient(135deg, var(--paper) 0 3px, var(--line) 3px 5px); }
.swatch { --yarn: var(--paper); position: relative; aspect-ratio: 1; border-radius: 50%; border: 0; padding: 0; cursor: pointer;
  background:
    repeating-linear-gradient(115deg, rgba(255,255,255,.18) 0 3px, rgba(0,0,0,.06) 3px 6px),
    radial-gradient(circle at 34% 30%, rgba(255,255,255,.45), rgba(255,255,255,0) 46%),
    radial-gradient(circle at 60% 70%, rgba(0,0,0,0), rgba(0,0,0,.22) 85%),
    var(--yarn);
  box-shadow: 0 3px 6px -3px rgba(59, 35, 66, .45), inset 0 0 0 1px rgba(59, 35, 66, .12); transition: transform .12s ease; }
.swatch:hover { transform: scale(1.06); }
.swatch[aria-checked="true"] { box-shadow: 0 0 0 3px var(--paper), 0 0 0 5px var(--plum); }
.swatch.none { background: repeating-linear-gradient(135deg, var(--paper) 0 6px, var(--line) 6px 9px); }
.swatch-name { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.picked { margin-top: 10px; font-size: .95rem; color: var(--plum-muted); }
@media (prefers-reduced-motion: reduce) { .swatch { transition: none; } .swatch:hover { transform: none; } }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 8px; padding: 8px 16px; border: 1.5px solid var(--line); border-radius: var(--radius-pill); background: var(--paper); color: var(--plum); font: 500 .92rem/1.2 var(--body); cursor: pointer; }
.chip[aria-pressed="true"] { border-color: var(--plum); box-shadow: inset 0 0 0 1px var(--plum); }
.chip-dot { width: 16px; height: 16px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(59, 35, 66, .25); }

.notes summary { font-family: var(--display); font-size: 1.3rem; font-weight: 500; cursor: pointer; list-style: none; display: flex; align-items: center; gap: 8px; }
.notes summary::-webkit-details-marker { display: none; }
.notes summary::before { content: "+"; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; border: 1.5px solid var(--line); font: 500 1rem/1 var(--body); }
.notes[open] summary::before { content: "\2212"; }
.notes summary span { font-family: var(--body); font-size: .85rem; color: var(--plum-muted); }
.notes textarea { margin-top: 10px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
textarea { width: 100%; font: inherit; color: var(--plum); background: var(--paper); border: 1.5px solid var(--line); border-radius: 12px; padding: 12px 14px; resize: vertical; }
textarea:focus { border-color: var(--plum); outline: none; }
textarea:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }

.summary { background: var(--blush); border-radius: var(--radius-tag); padding: 18px 20px; }
.summary-title { font-family: var(--display); font-size: 1.3rem; font-weight: 500; margin-bottom: 6px; }
.summary ul { margin: 0; padding-left: 1.1rem; }
.summary li { margin: 2px 0; }
.designer .actions { margin-top: 0; }
.hint { font-size: .9rem; color: var(--sage); min-height: 1.4em; margin-top: -12px; }

/* how it works: a real sequence */
.how { background: var(--heather); }
.steps { list-style: none; margin: 0; padding: 0; counter-reset: step; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(20px, 3vw, 40px); }
.steps li { counter-increment: step; }
.steps li::before { content: counter(step); display: grid; place-items: center; width: 44px; height: 44px; margin-bottom: 16px; border-radius: 50%; border: 1.5px dashed var(--yarn-rose); font-family: var(--display); font-size: 1.3rem; }
.steps p { color: var(--plum-muted); }

/* contact */
.contact { background: var(--plum); color: var(--on-plum); }
.contact p { color: #D9CDE0; font-size: 1.1rem; }
.email { display: inline-block; margin-top: 1.2rem; font-family: var(--display); font-size: clamp(1.6rem, 5vw, 3.2rem); line-height: 1.15; color: var(--on-plum); text-decoration-color: var(--yarn-rose); text-decoration-thickness: 2px; text-underline-offset: 8px; overflow-wrap: anywhere; }
.email:hover { color: #F2DCD8; }
.site-footer { background: var(--plum); color: #B9A9C2; padding: 0 var(--gutter) 36px; font-size: .9rem; }
.site-footer .wrap { display: flex; align-items: center; gap: 14px; border-top: 1px solid #5E4A66; padding-top: 22px; }
.site-footer img { width: 40px; height: 40px; flex: none; }
.site-footer p { max-width: none; }

.notfound { min-height: 100vh; padding: 15vh var(--gutter); }
.notfound a { font-weight: 500; }

@media (min-width: 901px) and (max-width: 1100px) { .swatch-card { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; }
  .hero-ball { max-width: 200px; order: -1; justify-self: start; }
  .studio { grid-template-columns: 1fr; }
  .preview-col { position: sticky; top: 0; z-index: 5; margin: 0 calc(-1 * var(--gutter)); padding: 10px var(--gutter) 8px; background: var(--paper); box-shadow: 0 8px 12px -10px rgba(59, 35, 66, .25); }
  .preview { aspect-ratio: auto; height: min(34vh, 260px); }
  .note { font-size: .78rem; margin-top: 6px; }
  .pieces { gap: 8px; }
  .pieces span { padding: 9px 16px; }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .site-header { padding-block: 12px; gap: 8px 16px; }
  .brand img { width: 150px; }
  .site-header nav { gap: 16px; font-size: .92rem; }
  .hero { padding-block: 12px 40px; gap: 16px; }
  .hero-ball { display: none; }
  .hero h1 { font-size: 2.7rem; }
  .lede { margin-top: .9rem; font-size: 1.02rem; }
  .actions { margin-top: 1.3rem; }
  .band { padding-block: 44px; }
  h2 { font-size: 2rem; margin-bottom: .8rem; }
  .make { border-radius: 20px 20px 0 0; }
  /* products: a swipeable row instead of a tall stack */
  .products { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: var(--gutter); gap: 14px; margin-inline: calc(-1 * var(--gutter)); padding: 4px var(--gutter) 12px; scrollbar-width: none; }
  .products::-webkit-scrollbar { display: none; }
  .product { flex: 0 0 72%; scroll-snap-align: start; }
  .product img { margin-bottom: 10px; }
  .product h3 { font-size: 1.35rem; }
  .product p { font-size: .9rem; line-height: 1.45; }
  .more { margin-top: 1.2rem; padding-top: 1rem; font-size: .92rem; }
  .intro { font-size: 1rem; margin-bottom: 1rem; }
  .preview { height: min(30vh, 230px); }
  .controls { gap: 18px; }
  legend { font-size: 1.2rem; margin-bottom: 8px; }
  .pieces span { padding: 8px 14px; font-size: .92rem; }
  .slot { padding: 5px 12px 5px 5px; gap: 8px; }
  .slot-dot { width: 26px; height: 26px; }
  .swatch-card { grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 7px; padding: 10px; }
  .swatch[aria-checked="true"] { box-shadow: 0 0 0 2px var(--paper), 0 0 0 4px var(--plum); }
  .swatch-extra { margin-top: 8px; }
  .picked { margin-top: 6px; font-size: .88rem; }
  .chip { padding: 7px 12px; font-size: .88rem; }
  .summary { padding: 12px 14px; font-size: .92rem; }
  .summary-title { font-size: 1.1rem; margin-bottom: 2px; }
  .summary ul { display: flex; flex-wrap: wrap; gap: 2px 14px; padding-left: 0; list-style: none; }
  .designer .btn { flex: 1 1 auto; }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 16px; }
  .steps li::before { width: 34px; height: 34px; margin-bottom: 8px; font-size: 1.1rem; }
  .steps h3 { font-size: 1.2rem; }
  .steps p { font-size: .88rem; line-height: 1.45; }
  .contact p { font-size: 1rem; }
  .email { font-size: 1.5rem; }
  .site-footer { font-size: .82rem; }
}
.nf-title { margin-top: 48px; }
