/* =========================================================
   Lora B — drawings made wearable
   Editorial / art-book aesthetic, mobile-first.
   ========================================================= */

:root {
  --paper: #f4f1ea;
  --paper-deep: #ece7db;
  --ink: #1a1a1a;
  --ink-muted: #6b6b6b;
  --ink-faint: #a8a39a;
  --accent: #d94f2a;
  --rule: rgba(26, 26, 26, 0.14);

  --font: "Lato", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  --maxw: 1280px;
  --gutter: clamp(1.25rem, 4vw, 3.5rem);

  --radius: 2px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-weight: 400;
  font-size: 17px;
  line-height: 1.55;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img { display: block; max-width: 100%; height: auto; }

a {
  color: inherit;
  text-decoration: none;
  transition: color 180ms ease, opacity 180ms ease;
}
a:hover { color: var(--accent); }

::selection { background: var(--accent); color: var(--paper); }

/* Small-caps utility — Lato + letter-spacing + uppercase. */
.label {
  font-family: var(--font);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.18em;
}

/* ---------- HEADER --------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--paper) 92%, transparent);
  backdrop-filter: saturate(140%) blur(8px);
  -webkit-backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid transparent;
  transition: border-color 180ms ease, background 180ms ease;
}
.site-header.is-scrolled { border-bottom-color: var(--rule); }

.nav {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0.85rem var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.wordmark {
  font-family: var(--font);
  font-weight: 900;
  font-size: 1.2rem;
  letter-spacing: -0.005em;
}

.nav-list {
  list-style: none;
  display: flex;
  gap: clamp(1rem, 3vw, 2.25rem);
  margin: 0;
  padding: 0;
  font-family: var(--font);
  font-weight: 700;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
}

.nav-out { color: var(--ink); }
.nav-out:hover { color: var(--accent); }

/* ---------- HERO ----------------------------------------- */

.hero {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(2.25rem, 7vh, 5rem) var(--gutter) clamp(2.5rem, 7vh, 4.5rem);
  text-align: center;
  position: relative;
}

.eyebrow {
  margin: 0 0 clamp(1.5rem, 5vh, 3rem);
  font-family: var(--font);
  font-weight: 700;
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

/* Width-based sizing protects the monogram's aspect ratio at every breakpoint. */
.hero-mark {
  margin: 0 auto clamp(1.25rem, 3.5vh, 2.5rem);
  /* Clear padding so the artwork never touches text or edges. */
  padding: 0 0.5rem;
  width: clamp(140px, 24vw, 240px);
}
.hero-monogram {
  display: block;
  width: 100%;
  height: auto;
  /* The SVG carries its own intrinsic aspect ratio; we never override height. */
  animation: ink-fill 1.8s cubic-bezier(0.65, 0, 0.35, 1) 0.25s both;
  will-change: clip-path;
}

@keyframes ink-fill {
  from {
    -webkit-clip-path: inset(0 0 100% 0);
            clip-path: inset(0 0 100% 0);
  }
  to {
    -webkit-clip-path: inset(0 0 0 0);
            clip-path: inset(0 0 0 0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-monogram {
    animation: none;
    -webkit-clip-path: none;
            clip-path: none;
  }
}

.hero-tagline {
  margin: 0;
  font-family: var(--font);
  font-weight: 400;
  font-style: italic;
  font-size: clamp(1.05rem, 2.2vw, 1.5rem);
  line-height: 1.3;
  color: var(--ink-muted);
}

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- INTRO ---------------------------------------- */

.intro {
  max-width: 38rem; /* ~608px — comfortable reading width, not a thin column */
  margin: 0 auto;
  padding: clamp(2.5rem, 6vh, 4.5rem) var(--gutter) clamp(4rem, 10vh, 7rem);
  border-top: 1px solid var(--rule);
}

.intro-lead {
  margin: 0 0 1rem;
  font-family: var(--font);
  font-weight: 700;
  font-size: clamp(1.2rem, 2.2vw, 1.55rem);
  line-height: 1.4;
}
.intro-body {
  margin: 0;
  font-family: var(--font);
  font-weight: 400;
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink-muted);
}

/* ---------- ROOM (collection section) -------------------- */

.room {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(2.5rem, 6vh, 4rem) var(--gutter) clamp(3rem, 8vh, 6rem);
}

.room + .room { border-top: 1px solid var(--rule); }

.room-header {
  margin-bottom: clamp(2rem, 4.5vh, 3.75rem);
  position: relative;
}

.room-title {
  margin: 0;
  font-family: var(--font);
  font-weight: 900;
  font-size: clamp(4rem, 14vw, 11rem);
  line-height: 0.9;
  letter-spacing: -0.04em;
  color: var(--ink);
}

.room-note {
  /* Generous space between the big title and Lora's note. */
  margin: clamp(2.5rem, 6vh, 5rem) 0 0;
  max-width: 38rem;
  font-family: var(--font);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(1.05rem, 1.8vw, 1.25rem);
  line-height: 1.45;
  color: var(--ink);
}
.room-attrib {
  display: inline-block;
  margin-left: 0.4em;
  font-family: var(--font);
  font-weight: 700;
  font-style: normal;
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-muted);
  vertical-align: middle;
  transform: translateY(-0.1em);
}
/* ---------- GRID ----------------------------------------- */

/* Equal gap on both axes for a calm, intentional grid. */
.grid {
  display: grid;
  gap: clamp(1.75rem, 3.5vw, 2.75rem);
}

.hugs-grid { grid-template-columns: 1fr; }
.l-grid    { grid-template-columns: 1fr; }

@media (min-width: 640px) {
  .hugs-grid { grid-template-columns: repeat(2, 1fr); }
  .l-grid    { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 960px) {
  /* Four smaller Hugs products in one even row below the featured hoodie. */
  .hugs-grid { grid-template-columns: repeat(4, 1fr); }
  .l-grid    { grid-template-columns: repeat(3, 1fr); }
}

/* ---------- CARDS (uniform: image → name → price → button) ---- */

.card {
  position: relative;
  /* Make cards equal height in flex/grid contexts. */
  display: flex;
  flex-direction: column;
}

.card-link {
  display: flex;
  flex-direction: column;
  color: inherit;
  text-decoration: none;
  height: 100%;
}
.card-link:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 6px;
  border-radius: var(--radius);
}

.card-media {
  position: relative;
  /* Cream backing matches the page so the bounding rectangle is invisible.
     It also serves as the blend backdrop for the image's mix-blend-mode below. */
  background: var(--paper);
  /* Let the soft shadow extend past the rectangle. */
  overflow: visible;
  aspect-ratio: 1 / 1;
  will-change: transform;
  transition: transform 460ms cubic-bezier(0.22, 1, 0.36, 1);
}
.card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  /* "Darken" blend lets pixels brighter than the cream backing (the mockup's
     white background) drop into the page; darker pixels (the product itself,
     the drawing) stay visible. Removes the white box without touching the
     source images. */
  mix-blend-mode: darken;
  /* drop-shadow follows the image's alpha channel. Today the mockups are
     fully opaque, so the shadow renders as a soft rectangle. If/when the
     mockups are re-exported with transparent backgrounds (T-Pop offers this,
     or any bg-removal tool), the same shadow will automatically hug the
     product silhouette — no code change needed. */
  filter: drop-shadow(0 8px 18px rgba(0, 0, 0, 0.055));
  transition: filter 460ms cubic-bezier(0.22, 1, 0.36, 1);
}

/* Desktop-only hover: gentle scale + slightly deeper shadow.
   On touch devices (hover: none) nothing changes — the soft shadow stays. */
@media (hover: hover) {
  .card-link:hover .card-media {
    transform: scale(1.025);
  }
  .card-link:hover .card-media img {
    filter: drop-shadow(0 14px 30px rgba(0, 0, 0, 0.09));
  }
}

.card-meta {
  padding-top: 1rem;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.45rem;
}

.card-name {
  margin: 0;
  font-family: var(--font);
  font-weight: 700;
  font-size: clamp(1.05rem, 1.55vw, 1.35rem);
  line-height: 1.2;
  letter-spacing: -0.005em;
  color: var(--ink);
}

.card-price {
  margin: 0;
  font-family: var(--font);
  font-weight: 400;
  font-size: 1rem;
  color: var(--ink-muted);
  letter-spacing: 0.01em;
}

/* "Buy on T-Pop" pill button. Same across every card. */
.card-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.35em;
  margin-top: auto;
  /* keep the button aligned at the bottom across uneven name lengths */
  padding: 0.55rem 1.05rem;
  border: 1px solid var(--ink);
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  font-family: var(--font);
  font-weight: 700;
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  transition: background 200ms ease, color 200ms ease, border-color 200ms ease;
}
.cta-arrow {
  display: inline-block;
  transition: transform 200ms ease;
}
.card-link:hover .card-cta {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}
.card-link:hover .cta-arrow {
  transform: translate(2px, -2px);
}

