/* Page-owned styles for /psy/ */

#psy-main {
  display: block;
}

.psy-section {
  padding-block: var(--space-5xl);
}

.psy-section--alt {
  background-color: var(--color-surface-alt);
}

.psy-section__title {
  margin-block-end: var(--space-2xl);
}

.psy-section__title--center {
  text-align: center;
  margin-inline: auto;
}

/* Hero */
.psy-hero {
  position: relative;
  min-height: 80vh;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  background-color: var(--color-forest-deep);
}

.psy-hero__media {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.psy-hero__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  border-radius: 0;
}

.psy-hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(31, 61, 40, 0.05) 0%, rgba(31, 61, 40, 0.55) 55%, rgba(31, 61, 40, 0.85) 100%);
}

.psy-hero__content {
  position: relative;
  z-index: 1;
  padding-block: var(--space-4xl);
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--container-pad-desktop);
}

.psy-hero__title {
  color: #ffffff;
  max-width: 12ch;
  margin-block-end: var(--space-xl);
  font-size: clamp(2rem, 4vw + 0.5rem, 3.5rem);
  line-height: 1.05;
}

.psy-hero__lead {
  color: rgba(255, 255, 255, 0.92);
  max-width: 62ch;
  margin-block-end: var(--space-2xl);
  font-size: var(--text-body-large-size);
  line-height: var(--text-body-large-leading);
}

.psy-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-lg);
  align-items: center;
}

.psy-hero__button {
  min-width: 200px;
}

.psy-hero__button--outline {
  color: #ffffff;
  border-color: #ffffff;
  background-color: rgba(255, 255, 255, 0.08);
}

.psy-hero__button--outline:hover {
  background-color: #ffffff;
  color: var(--color-forest-deep);
}

/* Categories */
.psy-categories {
  background-color: var(--color-canvas);
}

.psy-categories__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-xl);
}

.psy-category-card {
  position: relative;
  display: block;
  border-radius: var(--radius-md);
  overflow: hidden;
  min-width: 0;
  background-color: var(--color-surface);
  box-shadow: var(--shadow-card);
  transition: box-shadow var(--transition-fast), transform var(--transition-fast);
}

.psy-category-card:hover {
  box-shadow: var(--shadow-elevated);
  transform: translateY(-2px);
}

.psy-category-card__media {
  aspect-ratio: 4 / 3;
  width: 100%;
  overflow: hidden;
}

.psy-category-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  border-radius: 0;
  transition: transform var(--transition-medium);
}

.psy-category-card:hover .psy-category-card__media img {
  transform: scale(1.03);
}

.psy-category-card__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(31, 61, 40, 0) 40%, rgba(31, 61, 40, 0.75) 100%);
}

.psy-category-card__content {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: var(--space-xl);
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.psy-category-card__title {
  color: #ffffff;
  font-size: var(--text-h3-size);
  line-height: var(--text-h3-leading);
  margin-block-end: 0;
}

.psy-category-card__count {
  color: rgba(255, 255, 255, 0.85);
  font-size: var(--text-small-size);
  line-height: var(--text-small-leading);
  margin-block-end: 0;
}

/* Product grids */
.psy-products__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--space-xl);
}

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

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

.psy-product-card__visual {
  aspect-ratio: 1 / 1;
  width: 100%;
  background-color: var(--color-surface-alt);
  display: flex;
  align-items: center;
  justify-content: center;
}

.psy-product-card__placeholder {
  width: 60%;
  height: 60%;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--color-caramel-soft), var(--color-surface));
  border: 1px solid var(--color-border);
}

.psy-product-card__body {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  padding: var(--space-xl);
  flex: 1 1 auto;
}

.psy-product-card__badge {
  align-self: flex-start;
}

.psy-product-card__title {
  font-size: var(--text-h4-size);
  line-height: var(--text-h4-leading);
  margin-block-end: 0;
  color: var(--color-forest-deep);
}

.psy-product-card__desc {
  font-size: var(--text-small-size);
  line-height: var(--text-small-leading);
  color: var(--color-ink-muted);
  margin-block-end: 0;
}

.psy-product-card__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-sm);
  margin-block-start: auto;
}

.psy-product-card__price {
  font-weight: 700;
  color: var(--color-caramel);
  font-size: var(--text-body-large-size);
}

