/* ==========================================================
   KingsCollection — Our Story page (js/story.js)
   Cream editorial layout: giant two-style title, heavy sans +
   light serif type, captioned product photos, a statement that
   lights up as you scroll, and mission chapters that slide sideways.
   ========================================================== */
:root {
  --sy-bg: #f2eee5;
  --sy-ink: #1b1914;
  --sy-soft: #6f695d;
  --sy-heavy: 'Inter', 'Segoe UI', Arial, sans-serif;
  --sy-pad: clamp(1rem, 3vw, 2.5rem);
}
body[data-page="about"] { background: var(--sy-bg); color: var(--sy-ink); }
.sy-thin { font-family: var(--serif); font-weight: 500; letter-spacing: -.01em; }
.sy-eyebrow { display: block; font-size: .62rem; font-weight: 700; letter-spacing: .22em; text-transform: uppercase; color: var(--gold-deep); }

/* every photo: a small caption above, the picture wipes open */
.sy-cap {
  display: block; margin-bottom: .45rem;
  font-size: .56rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--sy-soft);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.sy-img { display: block; overflow: hidden; background: #dcd6c9; border-radius: 2px; clip-path: inset(100% 0 0 0); transition: clip-path 1.2s var(--ease); }
.in > .sy-img { clip-path: inset(0); }
.sy-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .9s var(--ease); }
a:hover > .sy-img img { transform: scale(1.05); }

/* ==========================================================
   1. Intro
   ========================================================== */
.sy-intro {
  position: relative; overflow: hidden;
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--sy-pad);
  padding: clamp(1.5rem, 3vw, 2.5rem) var(--sy-pad) 0;
}
.sy-title {
  grid-column: 1 / -1; grid-row: 1; position: relative; z-index: 2; margin: 0;
  display: flex; justify-content: space-between; align-items: baseline; gap: .12em;
  font-family: var(--sy-heavy); font-weight: 900; text-transform: uppercase;
  font-size: clamp(4.5rem, 17.6vw, 20rem); line-height: .8; letter-spacing: -.055em;
  pointer-events: none;
}
.sy-title .sy-thin { font-size: 1.04em; letter-spacing: -.04em; }
.sy-title span { animation: syRise 1.1s var(--ease) both; }
.sy-title span + span { animation-delay: .12s; }
@keyframes syRise { from { opacity: 0; transform: translateY(.3em); } }
.sy-meta {
  grid-column: 1 / 8; grid-row: 2; display: flex; gap: clamp(1.5rem, 6vw, 6rem);
  margin: 1.2rem 0 clamp(2rem, 5vw, 4rem);
  font-family: var(--serif); font-size: .95rem; color: var(--sy-soft);
}
.sy-intro__photo {
  grid-column: 8 / 13; grid-row: 1 / span 4; position: relative; z-index: 3;   /* sits over the big title */
  margin-top: clamp(4rem, 9vw, 10rem); align-self: start;
}
.sy-intro__photo .sy-img { aspect-ratio: 4 / 5; }
.sy-intro__photo { display: flex; flex-direction: column-reverse; }   /* caption under the photo */
.sy-intro__photo .sy-cap { margin: .5rem 0 0; }
.sy-intro__copy { grid-column: 1 / 7; grid-row: 3; position: relative; }
.sy-lead {
  margin: .9rem 0 0;
  font-family: var(--sy-heavy); font-weight: 500; font-size: clamp(1.4rem, 2.5vw, 2.3rem); line-height: 1.15; letter-spacing: -.02em;
}
.sy-lead em { font-family: var(--serif); font-style: italic; font-weight: 500; color: var(--gold-deep); }
.sy-sign { width: clamp(110px, 12vw, 180px); margin-top: 1rem; overflow: visible; }
.sy-sign path, .sy-quote svg path {
  fill: none; stroke: var(--gold); stroke-width: 4; stroke-linecap: round; stroke-linejoin: round;
}
.sy-intro__note { grid-column: 3 / 7; grid-row: 4; margin: clamp(1.5rem, 4vw, 3rem) 0 clamp(3rem, 6vw, 5rem); max-width: 22rem; font-size: .8rem; line-height: 1.6; color: var(--sy-soft); }
.sy-values { grid-column: 1 / -1; grid-row: 5; margin: 0 calc(-1 * var(--sy-pad)); border-top: 1px solid rgba(27,25,20,.12); overflow: hidden; padding: 1.2rem 0; }
.sy-values__track { display: flex; align-items: center; width: max-content; animation: syValues 40s linear infinite; }
.sy-values__track span { padding: 0 2rem; white-space: nowrap; font-family: var(--sy-heavy); font-weight: 800; font-size: 1rem; text-transform: uppercase; letter-spacing: .02em; }
.sy-values__track span:nth-of-type(even) { font-family: var(--serif); font-weight: 500; font-style: italic; text-transform: none; font-size: 1.35rem; color: var(--gold-deep); }
.sy-values__track i { width: 7px; height: 14px; flex: none; background: url(../images/logo-gold.webp) center / contain no-repeat; }
@keyframes syValues { to { transform: translateX(-50%); } }

