/* ==========================================================================
   Sigma Taurus — pages.css
   Page-specific sections. Split further if this file outgrows readability.
   ========================================================================== */

/* --------------------------------------------------------------------------
   Home — hero
   -------------------------------------------------------------------------- */
.hero {
  background-color: var(--color-mint);
  padding-block: clamp(2.5rem, 1.5rem + 4vw, 5rem) 0;
}

.hero__grid {
  display: grid;
  gap: var(--space-lg);
  align-items: end;
}

.hero__title {
  font-size: var(--fs-display);
  margin-bottom: 0;
  max-width: 16ch;
}

.hero__aside {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-lg);
}

.hero__text {
  font-size: var(--fs-lead);
  color: var(--color-text-muted);
  max-width: 42ch;
}

.hero__figure {
  margin: clamp(2rem, 1.2rem + 3vw, 3.5rem) 0 0;
}

.hero__image {
  width: 100%;
  aspect-ratio: 16 / 7;
  object-fit: cover;
  border-radius: var(--radius-lg);
}

@media (min-width: 820px) {
  .hero__grid {
    grid-template-columns: 1.35fr 1fr;
    gap: var(--space-2xl);
  }
}

/* --------------------------------------------------------------------------
   Split section — image one side, copy the other (Our Legacy, Who We Are)
   -------------------------------------------------------------------------- */
.split {
  display: grid;
  gap: var(--space-xl);
  align-items: center;
}

.split__media {
  margin: 0;
}

.split__image {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--radius-md);
}

@media (min-width: 820px) {
  .split {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-3xl);
  }

  /* Modifier flips the visual order without touching source order, so the
     reading order stays sensible for screen readers. */
  .split--media-right .split__media {
    order: 2;
  }
}

/* --------------------------------------------------------------------------
   Services — numbered cards
   -------------------------------------------------------------------------- */
.services__head {
  margin-bottom: var(--space-2xl);
}

.services__grid {
  display: grid;
  gap: var(--space-lg);
}

.service-card {
  background-color: var(--color-white);
  border-radius: var(--radius-md);
  padding: var(--space-xl);
  box-shadow: var(--shadow-card);
  transition: box-shadow var(--transition), transform var(--transition);
}

.service-card:hover {
  box-shadow: var(--shadow-card-hover);
  transform: translateY(-3px);
}

.service-card__number {
  display: block;
  margin-bottom: var(--space-sm);
  font-size: var(--fs-small);
  font-weight: 700;
  color: var(--color-teal);
  letter-spacing: 0.08em;
}

.service-card__title {
  font-size: var(--fs-h3);
  margin-bottom: var(--space-xs);
}

.service-card__text {
  color: var(--color-text-muted);
  font-size: var(--fs-small);
  margin: 0;
}

@media (min-width: 700px) {
  .services__grid {
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-xl);
  }

  /* Stagger, echoing the existing site's offset cards. */
  .services__grid > :nth-child(2) {
    transform: translateY(var(--space-xl));
  }

  .services__grid > :nth-child(2):hover {
    transform: translateY(calc(var(--space-xl) - 3px));
  }

  .services__grid > :nth-child(3) {
    transform: translateY(calc(var(--space-xl) * 2));
  }

  .services__grid > :nth-child(3):hover {
    transform: translateY(calc(var(--space-xl) * 2 - 3px));
  }

  /* Reclaim the space the stagger pushes past the section edge. */
  .services {
    padding-bottom: calc(var(--section-y) + var(--space-xl) * 2);
  }
}

/* --------------------------------------------------------------------------
   CTA banner
   -------------------------------------------------------------------------- */
.cta {
  background-color: var(--color-teal);
  border-radius: var(--radius-lg);
  padding: clamp(2rem, 1.4rem + 2.4vw, 3.5rem);
  display: grid;
  gap: var(--space-lg);
  align-items: center;
  justify-items: start;
}

.cta__title {
  color: var(--color-text-invert);
  font-size: var(--fs-h2);
  margin-bottom: var(--space-xs);
  max-width: 20ch;
}

