/* Page layout and the home page. Components come from bundle.css, tokens from tokens.css; the headboard builder has its own sheet (builder.css). */
html { scroll-behavior: smooth; }
body { min-height: 100vh; display: flex; flex-direction: column; }
main { flex: 1; }
.page { max-width: var(--page-max); margin: 0 auto; padding: 0 var(--space-6); box-sizing: border-box; }
@media (max-width: 600px) { .page { padding: 0 var(--space-4); } }
[id] { scroll-margin-top: calc(var(--header-height) + var(--space-4)); }
.visually-hidden { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: -999px; top: var(--space-2); }
.skip:focus { left: var(--space-4); z-index: 10; padding: var(--space-2) var(--space-4); background: var(--surface); border: var(--hairline) solid var(--line-strong); color: var(--ink-strong); }

/* ---------- Home ---------- */
/* the photo runs edge to edge, under the masthead; a dark veil keeps the wordmark and the text readable */
.hero { position: relative; isolation: isolate; display: flex; align-items: flex-end; justify-content: center; min-height: 100vh; min-height: min(100svh, 1040px); background: var(--oak-900); color: var(--linen-50); overflow: hidden; }
/* the photos lie on top of each other: the new one fades in over the old one, which only then disappears */
.hero__slide { position: absolute; inset: 0; z-index: -3; background: var(--oak-900); opacity: 0; visibility: hidden; transition: opacity 0s 1.2s, visibility 0s 1.2s; }
.hero__slide.is-active { z-index: -2; opacity: 1; visibility: visible; transition: opacity 1.2s ease; }
.hero picture { position: absolute; inset: 0; }
/* the ottoman stands low in its photo: on narrower screens the photo ends higher and fades out, so the text stays below the ottoman */
.hero__slide--ottoman picture { bottom: max(0px, calc(260px - 16.5vw)); }
.hero__slide--ottoman .hero__img { object-position: 50% 100%; }
/* the wallpaper is light, so this photo gets an extra veil behind the white menu */
.hero__slide--ottoman::after { content: ""; position: absolute; inset: 0 0 auto; height: 280px; background: linear-gradient(to bottom, rgba(22,34,15,.50) 0%, rgba(22,34,15,.45) 50%, rgba(22,34,15,0) 100%); }
@media (max-width: 743px) { .hero__slide--ottoman::after { height: 150px; } }
@media (max-width: 1575px) { .hero__slide--ottoman picture { -webkit-mask-image: linear-gradient(to top, transparent, #000 12%); mask-image: linear-gradient(to top, transparent, #000 12%); } }
.hero__img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 50% 40%; }
.hero::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(to bottom, rgba(22,34,15,.60) 0%, rgba(22,34,15,.38) 18%, rgba(22,34,15,.10) 36%, rgba(22,34,15,0) 50%, rgba(22,34,15,.10) 64%, rgba(22,34,15,.64) 100%); }
.hero__copy { display: flex; flex-direction: column; align-items: center; gap: var(--space-5); width: 100%; max-width: 760px; padding: 0 var(--space-5) var(--space-8); box-sizing: border-box; text-align: center; }
.hero .eh-ruled { max-width: 460px; color: inherit; }
.hero .eh-ruled::before, .hero .eh-ruled::after { background: currentColor; opacity: .7; }
.hero h1 { margin: 0; font-family: var(--font-display); font-weight: 400; font-size: 56px; line-height: 62px; letter-spacing: 0.01em; color: inherit; max-width: 22ch; text-wrap: balance; }
.hero__controls { position: absolute; left: 0; right: 0; bottom: var(--space-2); display: flex; justify-content: center; }
.hero__controls[hidden] { display: none; }
/* small round dots, the one exception to the square corners: filled is the photo on show. The button around each is larger, so it is easy to tap */
.hero__dot { display: grid; place-items: center; width: 28px; height: 40px; padding: 0; border: 0; background: none; color: inherit; cursor: pointer; }
.hero__dot::before { content: ""; box-sizing: border-box; width: 8px; height: 8px; border: var(--hairline) solid currentColor; border-radius: 50%; transition: background-color .4s ease; }
.hero__dot[aria-current]::before { background-color: currentColor; }
.hero__dot:focus-visible { outline: 2px solid var(--linen-50); outline-offset: -4px; }
@media (prefers-reduced-motion: reduce) { .hero__slide, .hero__slide.is-active, .hero__dot::before { transition: none; } }
.eh-btn--photo { border-color: var(--linen-50); color: var(--linen-50); }
.eh-btn--photo:hover { background: var(--linen-50); border-color: var(--linen-50); color: var(--oak-700); }
.eh-btn--photo:focus-visible { outline-color: var(--linen-50); }
.lead { margin: 0; max-width: var(--measure); font-size: 20px; line-height: 32px; }
.band { background: var(--surface-band); }
.section { padding: var(--space-9) 0; }
.three { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: var(--space-6); margin-top: var(--space-6); }
.three h3 { margin: 0 0 var(--space-2); font-family: var(--font-display); font-weight: 400; font-size: 22px; line-height: 28px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-strong); }
.three p { margin: 0; font-size: 15px; line-height: 24px; color: var(--ink-muted); }
.soon { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--space-5); min-height: 62vh; padding-top: var(--space-9); padding-bottom: var(--space-9); text-align: center; }
.soon .eh-title { margin: 0; }
@media (max-width: 960px) { .hero__img { object-position: 50% 45%; } }
@media (max-width: 600px) { .hero { min-height: 100vh; min-height: min(86svh, 760px); } .hero__copy { padding-bottom: var(--space-8); gap: var(--space-4); } .hero h1 { font-size: 36px; line-height: 42px; } .section { padding: var(--space-7) 0; } }

