/* Prairie House Herbals */

@font-face {
  font-family: "Oswald";
  src: url("/assets/fonts/oswald.woff2") format("woff2");
  font-weight: 200 700;
  font-display: swap;
}
@font-face {
  font-family: "DM Sans";
  src: url("/assets/fonts/dm-sans.woff2") format("woff2");
  font-weight: 100 1000;
  font-display: swap;
}

:root {
  /* Brand colour */
  --green-900: #1E3D35;   /* body text */
  --green-700: #2E5D50;   /* brand green, primary actions */
  --green-800: #244A40;   /* primary hover */
  --sage-300: #A3C9A8;    /* brand leaf */
  --sage-200: #C9DFCB;
  --sage-100: #E9F0E7;    /* tinted surface */
  --cream: #F8F6F0;       /* page */
  --white: #FFFFFF;
  --text: var(--green-900);
  --text-muted: #4D645B;

  /* Type */
  --font-display: "Oswald", "Arial Narrow", sans-serif;
  --font-body: "DM Sans", system-ui, sans-serif;

  /* Space */
  --gutter: clamp(1rem, 4vw, 2.5rem);
  --section: clamp(4rem, 9vw, 7rem);
  --header-h: 4.5rem;

  /* Surfaces */
  --radius-card: 24px;
  --radius-inner: 16px;
  --shadow-border:
    0px 0px 0px 1px oklch(0 0 0 / 0.06),
    0px 1px 2px -1px oklch(0 0 0 / 0.06),
    0px 2px 4px 0px oklch(0 0 0 / 0.04);
  --shadow-border-hover:
    0px 0px 0px 1px oklch(0 0 0 / 0.08),
    0px 1px 2px -1px oklch(0 0 0 / 0.08),
    0px 2px 4px 0px oklch(0 0 0 / 0.06);
  --image-outline: oklch(0 0 0 / 0.1);
  --ease-out-soft: cubic-bezier(0.2, 0, 0, 1);
}

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-padding-block-start: calc(var(--header-h) + 1rem);
  -webkit-text-size-adjust: 100%;
}
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  background: var(--cream);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-tap-highlight-color: transparent;
}

img, svg { display: block; max-width: 100%; height: auto; }
svg { flex-shrink: 0; }

h1, h2, h3 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--green-700);
  text-wrap: balance;
}
h1 { font-size: clamp(2.75rem, 6.5vw, 4.75rem); line-height: 1.05; letter-spacing: -0.01em; }
h2 { font-size: clamp(2rem, 4vw, 2.75rem); line-height: 1.15; letter-spacing: -0.01em; }
h3 { font-size: 1.75rem; line-height: 1.2; letter-spacing: -0.01em; }
p { margin: 0; text-wrap: pretty; }

a { color: inherit; }

.container {
  width: 100%;
  max-width: 72rem;
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.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-link {
  position: absolute;
  inset-inline-start: 1rem;
  inset-block-start: -4rem;
  z-index: 100;
  padding: 0.75rem 1rem;
  border-radius: 999px;
  background: var(--green-700);
  color: var(--white);
  font-weight: 600;
  text-decoration: none;
}
.skip-link:focus { inset-block-start: 1rem; }

:focus-visible {
  outline: 2px solid var(--green-700);
  outline-offset: 3px;
  border-radius: 6px;
}

/* ---------- Buttons and links ---------- */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 3rem;
  padding-block: 0.75rem;
  padding-inline: 1.5rem;
  border: 1px solid transparent;
  border-radius: 999px;
  font: 600 1rem/1.2 var(--font-body);
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition-property: background-color, color, scale;
  transition-duration: 150ms;
  transition-timing-function: ease-out;
}
.button:has(svg:last-child) { padding-inline-end: 1.375rem; }
.button:has(svg:first-child) { padding-inline-start: 1.375rem; }
.button:not(:disabled):active { scale: 0.96; }
.button:focus-visible { border-radius: 999px; }

.button--primary { background: var(--green-700); color: var(--white); }
.button--light { background: var(--white); color: var(--green-700); }
.button--light:focus-visible { outline-color: var(--white); }

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  min-height: 2.75rem;
  color: var(--green-700);
  font-weight: 600;
  text-decoration-line: underline;
  text-decoration-color: var(--sage-300);
  text-decoration-thickness: 2px;
  text-underline-offset: 0.3em;
  transition-property: text-decoration-color;
  transition-duration: 150ms;
  transition-timing-function: ease-out;
}

