/* Leah's Journal: white editorial pages, serif type, wide letter-spaced labels. */
:root {
  color-scheme: light;
  --ink: #000;
  --muted: #6f6f6f;
  --line: #e6e6e6;
  --wash: #f2f2f2;
  --bg: #fff;
  --serif: Georgia, "Times New Roman", serif;
  --wide: "Syncopate", "Helvetica Neue", Arial, sans-serif;
  --script: "Herr Von Muellerhoff", "Snell Roundhand", cursive;
  --gutter: 20px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--serif);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; }
a { color: inherit; }
button { font: inherit; color: inherit; cursor: pointer; }
a:focus-visible, button:focus-visible, .track:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.skip { position: absolute; left: -999px; top: 8px; }
.skip:focus { left: 12px; z-index: 100; background: var(--ink); color: #fff; padding: 8px 12px; }

/* ---------- Labels ---------- */
.eyebrow {
  margin: 0;
  font-family: var(--wide);
  font-size: 11px;
  line-height: 1.8;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}
.caps-heading {
  margin: 0 0 28px;
  padding-left: 0.3em; /* balances the trailing letter-spacing */
  font: 400 19px/1.3 var(--serif);
  letter-spacing: 0.3em;
  text-transform: uppercase;
  text-align: center;
}
.script-label {
  display: inline-block;
  font-family: var(--script);
  font-size: 34px;
  line-height: 1;
  text-decoration: none;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--bg);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.07);
}
.site-header-row {
  display: grid;
  grid-template-columns: 48px 1fr 48px;
  align-items: center;
  height: 58px;
  padding: 0 8px;
  border-bottom: 1px solid var(--line);
}
.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  background: none;
}
.wordmark {
  justify-self: center;
  font-family: var(--wide);
  font-weight: 700;
  font-size: 16px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
}
.masthead { text-align: center; }
.masthead-row {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 70px;
}
.script-title {
  font-family: var(--script);
  font-size: 56px;
  line-height: 1;
  padding-top: 10px;
  text-decoration: none;
}
.masthead-toggle { position: absolute; right: 10px; top: 13px; }
.masthead-toggle[aria-expanded="true"] svg { transform: rotate(180deg); }
.sections { display: none; border-top: 1px solid var(--line); }
.sections.open { display: block; }
.sections ul { list-style: none; margin: 0; padding: 6px 0 10px; }
.sections a {
  display: block;
  padding: 13px var(--gutter);
  font-family: var(--wide);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  text-decoration: none;
}
.sections a.active { text-decoration: underline; text-underline-offset: 6px; }