/* ---------- The founder ---------- */
.founder { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; gap: var(--space-8); }
.founder__photo { display: block; width: 100%; height: auto; }
.founder__text { display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-5); }
.founder__text p { margin: 0; max-width: var(--measure); }
.making { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-6) var(--space-5); margin-top: var(--space-6); }
.making__item { margin: 0; }
.making__item--wide { grid-column: 1 / -1; }
/* the frame keeps its shape, so a photo can replace the text without moving anything */
.making__photo { position: relative; display: grid; place-items: center; aspect-ratio: 4 / 5; box-sizing: border-box; border: var(--hairline) solid var(--line); background: var(--surface); overflow: hidden; }
.making__item--wide .making__photo { aspect-ratio: 16 / 9; }
.making__photo span { font-family: var(--font-utility); font-size: 13px; line-height: 18px; color: var(--ink-muted); }
.making__photo img { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: cover; }
.making figcaption { margin-top: var(--space-3); font-size: 15px; line-height: 24px; color: var(--ink-muted); }
@media (max-width: 960px) { .founder { gap: var(--space-6); } }
@media (max-width: 743px) { .founder, .making { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Home: best sellers ---------- */
/* the cards are the tiles of the menu (masthead.css), larger */
.soon-note { font-family: var(--font-utility); font-size: 13px; line-height: 18px; color: var(--ink-muted); }
.sellers__title { text-align: center; }
.sellers__arrow[hidden] { display: none; }
.sellers__arrow:focus-visible { outline: 2px solid var(--focus); outline-offset: -4px; }
.sellers__frame { --card: calc((100% - 2 * var(--space-5)) / 3); position: relative; margin-top: var(--space-6); }
.sellers__row { display: flex; justify-content: safe center; gap: var(--space-5); margin: 0; padding: 0; list-style: none; overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: none; }
.sellers__row::-webkit-scrollbar { display: none; }
.sellers__row > li { flex: 0 0 var(--card); min-width: 0; scroll-snap-align: start; }
.sellers__row .tile { gap: var(--space-1); text-align: center; }
.sellers__row .tile:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; } /* the row cuts off anything outside it */
.sellers__row .tile__art { margin-bottom: var(--space-3); }
.sellers__row .tile__cap { font-family: var(--font-display); font-size: 24px; line-height: 32px; color: var(--ink-strong); }
.tile__meta { font-size: 15px; line-height: 24px; color: var(--ink-muted); }
.tile__price { margin-top: var(--space-2); font-family: var(--font-utility); font-size: 15px; line-height: 24px; }
.sellers__arrow { position: absolute; top: 120px; display: grid; place-items: center; width: 48px; height: 48px; padding: 0; border: var(--hairline) solid var(--line-strong); background: var(--surface-raised); color: var(--ink-strong); cursor: pointer; }
.sellers__arrow:hover { background: var(--brand-soft); }
.sellers__arrow--prev { left: 0; }
.sellers__arrow--next { right: 0; }
.sellers__arrow svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
@media (max-width: 960px) { .sellers__frame { --card: 40%; } }
@media (max-width: 600px) { .sellers__frame { --card: 70%; } }

/* ---------- Home: a photo beside text, edge to edge; --flip puts the photo on the right ---------- */
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); background: var(--surface-raised); }
.split__photo { position: relative; display: grid; place-items: center; aspect-ratio: 4 / 5; width: 100%; max-height: 900px; background: var(--surface-band); overflow: hidden; }
.split--flip .split__photo { order: 1; background: var(--brand-soft); }
.split__photo img { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: cover; }
.split__photo .split__img--york { object-position: 60% 50%; } /* a square photo: keep the curve of the headboard and the whole lampshade */
.split__text { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--space-5); padding: var(--space-8) var(--space-6); text-align: center; }
.split__text p { margin: 0 0 var(--space-3); max-width: 40ch; font-size: 18px; line-height: 30px; }
@media (max-width: 743px) {
  .split { grid-template-columns: minmax(0, 1fr); }
  .split--flip .split__photo { order: 0; }
  .split__text { padding: var(--space-7) var(--space-4); }
}

