/* =========================================================
   HOME PAGE ONLY — index.html
   Sections are added here one at a time, top to bottom:
   2 Intro line · 3 Shop by category · 4 Bestsellers
   5 Our Story teaser · 6 Styling · 7 Custom Orders
   ========================================================= */

/* ---------- 2 · Intro line ---------- */
.intro {
  padding-block: clamp(96px, 13vw, 200px);
  text-align: center;
}
.intro__inner { display: flex; flex-direction: column; align-items: center; }
.intro__mark { width: 48px; height: auto; margin-bottom: var(--s-6); }
.intro__text {
  margin-top: var(--s-5);
  max-width: 32ch;
  font-family: var(--font-display); font-weight: 300;
  font-size: clamp(22px, 2.5vw, 34px); line-height: 1.55; letter-spacing: .01em;
}
.intro__link { margin-top: var(--s-7); }

/* ---------- 3 · Shop by category ---------- */
.categories { padding-top: 0; } /* the intro above already gives plenty of space */

.category-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s-5); }

.category-tile {
  position: relative; display: block; overflow: hidden; isolation: isolate;
  aspect-ratio: 4 / 5; background: var(--sand); color: var(--cream);
  border-radius: var(--radius-card);
  transition: border-radius .5s var(--ease);
}
.category-tile:hover, .category-tile:focus-visible { border-radius: 0; } /* rounded → sharp on hover */
.category-tile img {
  position: absolute; inset: 0; width: 100%; height: 100%; z-index: -2;
  object-fit: cover; object-position: var(--focus, center);
  transition: transform 1.2s var(--ease);
}
.category-tile::before { /* soft shade at the bottom so the label reads on any photo */
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(to top, rgba(30, 18, 8, .5) 0%, rgba(30, 18, 8, 0) 45%);
  transition: opacity var(--dur-slow) var(--ease);
}
.category-tile:hover img { transform: scale(1.04); }

.category-tile__label {
  position: absolute; left: var(--s-6); right: var(--s-6); bottom: var(--s-6);
  display: flex; flex-direction: column; align-items: flex-start; gap: var(--s-3);
}
.category-tile__name {
  font-family: var(--font-display); font-weight: 300;
  font-size: clamp(18px, 1.7vw, 24px); letter-spacing: var(--tracking-display); text-transform: uppercase;
  line-height: 1.2;
}
.category-tile__cta {
  position: relative; font-size: var(--fs-small); padding-bottom: 2px; white-space: nowrap;
  opacity: 0; transform: translateY(6px);
  transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.category-tile__cta::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: currentColor;
}
.category-tile:hover .category-tile__cta,
.category-tile:focus-visible .category-tile__cta { opacity: 1; transform: none; }

/* Phones & tablets: swipe sideways through the tiles, next one peeks in */
@media (max-width: 900px) {
  .category-grid {
    grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 78%;
    gap: var(--s-3); overflow-x: auto; scroll-snap-type: x mandatory;
    margin-inline: calc(-1 * var(--gutter)); padding-inline: var(--gutter);
    scroll-padding-inline: var(--gutter); scrollbar-width: none;
  }
  .category-grid::-webkit-scrollbar { display: none; }
  .category-tile { scroll-snap-align: start; }
  .category-tile__label { left: var(--s-5); right: var(--s-5); bottom: var(--s-5); }
  .category-tile__cta { opacity: 1; transform: none; } /* no hover on touch */
}

/* ---------- 5 · Our Story teaser ---------- */
.story__inner {
  display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(40px, 7vw, 120px); align-items: center;
}
.story__media { margin: 0; aspect-ratio: 4 / 5; overflow: hidden; background: var(--sand); }
.story__media img { width: 100%; height: 100%; object-fit: cover; object-position: center 60%; }

.story__text { max-width: 460px; }
.story__title { font-size: clamp(22px, 2.2vw, 30px); font-weight: 300; line-height: 1.25; } /* sub-heading; the section heading sits above */
.story__lead { margin-top: var(--s-6); font-size: var(--fs-lead); line-height: 1.6; color: var(--text); }
.story__body { margin-top: var(--s-4); color: var(--text-muted); }

.story__link { margin-top: var(--s-7); }

@media (max-width: 900px) {
  .story__inner { grid-template-columns: 1fr; }
  .story__text { max-width: none; }
}

