/* =========================================================
   JEM STUDIOS — Global Stylesheet
   Apparel-first, photo-forward. Mobile-first: base = phone,
   min-width overrides scale up. Design tokens carried over
   from the original scaffold.
   ========================================================= */

:root {
  --color-bg: #ffffff;
  --color-text: #1a1a1a;
  --color-muted: #6b6b6b;
  --color-border: #e6e3dd;
  --color-accent: #1a1a1a;
  --color-surface: #f7f5f2;
  --color-tint: #f3f0ea;
  --color-cta: #1a1a1a;
  --color-cta-text: #ffffff;
  --color-focus: #b8860b;

  --font-body: -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  --font-heading: Georgia, "Times New Roman", serif;

  --max-width: 1200px;
  --gutter: 1.25rem;
  --header-h: 3.6rem;
}

/* -------------------- Reset -------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 0.5rem); }
body { margin: 0; font-family: var(--font-body); color: var(--color-text); background: var(--color-bg); line-height: 1.5; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; margin: 0; padding: 0; }
h1, h2, h3 { font-family: var(--font-heading); font-weight: 400; line-height: 1.2; margin: 0 0 0.5em; }
p { margin: 0 0 1rem; }
:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 2px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: -999px; top: 0; background: var(--color-text); color: #fff; padding: 0.6rem 1rem; z-index: 300; }
.skip-link:focus { left: 0; }
.center { text-align: center; }
.eyebrow { font-size: 0.75rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--color-muted); margin: 0 0 0.6rem; }
.text-link { border-bottom: 1px solid currentColor; font-size: 0.9rem; }

/* -------------------- Header / Nav -------------------- */
.site-header { border-bottom: 1px solid var(--color-border); position: sticky; top: 0; background: var(--color-bg); z-index: 100; }
.nav-wrap { display: flex; align-items: center; justify-content: space-between; padding: 0.9rem var(--gutter); max-width: var(--max-width); margin: 0 auto; }
.site-logo { font-family: var(--font-heading); font-size: 1.4rem; letter-spacing: 0.08em; text-transform: uppercase; }

.nav-toggle { display: block; background: none; border: none; cursor: pointer; padding: 0.5rem; z-index: 200; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: var(--color-text); margin: 5px 0; transition: transform 0.2s ease, opacity 0.2s ease; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.nav-menu { position: fixed; top: 0; right: 0; height: 100vh; width: min(75vw, 320px); background: var(--color-bg); border-left: 1px solid var(--color-border);
  display: flex; flex-direction: column; gap: 0.5rem; padding: 5rem 2rem 2rem; transform: translateX(100%); transition: transform 0.25s ease; visibility: hidden; }
.nav-menu.is-open { transform: translateX(0); visibility: visible; }
.nav-menu li { border-bottom: 1px solid var(--color-border); }
.nav-menu a { display: block; padding: 0.9rem 0; font-size: 1.05rem; text-transform: uppercase; letter-spacing: 0.05em; }
.nav-menu a[aria-current="page"] { font-weight: 700; text-decoration: underline; text-underline-offset: 6px; }
.nav-soon { font-size: 0.6rem; letter-spacing: 0.08em; color: var(--color-muted); border: 1px solid var(--color-border); border-radius: 3px; padding: 1px 5px; vertical-align: middle; margin-left: 0.3rem; }

@media (min-width: 768px) {
  .nav-toggle { display: none; }
  .nav-menu { position: static; height: auto; width: auto; flex-direction: row; gap: 2rem; padding: 0; border-left: none; transform: none; visibility: visible; }
  .nav-menu li { border-bottom: none; }
  .nav-menu a { padding: 0.25rem 0; font-size: 0.9rem; }
}

/* -------------------- Buttons -------------------- */
.btn { display: inline-block; border: 1px solid var(--color-text); padding: 0.8rem 1.8rem; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.08em; background: transparent; color: var(--color-text); cursor: pointer; font-family: inherit; transition: background 0.2s ease, color 0.2s ease; }
.btn:hover { background: var(--color-text); color: var(--color-bg); }
.btn--solid { background: var(--color-cta); color: var(--color-cta-text); }
.btn--solid:hover { background: #000; }
.btn--lg { padding: 1rem 2.2rem; font-size: 0.9rem; }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; }

/* -------------------- Sections -------------------- */
.section { padding: 2rem var(--gutter) 2.5rem; max-width: var(--max-width); margin: 0 auto; }
.section--tint { max-width: none; background: var(--color-tint); }
.section--tint > * { max-width: var(--max-width); margin-left: auto; margin-right: auto; }
.section-heading { text-align: center; margin-bottom: 1.5rem; }
.section-heading h2 { font-size: clamp(1.4rem, 4vw, 2rem); margin-bottom: 0.25rem; }
.section-heading p { color: var(--color-muted); margin: 0; }
.section-heading a { font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.05em; border-bottom: 1px solid var(--color-text); }
.section-heading--left { text-align: left; display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; }
.section-heading--left span { color: var(--color-muted); font-size: 0.85rem; }
.page-head { text-align: center; padding: 2.5rem var(--gutter) 1rem; }
.page-head h1 { font-size: clamp(1.8rem, 5vw, 2.6rem); margin-bottom: 0.2em; }
.page-head p { color: var(--color-muted); margin: 0 auto 1rem; }

/* -------------------- Product grid + cards -------------------- */
.product-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.1rem 0.9rem; max-width: var(--max-width); margin: 0 auto 1.5rem; }
@media (min-width: 600px) { .product-grid { grid-template-columns: repeat(3, 1fr); gap: 1.5rem 1.25rem; } }
@media (min-width: 1000px) { .product-grid { grid-template-columns: repeat(4, 1fr); gap: 2rem 1.5rem; } .product-grid--feat { grid-template-columns: repeat(5, 1fr); } }

