@layer reset, base, components, responsive;

@font-face {
  font-family: Fraunces;
  src: url("./assets/fonts/Fraunces-Variable.ttf") format("truetype");
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: Fraunces;
  src: url("./assets/fonts/Fraunces-Italic-Variable.ttf") format("truetype");
  font-style: italic;
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: "DM Sans";
  src: url("./assets/fonts/DMSans-Variable.ttf") format("truetype");
  font-style: normal;
  font-weight: 100 1000;
  font-display: swap;
}

@layer reset {
  *, *::before, *::after { box-sizing: border-box; }
  html { scroll-behavior: smooth; }
  body, h1, h2, h3, h4, p, figure, blockquote { margin: 0; }
  img, svg { display: block; max-width: 100%; }
  a { color: inherit; }
}

@layer base {
  :root {
    --paper: #f5f1e8;
    --paper-light: #fbf8f2;
    --ink: #25352d;
    --forest: #283e33;
    --sage: #aeb99b;
    --clay: #985137;
    --ochre: #d8bd88;
    --line: #d9d5c9;
    --serif: Fraunces, Iowan Old Style, Georgia, serif;
    --sans: "DM Sans", Avenir Next, Segoe UI, Arial, sans-serif;
  }
  body { background: var(--paper); color: var(--ink); font-family: var(--sans); font-optical-sizing: auto; -webkit-font-smoothing: antialiased; }
  ::selection { background: var(--sage); color: var(--forest); }
  :focus-visible { outline: 2px solid var(--clay); outline-offset: 5px; }
  .shell { width: min(100% - 3rem, 1320px); margin-inline: auto; }
  h1, h2, h3, h4 { font-family: var(--serif); font-weight: 430; font-variation-settings: "SOFT" 55, "WONK" 1; }
  h1, h2 { text-wrap: balance; }
  h1 em, h2 em { color: var(--clay); font-weight: 410; }
  p { line-height: 1.7; }
  section { scroll-margin-top: 5rem; }
}

