/* ============================================================
   WEAR138 — Homepage Styles
   ============================================================ */

/* ---- Hero ---- */
.hero {
  position: relative;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: var(--color-bg);
}

.hero__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image: url('../images/hero-bg.jpg');
  background-size: cover;
  background-position: center top;
  background-repeat: no-repeat;
  /* Dark overlay to keep text readable */
  filter: brightness(0.35) saturate(0.7);
  transform: scale(1.03); /* slight scale prevents edge gaps */
}

.hero__noise {
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
  background-size: 200px 200px;
  opacity: 0.4;
}

.hero__vignette {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to right, rgba(0,0,0,0.85) 40%, rgba(0,0,0,0.2) 100%),
    radial-gradient(ellipse at center, transparent 20%, rgba(0,0,0,0.6) 100%);
}

.hero__grid-lines {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(204,0,0,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(204,0,0,0.03) 1px, transparent 1px);
  background-size: 60px 60px;
}

[data-theme="light"] .hero__bg {
  filter: brightness(0.25) saturate(0.5);
}
[data-theme="light"] .hero__noise { opacity: 0.2; }

.hero__content {
  position: relative;
  z-index: 1;
  padding-top: calc(var(--nav-height) + var(--space-8));
  padding-bottom: var(--space-16);
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}

.hero__number {
  font-family: var(--font-display);
  font-size: var(--text-hero);
  line-height: 0.85;
  color: transparent;
  -webkit-text-stroke: 1px rgba(204, 0, 0, 0.35);
  text-stroke: 1px rgba(204, 0, 0, 0.35);
  letter-spacing: 0.02em;
  user-select: none;
  position: relative;
  z-index: 1;
  /* Ghost number behind heading */
  margin-bottom: calc(-1 * var(--text-hero) * 0.5);
}

.hero__text {
  position: relative;
  z-index: 2;
}

.hero__heading {
  font-family: var(--font-display);
  font-size: var(--text-3xl);
  letter-spacing: 0.06em;
  color: var(--color-text);
  line-height: 1;
  text-transform: uppercase;
  margin-bottom: var(--space-5);
}

.hero__sub {
  font-size: var(--text-lg);
  color: var(--color-text-muted);
  font-weight: 300;
  line-height: 1.7;
  max-width: 44ch;
}

.hero__cta {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  flex-wrap: wrap;
  padding-top: var(--space-4);
}

/* Scroll indicator */
.hero__scroll {
  position: absolute;
  bottom: var(--space-8);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
  color: var(--color-text-faint);
  font-size: var(--text-xs);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  animation: scrollBounce 2.5s ease-in-out infinite;
  z-index: 1;
}

.hero__scroll-dot {
  animation: scrollDot 2.5s ease-in-out infinite;
}

@keyframes scrollBounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(6px); }
}

@keyframes scrollDot {
  0%, 100% { transform: translateY(0); opacity: 1; }
  50% { transform: translateY(8px); opacity: 0.3; }
}

/* ---- Reveal animation ---- */
[data-reveal] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

[data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Hero reveals immediately */
.hero [data-reveal] {
  animation: heroReveal 0.7s ease forwards;
}

.hero [data-reveal]:nth-child(1) { animation-delay: 0.1s; }
.hero [data-reveal]:nth-child(2) { animation-delay: 0.25s; }
.hero [data-reveal]:nth-child(3) { animation-delay: 0.4s; }
.hero [data-reveal]:nth-child(4) { animation-delay: 0.55s; }

@keyframes heroReveal {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---- About Strip ---- */
.about-strip {
  background: var(--color-surface);
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
}

.about-strip__inner {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: var(--space-16);
  align-items: center;
}

.about-strip__text p {
  font-size: var(--text-base);
  color: var(--color-text-muted);
  line-height: 1.8;
  margin-bottom: var(--space-5);
}

.about-strip__actions {
  margin-top: var(--space-8);
}

.about-strip__skull {
  display: flex;
  align-items: center;
  justify-content: center;
}

.skull-svg {
  width: 100%;
  max-width: 200px;
  filter: drop-shadow(0 0 20px rgba(204, 0, 0, 0.15));
  animation: skullPulse 4s ease-in-out infinite;
}

@keyframes skullPulse {
  0%, 100% { filter: drop-shadow(0 0 20px rgba(204, 0, 0, 0.15)); }
  50% { filter: drop-shadow(0 0 30px rgba(204, 0, 0, 0.3)); }
}

@media (max-width: 768px) {
  .about-strip__inner {
    grid-template-columns: 1fr;
  }

  .about-strip__skull {
    order: -1;
  }

  .skull-svg {
    max-width: 120px;
  }
}

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

.categories__header {
  margin-bottom: var(--space-12);
}

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

.category-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
  padding: var(--space-8);
  background: var(--color-surface-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  text-decoration: none;
  color: var(--color-text);
  overflow: hidden;
  transition:
    border-color var(--transition-interactive),
    transform var(--transition-interactive),
    box-shadow var(--transition-interactive);
}

.category-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--color-red), transparent);
  opacity: 0;
  transition: opacity var(--transition-interactive);
}

.category-card:hover {
  border-color: var(--color-red-border);
  transform: translateY(-4px);
  box-shadow: var(--shadow-md), var(--shadow-red);
}

.category-card:hover::before {
  opacity: 1;
}

.category-card--featured {
  border-color: var(--color-red-border);
  background: linear-gradient(135deg, var(--color-surface-card), var(--color-surface-offset));
}

.category-card--featured::before {
  opacity: 0.6;
}

.category-card__icon {
  color: var(--color-text-muted);
  transition: color var(--transition-interactive);
}

.category-card:hover .category-card__icon {
  color: var(--color-red);
}

.category-card--featured .category-card__icon {
  color: var(--color-red);
}