/* ---------- Featured carousel ---------- */
.features { position: relative; max-width: 1080px; margin: 18px auto 0; padding: 0 var(--gutter); }
.track {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
}
.track::-webkit-scrollbar { display: none; }
.slide { position: relative; flex: 0 0 100%; scroll-snap-align: start; padding: 0 1px 10px; }
.slide-media { display: block; background: var(--wash); }
.slide-media img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.slide-card {
  background: var(--bg);
  padding: 28px 26px 30px;
  box-shadow: 0 1px 5px rgba(0, 0, 0, 0.14);
}
.slide-title { margin: 16px 0 22px; font: 400 25px/1.25 var(--serif); }
.slide-title a { text-decoration: none; }
.slide-rule { border: 0; border-top: 1px solid var(--ink); margin: 0 0 26px; }
.slide-excerpt {
  margin: 0 0 22px;
  font-size: 17px;
  line-height: 1.6;
  max-height: calc(1.6em * 4.4);
  overflow: hidden;
  -webkit-mask-image: linear-gradient(to bottom, #000 35%, transparent);
  mask-image: linear-gradient(to bottom, #000 35%, transparent);
}
.continue {
  display: inline-flex;
  align-items: center;
  gap: 18px;
  font-family: var(--wide);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  text-decoration: none;
}
.arrow { display: none; }
.dots { display: flex; justify-content: center; gap: 2px; margin-top: 14px; }
.dot {
  width: 30px;
  height: 30px;
  padding: 10px;
  border: 0;
  border-radius: 50%;
  background: #d6d6d6;
  background-clip: content-box;
}
.dot.active { background-color: var(--ink); }

/* ---------- Story grid ---------- */
.discover-section { max-width: 1000px; margin: 64px auto 0; padding: 0 var(--gutter); }
.grid { display: grid; grid-template-columns: minmax(0, 1fr); row-gap: 48px; }
.card a { display: block; text-decoration: none; }
.card-media { aspect-ratio: 16 / 9; overflow: hidden; background: var(--wash); }
.card-media img { display: block; width: 100%; height: 100%; object-fit: cover; transition: opacity 0.2s; }
.card a:hover .card-media img { opacity: 0.88; }
.card-title { margin: 18px 0 10px; font: 400 22px/1.3 var(--serif); }
.empty { text-align: center; color: var(--muted); font-style: italic; }

/* ---------- Story page ---------- */
.story-head { max-width: 680px; margin: 34px auto 26px; padding: 0 var(--gutter); text-align: center; }
.story-head .eyebrow { margin-top: 10px; }
.story-title { margin: 12px 0 14px; font: 400 28px/1.25 var(--serif); }
.byline { margin: 0; font-size: 15px; font-style: italic; }
.dateline { margin: 4px 0 0; font-size: 13px; font-style: italic; color: var(--muted); }
.story-hero { max-width: 1180px; margin: 0 auto; padding: 0 var(--gutter); }
.story-hero img { display: block; width: 100%; aspect-ratio: 3 / 2; object-fit: cover; background: var(--wash); }
figure { margin: 0; }
figcaption { margin-top: 10px; font-size: 13px; line-height: 1.4; color: var(--muted); }
.prose { max-width: calc(30rem + 2 * var(--gutter)); margin: 0 auto; padding: 0 var(--gutter); }
.prose p { margin: 0 0 1.25em; font-size: 17px; line-height: 1.65; }
.intro { margin-top: 40px; }
.shop-link { margin: 32px 0 0; text-align: center; font-style: italic; }
.entry-link { font-style: italic; }
.shop-link a, .entry-link a { text-underline-offset: 3px; }
.entry { margin-top: 60px; }
.entry-title {
  max-width: 680px;
  margin: 0 auto;
  padding: 0 var(--gutter);
  text-align: center;
  font: 400 24px/1.3 var(--serif);
}
.entry-rule { width: 56px; border: 0; border-top: 1px solid #b5b5b5; margin: 22px auto 30px; }
.entry-media { display: grid; gap: 10px; max-width: calc(560px + 2 * var(--gutter)); margin: 0 auto 30px; padding: 0 var(--gutter); }
.entry-media.pair { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.entry-media img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: var(--wash); }
.entry-media.pair img { aspect-ratio: 3 / 4; }

.products { max-width: calc(600px + 2 * var(--gutter)); margin: 36px auto 0; padding: 0 var(--gutter); }
.product-track { display: flex; gap: 20px; margin: 0; padding: 0 0 8px; list-style: none; overflow-x: auto; scroll-snap-type: x mandatory; }
.product { flex: 0 0 44%; scroll-snap-align: start; text-align: center; }
.product a { display: block; text-decoration: none; }
.product-media { aspect-ratio: 3 / 4; background: var(--wash); }
.product-media img { width: 100%; height: 100%; object-fit: cover; }
.product-brand { margin: 12px 0 4px; font-family: var(--wide); font-size: 10px; letter-spacing: 0.15em; text-transform: uppercase; }
.product-name { margin: 0; font-size: 14px; color: var(--muted); }
.product-price { margin: 10px 0 0; font-size: 14px; }

.more-stories { max-width: 1180px; margin: 88px auto 0; padding: 0 var(--gutter); }
.heavy-rule { border: 0; border-top: 3px solid var(--ink); margin: 0 0 40px; }
.more-grid {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding: 0 var(--gutter);
  scrollbar-width: none;
  margin: 0 calc(-1 * var(--gutter));
  padding: 0 var(--gutter) 6px;
}
.more-grid::-webkit-scrollbar { display: none; }
.more-card { flex: 0 0 68%; scroll-snap-align: start; }
.more-card a { display: block; text-decoration: none; }
.more-media { aspect-ratio: 3 / 4; overflow: hidden; background: var(--wash); }
.more-media img { display: block; width: 100%; height: 100%; object-fit: cover; }
.more-card .script-label { display: block; margin-top: 12px; font-size: 30px; line-height: 0.9; }
.more-title { margin: 2px 0 0; font: 400 18px/1.3 var(--serif); }

.not-found { padding: 80px var(--gutter) 40px; text-align: center; }

/* ---------- Footer ---------- */
.site-footer { margin-top: 96px; padding: 48px var(--gutter) 40px; border-top: 1px solid var(--line); text-align: center; }
.site-footer p { margin: 12px 0 0; font-style: italic; color: var(--muted); }
.footer-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 26px; margin: 28px 0 0; padding: 0; list-style: none; }
.footer-links a { font-family: var(--wide); font-size: 10px; letter-spacing: 0.2em; text-transform: uppercase; text-decoration: none; }
.site-footer .fine { margin-top: 28px; font-size: 12px; font-style: normal; }

/* ---------- Tablet and up ---------- */
@media (min-width: 768px) {
  :root { --gutter: 32px; }
  .site-header-row .icon-btn, .masthead-toggle { visibility: hidden; }
  .wordmark { font-size: 18px; }
  .masthead-row { height: 66px; }
  .script-title { font-size: 52px; }
  .sections { display: block; border-top: 0; }
  .sections ul { display: flex; flex-wrap: wrap; justify-content: center; gap: 0 clamp(18px, 3.4vw, 52px); padding: 0 var(--gutter) 2px; }
  .sections a { padding: 6px 0 12px; font-size: 10px; border-bottom: 1px solid transparent; }
  .sections a.active { text-decoration: none; border-bottom-color: var(--ink); }

  .features { margin-top: 28px; padding: 0 56px; }
  .slide { padding: 0; }
  .slide-card {
    position: absolute;
    top: 6%;
    bottom: 6%;
    left: 4%;
    width: min(340px, 42%);
    display: flex;
    flex-direction: column;
    padding: 40px 36px;
    box-shadow: none;
  }
  .slide-title { font-size: 22px; margin: 14px 0 20px; }
  .slide-excerpt { flex: 1; max-height: none; font-size: 15px; }
  .continue { margin-top: auto; font-size: 10px; }
  .eyebrow { font-size: 9px; }
  .arrow {
    display: inline-flex;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    align-items: center;
    justify-content: center;
    border: 0;
    background: none;
  }
  .arrow.prev { left: 4px; }
  .arrow.next { right: 4px; }
  .dots { margin-top: 18px; }

  .discover-section { margin-top: 80px; }
  .caps-heading { font-size: 18px; margin-bottom: 36px; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 28px; row-gap: 52px; align-items: start; }
  .card:nth-child(2n) { margin-top: 28px; }
  .card-media { aspect-ratio: 16 / 10; }
  .card.tall .card-media { aspect-ratio: 4 / 5; }
  .card-title { font-size: 18px; margin: 16px 0 8px; }

  .story-head { margin-top: 44px; }
  .script-label { font-size: 32px; }
  .story-title { font-size: 30px; }
  .story-hero img { aspect-ratio: 16 / 9; }
  .prose p { font-size: 16px; line-height: 1.55; }
  .entry { margin-top: 72px; }
  .product { flex-basis: 30%; }

  .more-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; max-width: 880px; margin: 0 auto; padding: 0; overflow: visible; }
  .more-card .script-label { font-size: 28px; }
  .more-title { font-size: 17px; }
}

/* ---------- Desktop ---------- */
@media (min-width: 1024px) {
  .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: 32px; row-gap: 56px; }
  .card:nth-child(2n) { margin-top: 0; }
  .card:nth-child(3n) { margin-top: 30px; }
  .card-title { font-size: 17px; }
}