.product-card__link { display: block; }
.product-card__image-wrap { display: block; aspect-ratio: 4 / 5; overflow: hidden; background: var(--color-surface); margin-bottom: 0.7rem; }
.product-card__image-wrap img { width: 100%; height: 100%; object-fit: cover; object-position: center 30%; transition: transform 0.35s ease; }
.product-card__link:hover .product-card__image-wrap img { transform: scale(1.04); }
.product-card__title { font-size: 1rem; margin: 0 0 0.15rem; }
.product-card__price { font-size: 0.95rem; font-weight: 600; margin: 0; }

.featured-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.1rem 0.9rem; max-width: var(--max-width); }
.featured-grid .product-card--spot { grid-column: 1 / -1; }
.featured-grid .product-card--spot .product-card__image-wrap { aspect-ratio: 1 / 1; }
.featured-grid .product-card--spot .product-card__title { font-size: 1.3rem; }
@media (min-width: 1000px) {
  .featured-grid { grid-template-columns: repeat(4, 1fr); gap: 1.5rem; }
  .featured-grid .product-card--spot { grid-column: 1 / 3; grid-row: 1 / 3; }
  .featured-grid .product-card--spot .product-card__image-wrap { aspect-ratio: 4 / 5; }
}

/* -------------------- Art -> apparel pairs -------------------- */
.pair-strip { display: flex; gap: 1rem; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 0.75rem; -webkit-overflow-scrolling: touch; max-width: var(--max-width); margin: 0 auto; }
.pair { flex: 0 0 82%; scroll-snap-align: start; display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: auto auto; border: 1px solid var(--color-border); background: var(--color-bg); }
.pair__art, .pair__worn { display: block; aspect-ratio: 4 / 5; overflow: hidden; background: var(--color-surface); }
.pair__art { display: flex; align-items: center; justify-content: center; padding: 0.6rem; }
.pair__art img { width: 100%; height: 100%; object-fit: contain; }
.pair__worn img { width: 100%; height: 100%; object-fit: cover; object-position: center 30%; }
.pair__caption { grid-column: 1 / -1; display: flex; justify-content: space-between; align-items: baseline; gap: 0.5rem; padding: 0.65rem 0.8rem; border-top: 1px solid var(--color-border); }
.pair__caption b { font-family: var(--font-heading); font-weight: 400; font-size: 1rem; }
.pair__caption i { font-style: normal; font-size: 0.8rem; color: var(--color-muted); white-space: nowrap; }
@media (min-width: 600px) { .pair { flex-basis: 46%; } }
@media (min-width: 1000px) { .pair { flex-basis: calc((100% - 3rem) / 4); } }
@media (min-width: 1000px) { .pair-strip { overflow: visible; } }

