/* Chindustry: colors taken from the fabrics */
:root {
  --sail: #f4f5f2;
  --studio: #e6e8e3;      /* backdrop behind product photos */
  --surface: #ffffff;
  --ink: #172633;
  --deep: #12202b;        /* dark band behind About */
  --muted: #4f5d69;
  --blue: #1d78a8;
  --orange: #ef6a2a;
  --red: #d8432b;
  --yellow: #f6b324;
  --olive: #7a6e42;
  --gray: #9ea4ab;
  --line: rgba(23, 38, 51, .14);

  --display: "Bricolage Grotesque", "Arial Narrow", "Helvetica Neue", Arial, sans-serif;
  --body: "Instrument Sans", "Helvetica Neue", Arial, sans-serif;

  --pad: clamp(1.1rem, 4vw, 3rem);
  --max: 1400px;
  --header-h: 84px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --sail: #13202b;
    --studio: #1f2e3a;
    --surface: #1b2b38;
    --ink: #eef1f2;
    --deep: #0b151d;
    --muted: #a9b5bd;
    --line: rgba(238, 241, 242, .16);
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}

body {
  margin: 0;
  font-family: var(--body);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--sail);
}

img { max-width: 100%; display: block; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }

h1, h2, h3 { font-family: var(--display); margin: 0; line-height: 1; }

/* Big condensed headings */
.section-head h2, .about h2, .shipping h2, .product-info h1 {
  font-weight: 800;
  font-stretch: 78%;
  font-variation-settings: "wdth" 78;
  text-transform: uppercase;
  letter-spacing: -.005em;
  line-height: .92;
}

.skip {
  position: absolute; left: -999px; top: .5rem;
  background: var(--yellow); color: #172633; padding: .5rem 1rem; z-index: 50;
}
.skip:focus { left: .5rem; }

/* ---------- Announcement + header ---------- */

.announce {
  margin: 0;
  padding: .55rem var(--pad);
  background: #172633;
  color: #fff;
  font-size: .88rem;
  font-weight: 600;
  text-align: center;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: color-mix(in srgb, var(--sail) 88%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: .7rem var(--pad);
  min-height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.brand { display: inline-flex; text-decoration: none; }
.brand-slot { display: inline-flex; align-items: center; }
.brand-logo { height: 62px; width: auto; max-width: 200px; object-fit: contain; }

/* Stand-in until a tag image is uploaded: a woven label */
.brand-label {
  display: inline-block;
  background: var(--yellow);
  color: #c4321e;
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  padding: .55rem .9rem .5rem;
  border-radius: 2px;
  box-shadow: inset 0 0 0 3px var(--yellow), inset 0 0 0 4px rgba(196, 50, 30, .45);
}

.site-nav { display: flex; gap: clamp(1rem, 3vw, 2.2rem); }
.site-nav a {
  font-weight: 700;
  font-size: .95rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  text-decoration: none;
  padding: .3rem 0;
  border-bottom: 2px solid transparent;
}
.site-nav a:hover { border-bottom-color: var(--orange); }

/* ---------- Hero: your photo, full width ---------- */

.hero {
  position: relative;
  min-height: clamp(480px, 78vh, 780px);
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  background: var(--deep);
  color: #fff;
}
.hero-img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  opacity: 0;
  transition: opacity .5s ease;
  /* framing chosen in the editor */
  object-position: var(--focus, 50% 50%);
  transform-origin: var(--focus, 50% 50%);
  transform: scale(var(--zoom, 1));
}
@media (max-width: 800px) {
  .hero-img {
    object-position: var(--focus-phone, var(--focus, 50% 50%));
    transform-origin: var(--focus-phone, var(--focus, 50% 50%));
    transform: scale(var(--zoom-phone, var(--zoom, 1)));
  }
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  --sx: 15%; --sy: 85%;
  background: radial-gradient(ellipse 85% 95% at var(--sx) var(--sy), rgba(10, 20, 28, .78), rgba(10, 20, 28, .35) 60%, rgba(10, 20, 28, .12));
}
.hero[data-text-h="center"]::after { --sx: 50%; }
.hero[data-text-h="right"]::after { --sx: 85%; }
.hero[data-text-v="top"]::after { --sy: 20%; }
.hero[data-text-v="middle"]::after { --sy: 50%; }

.hero[data-text-v="top"] { align-items: flex-start; }
.hero[data-text-v="middle"] { align-items: center; }
.hero[data-text-v="top"] .hero-inner { padding-top: clamp(2.5rem, 7vw, 5rem); }
.hero[data-text-v="middle"] .hero-inner { padding-top: clamp(2.5rem, 7vw, 5rem); }
.hero[data-text-h="center"] .hero-inner { text-align: center; }
.hero[data-text-h="center"] .hero-inner > * { margin-left: auto; margin-right: auto; }
.hero[data-text-h="right"] .hero-inner { text-align: right; }
.hero[data-text-h="right"] .hero-inner > * { margin-left: auto; margin-right: 0; }

.hero.no-photo .hero-img { display: none; }
.hero-img.is-loaded, .about-photo img.is-loaded { opacity: 1; }

/* hold the banner text until your settings are in, so old wording never flashes */
.hero-inner { opacity: 0; transition: opacity .35s ease; animation: show-anyway 0s linear 2.5s forwards; }
.settings-ready .hero-inner { opacity: 1; animation: none; }
@keyframes show-anyway { to { opacity: 1; } }

.hero-inner {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--pad) clamp(2.5rem, 7vw, 5rem);
}
.hero h1 {
  max-width: 15ch;
  font-size: clamp(2.6rem, 6.4vw, 5.6rem);
  font-weight: 800;
  font-stretch: 82%;
  font-variation-settings: "wdth" 82;
  line-height: .93;
  letter-spacing: -.015em;
  text-wrap: balance;
}
.hero h1 .accent { display: block; color: var(--yellow); }
.hero h1 .accent:empty { display: none; }
.hero p { max-width: 46ch; margin-top: 1.1rem; margin-bottom: 1.8rem; font-size: clamp(1.02rem, 1.4vw, 1.18rem); color: rgba(255, 255, 255, .9); }