/* ---------- Home: service and contact ---------- */
.service, .contact__list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-5); margin: var(--space-6) 0 0; }
.service__item { display: grid; place-items: center; min-height: 200px; box-sizing: border-box; padding: var(--space-5); border: var(--hairline) solid var(--line); }
.contact { border-top: var(--hairline) solid var(--line); text-align: center; }
.contact__list { margin-bottom: var(--space-6); }
.contact dt { font-family: var(--font-utility); font-size: 13px; line-height: 18px; color: var(--ink-muted); }
.contact dd { margin: var(--space-2) 0 0; font-size: 18px; line-height: 28px; }
@media (max-width: 743px) { .service, .contact__list { grid-template-columns: minmax(0, 1fr); } .service__item { min-height: 120px; } }

/* ---------- Footer: the links, then the dark green closing bar ---------- */
.footer__links { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--space-6); max-width: var(--page-max); margin: 0 auto; padding: var(--space-8) var(--space-6); box-sizing: border-box; }
.footer { border-top: var(--hairline) solid var(--line); background: var(--surface-band); }
.footer__links h2 { margin: 0 0 var(--space-3); font-family: var(--font-display); font-weight: 400; font-size: 22px; line-height: 28px; color: var(--ink-strong); }
.footer__links ul { margin: 0; padding: 0; list-style: none; }
.footer__links a { display: inline-block; padding: var(--space-1) 0; font-size: 15px; line-height: 24px; color: var(--ink); text-decoration: none; }
.footer__links a:hover { text-decoration: underline; text-underline-offset: 4px; }
.footer__links a:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.eh-footer { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-3) var(--space-6); padding: var(--space-5) var(--space-6); }
.eh-footer p { margin: 0; font-size: 15px; line-height: 24px; }
.eh-footer p.eh-footer__fine { font-size: 13px; }
.footer__logo { display: block; width: 160px; height: auto; }
@media (max-width: 743px) { .footer__links { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: var(--space-7) var(--space-4); } .eh-footer { flex-direction: column; text-align: center; } }