/* ---------- HERO CARD (signed hoodie, feature row) ------- */

/* Standalone feature row above the smaller-products grid. */
.card-hero {
  margin-bottom: clamp(2.5rem, 5vh, 4rem);
}

.card-hero .card-name {
  font-size: clamp(1.4rem, 2.4vw, 2.1rem);
  color: var(--ink);
}
.card-hero .card-price {
  font-size: 1.15rem;
}

/* Desktop / tablet: image and meta sit side-by-side, meta vertically centered. */
@media (min-width: 720px) {
  .card-hero .card-link {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: clamp(2rem, 5vw, 5rem);
    align-items: center;
  }
  .card-hero .card-media {
    max-width: 540px;
    width: 100%;
    margin: 0 auto;
  }
  .card-hero .card-meta {
    padding-top: 0;
    max-width: 26rem;
  }
}

.card-media-flip { position: relative; }
.card-media-flip .img-back,
.card-media-flip .img-front {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.card-media-flip .img-back {
  opacity: 1;
  transition: opacity 520ms ease;
}
.card-media-flip .img-front {
  opacity: 0;
  transition: opacity 520ms ease;
}

@media (hover: hover) {
  .card-hero:hover .card-media-flip .img-back { opacity: 0; }
  .card-hero:hover .card-media-flip .img-front { opacity: 1; }
}

.flip-badge {
  position: absolute;
  left: 0.9rem;
  bottom: 0.9rem;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.7rem;
  background: rgba(244, 241, 234, 0.92);
  border: 1px solid var(--rule);
  border-radius: 999px;
  font-family: var(--font);
  font-weight: 700;
  font-size: 0.62rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink);
  pointer-events: none;
  transition: opacity 260ms ease;
}
.flip-badge .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