.cta__text {
  color: var(--color-text-invert-muted);
  margin: 0;
  max-width: 48ch;
}

@media (min-width: 820px) {
  .cta {
    grid-template-columns: 1fr auto;
    gap: var(--space-2xl);
    justify-items: stretch;
    align-items: center;
  }
}

/* --------------------------------------------------------------------------
   Why choose us — dark photo background
   -------------------------------------------------------------------------- */
.why {
  position: relative;
  background-color: var(--color-ink);
  background-image: url("../assets/img/feed-3.jpg");
  background-size: cover;
  background-position: center;
  isolation: isolate;
}

/* Scrim keeps text contrast well clear of WCAG AA over the photo. */
.why::before {
  content: "";
  position: absolute;
  inset: 0;
  background-color: rgba(15, 20, 22, 0.78);
  z-index: -1;
}

.why__title {
  color: var(--color-text-invert);
}

.why__lead {
  color: var(--color-text-invert-muted);
  font-size: var(--fs-lead);
  max-width: 58ch;
}

.why__head {
  margin-bottom: var(--space-2xl);
}

.why__grid {
  display: grid;
  gap: var(--space-xl);
}

.feature__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  margin-bottom: var(--space-md);
  background-color: var(--color-teal);
  border-radius: var(--radius-pill);
  color: var(--color-text-invert);
}

.feature__icon svg {
  width: 26px;
  height: 26px;
}

.feature__title {
  color: var(--color-text-invert);
  font-size: var(--fs-h3);
  margin-bottom: var(--space-xs);
}

.feature__text {
  color: var(--color-text-invert-muted);
  font-size: var(--fs-small);
  margin: 0;
}

@media (min-width: 700px) {
  .why__grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* --------------------------------------------------------------------------
   Process — numbered steps
   -------------------------------------------------------------------------- */
.process__head {
  margin-bottom: var(--space-2xl);
}

.process__grid {
  display: grid;
  gap: var(--space-xl);
  counter-reset: step;
}

.step {
  border-top: 2px solid var(--color-border);
  padding-top: var(--space-lg);
}

.step__label {
  display: block;
  margin-bottom: var(--space-sm);
  font-size: var(--fs-eyebrow);
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--color-teal);
}

.step__title {
  font-size: var(--fs-h3);
  margin-bottom: var(--space-xs);
}

.step__text {
  color: var(--color-text-muted);
  font-size: var(--fs-small);
  margin: 0;
}

@media (min-width: 700px) {
  .process__grid {
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-2xl);
  }
}

/* --------------------------------------------------------------------------
   About — stat cards
   -------------------------------------------------------------------------- */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-md);
  margin-top: var(--space-lg);
}

.stat {
  background-color: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-lg);
}

.stat__value {
  display: block;
  font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2.125rem);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.stat__label {
  display: block;
  margin-top: var(--space-2xs);
  font-size: var(--fs-small);
  color: var(--color-text-muted);
}

/* --------------------------------------------------------------------------
   About — milestones: card overlapping a photo
   -------------------------------------------------------------------------- */
.milestone {
  display: grid;
  gap: var(--space-lg);
  align-items: center;
}

.milestone__card {
  background-color: var(--color-white);
  border-radius: var(--radius-md);
  padding: clamp(1.5rem, 1.1rem + 1.6vw, 2.5rem);
  box-shadow: var(--shadow-card);
}

.milestone__image {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--radius-md);
}

.milestone__media {
  margin: 0;
}

@media (min-width: 900px) {
  .milestone {
    grid-template-columns: 1fr 1fr;
    gap: 0;
  }

  .milestone__card {
    position: relative;
    z-index: 1;
    /* Overlap the photo, echoing the original layout. */
    margin-right: calc(var(--space-2xl) * -1);
  }
}

/* --------------------------------------------------------------------------
   Contact — details panel + photo
   -------------------------------------------------------------------------- */
.contact-panel {
  display: grid;
  gap: 0;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-card);
}

