:root {
  color: #171911;
  background: #ffba13;
  font-family: system-ui, -apple-system, sans-serif;
  --cream: #fbf4e7;
  --ink-green: #203e20;
  --marigold: #ffbc0a;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  padding: clamp(16px, 8vw, 105px) clamp(12px, 7vw, 100px);
  background: linear-gradient(90deg, #ffb914 0 54%, #069742 54% 100%);
}
.page {
  max-width: 1320px;
  margin-inline: auto;
  display: grid;
  grid-template-columns: 1.06fr 1fr;
  grid-template-areas: "header hero" "intro hero" "collection hero" "about about";
  background: var(--cream);
  box-shadow: 0 9px 20px rgba(29, 28, 13, .16), 0 24px 54px rgba(29, 28, 13, .24);
}
.header, .intro, .collection, .about { padding-inline: clamp(20px, 3vw, 48px); }
.header {
  grid-area: header;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  column-gap: clamp(16px, 2.2vw, 36px);
  row-gap: 14px;
  padding-block: 24px;
}
.brand { display: inline-flex; align-items: center; gap: 9px; text-decoration: none; color: var(--ink-green); }
.brand strong { display: block; }
.brand strong { font-size: clamp(20px, 2.2vw, 31px); line-height: 1.05; font-weight: 850; letter-spacing: -.04em; }
.brand-tagline { display: block; width: clamp(132px, 16vw, 166px); height: auto; margin-top: 3px; }
nav { display: flex; gap: 18px; }
nav a { color: inherit; text-decoration: none; font-size: .94rem; }
nav a:hover { text-decoration: underline; }
.intro { grid-area: intro; align-self: center; padding-block: clamp(22px, 4vw, 52px); }
h1 { margin: 0; max-width: 12ch; font-size: clamp(2.35rem, 4.6vw, 4.6rem); line-height: 1.02; letter-spacing: -.065em; }
p { line-height: 1.55; }
.intro p { max-width: 35ch; margin: 18px 0 23px; font-size: clamp(1rem, 1.5vw, 1.25rem); }
.button { display: inline-block; padding: 13px 20px; background: var(--marigold); font-weight: 750; color: inherit; text-decoration: none; }
.button:hover { background: #f0a800; }
a:focus-visible { outline: 3px solid var(--ink-green); outline-offset: 4px; }
.hero { grid-area: hero; position: relative; margin: 0; background: var(--marigold); min-height: 520px; }
.hero img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero figcaption {
  position: absolute;
  inset: auto 5% 5% auto;
  max-width: 90%;
  background: var(--cream);
  padding: 10px 16px;
  font-size: clamp(1rem, 2vw, 1.65rem);
  font-weight: 800;
  letter-spacing: -.035em;
}
.collection { grid-area: collection; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; padding-block: 8px 28px; }
.collection figure { margin: 0; text-align: center; }
.collection img { display: block; width: 100%; max-width: 160px; height: auto; margin: 0 auto 6px; }
.collection figcaption { font-weight: 650; font-size: clamp(.78rem, 1.25vw, 1rem); line-height: 1.25; }
.about { grid-area: about; border-top: 1px solid #e2d7c2; padding-block: 26px 36px; }
.about h2 { margin: 0; font-size: 1.25rem; }
.about p { max-width: 64ch; margin: 8px 0 0; }
@media (max-width: 800px) {
  .page { grid-template-columns: minmax(0, 1fr); grid-template-areas: "header" "intro" "hero" "collection" "about"; }
  .hero { min-height: 0; aspect-ratio: 1; }
  .collection { padding-block-start: 22px; }
  .header { padding-bottom: 10px; }
  h1 { max-width: 14ch; }
}

.hero img.gallery-detail {
  object-fit: contain;
  background: #ffb30a;
}

/* Keep both frames visible during the crossfade, with the caption above them. */
.hero { overflow: hidden; isolation: isolate; }
.hero:has(.is-active) img {
  opacity: 0;
  transform: translateY(7px) scale(1.012);
  transition: opacity 780ms ease, transform 950ms cubic-bezier(.22,.61,.36,1);
}
.hero:has(.is-active) img.is-active {
  opacity: 1;
  transform: translateY(0) scale(1);
}
.hero figcaption { z-index: 1; }
@media (prefers-reduced-motion: reduce) {
  .hero:has(.is-active) img { transition: none; transform: none; }
}


.about article { max-width: 72ch; }
.about article h3 { margin: 1.8em 0 .4em; font-size: clamp(1.1rem, 2vw, 1.4rem); color: var(--ink-green); }
.about article p { max-width: none; margin: .7em 0; line-height: 1.7; }
.login-page { display: block; max-width: 660px; }
.login-page .about { border-top: 0; }
.login-page h1 { margin-top: 24px; }
.login-page .button { margin-top: 16px; }

.home-footer { padding-block: 18px; }
.story-page { display: block; }
.story-page .header { justify-content: space-between; }
.story-hero {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  background: var(--ink-green);
  color: var(--cream);
}
.story-heading { align-self: center; padding: clamp(24px, 6vw, 88px); }
.story-heading h1 { max-width: 10ch; }
.story-heading p { margin-bottom: 0; font-size: clamp(1rem, 2vw, 1.25rem); }
.about-photo { margin: 0; }
.about-photo img {
  display: block;
  width: 100%;
  height: clamp(270px, 39vw, 540px);
  object-fit: cover;
  object-position: center 56%;
}
.story-article { padding: clamp(20px, 5vw, 64px); }
.story-intro {
  max-width: 72ch;
  margin: 0 auto clamp(24px, 5vw, 56px);
}
.story-row {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  grid-template-areas: "copy illustration";
  align-items: center;
  gap: clamp(20px, 5vw, 66px);
  padding-block: clamp(24px, 4vw, 52px);
  border-top: 1px solid #ded0b8;
}
.story-row:nth-of-type(even) {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr);
  grid-template-areas: "illustration copy";
}
.story-copy { grid-area: copy; }
.story-copy h2 {
  color: var(--ink-green);
  margin: 0 0 .55em;
  font-size: clamp(1.35rem, 2.6vw, 2rem);
  letter-spacing: -.025em;
}
.story-article p { line-height: 1.75; text-align: justify; hyphens: auto; }
.story-illustration {
  grid-area: illustration;
  margin: 0;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 10px 26px #39291324;
}
.story-illustration img { display: block; width: 100%; height: auto; }
@media (max-width: 760px) {
  .story-row, .story-row:nth-of-type(even) {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "copy" "illustration";
  }
}
.story-footer { text-align: center; }
@media (max-width: 700px) {
  .story-hero { grid-template-columns: minmax(0, 1fr); }
  .about-photo img { height: auto; }
}

.site-copyright {
  margin: 24px auto 0;
  text-align: center;
  color: #151810;
  font-size: .85rem;
  font-weight: 650;
}
.site-copyright p { margin: 0; }

@media (min-width: 761px) {
  .story-row-fit .story-illustration {
    position: relative;
    align-self: stretch;
  }
  .story-row-fit .story-illustration img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 44%;
  }
}

.catalog { padding: clamp(20px, 4vw, 52px); }
.home-catalog { grid-column: 1 / -1; }
.catalog h1 { max-width: none; }
.catalog-category { padding-block: 22px; border-top: 1px solid #dfd2bc; }
.catalog-heading, .product-actions, .cart-items li, .catalog-navigation {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}
.catalog-heading, .cart-items li { justify-content: space-between; }
.catalog-heading { margin-bottom: 16px; }
.catalog-heading h2, .product-details h3 { margin: 0; color: var(--ink-green); }
.catalog-more { background: transparent; border: 1px solid #b8b0a0; }
.product-card {
  display: grid;
  grid-template-columns: minmax(130px, 245px) minmax(0, 1fr);
  gap: clamp(16px, 3vw, 40px);
  align-items: center;
}
.product-card img { width: 100%; height: auto; display: block; border-radius: 8px; }
.product-details p { margin: 6px 0; }
.product-price { font-weight: 750; font-size: 1.25rem; }
.product-size span { font-size: .82em; }
.product-actions { margin-top: 12px; }
.product-actions[hidden] { display: none; }
.product-actions label { display: inline-flex; align-items: center; gap: 8px; }
.product-actions input { width: 66px; min-height: 44px; padding: 6px; font: inherit; }
.product-actions .button, .cart-items .button { border: 0; cursor: pointer; font: inherit; font-weight: 750; }
.cart-feedback { font-size: .9rem; color: var(--ink-green); }
.catalog-navigation { margin-block: 18px; }
.catalog-navigation a { padding: 6px 10px; border: 1px solid #d4c4aa; }
.cart-items { list-style: none; padding: 0; }
.cart-items li { padding-block: 12px; border-bottom: 1px solid #dfd2bc; }
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
@media (max-width: 540px) {
  .product-card { grid-template-columns: minmax(0, 1fr); }
  .product-card img { max-width: 340px; }
}

.shop-home {
  grid-template-areas: "header hero" "intro hero" "collection hero" "about about" "catalog catalog";
}
.shop-home .home-footer {
  grid-area: about;
  padding: 12px clamp(20px, 3vw, 48px) 0;
}
.shop-home .home-catalog { grid-area: catalog; padding-top: 16px; }
.collection-header { border-bottom: 1px solid #dfd2bc; }
.collection-header nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  margin-left: auto;
}
.category-menu { position: relative; }
.category-menu summary { cursor: pointer; }
.category-menu ul {
  position: absolute;
  inset: calc(100% + 8px) auto auto 0;
  z-index: 2;
  min-width: max-content;
  padding: 6px;
  margin: 0;
  list-style: none;
  background: var(--cream);
  border: 1px solid #dfd2bc;
  box-shadow: 0 7px 20px #21170d24;
}
.category-menu li a { display: block; padding: 8px 12px; }
.category-menu a[aria-current="page"] { font-weight: 750; }
.collection-catalog h1 { font-size: clamp(1.9rem, 4vw, 3.4rem); margin-bottom: 18px; }
.product-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: clamp(10px, 1.7vw, 22px);
}
.product-grid .product-card {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  background: #fffaf1;
  border: 1px solid #e8ddcc;
  border-radius: 8px;
  overflow: hidden;
}
.product-grid .product-card img { max-width: none; border-radius: 0; }
.product-grid .product-details {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: clamp(9px, 1.1vw, 15px);
}
.product-grid .product-details h3 { font-size: 1rem; }
.product-grid .product-size, .product-grid .product-details p:not(.product-price) { font-size: .85rem; }
.product-grid .product-actions:not([hidden]) {
  display: grid;
  gap: 8px;
  margin-top: auto;
  padding-top: 10px;
}
.product-grid .product-actions input { min-height: 38px; }
.product-grid .product-actions .button { padding-inline: 8px; }
@media (max-width: 800px) {
  .shop-home { grid-template-areas: "header" "intro" "hero" "collection" "about" "catalog"; }
  .product-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 540px) {
  .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .collection-header nav { margin-left: 0; justify-content: flex-start; }
}

.product-share { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; }
.product-share button, .product-share a {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid #cabc9f;
  border-radius: 6px;
  background: #fffaf1;
  cursor: pointer;
}
.product-share button:hover, .product-share a:hover { background: #f1e8d5; }
.product-share button:focus-visible { outline: 3px solid var(--ink-green); outline-offset: 2px; }
.product-grid .product-share img { width: 22px; height: 22px; }
.share-notice { font-size: .8rem; color: var(--ink-green); }
.share-notice:empty { display: none; }
.product-card:target { outline: 2px solid var(--ink-green); scroll-margin-top: 16px; }

.product-photo-link { display: block; }
.product-details h3 a { color: inherit; text-decoration: none; }
.product-details h3 a:hover { text-decoration: underline; }
.product-page h1 { margin-block: 16px; font-size: clamp(2rem, 5vw, 4rem); }
.product-page .product-card { grid-template-columns: minmax(0, 420px) minmax(0, 1fr); }
@media (max-width: 660px) {
  .product-page .product-card { grid-template-columns: minmax(0, 1fr); }
}

.help-page { max-width: 940px; margin-inline: auto; }
.help-page h2 { margin: 22px 0 12px; color: var(--ink-green); }
.faq-list { margin-bottom: 26px; }
.faq-list details { border-top: 1px solid #dfd2bc; padding-block: 14px; }
.faq-list details:last-child { border-bottom: 1px solid #dfd2bc; }
.faq-list summary { cursor: pointer; font-weight: 700; color: var(--ink-green); }
.faq-list p { max-width: 70ch; margin: 10px 0 0; }

.site-copyright .privacy-link {
  display: inline-block;
  margin-inline-start: .45em;
  color: inherit;
  text-decoration: underline;
  text-underline-offset: .16em;
}
.privacy-page p { max-width: 72ch; text-align: justify; hyphens: auto; }
.privacy-page a { color: var(--ink-green); }