/* -------------------- Home hero -------------------- */
.home-hero { display: flex; flex-direction: column; gap: 1.5rem; padding: 0 0 2rem; max-width: var(--max-width); margin: 0 auto; }
.home-hero__media { position: relative; }
.home-hero__worn { display: block; aspect-ratio: 1 / 1; background: var(--color-surface); overflow: hidden; }
.home-hero__worn img { width: 100%; height: 100%; object-fit: cover; }
.home-hero__art { position: absolute; right: 0.75rem; bottom: 0.75rem; width: 34%; background: rgba(255,255,255,0.94); border: 1px solid var(--color-border); padding: 0.4rem; }
.home-hero__art img { width: 100%; aspect-ratio: 1 / 1; object-fit: contain; }
.home-hero__art span { display: block; font-size: 0.62rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--color-muted); text-align: center; padding-top: 0.25rem; }
.home-hero__copy { padding: 0 var(--gutter); text-align: center; }
.home-hero__copy h1 { font-size: clamp(2rem, 8vw, 3.4rem); letter-spacing: 0.06em; margin-bottom: 0.3em; }
.home-hero__copy p { color: var(--color-muted); max-width: 42ch; margin: 0 auto 1.4rem; }
@media (min-width: 900px) {
  .home-hero { flex-direction: row; align-items: center; gap: 3rem; padding: 2.5rem var(--gutter) 3rem; }
  .home-hero__media { flex: 1 1 55%; }
  .home-hero__copy { flex: 1 1 40%; text-align: left; padding: 0; }
  .home-hero__copy p { margin-left: 0; }
  .home-hero__art { width: 30%; right: -1rem; bottom: 1.5rem; }
}