@media (hover: none) {
  .flip-badge { display: none; }
}
@media (hover: hover) {
  .card-hero:hover .flip-badge { opacity: 0; }
}

/* ---------- L-BAG strap toggle --------------------------- */

.card-media-strap { position: relative; }
.card-media-strap .strap-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 320ms ease;
}
.card-media-strap .strap-img.is-active { opacity: 1; }
/* First child gets a real slot so the aspect-ratio box has size */
.card-media-strap .strap-img:first-child { position: relative; }

.strap-toggle {
  display: inline-flex;
  gap: 0.5rem;
  margin: 0;
}
.strap-btn {
  appearance: none;
  -webkit-appearance: none;
  border: 1px solid var(--rule);
  background: transparent;
  color: var(--ink-muted);
  font-family: var(--font);
  font-weight: 700;
  font-size: 0.66rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 0.35rem 0.6rem 0.35rem 0.45rem;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  cursor: pointer;
  border-radius: 999px;
  transition: border-color 180ms ease, color 180ms ease, background 180ms ease;
  position: relative;
  z-index: 2;
}
.strap-btn:hover { color: var(--ink); border-color: var(--ink-faint); }
.strap-btn.is-active {
  color: var(--ink);
  border-color: var(--ink);
  background: var(--paper);
}
.swatch {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
  border: 1px solid var(--rule);
}
.swatch-blue { background: #2e4a7a; }
.swatch-red  { background: #b3322a; }

/* ---------- CLOSING -------------------------------------- */

.closing {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(2.5rem, 6vh, 4rem) var(--gutter);
  text-align: center;
  border-top: 1px solid var(--rule);
}

.closing-line {
  margin: 0;
  font-family: var(--font);
  font-weight: 700;
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

/* ---------- FOOTER --------------------------------------- */

.site-footer {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 1.75rem var(--gutter) 2.5rem;
  border-top: 1px solid var(--rule);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  font-family: var(--font);
  font-weight: 700;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-muted);
}
.site-footer p { margin: 0; }
.site-footer a {
  color: var(--ink);
  border-bottom: 1px solid var(--ink-faint);
  padding-bottom: 1px;
}
.site-footer a:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
}
.foot-note {
  color: var(--ink-faint);
  text-transform: none;
  letter-spacing: 0.02em;
  font-family: var(--font);
  font-weight: 400;
  font-style: italic;
  font-size: 0.9rem;
}

@media (max-width: 560px) {
  .site-footer {
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
    gap: 0.5rem;
  }
}

/* ---------- A11Y / motion -------------------------------- */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

a:focus-visible, button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
  border-radius: var(--radius);
}