@media (hover: hover) {
  .button--primary:hover { background: var(--green-800); }
  .button--light:hover { background: var(--sage-100); }
  .text-link:hover { text-decoration-color: currentColor; }
  .nav-link:hover { background: var(--sage-100); }
  .icon-button:hover { background: var(--sage-100); }
}

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  inset-block-start: 0;
  z-index: 10;
  background: rgb(248 246 240 / 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 oklch(0 0 0 / 0.06);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: var(--header-h);
}
.brand { display: block; flex-shrink: 1; min-width: 0; }
.brand img { width: clamp(10.5rem, 30vw, 14.5rem); }

.nav { display: flex; align-items: center; gap: 0.25rem; }
.nav-link {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  padding-inline: 0.875rem;
  border-radius: 999px;
  color: var(--green-900);
  font-weight: 500;
  text-decoration: none;
  transition-property: background-color;
  transition-duration: 150ms;
  transition-timing-function: ease-out;
}
.icon-button {
  display: inline-grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 999px;
  color: var(--green-700);
  transition-property: background-color;
  transition-duration: 150ms;
  transition-timing-function: ease-out;
}
.icon-button:focus-visible { border-radius: 999px; }

@media (max-width: 40rem) {
  .nav-link--wide { display: none; }
}

/* ---------- Intro ---------- */

.intro { padding-block: clamp(3rem, 7vw, 5.5rem) clamp(2rem, 4vw, 3rem); }
.intro-text {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem clamp(2rem, 5vw, 4rem);
  max-width: 60rem;
  margin-block-start: 1.5rem;
}
.intro-text p { color: var(--text-muted); font-size: clamp(1.0625rem, 1.4vw, 1.1875rem); line-height: 1.6; }
@media (max-width: 48rem) {
  .intro-text { grid-template-columns: minmax(0, 1fr); }
}

/* Staged entrance, motion only when allowed */
@keyframes enter {
  from { opacity: 0; filter: blur(4px); translate: 0 12px; }
}
@media (prefers-reduced-motion: no-preference) {
  .enter {
    animation: enter 300ms ease-out both;
    animation-delay: calc(var(--i, 0) * 100ms);
  }
}

/* ---------- Banner ---------- */

.banner {
  display: grid;
  place-items: center;
  min-height: clamp(16rem, 34vw, 26rem);
  padding: clamp(2rem, 5vw, 3.5rem);
  border-radius: 32px;
  background:
    radial-gradient(circle at 15% 20%, rgb(163 201 168 / 0.45), transparent 40%),
    radial-gradient(circle at 85% 80%, rgb(163 201 168 / 0.45), transparent 42%),
    var(--sage-100);
}
.banner img { width: clamp(11rem, 24vw, 19rem); }

/* ---------- USPs ---------- */

.usps { padding-block: clamp(1.5rem, 4vw, 2.5rem) 0; }
.usp-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
  margin-block: 0;
  list-style: none;
}
.usp-list li {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.625rem;
  padding: 1.5rem 1rem;
  border: 1px solid transparent;
  border-radius: var(--radius-card);
  background: var(--white);
  box-shadow: var(--shadow-border);
  color: var(--green-900);
  font-weight: 600;
  text-align: center;
}
.usp-list svg { color: var(--green-700); }
@media (max-width: 44rem) {
  .usp-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ---------- Sections ---------- */

.section { padding-block: var(--section); }
.section--tint { background: var(--sage-100); }
.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
  margin-block-end: 2.5rem;
}
.count { margin-block-start: 0.375rem; color: var(--text-muted); font-size: 0.9375rem; font-variant-numeric: tabular-nums; }

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

.product {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(1.5rem, 4vw, 3rem);
  padding: 0.75rem;
  border: 1px solid transparent;
  border-radius: calc(var(--radius-inner) + 0.75rem + 1px);
  background: var(--white);
  box-shadow: var(--shadow-border);
  transition-property: box-shadow;
  transition-duration: 150ms;
  transition-timing-function: ease-out;
}
@media (hover: hover) {
  .product:hover { box-shadow: var(--shadow-border-hover); }
}
.product-media {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: var(--radius-inner);
  background: var(--sage-100);
  outline: 1px solid var(--image-outline);
  outline-offset: -1px;
}
.product-media img:not(.product-fallback) {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.product-fallback { width: 40%; opacity: 0.9; }
.product-body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-block: clamp(0.5rem, 2vw, 1.5rem);
  padding-inline-end: clamp(0.75rem, 3vw, 2rem);
}
.product-text { margin-block-start: 0.75rem; max-width: 30rem; color: var(--text-muted); font-size: 1.0625rem; }
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1.25rem 0 0;
  padding: 0;
  list-style: none;
}
.tags li {
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  background: var(--sage-100);
  color: var(--green-900);
  font-size: 0.875rem;
  font-weight: 500;
  white-space: nowrap;
}
.product-buy {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.5rem;
  margin-block-start: 2rem;
}
.price {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 600;
  line-height: 1;
  color: var(--green-700);
  font-variant-numeric: tabular-nums;
}