/* ==========================================================
   2. Statement
   ========================================================== */
.sy-statement {
  position: relative; text-align: center;
  padding: clamp(5rem, 11vw, 9rem) var(--sy-pad);
  display: grid; justify-items: center;
}
.sy-statement__icon { height: 30px; width: auto; margin-bottom: .6rem; }
.sy-statement__photo {
  position: absolute; z-index: 0; left: 50%; top: 52%;
  width: clamp(150px, 17vw, 250px);
  transform: translate(-50%, -50%) rotate(calc((1 - var(--k, 0)) * -6deg));
}
.sy-statement__photo .sy-img { aspect-ratio: 4 / 5; }
.sy-statement__photo .sy-cap { display: none; }   /* the big words already sit on top */
.sy-statement__photo img { filter: grayscale(calc(1 - var(--k, 0))); }
.sy-statement__text {
  position: relative; z-index: 1; margin: 2rem 0 0; max-width: 15ch;
  font-family: var(--sy-heavy); font-weight: 900; text-transform: uppercase;
  font-size: clamp(2.6rem, 8vw, 7.5rem); line-height: .9; letter-spacing: -.045em;
  pointer-events: none;
}
.sy-statement__text em { font-family: var(--serif); font-style: normal; font-weight: 500; letter-spacing: -.02em; color: #8d8573; }
.sy-w { display: inline-block; opacity: .14; transition: opacity .2s linear; }
.sy-statement__sub { position: relative; z-index: 1; max-width: 30rem; margin: 2.5rem auto 0; font-size: .85rem; color: var(--sy-soft); }

/* ==========================================================
   3. Our Mission (slides sideways)
   ========================================================== */
.sy-mission__head {
  display: flex; gap: 1rem; align-items: center; padding: 0 var(--sy-pad) clamp(1rem, 3vw, 2rem);
  opacity: 0; transform: translateY(30px); transition: opacity 1s var(--ease), transform 1s var(--ease);
}
.sy-mission__head.in { opacity: 1; transform: none; }
.sy-mission__head svg { width: 2.6rem; height: 2.6rem; color: var(--gold-deep); flex: none; }
.sy-mission__head h2 {
  margin: 0; display: grid;
  font-family: var(--sy-heavy); font-weight: 900; text-transform: uppercase;
  font-size: clamp(2.2rem, 5vw, 4.5rem); line-height: .88; letter-spacing: -.04em;
}
.sy-rail { position: relative; }
.sy-rail__pin { position: sticky; top: var(--kc-head, 78px); height: calc(100svh - var(--kc-head, 78px)); overflow: hidden; }
.sy-rail__track {
  display: flex; align-items: flex-start; gap: clamp(2rem, 5vw, 5rem);
  height: 100%; width: max-content;
  padding: 0 var(--sy-pad);
  will-change: transform;
}
.sy-photo {
  flex: none; display: flex; flex-direction: column;
  height: calc(var(--h) * 1%); aspect-ratio: 4 / 5.5;
  margin-top: calc((100svh - var(--kc-head, 78px)) * (5 + var(--y) * .5) / 100);
}
.sy-photo .sy-img { flex: 1; min-height: 0; }
.sy-chapter {
  flex: none; align-self: center; width: clamp(16rem, 26vw, 24rem);
  padding-left: clamp(1rem, 4vw, 4rem);
  opacity: 0; transition: opacity 1s var(--ease);
}
.sy-chapter.in { opacity: 1; }
.sy-chapter h3 {
  margin: 0; display: grid;
  font-family: var(--serif); font-weight: 500; text-transform: uppercase;
  font-size: clamp(2.2rem, 4.2vw, 3.9rem); line-height: .88; letter-spacing: -.01em;
}
.sy-chapter small { display: block; margin-top: .9rem; font-size: .6rem; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; color: var(--gold-deep); }
.sy-chapter p { margin: .9rem 0 0; max-width: 18rem; font-size: .82rem; line-height: 1.6; color: var(--sy-soft); }
.sy-quote {
  flex: none; align-self: flex-start; margin: calc((100svh - var(--kc-head, 78px)) * .12) 0 0; width: clamp(14rem, 22vw, 20rem);
  font-family: var(--serif); font-size: clamp(1.3rem, 2vw, 1.8rem); line-height: 1.2;
  opacity: 0; transition: opacity 1s var(--ease);
}
.sy-quote.in { opacity: 1; }
.sy-quote cite { display: block; margin-top: .8rem; font-family: var(--sans); font-style: normal; font-size: .6rem; font-weight: 700; letter-spacing: .22em; text-transform: uppercase; color: var(--gold-deep); }
.sy-quote svg { width: 90px; margin-top: .8rem; overflow: visible; }
.sy-quote svg path { stroke-width: 2.4; }
.sy-end {
  flex: none; align-self: center; display: grid; justify-items: start; gap: 1.4rem;
  padding: 0 clamp(2rem, 8vw, 8rem) 0 clamp(1rem, 4vw, 4rem);
  opacity: 0; transition: opacity 1s var(--ease);
}
.sy-end.in { opacity: 1; }
.sy-end h3 {
  margin: 0; display: grid;
  font-family: var(--sy-heavy); font-weight: 900; text-transform: uppercase;
  font-size: clamp(2.6rem, 6vw, 5.5rem); line-height: .86; letter-spacing: -.045em;
}
.sy-end h3 span:first-child { font-family: var(--serif); font-weight: 500; letter-spacing: -.01em; }
.sy-btn {
  display: inline-flex; align-items: center; gap: .6rem;
  padding: 1rem 1.6rem; border-radius: 6px; background: var(--gold); color: var(--sy-ink);
  font-size: .72rem; font-weight: 800; letter-spacing: .18em; text-transform: uppercase;
  transition: background .3s, color .3s, transform .3s var(--ease);
}
.sy-btn:hover { background: var(--sy-ink); color: var(--gold); transform: translateY(-2px); }
.sy-rail__bar { position: absolute; left: var(--sy-pad); right: var(--sy-pad); bottom: 1.4rem; height: 2px; background: rgba(27,25,20,.12); overflow: hidden; }
.sy-rail__bar span { display: block; height: 100%; background: var(--gold); transform: scaleX(0); transform-origin: left; }

/* the shared footer sits right after */
body[data-page="about"] .site-footer { margin-top: 0; }

/* ==========================================================
   Phones and tablets
   ========================================================== */
@media (max-width: 800px) {
  .sy-title { font-size: clamp(2.6rem, 15.5vw, 9rem); justify-content: flex-start; }
  .sy-meta, .sy-intro__photo, .sy-intro__copy, .sy-intro__note, .sy-values { grid-row: auto; }
  .sy-meta { grid-column: 1 / -1; gap: 1.2rem; font-size: .8rem; }
  .sy-intro__photo { grid-column: 3 / -1; grid-row: auto; margin-top: 0; order: 3; margin-bottom: 2rem; }
  .sy-intro__copy { grid-column: 1 / -1; order: 2; margin-bottom: 2.5rem; }
  .sy-intro__note { grid-column: 1 / -1; order: 4; margin-top: 0; }
  .sy-values { order: 5; }
  .sy-photo { height: calc(var(--h) * .8%); }
  .sy-chapter { width: 15rem; padding-left: 0; }
  .sy-quote { width: 13rem; }
}

@media (prefers-reduced-motion: reduce) {
  .sy-img { clip-path: none !important; }
  .sy-w { opacity: 1 !important; }
  .sy-rail__pin { overflow-x: auto; }     /* swipe the chapters instead */
  .sy-values__track, .sy-title span { animation: none; }
}