.psy-product-card__rating {
  font-size: var(--text-small-size);
  color: var(--color-ink-muted);
}

.psy-product-card__add {
  width: 100%;
  min-height: 3rem;
}

/* Brands */
.psy-brands__intro {
  max-width: 62ch;
  margin-inline: auto;
  text-align: center;
  margin-block-end: var(--space-2xl);
  color: var(--color-ink-muted);
}

.psy-brands__row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: var(--space-2xl);
}

.psy-brand {
  font-family: var(--font-heading);
  font-size: var(--text-h3-size);
  font-weight: 600;
  color: var(--color-forest-deep);
  opacity: 0.8;
  min-width: 0;
  text-align: center;
}

/* Editorial sections */
.psy-editorial {
  background-color: var(--color-canvas);
}

.psy-editorial--reverse {
  background-color: var(--color-surface-alt);
}

.psy-editorial__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-3xl);
  align-items: center;
}

.psy-editorial__content {
  min-width: 0;
}

.psy-editorial__content h2 {
  margin-block-end: var(--space-xl);
}

.psy-editorial__lead {
  max-width: 62ch;
  margin-block-end: var(--space-lg);
}

.psy-editorial__content p:not(.psy-editorial__lead) {
  max-width: 62ch;
  margin-block-end: var(--space-lg);
}

.psy-editorial__media {
  min-width: 0;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-card);
}

.psy-editorial__media img {
  width: 100%;
  height: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  object-position: center;
  border-radius: 0;
}

.psy-editorial__products {
  grid-column: 1 / -1;
  margin-block-start: var(--space-2xl);
}

.psy-editorial__products h3 {
  margin-block-end: var(--space-xl);
}

.psy-mini-products {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-xl);
}

.psy-mini-product {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-xl);
  min-width: 0;
  transition: box-shadow var(--transition-fast);
}

.psy-mini-product:hover {
  box-shadow: var(--shadow-card);
}

.psy-mini-product__name {
  font-weight: 700;
  color: var(--color-forest-deep);
  font-size: var(--text-body-size);
  line-height: var(--text-body-leading);
}

.psy-mini-product__desc {
  font-size: var(--text-small-size);
  line-height: var(--text-small-leading);
  color: var(--color-ink-muted);
}

.psy-mini-product__price {
  font-weight: 700;
  color: var(--color-caramel);
  margin-block-start: auto;
}

/* Guides */
.psy-guides {
  background-color: var(--color-canvas);
}

.psy-guides__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-xl);
}

.psy-guide-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  transition: box-shadow var(--transition-fast), transform var(--transition-fast);
}

.psy-guide-card:hover {
  box-shadow: var(--shadow-elevated);
  transform: translateY(-2px);
}

.psy-guide-card__visual {
  aspect-ratio: 16 / 9;
  width: 100%;
  background-color: var(--color-surface-alt);
  background-image: linear-gradient(135deg, var(--color-caramel-soft), var(--color-surface));
}

.psy-guide-card__body {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  padding: var(--space-xl);
  flex: 1 1 auto;
}

.psy-guide-card__title {
  font-size: var(--text-h4-size);
  line-height: var(--text-h4-leading);
  margin-block-end: 0;
  color: var(--color-forest-deep);
}

.psy-guide-card__body p {
  font-size: var(--text-small-size);
  line-height: var(--text-small-leading);
  color: var(--color-ink-muted);
  margin-block-end: 0;
}

/* Reviews */
.psy-reviews {
  background-color: var(--color-surface-alt);
}

.psy-reviews__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-xl);
}

.psy-review-card {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
  min-width: 0;
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  padding: var(--space-xl);
}

.psy-review-card__stars {
  color: var(--color-orange);
  font-size: var(--text-h4-size);
  letter-spacing: 0.1em;
}

.psy-review-card__quote {
  margin-block-end: 0;
  padding-inline-start: 0;
  border-inline-start: none;
  font-style: normal;
  color: var(--color-ink);
  font-size: var(--text-body-size);
  line-height: var(--text-body-leading);
}

.psy-review-card__author {
  margin-block-end: 0;
  font-size: var(--text-small-size);
  color: var(--color-ink-muted);
}

.psy-review-card__author span {
  color: var(--color-forest);
}

/* Newsletter */
.psy-newsletter {
  background-color: var(--color-forest);
  padding-block: var(--space-5xl);
}