@media (max-width: 48rem) {
  .product { grid-template-columns: minmax(0, 1fr); }
  .product-body { padding: 0.5rem 0.75rem 1rem; }
}

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

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-block: -1rem 2rem;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 2.75rem;
  padding-inline: 1.125rem;
  border: 1px solid oklch(0 0 0 / 0.12);
  border-radius: 999px;
  background: var(--white);
  color: var(--green-900);
  font: 500 0.9375rem/1.2 var(--font-body);
  cursor: pointer;
  transition-property: background-color, color, border-color, scale;
  transition-duration: 150ms;
  transition-timing-function: ease-out;
}
.chip:not(:disabled):active { scale: 0.96; }
.chip:focus-visible { border-radius: 999px; }
.chip-n { color: var(--text-muted); font-variant-numeric: tabular-nums; }
.chip[aria-pressed="true"] { background: var(--green-700); border-color: var(--green-700); color: var(--white); }
.chip[aria-pressed="true"] .chip-n { color: var(--sage-200); }
@media (hover: hover) {
  .chip[aria-pressed="false"]:hover { background: var(--sage-100); }
}

.tea-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(1.5rem, 3vw, 2.5rem) clamp(1rem, 2vw, 1.5rem);
  margin: 0;
  padding: 0;
  list-style: none;
}
@media (max-width: 64rem) { .tea-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 44rem) { .tea-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.tea { position: relative; display: flex; flex-direction: column; }
.tea[hidden] { display: none; }
.tea-media {
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: var(--radius-inner);
  background: var(--sage-100) url("/assets/img/mark.webp") center / 38% no-repeat;
  outline: 1px solid var(--image-outline);
  outline-offset: -1px;
}
.tea-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition-property: scale;
  transition-duration: 300ms;
  transition-timing-function: var(--ease-out-soft);
}
.tea-name {
  margin-block-start: 0.875rem;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: 0;
  color: var(--green-900);
  text-wrap: pretty;
}
.tea-name a { text-decoration: none; }
.tea-name a::after { content: ""; position: absolute; inset: 0; border-radius: var(--radius-inner); }
.tea-name a:focus-visible { outline: none; }
.tea-name a:focus-visible::after { outline: 2px solid var(--green-700); outline-offset: 4px; }
.tea-desc { margin-block-start: 0.25rem; color: var(--text-muted); font-size: 0.875rem; line-height: 1.5; }
.tea-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.25rem 0.625rem;
  margin-block-start: auto;
  padding-block-start: 0.625rem;
}
.tea-price { color: var(--green-700); font-weight: 700; font-variant-numeric: tabular-nums; }
.tea-size { color: var(--text-muted); font-size: 0.875rem; }
@media (hover: hover) {
  .tea:hover .tea-name a { text-decoration: underline; text-decoration-color: var(--sage-300); text-decoration-thickness: 2px; text-underline-offset: 0.25em; }
}
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .tea:hover .tea-media img { scale: 1.03; }
}
.shop-note { margin-block-start: 2.5rem; color: var(--text-muted); font-size: 0.9375rem; }

/* ---------- Feature ---------- */

.feature { background: var(--green-700); color: var(--white); padding-block: clamp(4rem, 8vw, 6rem); }
.feature-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
  align-items: center;
  gap: clamp(2rem, 6vw, 5rem);
}
.feature h2 { color: var(--white); }
.feature p { margin-block: 1rem 2rem; max-width: 32rem; color: var(--sage-200); font-size: 1.125rem; }
.feature-art {
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  max-width: 20rem;
  justify-self: end;
  width: 100%;
  border-radius: 999px;
  background: var(--white);
  padding: 2.5rem;
}
.feature-art img { width: 100%; }
@media (max-width: 48rem) {
  .feature-inner { grid-template-columns: minmax(0, 1fr); }
  .feature-art { justify-self: start; max-width: 9rem; padding: 1.25rem; }
}

/* ---------- Footer ---------- */

.site-footer { padding-block: 2.5rem; }
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 2rem;
  color: var(--text-muted);
  font-size: 0.9375rem;
}
.footer-logo { width: 9.5rem; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 0.25rem 1.25rem; margin-inline-start: auto; }
.footer-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  color: var(--green-900);
  text-decoration: none;
  font-weight: 500;
}
@media (hover: hover) {
  .footer-nav a:hover { text-decoration: underline; text-underline-offset: 0.3em; }
}
.footer-copy { width: 100%; }
@media (min-width: 60rem) {
  .footer-copy { width: auto; }
}