/* ---------- Buttons ---------- */

.button {
  display: inline-block;
  font: 700 1rem var(--body);
  letter-spacing: .02em;
  text-decoration: none;
  text-align: center;
  color: #fff;
  background: var(--blue);
  padding: .95rem 1.6rem;
  border-radius: 3px;
  border: 0;
  box-shadow: 0 3px 0 rgba(10, 20, 28, .35);
  transition: transform .15s ease, box-shadow .15s ease;
}
.button:hover { transform: translateY(-2px); box-shadow: 0 5px 0 rgba(10, 20, 28, .35); }
.button:active { transform: translateY(1px); box-shadow: 0 1px 0 rgba(10, 20, 28, .35); }
.button-yellow { background: var(--yellow); color: #172633; }
.button.is-disabled { background: var(--gray); color: #22303b; cursor: not-allowed; box-shadow: none; transform: none; }

/* ---------- Shop grid ---------- */

.shop, .past, .shipping {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(3rem, 7vw, 5.5rem) var(--pad) clamp(2rem, 5vw, 3.5rem);
}

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: .5rem 1.5rem;
  margin-bottom: clamp(1.5rem, 3vw, 2.4rem);
  padding-bottom: 1rem;
  border-bottom: 2px solid var(--ink);
}
.section-head h2 { font-size: clamp(2.3rem, 5.5vw, 4.2rem); }
.count { margin: 0; font-weight: 600; color: var(--muted); }

.shop-message { color: var(--muted); font-size: 1.05rem; }

.grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 290px), 1fr));
  gap: clamp(2rem, 4vw, 3rem) clamp(1rem, 2vw, 1.6rem);
}

.card-link { display: block; text-decoration: none; }

.card-photo {
  position: relative;
  aspect-ratio: 4 / 5;
  background: var(--studio);
  border-radius: 4px;
  overflow: hidden;
}
.card-photo img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .6s cubic-bezier(.2, .7, .2, 1), opacity .35s ease;
}
.card-link:hover .card-photo img { transform: scale(1.04); }
.card-photo .alt { opacity: 0; }
.card-link:hover .has-alt .alt { opacity: 1; }

.card-text { padding-top: .9rem; }
.card-text h3 { font-size: 1.3rem; font-weight: 700; letter-spacing: -.01em; line-height: 1.15; }
.card-link:hover h3 { text-decoration: underline; text-decoration-color: var(--orange); text-decoration-thickness: 2px; text-underline-offset: 4px; }
.card-text p { margin: .3rem 0 0; font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }

/* price on a hang tag, a different fabric color for each piece */
.price-tag {
  position: absolute;
  left: 14px;
  bottom: 16px;
  z-index: 1;
  padding: .55rem 1rem .55rem 1.7rem;
  font: 700 1.05rem/1 var(--body);
  background: var(--tag, var(--orange));
  color: var(--tag-ink, #172633);
  clip-path: polygon(12px 0, 100% 0, 100% 100%, 12px 100%, 0 calc(100% - 12px), 0 12px);
  transform: rotate(var(--tilt, -3deg));
  filter: drop-shadow(0 4px 6px rgba(10, 20, 28, .3));
}
.price-tag::before {
  content: "";
  position: absolute;
  left: 8px; top: 50%;
  width: 8px; height: 8px; margin-top: -4px;
  border-radius: 50%;
  background: var(--studio);
}
.card:nth-child(5n+1) { --tag: var(--orange); --tilt: -3deg; }
.card:nth-child(5n+2) { --tag: var(--yellow); --tilt: 2deg; }
.card:nth-child(5n+3) { --tag: var(--blue); --tag-ink: #fff; --tilt: -2deg; }
.card:nth-child(5n+4) { --tag: var(--red); --tag-ink: #fff; --tilt: 3deg; }
.card:nth-child(5n+5) { --tag: var(--gray); --tilt: -1.5deg; }

.status {
  display: inline-block;
  font: 700 .74rem/1 var(--body);
  text-transform: uppercase;
  letter-spacing: .1em;
  padding: .5rem .7rem;
  background: #172633;
  color: #fff;
}
.card-photo .status { position: absolute; top: 14px; left: 0; z-index: 1; }

/* ---------- New-product alerts ---------- */

.signup { max-width: var(--max); margin: 0 auto; padding: 0 var(--pad) clamp(2.5rem, 6vw, 4rem); }
.signup-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 1.2rem clamp(2rem, 5vw, 4rem);
  align-items: center;
  padding: clamp(1.8rem, 4vw, 2.8rem) clamp(1.5rem, 4vw, 3rem);
  border-radius: 6px;
  color: #fff;
  background-color: var(--blue);
  /* ripstop grid */
  background-image:
    linear-gradient(rgba(255, 255, 255, .08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .08) 1px, transparent 1px);
  background-size: 14px 14px;
}
.signup h2 {
  font-weight: 800;
  font-stretch: 78%;
  font-variation-settings: "wdth" 78;
  text-transform: uppercase;
  line-height: .95;
  font-size: clamp(1.8rem, 3.6vw, 2.8rem);
}
.signup-text p { margin: .7rem 0 0; color: rgba(255, 255, 255, .88); max-width: 46ch; }
.signup-form { display: flex; gap: .6rem; flex-wrap: wrap; }
.signup-form input[type="email"] {
  flex: 1 1 14rem;
  min-width: 0;
  font: 500 1rem var(--body);
  padding: .9rem 1rem;
  border: 2px solid transparent;
  border-radius: 3px;
  background: #fff;
  color: #172633;
}
.signup-form input[type="email"]:focus { outline: none; border-color: var(--yellow); }
.signup-form .button { flex: none; }
.signup-form .button:disabled { opacity: .7; cursor: wait; transform: none; }
.signup-status { margin: .7rem 0 0; font-weight: 600; min-height: 1.4em; }
.signup-status:empty { display: none; }
.hp { position: absolute; left: -9999px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Already sold ---------- */

.past { padding-top: 0; }
.past .section-head h2 { font-size: clamp(1.6rem, 3.2vw, 2.4rem); }
.past-grid {
  list-style: none; margin: 0; padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 1rem;
}
.past-grid a { text-decoration: none; }
.past-photo { aspect-ratio: 1; border-radius: 4px; overflow: hidden; background: var(--studio); }
.past-photo img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(.75); opacity: .85; }
.past-grid p { margin: .5rem 0 0; font-size: .9rem; color: var(--muted); }

/* ---------- About: dark band ---------- */

.about { background: var(--deep); color: #eef1f2; margin-top: clamp(2rem, 5vw, 3rem); }
.about-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(3.5rem, 8vw, 6.5rem) var(--pad);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  gap: clamp(2.5rem, 6vw, 5.5rem);
  align-items: center;
}
.about-photo { position: relative; margin: 0 1.2rem 1.2rem 0; }
.about-photo::before { /* offset fabric block behind the photo */
  content: "";
  position: absolute;
  inset: 1.2rem -1.2rem -1.2rem 1.2rem;
  background: var(--orange);
  border-radius: 4px;
}
.about-photo img { position: relative; width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 4px; opacity: 0; transition: opacity .5s ease; background: #22313d; }
.about.no-photo .about-photo { display: none; }
.about.no-photo .about-inner { grid-template-columns: 1fr; }

.about h2 { font-size: clamp(2.6rem, 6vw, 4.6rem); color: var(--yellow); margin-bottom: 1.5rem; }
.about .prose { font-size: 1.1rem; color: rgba(238, 241, 242, .88); }
.prose { max-width: 60ch; }
.prose p { margin: 0 0 1em; }
.contact { display: flex; flex-wrap: wrap; gap: 1.5rem; font-weight: 700; margin-top: 1.5rem; }
.contact a { text-decoration-color: var(--yellow); text-decoration-thickness: 2px; text-underline-offset: 5px; }

/* ---------- Shipping ---------- */

.shipping { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 1rem 3rem; align-items: start; }
.shipping h2 { font-size: clamp(2rem, 4.5vw, 3.2rem); }
.shipping .prose { font-size: 1.08rem; padding-top: .4rem; }

/* ---------- Footer: big pieced wordmark ---------- */

.site-footer { overflow: hidden; padding: clamp(2rem, 5vw, 3.5rem) 0 1.5rem; border-top: 1px solid var(--line); }
.footer-word {
  display: block;
  width: calc(100% - 2 * var(--pad));
  height: auto;
  margin: 0 var(--pad);
  font-family: var(--display);
  font-weight: 800;
  font-stretch: 75%;
  font-variation-settings: "wdth" 75;
  font-size: 160px;
  letter-spacing: -.02em;
}
.footer-word { opacity: 0; transition: opacity .3s ease; }
.settings-ready .footer-word { opacity: 1; }
.has-footer-logo .footer-word { display: none; }
.footer-logo {
  display: block;
  margin: 0 var(--pad);
  max-width: calc(100% - 2 * var(--pad));
  max-height: clamp(90px, 16vw, 240px);
  width: auto;
  height: auto;
  object-fit: contain;
}
.footer-logo[hidden] { display: none; }
.footer-note { max-width: var(--max); margin: 1.5rem auto 0; padding: 0 var(--pad); color: var(--muted); font-size: .9rem; }

/* ---------- Product page ---------- */

.product { max-width: var(--max); margin: 0 auto; padding: clamp(1.5rem, 4vw, 3rem) var(--pad) clamp(3rem, 7vw, 5rem); }
.missing { padding: 3rem 0; }
.missing .shop-message { margin-bottom: 1.5rem; }

.product-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: clamp(1.5rem, 5vw, 4.5rem);
  align-items: start;
}
.gallery { display: flex; flex-direction: column; gap: 1rem; }
.gallery img { width: 100%; border-radius: 4px; background: var(--studio); }

.product-info { position: sticky; top: calc(var(--header-h) + 1.5rem); }
.back { display: inline-block; margin-bottom: 1.4rem; font-weight: 700; font-size: .9rem; text-decoration-color: var(--orange); text-decoration-thickness: 2px; text-underline-offset: 4px; }
.eyebrow { margin: 0 0 .5rem; font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); }
.product-info h1 { font-size: clamp(2.6rem, 5vw, 4rem); }
.product-price { display: flex; align-items: center; gap: .8rem; font-size: 1.6rem; font-weight: 700; margin: 1rem 0; min-height: 1rem; }
.lede { font-size: 1.12rem; color: var(--muted); max-width: 48ch; }
.actions { display: flex; flex-direction: column; align-items: stretch; gap: 1rem; margin: 1.6rem 0 1rem; max-width: 26rem; }
.button-big { font-size: 1.08rem; padding: 1.1rem 1.6rem; }
.ask { font-weight: 700; text-align: center; text-decoration-color: var(--orange); text-decoration-thickness: 2px; text-underline-offset: 4px; }

.one-off { display: flex; align-items: center; gap: .7rem; font-weight: 600; margin: 0 0 1.8rem; }
.one-off::before {
  content: "";
  flex: none;
  width: 22px; height: 22px;
  border-radius: 3px;
  background: linear-gradient(135deg, var(--red) 0 33%, var(--orange) 33% 55%, var(--gray) 55% 78%, var(--yellow) 78%);
}

.details {
  display: grid; grid-template-columns: max-content 1fr; gap: .6rem 1.4rem;
  margin: 1.5rem 0; padding: 1.2rem 0;
  border-top: 2px solid var(--ink); border-bottom: 1px solid var(--line);
}
.details dt { font-weight: 700; }
.details dd { margin: 0; color: var(--muted); }
.ship-note { color: var(--muted); font-size: .95rem; max-width: 52ch; }
.ship-note h2 { font: 700 .8rem var(--body); text-transform: uppercase; letter-spacing: .12em; color: var(--ink); margin-bottom: .5rem; }

/* ---------- Small screens ---------- */

@media (max-width: 800px) {
  :root { --header-h: 68px; }
  .brand-logo { height: 48px; max-width: 140px; }
  .brand-label { font-size: .86rem; padding: .45rem .65rem .4rem; }
  .site-nav { gap: .9rem; }
  .site-nav a { font-size: .82rem; letter-spacing: .04em; }
  .hero { min-height: 82vh; }
  .about-inner, .shipping, .product-layout, .signup-inner { grid-template-columns: 1fr; }
  .product { padding-top: 0; }
  .product-layout { margin: 0 calc(-1 * var(--pad)); }
  .product-info { position: static; padding: 0 var(--pad); }
  .gallery {
    flex-direction: row;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: 0;
  }
  .gallery img { flex: 0 0 100%; scroll-snap-align: start; border-radius: 0; aspect-ratio: 4 / 5; object-fit: cover; }
  .actions { max-width: none; }
}

@media (max-width: 560px) {
  .grid { grid-template-columns: 1fr 1fr; gap: 1.6rem .8rem; }
  .card-text h3 { font-size: 1rem; }
  .card-text p { font-size: .68rem; }
  .price-tag { left: 8px; bottom: 10px; font-size: .88rem; padding: .45rem .7rem .45rem 1.35rem; }
  .price-tag::before { left: 6px; width: 6px; height: 6px; margin-top: -3px; }
  .card-photo .status { top: 8px; font-size: .62rem; padding: .4rem .5rem; }
}

/* ---------- Checkout window ---------- */

.checkout-open, .checkout-open body { overflow: hidden; }
.checkout {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 1rem;
  background: rgba(10, 20, 28, .6);
}
.checkout-panel {
  position: relative;
  width: min(100%, 1000px);
  max-height: calc(100vh - 2rem);
  overflow-y: auto;
  background: #fff;
  color: #172633;
  border-radius: 8px;
  padding: 3rem 1rem 1rem;
}
.checkout-close {
  position: absolute;
  top: .5rem; right: .6rem;
  width: 44px; height: 44px;
  border: 0; border-radius: 50%;
  background: transparent;
  font: 400 2rem/1 var(--body);
  color: #172633;
  cursor: pointer;
}
.checkout-close:hover { background: #eef1f2; }
.checkout-note { margin: 0 0 1rem; text-align: center; color: #4f5d69; }
.checkout-note:empty { display: none; }
.checkout-note.is-error { color: #b4321e; font-weight: 600; }
.checkout-ship { margin: 0 auto .8rem; max-width: 40rem; text-align: center; font-size: .9rem; color: #1e5631; }
.checkout-ship:empty { display: none; }
.checkout-ship.is-error { color: #b4321e; font-weight: 600; word-break: break-word; }
.checkout-detail { margin: -.5rem auto 1rem; max-width: 40rem; text-align: center; font-size: .85rem; color: #4f5d69; word-break: break-word; }
.thanks { margin: 0; padding: 1rem 1.2rem; border-radius: 4px; background: #e9f5ec; color: #1e5631; font-weight: 600; max-width: 26rem; }
button.button { cursor: pointer; }
button.button:disabled { opacity: .75; cursor: wait; transform: none; }

@media (max-width: 600px) {
  .checkout { padding: 0; place-items: stretch; }
  .checkout-panel { max-height: none; height: 100%; border-radius: 0; }
}