/* -------------------- Chips (collections) -------------------- */
.chips { display: flex; gap: 0.5rem; overflow-x: auto; justify-content: flex-start; padding: 0.25rem 0 0.5rem; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
@media (min-width: 700px) { .chips { justify-content: center; flex-wrap: wrap; } }
.chip-link { flex: 0 0 auto; border: 1px solid var(--color-border); border-radius: 999px; padding: 0.45rem 1rem; font-size: 0.85rem; background: var(--color-bg); }
.chip-link:hover { border-color: var(--color-text); }

.editorial-break { grid-column: 1 / -1; }
.editorial-break .pair { display: grid; max-width: 720px; margin: 0.5rem auto; }
.editorial-break--later { display: none; }
@media (min-width: 600px) { .editorial-break--later { display: block; } }
.collections .collection + .collection { margin-top: 2.5rem; }

/* -------------------- Trust / Art soon / signup -------------------- */
.trust { text-align: center; }
.trust__inner { max-width: 640px; margin: 0 auto; }
blockquote { font-family: var(--font-heading); font-style: italic; font-size: clamp(1.15rem, 3.4vw, 1.5rem); line-height: 1.45; margin: 0 0 1.5rem; }
.art-soon { text-align: center; padding: 3rem var(--gutter); background: var(--color-surface); border-top: 1px solid var(--color-border); border-bottom: 1px solid var(--color-border); }
.art-soon h1, .art-soon h2 { font-size: clamp(1.2rem, 3.6vw, 1.7rem); letter-spacing: 0.12em; }
.art-soon p:last-of-type { color: var(--color-muted); }
.art-gallery { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; max-width: var(--max-width); margin: 0 auto 2rem; }
@media (min-width: 800px) { .art-gallery { grid-template-columns: repeat(3, 1fr); } }
.art-tile { margin: 0; background: var(--color-surface); aspect-ratio: 1 / 1; }
.art-tile span { display: flex; width: 100%; height: 100%; padding: 1.2rem; }
.art-tile img { width: 100%; height: 100%; object-fit: contain; }
.prose { max-width: 640px; margin: 0 auto; padding: 1rem var(--gutter) 2rem; }

.signup { padding: 2.5rem var(--gutter); text-align: center; border-top: 1px solid var(--color-border); }
.signup__inner { max-width: 520px; margin: 0 auto; }
.signup h2 { font-size: 1.4rem; }
.signup p { color: var(--color-muted); }
.signup__form { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.signup__form input { flex: 1 1 200px; padding: 0.8rem 0.9rem; border: 1px solid var(--color-text); font: inherit; background: var(--color-bg); min-width: 0; }
.signup__form input[disabled] { background: var(--color-surface); border-color: var(--color-border); }
.signup__pending { font-size: 0.8rem; margin: 0.6rem 0 0; }
@media (max-width: 480px) { .signup__form .btn { flex: 1 1 100%; } }   /* the longer button label wraps below the field: make it a full-width row, not a left-aligned stub */

/* -------------------- Product page -------------------- */
.crumbs { max-width: var(--max-width); margin: 0 auto; padding: 0.9rem var(--gutter) 0; font-size: 0.85rem; color: var(--color-muted); }
.product { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.25rem; max-width: var(--max-width); margin: 0 auto; padding: 0.75rem var(--gutter) 2rem; }
.product__main { margin: 0; background: var(--color-surface); }
.product__main img { width: 100%; aspect-ratio: 1 / 1; object-fit: contain; background: var(--color-surface); }
.product__main figcaption { font-size: 0.8rem; color: var(--color-muted); padding: 0.5rem 0.2rem 0; min-height: 1.6rem; background: var(--color-bg); }
.thumbs { display: flex; gap: 0.5rem; overflow-x: auto; padding: 0.5rem 0; }
.thumb { flex: 0 0 4.2rem; aspect-ratio: 1 / 1; padding: 0; border: 2px solid transparent; background: var(--color-surface); cursor: pointer; position: relative; overflow: hidden; }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb--art img { object-fit: contain; padding: 0.25rem; }
.thumb span { position: absolute; left: 0; right: 0; bottom: 0; font-size: 0.55rem; text-transform: uppercase; letter-spacing: 0.06em; background: rgba(255,255,255,0.9); text-align: center; }
.thumb.is-active { border-color: var(--color-text); }
.ai-note { font-size: 0.72rem; color: var(--color-muted); margin: 0.2rem 0 0; }
.ai-note[hidden] { display: none; }

.product__info h1 { font-size: clamp(1.7rem, 5vw, 2.4rem); margin-bottom: 0.15em; }
.price { font-size: 1.7rem; font-weight: 700; margin: 0 0 0.4rem; }
.price small { font-size: 0.85rem; font-weight: 400; color: var(--color-muted); }
.price-groups { border: 1px solid var(--color-border); margin: 0 0 1rem; font-size: 0.9rem; }
.price-groups li { display: flex; justify-content: space-between; gap: 1rem; padding: 0.45rem 0.75rem; }
.price-groups li + li { border-top: 1px solid var(--color-border); }

.btn-buy { display: flex; flex-direction: column; align-items: center; justify-content: center; width: 100%; min-height: 3.6rem; padding: 0.7rem 1rem; border: 0; background: var(--color-cta); color: var(--color-cta-text); font-family: inherit; cursor: pointer; text-align: center; }
.btn-buy span { font-size: 1.05rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.btn-buy small { font-size: 0.72rem; opacity: 0.78; margin-top: 0.15rem; }
.btn-buy:hover { background: #000; }
.btn-buy[disabled] { background: #55524d; cursor: not-allowed; }
.buy__note { font-size: 0.8rem; color: var(--color-muted); margin: 0.6rem 0 1.25rem; }

.opts { display: grid; gap: 0.9rem; border-top: 1px solid var(--color-border); padding-top: 1rem; margin-bottom: 1.25rem; }
.opt h3 { font-family: var(--font-body); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--color-muted); margin: 0 0 0.3rem; }
.opt p { margin: 0; font-size: 0.95rem; }
.opt-note { color: var(--color-muted); font-size: 0.85rem !important; }
.opt-list { display: flex; flex-wrap: wrap; gap: 0.35rem 0.9rem; font-size: 0.95rem; }
.opt-list li { display: inline-flex; align-items: center; gap: 0.4rem; }
.dot { width: 0.85rem; height: 0.85rem; border-radius: 50%; border: 1px solid rgba(0,0,0,0.25); flex: none; }
.desc { font-size: 1rem; }
.credit { font-size: 0.85rem; color: var(--color-muted); }
.credit a { border-bottom: 1px solid currentColor; }

.buy-bar { display: none; }
@media (max-width: 899px) {
  .buy-bar { display: block; transform: translateY(110%); transition: transform 0.2s ease; position: fixed; left: 0; right: 0; bottom: 0; padding: 0.5rem var(--gutter) calc(0.5rem + env(safe-area-inset-bottom)); background: rgba(255,255,255,0.97); border-top: 1px solid var(--color-border); z-index: 90; }
  .buy-bar.is-visible { transform: none; }
  .buy-bar .btn-buy { min-height: 3rem; }
  .buy-bar .btn-buy small { display: none; }
}
@media (min-width: 900px) {
  .product { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 3rem; padding-top: 1.5rem; }
  .product__gallery { position: sticky; top: calc(var(--header-h) + 1rem); align-self: start; }
  .thumb { flex-basis: 4.8rem; }
}
.related { padding-top: 1rem; border-top: 1px solid var(--color-border); }

/* -------------------- Footer -------------------- */
.site-footer { border-top: 1px solid var(--color-border); padding: 2.5rem var(--gutter); margin-top: 2rem; text-align: center; color: var(--color-muted); font-size: 0.85rem; }
.site-footer .footer-links { display: flex; justify-content: center; gap: 1.5rem; margin-bottom: 1rem; flex-wrap: wrap; }
.footer-links a { padding: 0.4rem 0; }
.footer-social { display: flex; justify-content: center; gap: 1.25rem; margin-bottom: 1rem; }
.footer-social a { display: inline-block; padding: 0.6rem 1rem; border: 1px solid var(--color-border); color: var(--color-text); }
.footer-brand { color: var(--color-text); }

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }

/* -------------------- Logo placements -------------------- */
.home-hero__logo-wrap { margin: 0 0 0.4rem; font-size: 1rem; line-height: 0; }
.home-hero__logo { width: min(300px, 72vw); height: auto; margin: -1.5rem auto -1rem; }
.trust__logo { width: min(200px, 52vw); height: auto; margin: -1rem auto 0; }
@media (min-width: 900px) {
  .home-hero__logo { width: min(340px, 100%); margin: -2rem 0 -1.25rem -2.75rem; }
}

/* -------------------- Art coming-soon options -------------------- */
.art-options { display: grid; gap: 1rem; max-width: 720px; margin: 1.75rem auto 1.5rem; text-align: left; }
.art-option { margin: 0; border: 1px solid var(--color-border); background: var(--color-bg); padding: 1.1rem 1.2rem; }
.art-option h3 { font-size: 1.15rem; margin-bottom: 0.25rem; }
.art-option p { color: var(--color-muted); margin: 0 0 0.6rem; font-size: 0.95rem; }
.art-option__tag { display: inline-block; font-size: 0.65rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--color-muted); border: 1px solid var(--color-border); border-radius: 3px; padding: 1px 6px; }
.art-option--paint { padding: 0; display: flex; flex-direction: column; }
.art-option--paint img { width: 100%; height: auto; aspect-ratio: 1 / 1; object-fit: contain; }
.art-option--paint figcaption { padding: 0 1.2rem 1.1rem; }
.art-option--paint figcaption p { margin-bottom: 0.6rem; }
@media (min-width: 700px) { .art-options { grid-template-columns: 1fr 1fr; align-items: start; } }

/* -------------------- Collection pages -------------------- */
.chip-link.is-current { background: var(--color-text); color: var(--color-bg); border-color: var(--color-text); }
.collection .section-heading h2 a { border-bottom: 1px solid transparent; }
.collection .section-heading h2 a:hover { border-bottom-color: currentColor; }
.related-set[hidden] { display: none; }