.contact-panel__body {
  background-color: var(--color-mint);
  padding: clamp(1.5rem, 1.1rem + 1.8vw, 3rem);
}

.contact-panel__media {
  margin: 0;
}

.contact-panel__image {
  width: 100%;
  height: 100%;
  min-height: 240px;
  object-fit: cover;
}

.contact-list {
  margin: var(--space-lg) 0 0;
}

.contact-list__term {
  font-size: var(--fs-eyebrow);
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.contact-list__detail {
  margin: var(--space-2xs) 0 var(--space-lg);
}

.contact-list__detail:last-child {
  margin-bottom: 0;
}

.contact-list__detail a {
  color: var(--color-text);
  text-decoration: none;
}

.contact-list__detail a:hover {
  color: var(--color-teal-darker);
  text-decoration: underline;
}

@media (min-width: 820px) {
  .contact-panel {
    grid-template-columns: 1fr 1fr;
  }
}

/* --------------------------------------------------------------------------
   Contact — form
   -------------------------------------------------------------------------- */
.contact-form__grid {
  display: grid;
  gap: var(--space-xl);
  align-items: start;
}

.field {
  margin-bottom: var(--space-md);
}

.field__label {
  display: block;
  margin-bottom: var(--space-2xs);
  font-size: var(--fs-small);
  font-weight: 500;
}

.field__input,
.field__textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  font-family: inherit;
  font-size: var(--fs-body);
  color: var(--color-text);
  background-color: var(--color-mint-deep);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  transition: border-color var(--transition), background-color var(--transition);
}

.field__input:focus,
.field__textarea:focus {
  background-color: var(--color-white);
  border-color: var(--color-teal);
}

.field__textarea {
  min-height: 150px;
  resize: vertical;
}

.form-note {
  margin-top: var(--space-md);
  font-size: var(--fs-small);
  color: var(--color-text-muted);
}

@media (min-width: 820px) {
  .contact-form__grid {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-3xl);
  }
}

/* --------------------------------------------------------------------------
   Products — grid of cards
   Adding or removing a card is just adding/removing one <article>; the grid
   reflows on its own. See PROGRESS.md for the full add/remove recipe.
   -------------------------------------------------------------------------- */
.product-grid {
  display: grid;
  gap: var(--space-xl);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
}

.product-card {
  display: flex;
  flex-direction: column;
  background-color: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: box-shadow var(--transition), transform var(--transition);
}

.product-card:hover {
  box-shadow: var(--shadow-card-hover);
  transform: translateY(-3px);
}

.product-card__media {
  margin: 0;
}

.product-card__image {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

/* Bag packshots are tall portraits — cropping them 4/3 would cut the label
   off, so they are contained on a mint panel instead. The aspect-ratio is
   still fixed, and taller than the cropped variant, so every card in the grid
   keeps a uniform image block and the titles below stay aligned. */
.product-card__image--contain {
  aspect-ratio: 1 / 1;
  object-fit: contain;
  background-color: var(--color-mint);
  padding: var(--space-md);
}

.product-card__body {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  padding: var(--space-lg);
}

.product-card__title {
  font-size: var(--fs-h3);
  margin-bottom: var(--space-xs);
}

.product-card__text {
  color: var(--color-text-muted);
  font-size: var(--fs-small);
  /* Push the button to the bottom so uneven copy still lines the buttons up. */
  margin-bottom: var(--space-lg);
}

.product-card__action {
  margin-top: auto;
  align-self: flex-start;
}

/* --------------------------------------------------------------------------
   Product detail
   -------------------------------------------------------------------------- */
.product-detail__image {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  border-radius: var(--radius-md);
}

/* Packshot — a photograph of the bag itself. Unlike every other image on the
   site this one is CONTAINED, not cropped: the bags are tall portraits and
   the label is the whole point, so object-fit: cover would cut the product
   name off. The mint panel gives the keyed-out edges something to sit on.

   max-width keeps the panel close to the painted image. Without it the panel
   stretches to the full grid column and the bag floats in ~100px of mint on
   each side, which reads as a mistake rather than as a backdrop. */
.product-detail__packshot {
  display: block;
  width: 100%;
  max-width: 24rem;
  max-height: 30rem;
  margin-inline: auto;
  object-fit: contain;
  background-color: var(--color-mint);
  border-radius: var(--radius-md);
  padding: var(--space-lg);
}

/* Title metadata — range / type / season, shown as label ⇒ value pairs. */
.product-meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md) var(--space-xl);
  margin: var(--space-lg) 0 0;
}