.category-card__text h3 {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  letter-spacing: 0.05em;
  color: var(--color-text);
  margin-bottom: var(--space-3);
  line-height: 1;
}

.category-card__text p {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.7;
  margin-bottom: var(--space-5);
}

.category-card__link {
  font-size: var(--text-sm);
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--color-red);
  display: inline-block;
  transition: letter-spacing var(--transition-interactive);
}

.category-card:hover .category-card__link {
  letter-spacing: 0.14em;
}

.category-card__badge {
  position: absolute;
  top: var(--space-4);
  right: var(--space-4);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: var(--space-1) var(--space-3);
  background: var(--color-red);
  color: #ffffff;
  border-radius: var(--radius-sm);
}

@media (max-width: 900px) {
  .categories__grid {
    grid-template-columns: 1fr;
    max-width: 480px;
  }
}

/* ---- Story ---- */
.story {
  background: var(--color-surface);
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
  position: relative;
  overflow: hidden;
}

.story__inner {
  position: relative;
}

.story__number-deco {
  position: absolute;
  right: -40px;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--font-display);
  font-size: clamp(8rem, 15vw, 18rem);
  color: transparent;
  -webkit-text-stroke: 1px rgba(204, 0, 0, 0.08);
  text-stroke: 1px rgba(204, 0, 0, 0.08);
  line-height: 1;
  user-select: none;
  pointer-events: none;
  letter-spacing: 0.02em;
}

.story__content {
  max-width: 680px;
  position: relative;
  z-index: 1;
}

.story__lead {
  font-size: var(--text-lg);
  color: var(--color-text-muted);
  line-height: 1.8;
  margin-bottom: var(--space-5);
}

.story__content p {
  font-size: var(--text-base);
  color: var(--color-text-muted);
  line-height: 1.8;
  margin-bottom: var(--space-5);
}

.story__content em {
  color: var(--color-text);
  font-style: normal;
}

/* ---- Featured ---- */
.featured {
  background: var(--color-bg);
}

.featured__header {
  margin-bottom: var(--space-12);
}

.featured__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-6);
  margin-bottom: var(--space-12);
}

.product-card {
  background: var(--color-surface-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition:
    border-color var(--transition-interactive),
    transform var(--transition-interactive),
    box-shadow var(--transition-interactive);
}

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

.product-card__img-wrap {
  display: block;
  position: relative;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  text-decoration: none;
}

.product-card__placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--color-surface-offset) 0%, var(--color-surface-2) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition-interactive);
}

.product-card:hover .product-card__placeholder {
  background: linear-gradient(135deg, var(--color-surface-2) 0%, var(--color-surface-offset) 100%);
}

.product-card__abbr {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  letter-spacing: 0.1em;
  color: var(--color-red);
  opacity: 0.5;
}

.product-card__vintage-badge {
  position: absolute;
  top: var(--space-3);
  left: var(--space-3);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: var(--space-1) var(--space-3);
  background: rgba(10, 10, 10, 0.85);
  border: 1px solid var(--color-red-border);
  color: var(--color-red);
  border-radius: var(--radius-sm);
}

.product-card__body {
  padding: var(--space-5) var(--space-5) var(--space-6);
}

.product-card__tag {
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  display: block;
  margin-bottom: var(--space-2);
}

.product-card__tag--vintage {
  color: var(--color-red);
}

.product-card__name {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  letter-spacing: 0.04em;
  color: var(--color-text);
  margin-bottom: var(--space-2);
  line-height: 1.2;
}

.product-card__name a {
  color: inherit;
  text-decoration: none;
}

.product-card__name a:hover {
  color: var(--color-red);
}

.product-card__price {
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--color-text);
}

.featured__cta {
  text-align: center;
}

@media (max-width: 768px) {
  .featured__grid {
    grid-template-columns: 1fr;
    max-width: 360px;
  }
}

/* ---- Trust Strip ---- */
.trust-strip {
  background: var(--color-surface);
  border-top: 1px solid var(--color-border);
  padding-block: var(--space-16);
}

.trust-strip__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-8);
}

.trust-item {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.trust-item__icon {
  flex-shrink: 0;
}

.trust-item h3 {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  letter-spacing: 0.04em;
  color: var(--color-text);
  line-height: 1.1;
}

.trust-item p {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.7;
}

@media (max-width: 900px) {
  .trust-strip__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .trust-strip__grid {
    grid-template-columns: 1fr;
  }
}

/* ---- Texture Break ---- */
.texture-break {
  position: relative;
  height: 180px;
  overflow: hidden;
  background-image: url('../images/texture-break.jpg');
  background-size: cover;
  background-position: center;
}

.texture-break::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    var(--color-surface) 0%,
    transparent 30%,
    transparent 70%,
    var(--color-bg) 100%
  );
  z-index: 1;
}

.texture-break__text {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
}

.texture-break__text span {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 4vw, 3rem);
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.9);
  text-shadow: 0 0 40px rgba(204,0,0,0.6), 0 2px 8px rgba(0,0,0,0.8);
}

/* ---- About Jacket Image ---- */
.about-jacket-wrap {
  position: relative;
  width: 280px;
  height: 360px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg), var(--shadow-red);
}

.about-jacket-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  filter: saturate(0.8) brightness(0.9);
  transition: filter var(--transition-slow);
}

.about-jacket-wrap:hover .about-jacket-img {
  filter: saturate(1) brightness(1);
}

.about-jacket-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to top, rgba(10,10,10,0.5) 0%, transparent 50%),
    linear-gradient(135deg, rgba(204,0,0,0.08) 0%, transparent 60%);
}

@media (max-width: 768px) {
  .about-jacket-wrap {
    width: 200px;
    height: 260px;
  }
}