@media (prefers-reduced-motion: reduce) {
  .track { scroll-behavior: auto; }
  .card-media img { transition: none; }
}

/* ---------- Partner (Rakuten) products ---------- */
/* Product shots on white: show the whole product on a soft ground instead of cropping it. */
img.fit-contain { object-fit: contain !important; background: #f6f5f2; padding: 6%; }
.story-hero img.fit-contain { padding: 3%; }
.entry-media img.fit-contain { aspect-ratio: 1 / 1; }
.entry-price { margin: -4px auto 10px; font-family: var(--wide); font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase; }
.entry-price span { color: var(--muted); letter-spacing: 0.12em; }
.disclosure { max-width: 30rem; margin: 14px auto 0; font-size: 12px; line-height: 1.5; font-style: italic; color: var(--muted); }
/* Product rows ("shop the look"): show partner products whole on a soft ground. */
.product-media img { object-fit: contain; background: #f6f5f2; padding: 8%; display: block; }
.products::before { content: "Shop the look"; display: block; margin: 0 0 14px; text-align: center; font-family: var(--wide); font-size: 10px; letter-spacing: 0.22em; text-transform: uppercase; }
/* Section pages: the script title is the page's heading, styled exactly as before */
.masthead-heading { margin: 0; font: inherit; line-height: inherit; }
.site-footer .fine a { color: inherit; }
/* Concept Studio: tall 2:3 concept images, AI note under every title */
.concept-intro { max-width: 34rem; margin: 0 auto 40px; text-align: center; font-style: italic; line-height: 1.6; color: var(--muted); }
.concept-intro a { text-underline-offset: 3px; }
.concept-media { aspect-ratio: 2 / 3; }
.card .concept-media { aspect-ratio: 2 / 3; }
.concept-hero { max-width: 560px; margin: 0 auto; padding: 0 var(--gutter); }
.concept-hero img { display: block; width: 100%; aspect-ratio: 2 / 3; object-fit: cover; background: var(--wash); }
.concept-materials { margin: 0 0 1.25em; font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