/* ---------- 6 · Styling (full-width photo band, centred text) ---------- */
.styling {
  position: relative; isolation: isolate; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  min-height: clamp(560px, 85vh, 860px);
  padding-block: var(--s-9);
  color: var(--cream); text-align: center; background: var(--brown-deep);
}
.styling__media, .styling__media img { position: absolute; inset: 0; width: 100%; height: 100%; }
.styling__media { z-index: -2; }
.styling__media img { object-fit: cover; object-position: center 55%; }
.styling::before { /* even shade so centred text reads on any photo */
  content: ""; position: absolute; inset: 0; z-index: -1; background: rgba(30, 18, 8, .48);
}

.styling__content { display: flex; flex-direction: column; align-items: center; }
.styling__eyebrow { color: rgba(246, 243, 236, .85); }
.styling__title {
  margin-top: var(--s-4);
  font-family: var(--font-display); font-weight: 300;
  font-size: clamp(28px, 4vw, 54px); letter-spacing: var(--tracking-display); text-transform: uppercase; line-height: 1.2;
  max-width: 20ch;
}
.styling__text { margin-top: var(--s-5); max-width: 46ch; font-size: var(--fs-lead); line-height: 1.6; color: rgba(246, 243, 236, .9); }

/* 01 Consult — 02 Curate — 03 Style
   Hover / tap / Tab a step: the name fades out and a short description fades in, in the same spot. */
.styling__steps {
  display: flex; justify-content: center; gap: var(--s-6); list-style: none; margin: var(--s-7) 0 0; padding: 0;
}
.styling__steps li {
  width: 190px; display: flex; flex-direction: column; align-items: center; gap: var(--s-3);
  cursor: default; outline-offset: 6px;
}
.styling__num {
  font-family: var(--font-display); font-size: 12px; letter-spacing: var(--tracking-label);
  opacity: .7; padding-bottom: var(--s-2); border-bottom: 1px solid rgba(246, 243, 236, .5);
  transition: opacity var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.styling__swap { display: grid; justify-items: center; }
.styling__label, .styling__desc { grid-area: 1 / 1; transition: opacity .35s var(--ease), transform .35s var(--ease); }
.styling__label {
  font-size: var(--fs-small); letter-spacing: var(--tracking-label); text-transform: uppercase;
}
.styling__desc {
  font-size: 13px; line-height: 1.5; color: rgba(246, 243, 236, .9);
  opacity: 0; transform: translateY(6px); pointer-events: none;
}
.styling__steps li:hover .styling__label,
.styling__steps li:focus-visible .styling__label,
.styling__steps li.is-active .styling__label { opacity: 0; transform: translateY(-6px); }
.styling__steps li:hover .styling__desc,
.styling__steps li:focus-visible .styling__desc,
.styling__steps li.is-active .styling__desc { opacity: 1; transform: none; }
.styling__steps li:hover .styling__num,
.styling__steps li:focus-visible .styling__num,
.styling__steps li.is-active .styling__num { opacity: 1; border-color: var(--cream); }

/* Two buttons side by side, always the same width (both match the wider one) */
.styling__actions {
  display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; justify-content: center;
  gap: var(--s-3); margin-top: var(--s-7);
}

@media (max-width: 600px) {
  .styling__steps { gap: var(--s-3); }
  /* Phones: steps stay as names; the tapped step's description shows on one line underneath */
  .styling__steps { position: relative; width: 100%; margin-bottom: 72px; }
  .styling__steps li { width: auto; flex: 1 1 0; }
  .styling__desc { position: absolute; left: 0; right: 0; top: calc(100% + var(--s-4)); font-size: 13px; }
  /* the name stays put; the description appears on the line underneath */
  .styling__steps li:hover .styling__label,
  .styling__steps li:focus-visible .styling__label,
  .styling__steps li.is-active .styling__label { opacity: 1; transform: none; text-decoration: underline; text-underline-offset: 6px; }
  /* stacked and centred; both as wide as the longer label, not the full screen */
  .styling__actions { grid-auto-flow: row; grid-template-columns: minmax(220px, max-content); justify-content: center; }
}

/* Touch screens (no real hover): only the tapped step shows its description.
   Phones keep a "sticky" hover after a tap, so hover alone must not count here. */
@media (hover: none) {
  .styling__steps li:hover:not(.is-active) .styling__desc { opacity: 0; transform: translateY(6px); }
  .styling__steps li:hover:not(.is-active) .styling__label { opacity: 1; transform: none; text-decoration: none; }
  .styling__steps li:hover:not(.is-active) .styling__num { opacity: .7; border-color: rgba(246, 243, 236, .5); }
}