.product-meta__item {
  margin: 0;
}

.product-meta__label {
  font-size: var(--fs-eyebrow);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-teal-darker);
}

.product-meta__value {
  margin: 0;
  font-weight: 500;
}

/* Selling-point icons — 2 or 3 per product. */
.selling-points {
  display: grid;
  gap: var(--space-xl);
}

.selling-point {
  text-align: center;
}

.selling-point__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  margin-bottom: var(--space-md);
  background-color: var(--color-teal);
  border-radius: var(--radius-pill);
  color: var(--color-text-invert);
}

.selling-point__icon svg {
  width: 28px;
  height: 28px;
}

.selling-point__title {
  font-size: var(--fs-h3);
  margin-bottom: var(--space-xs);
}

.selling-point__text {
  color: var(--color-text-muted);
  font-size: var(--fs-small);
  margin: 0;
}

@media (min-width: 700px) {
  .selling-points {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  }
}

/* Further benefits, below the icon trio. The icons carry the three headline
   claims; this carries the rest as plain prose so the trio stays a trio. */
.benefit-list {
  max-width: 68ch;
  margin: var(--space-2xl) auto 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: var(--space-sm);
}

.benefit-list__item {
  position: relative;
  padding-left: var(--space-xl);
  color: var(--color-text-muted);
  font-size: var(--fs-small);
}

.benefit-list__item::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-color: var(--color-teal);
}

/* Ingredients + analytical components, side by side on wide screens. */
.spec-grid {
  display: grid;
  gap: var(--space-2xl);
  align-items: start;
}

.spec__title {
  font-size: var(--fs-h3);
  margin-bottom: var(--space-md);
}

/* The additives paragraph — dense regulatory text, deliberately quieter. */
.spec__note {
  margin-top: var(--space-lg);
  font-size: var(--fs-small);
  color: var(--color-text-muted);
}

/* The table on its own, no longer paired with the ingredients column. It sits
   on a mint section, so it needs its own white surface — otherwise the mint
   thead disappears into the background.

   Padding is fluid: at 360px a fixed 2rem each side would leave less than the
   table's 320px min-width, pushing it into a horizontal scroll it does not
   actually need. .table-wrap still scrolls as a backstop. */
.spec--table {
  max-width: 40rem;
  background-color: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-lg) clamp(0.75rem, -0.5rem + 5vw, 2rem);
}

.ingredient-list {
  margin: 0;
  padding-left: 1.1rem;
  color: var(--color-text-muted);
}

.ingredient-list li {
  margin-bottom: var(--space-2xs);
}

/* Table scrolls rather than overflowing on narrow screens. */
.table-wrap {
  overflow-x: auto;
}

.spec-table {
  /* Floor, not a target: below this the two columns start colliding. Sized to
     survive a 360px screen inside the padded .spec--table panel. */
  min-width: 280px;
  font-size: var(--fs-small);
}

.spec-table caption {
  text-align: left;
  color: var(--color-text-muted);
  margin-bottom: var(--space-sm);
}

.spec-table th,
.spec-table td {
  padding: var(--space-sm) var(--space-md);
  text-align: left;
  border-bottom: 1px solid var(--color-border);
}

.spec-table thead th {
  background-color: var(--color-mint);
  font-weight: 600;
}

.spec-table tbody tr:last-child th,
.spec-table tbody tr:last-child td {
  border-bottom: 0;
}

.spec-table tbody th {
  font-weight: 500;
}

@media (min-width: 820px) {
  .spec-grid {
    grid-template-columns: 1fr 1.2fr;
  }
}