@layer components {
  .skip-link { position: absolute; z-index: 100; top: -5rem; left: 1rem; padding: .7rem 1rem; background: var(--forest); color: white; }
  .skip-link:focus { top: 1rem; }
  .site-header { border-bottom: 1px solid var(--line); }
  .header-inner { min-height: 86px; display: flex; align-items: center; justify-content: space-between; gap: 2rem; }
  .wordmark { display: inline-flex; flex-direction: column; width: 142px; color: var(--forest); text-decoration: none; line-height: .9; white-space: nowrap; }
  .wordmark-top { font-family: var(--serif); font-size: 1.7rem; font-weight: 500; letter-spacing: .08em; }
  .wordmark-bottom { margin-top: .45rem; font-size: .65rem; font-weight: 600; letter-spacing: .32em; }
  .main-nav { display: flex; gap: clamp(1.5rem, 4vw, 4rem); align-items: center; }
  .main-nav a, .header-note { font-size: .8rem; font-weight: 600; letter-spacing: .025em; }
  .main-nav a { text-decoration: none; transition: color .2s ease; }
  .main-nav a:hover, .site-footer a:hover { color: var(--clay); }
  .header-note { border: 1px solid var(--ink); border-radius: 100px; padding: .75rem 1rem; white-space: nowrap; }
  .header-note span { margin-left: .65rem; font-size: 1rem; }

  .hero { display: grid; grid-template-columns: 1.08fr .92fr; align-items: stretch; gap: clamp(2.5rem, 5.5vw, 6rem); padding-block: clamp(2.5rem, 3vw, 3rem) clamp(3rem, 4vw, 4rem); }
  .hero-copy { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; padding-block: 1rem; }
  .eyebrow, .section-kicker { color: var(--clay); font-size: .7rem; font-weight: 700; letter-spacing: .18em; line-height: 1.3; text-transform: uppercase; }
  .eyebrow { display: flex; align-items: center; gap: .9rem; }
  .eyebrow-line { width: 2rem; height: 1px; background: currentColor; }
  .hero h1 { margin-top: 1.5rem; font-size: clamp(4.2rem, 6.8vw, 7.5rem); line-height: 1.01; letter-spacing: -.06em; }
  .hero h1 em { display: inline-block; margin-top: .06em; }
  .hero-description { max-width: 30rem; margin-top: 1.5rem; color: #526056; font-size: clamp(1rem, 1.23vw, 1.16rem); line-height: 1.7; }
  .text-link { display: inline-flex; gap: 1.5rem; align-items: center; margin-top: 1.6rem; padding-bottom: .55rem; border-bottom: 1px solid var(--ink); font-size: .84rem; font-weight: 700; text-decoration: none; transition: gap .2s ease, color .2s ease; }
  .text-link:hover { gap: 2rem; color: var(--clay); }
  .text-link span { font-size: 1.1rem; }
  .hero-offer { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin-top: 1.5rem; color: #687467; font-size: .72rem; letter-spacing: .035em; }
  .hero-offer strong { color: var(--forest); font-weight: 700; }
  .hero-offer span { color: var(--clay); }
  .hero-figure { position: relative; height: min(44vw, 620px); min-height: 480px; align-self: stretch; overflow: hidden; border-radius: 48% 48% 2px 2px / 22% 22% 2px 2px; background: var(--ochre); box-shadow: 15px 16px 0 #e3dfd2; }
  .hero-figure::after { content: ""; position: absolute; inset: 0; border: 1px solid #745d3d33; border-radius: inherit; pointer-events: none; }
  .hero-figure img { width: 100%; height: 100%; object-fit: cover; object-position: center 60%; }
  .hero-flourish { position: absolute; top: 13%; right: 14%; width: clamp(74px, 8vw, 118px); overflow: visible; color: var(--clay); opacity: .58; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; pointer-events: none; mix-blend-mode: multiply; }
  .hero-flourish path:nth-child(2) { fill: #a89466; fill-opacity: .22; }
  .hero-figure figcaption { position: absolute; right: 1.4rem; bottom: 1.4rem; left: 1.4rem; padding: .8rem 1rem; background: #f5f1e8e8; color: var(--forest); font-family: var(--serif); font-size: .95rem; font-style: italic; text-align: center; }

  .qualities { border-block: 1px solid var(--line); background: var(--paper-light); }
  .qualities-inner { min-height: 74px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem 1.2rem; padding-block: 1rem; color: var(--forest); font-size: .68rem; font-weight: 700; letter-spacing: .15em; }
  .quality-star { color: var(--clay); font-size: 1.2rem; }

  .products { padding-block: clamp(4rem, 5vw, 5rem); background: var(--paper-light); }
  .products-intro { display: grid; grid-template-columns: 1fr minmax(230px, 320px); gap: 0 3rem; align-items: end; }
  .products-intro .section-kicker { grid-column: 1 / -1; }
  .products-intro > p:last-child { padding-bottom: .45rem; color: #536056; font-size: 1rem; }
  .products-intro h2, .story-copy h2, .ingredients h2, .closing h2 { margin-top: 1.1rem; font-size: clamp(3.2rem, 5.3vw, 6rem); line-height: 1.08; letter-spacing: -.05em; }
  .product-group { margin-top: clamp(3rem, 4vw, 4rem); }
  .product-group--care { padding-top: clamp(3rem, 4vw, 4rem); border-top: 1px solid var(--line); }
  .product-group-heading { display: flex; align-items: end; justify-content: space-between; gap: 1.5rem 3rem; }
  .product-group-label, .product-card-kicker { color: var(--clay); font-size: .65rem; font-weight: 700; letter-spacing: .13em; line-height: 1.35; text-transform: uppercase; }
  .product-group-heading h3 { margin-top: .65rem; font-size: clamp(2.15rem, 3.15vw, 3.6rem); line-height: 1.1; letter-spacing: -.045em; }
  .group-price { padding-bottom: .35rem; color: var(--forest); font-size: .78rem; font-weight: 700; white-space: nowrap; }
  .group-price span { padding-inline: .3rem; color: var(--clay); }
  .product-group-intro { max-width: 18rem; padding-bottom: .35rem; color: #536056; font-size: .9rem; }
  .product-grid { display: grid; gap: 1rem; margin-top: 1.5rem; }
  .product-grid--soap { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .product-grid--care { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .product-card { display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--line); background: var(--paper); }
  .product-card img { width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; object-position: center 58%; border-bottom: 1px solid var(--line); }
  .product-card-copy { display: flex; flex: 1; flex-direction: column; padding: 1.25rem 1.3rem 1.55rem; }
  .product-card h4 { margin-top: .55rem; font-size: clamp(1.4rem, 1.8vw, 1.8rem); line-height: 1.17; letter-spacing: -.03em; text-wrap: balance; }
  .product-card-copy > h4 + p { margin-top: .8rem; color: #59675c; font-size: .86rem; line-height: 1.6; }
  .product-card-price { display: flex; align-items: baseline; gap: .65rem; margin-top: auto; padding-top: 1rem; color: var(--forest); line-height: 1.2; }
  .product-card-price strong { font-family: var(--serif); font-size: 1.4rem; font-weight: 500; }
  .product-card-price span { color: #687467; font-size: .78rem; }
  .product-details { margin-top: .5rem; }
  .product-details summary { display: flex; align-items: center; justify-content: space-between; padding-top: .7rem; border-top: 1px solid var(--line); color: var(--forest); cursor: pointer; font-size: .73rem; font-weight: 700; letter-spacing: .03em; list-style: none; }
  .product-details summary::-webkit-details-marker { display: none; }
  .product-details summary::after { content: "+"; color: var(--clay); font-size: 1.1rem; font-weight: 400; line-height: 1; }
  .product-details[open] summary::after { content: "−"; }
  .product-details > p { margin-top: .8rem; color: #59675c; font-size: .83rem; line-height: 1.6; }

  .story { display: grid; grid-template-columns: .9fr 1.1fr; align-items: center; gap: clamp(2rem, 5vw, 5rem); padding-block: clamp(3.5rem, 5vw, 5rem); }
  .story-ornament { width: min(100%, 440px); justify-self: center; }
  .story-ornament img { width: 100%; height: auto; }
  .story-copy blockquote { max-width: 35rem; margin-top: 1.5rem; }
  .story-copy blockquote p { color: #546056; font-size: 1rem; line-height: 1.65; }
  .story-copy blockquote p + p { margin-top: .9rem; }
  .story-copy cite { display: block; margin-top: 1rem; color: var(--clay); font-size: .7rem; font-style: normal; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }

  .ingredients { position: relative; overflow: hidden; padding-block: clamp(4rem, 5vw, 5rem) 6rem; background: var(--forest); color: #f7f2e8; }
  .ingredients-inner { position: relative; z-index: 1; display: grid; grid-template-columns: 1.15fr .85fr; gap: clamp(3rem, 9vw, 9rem); align-items: end; }
  .ingredients .section-kicker { color: var(--ochre); }
  .ingredients h2 em { color: var(--ochre); }
  .ingredients-copy > p { max-width: 28rem; color: #d8dfd2; font-size: 1.05rem; }
  .ingredient-list { display: flex; flex-wrap: wrap; gap: .7rem; margin: 2rem 0 0; padding: 0; list-style: none; }
  .ingredient-list li { padding: .6rem .9rem; border: 1px solid #8ca18c; border-radius: 100px; color: #f5f1e8; font-size: .75rem; }
  .canyon-lines { position: absolute; right: 0; bottom: 0; left: 0; height: 135px; opacity: .33; }
  .canyon-lines svg { width: 100%; height: 100%; fill: none; stroke: #afbd9f; stroke-width: 1.5; }

  .closing { display: flex; flex-direction: column; align-items: center; padding-block: 4rem; text-align: center; }
  .closing h2 { max-width: 970px; }
  .closing-logo { width: clamp(230px, 28vw, 340px); height: auto; margin-top: 2rem; mix-blend-mode: multiply; }
  .site-footer { border-top: 1px solid var(--line); }
  .footer-inner { min-height: 76px; display: flex; justify-content: space-between; align-items: center; gap: 1rem; color: #59645b; font-size: .75rem; }
  .site-footer a { color: var(--forest); font-weight: 700; text-decoration: none; }
}

@layer responsive {
  @media (max-width: 1050px) {
    .header-note { display: none; }
    .hero { min-height: 0; grid-template-columns: 1fr 1fr; gap: 2rem; }
    .hero h1 { font-size: clamp(3.7rem, 6vw, 6rem); }
    .hero-figure { min-height: 480px; }
    .product-grid--soap, .product-grid--care { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  }
  @media (max-width: 760px) {
    .shell { width: min(100% - 2rem, 640px); }
    .header-inner { min-height: 84px; gap: 1rem; }
    .main-nav { gap: 1rem; }
    .main-nav a { font-size: .72rem; }
    .hero { grid-template-columns: 1fr; gap: 1.6rem; padding-block: 2.75rem 3rem; }
    .hero-copy { padding: 0; }
    .hero h1 { margin-top: 1.5rem; font-size: clamp(4rem, 12vw, 6rem); }
    .hero-description { margin-top: 1.6rem; }
    .hero-side-note { display: none; }
    .hero-figure { min-height: 0; height: min(96vw, 520px); }
    .qualities-inner { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem 1rem; justify-content: center; text-align: center; }
    .quality-star { display: none; }
    .products-intro { grid-template-columns: 1fr; }
    .products-intro > p:last-child { margin-top: 1rem; }
    .product-group-heading { align-items: start; flex-direction: column; }
    .product-grid--care { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .story { grid-template-columns: 1fr; gap: 1.75rem; }
    .story-ornament { width: min(66%, 270px); }
    .story-copy { order: -1; }
    .ingredients-inner { grid-template-columns: 1fr; }
    .ingredients-inner { gap: 2rem; }
    .footer-inner { flex-wrap: wrap; justify-content: center; padding-block: 2rem; text-align: center; }
  }
  @media (max-width: 500px) {
    .header-inner { flex-wrap: wrap; justify-content: center; padding-block: 1.2rem; }
    .wordmark { align-items: center; }
    .main-nav { width: 100%; justify-content: center; }
    .hero { padding-top: 2.5rem; }
    .hero h1 { font-size: clamp(3.65rem, 14vw, 5rem); }
    .hero h1 em { white-space: normal; }
    .hero-figure { height: 96vw; }
    .hero-figure figcaption { right: .7rem; bottom: .7rem; left: .7rem; font-size: .8rem; }
    .qualities-inner { gap: .6rem .8rem; padding-block: 1.1rem; font-size: .63rem; }
    .story { padding-block: 3rem; }
    .story-ornament { width: min(62%, 220px); }
    .products, .closing { padding-block: 3.5rem; }
    .product-grid--soap, .product-grid--care { grid-template-columns: 1fr; }
    .product-card h4 { font-size: 1.65rem; }
    .ingredients { padding-block: 3.5rem 5.5rem; }
    .canyon-lines { height: 110px; }
    .closing-logo { width: 220px; margin-top: 2rem; }
    .products-intro h2, .story-copy h2, .ingredients h2, .closing h2 { font-size: clamp(3rem, 13vw, 4.8rem); }
  }
  @media (max-width: 360px) {
    .hero h1 em { font-size: .8em; white-space: nowrap; }
  }
  @media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
  }
}