.psy-newsletter__container {
  max-width: 600px;
  margin-inline: auto;
  text-align: center;
}

.psy-newsletter__content {
  display: flex;
  flex-direction: column;
  gap: var(--space-xl);
  align-items: center;
}

.psy-newsletter__content h2 {
  color: #ffffff;
  margin-block-end: 0;
}

.psy-newsletter__content p {
  color: rgba(255, 255, 255, 0.9);
  max-width: 56ch;
  margin-inline: auto;
  margin-block-end: 0;
}

.psy-newsletter__form {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md);
  width: 100%;
  justify-content: center;
  align-items: center;
}

.psy-newsletter__form input {
  flex: 1 1 250px;
  min-width: 0;
  background-color: #ffffff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: var(--space-md) var(--space-lg);
  font-size: var(--text-body-size);
  line-height: var(--text-body-leading);
  color: var(--color-ink);
}

.psy-newsletter__form input:focus-visible {
  border-color: var(--color-caramel);
  box-shadow: 0 0 0 2px var(--color-forest), 0 0 0 4px var(--color-caramel);
}

.psy-newsletter__button {
  flex: 0 0 auto;
  min-width: 140px;
  min-height: 3rem;
}

.psy-newsletter__privacy {
  font-size: var(--text-small-size);
  line-height: var(--text-small-leading);
  color: rgba(255, 255, 255, 0.7);
  margin-block-end: 0;
}

.psy-newsletter__message {
  min-height: 1.5em;
  font-size: var(--text-small-size);
  line-height: var(--text-small-leading);
  color: #ffffff;
  margin-block-end: 0;
}

.psy-newsletter__message--success {
  color: var(--color-caramel-soft);
}

.psy-newsletter__message--error {
  color: #ffd9c7;
}

/* Tablet */
@media (max-width: 1024px) {
  .psy-categories__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .psy-products__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .psy-editorial__grid {
    grid-template-columns: 1fr;
    gap: var(--space-2xl);
  }

  .psy-editorial__media {
    order: -1;
  }

  .psy-editorial--reverse .psy-editorial__media {
    order: -1;
  }

  .psy-mini-products {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .psy-guides__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .psy-reviews__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Mobile */
@media (max-width: 640px) {
  .psy-section {
    padding-block: var(--space-4xl);
  }

  .psy-hero {
    min-height: 70vh;
  }

  .psy-hero__content {
    padding-inline: var(--container-pad-mobile);
    padding-block: var(--space-2xl);
  }

  .psy-hero__title {
    font-size: clamp(1.8rem, 8vw, 2.5rem);
  }

  .psy-hero__lead {
    font-size: var(--text-body-size);
    line-height: var(--text-body-leading);
  }

  .psy-hero__actions {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
  }

  .psy-hero__button {
    width: 100%;
    min-width: 0;
  }

  .psy-categories__grid {
    grid-template-columns: 1fr;
  }

  .psy-products__grid {
    grid-template-columns: 1fr;
  }

  .psy-brands__row {
    gap: var(--space-lg);
    flex-wrap: nowrap;
    overflow-x: auto;
    justify-content: flex-start;
    padding-block-end: var(--space-sm);
    scrollbar-width: thin;
  }

  .psy-brand {
    flex: 0 0 auto;
  }

  .psy-editorial__grid {
    grid-template-columns: 1fr;
    gap: var(--space-xl);
  }

  .psy-editorial__media img {
    aspect-ratio: 4 / 3;
  }

  .psy-mini-products {
    grid-template-columns: 1fr;
  }

  .psy-guides__grid {
    grid-template-columns: 1fr;
  }

  .psy-reviews__grid {
    grid-template-columns: 1fr;
  }

  .psy-newsletter__form {
    flex-direction: column;
    align-items: stretch;
  }

  .psy-newsletter__form input {
    flex: 1 1 auto;
    width: 100%;
  }

  .psy-newsletter__button {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .psy-category-card,
  .psy-product-card,
  .psy-guide-card {
    transition: none;
  }

  .psy-category-card:hover,
  .psy-product-card:hover,
  .psy-guide-card:hover {
    transform: none;
  }

  .psy-category-card__media img {
    transition: none;
  }

  .psy-category-card:hover .psy-category-card__media img {
    transform: none;
  }
}
