/* Lore Marketing case study. Proportions follow the 1920px XD artboards:
   126px side margin ≈ 6.5vw, body text 20px Helvetica Neue in #707070, bold uppercase labels,
   serif display type. The article is always white (it presents the client's identity),
   while the Same Ground header and footer keep the site theme. */

body.case-lore-marketing main { margin-inline: calc(-1 * max(var(--gutter), env(safe-area-inset-left, 0px))); }
.lm {
  --pad: clamp(20px, 6.5vw, 126px);
  --gap: clamp(16px, 2.4vw, 46px);
  --gray: #707070;
  --ink: #141413;
  --red: #751717;
  --line: #dedbd5;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --nav-h: 48px;
  background: #fff; color: var(--gray);
  font: 400 clamp(15px, 1.05vw, 20px)/1.5 "Helvetica Neue", Helvetica, Arial, sans-serif;
  color-scheme: light;
}
.lm figure { margin: 0; }
.lm img { display: block; width: 100%; height: auto; }
.lm p { margin: 0 0 1em; }
.lm p:last-child { margin-bottom: 0; }
.lm :focus-visible { outline: 2px solid var(--red); outline-offset: 3px; }
.lm-serif { font-family: "Newsreader", "Iowan Old Style", Georgia, serif; letter-spacing: -.04em; color: #000; font-weight: 400; }
.lm-label { font: 700 1em/1.2 "Helvetica Neue", Helvetica, Arial, sans-serif; text-transform: uppercase; letter-spacing: .02em; color: var(--gray); margin: 0 0 1.6em; }

/* Same Ground context: title + meta on the site ground */
.lm-intro { background: var(--ground); color: var(--ink); padding: clamp(40px, 8vw, 110px) var(--pad) 8px; }
body.case-lore-marketing .lm-intro { padding-inline: max(var(--gutter), env(safe-area-inset-left, 0px)); }
.lm-intro h1 { font-family: var(--font-display); font-size: var(--step-3); line-height: 1; letter-spacing: -.02em; font-weight: 400; margin: 10px 0 32px; color: var(--ink); }
.lm-intro .meta { margin-bottom: 0; color: var(--ink); }

/* Chapter bar */
.lm-nav {
  position: sticky; top: 0; z-index: 15; height: var(--nav-h);
  display: flex; align-items: center; padding-inline: var(--pad);
  background: rgba(255, 255, 255, .9); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.lm-nav ol { display: flex; gap: clamp(14px, 2vw, 32px); margin: 0; padding: 0; list-style: none; overflow-x: auto; scrollbar-width: none; width: 100%; }
.lm-nav ol::-webkit-scrollbar { display: none; }
.lm-nav a { display: flex; gap: 6px; align-items: baseline; padding-block: 12px; white-space: nowrap; color: #9a9a9a; text-decoration: none; font-size: 13px; letter-spacing: .02em; transition: color .25s; }
.lm-nav a .n { font-size: 10px; font-variant-numeric: tabular-nums; }
.lm-nav a:hover, .lm-nav a.on { color: var(--ink); }
.lm-nav a.on .t { text-decoration: underline; text-underline-offset: 6px; text-decoration-color: var(--red); }
.lm-progress { position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; }
.lm-progress i { display: block; height: 100%; background: var(--red); transform: scaleX(var(--p, 0)); transform-origin: 0 50%; }
html { scroll-padding-top: calc(var(--nav-h) + 8px); }

/* Sections */
.lm-sec { position: relative; }
.lm-text { padding: clamp(40px, 4.4vw, 84px) var(--pad) 0; }
.lm-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: var(--gap); }
.lm-cols .lm-label { grid-column: 1 / -1; }
.lm-cols p { max-width: 62ch; margin: 0; }
.lm-narrow p { max-width: 62ch; }
.lm-wide { columns: 2; column-gap: var(--gap); }
.lm-wide p { break-inside: avoid; }
.lm-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap); padding: clamp(48px, 5vw, 100px) var(--pad) 0; align-items: start; }
.lm-grid > * { min-width: 0; }
.lm-grid > .lm-text { padding: 0; }
.lm-bleed { width: 100%; overflow: hidden; }
.lm-hero { aspect-ratio: 16 / 9; background: #ece9e4; }
.lm-hero img, .lm-apps img { width: 100%; height: 100%; object-fit: cover; transform: scale(var(--z, 1)); transform-origin: 50% 40%; will-change: transform; }
.lm-black { background: #000; }
.lm-end { display: flex; align-items: center; gap: 16px; padding: clamp(48px, 5vw, 96px) 36px clamp(24px, 2vw, 32px); }
.lm-end i { flex: 0 0 30px; height: 1px; background: var(--gray); }
.lm-end span { margin-inline: auto; font-size: 11px; letter-spacing: .14em; color: #b3b3b3; font-variant-numeric: tabular-nums; }

/* Video */
.vid { position: relative; background: #ece9e4; overflow: hidden; }
.vid video { display: block; width: 100%; height: 100%; object-fit: cover; }
.vid-toggle {
  position: absolute; right: 14px; bottom: 14px; width: 40px; height: 40px; border-radius: 50%;
  border: 0; background: rgba(255, 255, 255, .85); cursor: pointer; display: grid; place-items: center;
  opacity: 0; transition: opacity .25s;
}
.vid:hover .vid-toggle, .vid-toggle:focus-visible, .vid-toggle[data-state="paused"] { opacity: 1; }
@media (hover: none) { .vid-toggle { opacity: .9; } }
.vid-toggle span { width: 10px; height: 12px; border-inline: 3px solid var(--ink); }
.vid-toggle[data-state="paused"] span { width: 0; height: 0; border: 0; border-left: 11px solid var(--ink); border-block: 7px solid transparent; margin-left: 3px; }
.lm-banner { aspect-ratio: 16 / 9; margin-top: clamp(40px, 4.4vw, 84px); }

/* Strategy: LORE + expanding pillar gallery */
.lm-pillars { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: var(--gap); align-items: end; padding: clamp(48px, 5vw, 100px) var(--pad) 0; }
.lm-lore { margin: 0; display: grid; line-height: .92; }
.lm-lore .lm-serif:first-child { font-size: clamp(64px, 6.8vw, 130px); font-weight: 700; text-transform: uppercase; }
.lm-pillar-word { font-size: clamp(34px, 3.4vw, 64px); font-style: italic; font-weight: 300; color: var(--red); transition: opacity .35s, transform .35s var(--ease); }
.lm-pillar-word.swap { opacity: 0; transform: translateY(8px); }
.lm-gallery { display: flex; gap: 10px; height: clamp(360px, 40vw, 720px); }
.lm-panel { position: relative; flex: 1 1 0; min-width: 0; padding: 0; border: 0; background: #eee; cursor: pointer; overflow: hidden; transition: flex-grow .8s var(--ease); }
.lm-panel.is-on { flex-grow: 4.3; cursor: default; }
.lm-panel img { position: absolute; inset: 0; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease), filter .6s; }
.lm-panel:not(.is-on) img { filter: grayscale(.4) brightness(.95); }
.lm-panel:not(.is-on):hover img { transform: scale(1.05); filter: none; }
.lm-panel-name {
  position: absolute; left: 50%; bottom: 16px; transform: translateX(-50%) rotate(180deg); writing-mode: vertical-rl;
  font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: #fff; text-shadow: 0 1px 8px rgba(0, 0, 0, .4);
  transition: opacity .4s;
}
.lm-panel.is-on .lm-panel-name { opacity: 0; }

/* Logo: big L, serif video, nib */
.lm-serif-row { align-items: center; }
.lm-bigL { grid-column: 1 / 5; font-family: "Newsreader", Georgia, serif; font-size: clamp(220px, 31vw, 600px); line-height: .78; color: #000; letter-spacing: -.04em; font-weight: var(--w, 700); font-variation-settings: "opsz" 72; user-select: none; }
.lm-serif-copy { grid-column: 5 / 8; position: relative; }
.lm-nib { width: clamp(90px, 9vw, 170px); margin-top: 32px; animation: nib 6s ease-in-out infinite; }
@keyframes nib { 50% { transform: translateY(-10px) rotate(-4deg); } }
.lm-serif-vid { grid-column: 8 / 13; aspect-ratio: 803 / 852; }
.lm-symbol-row { align-items: end; }
.lm-type-vid { grid-column: 1 / 7; aspect-ratio: 803 / 852; }
.lm-symbols { grid-column: 8 / 13; }
.lm-symbols ul { list-style: none; margin: 1.4em 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px 26px; }
.lm-symbols li { position: relative; cursor: default; transition: color .3s, transform .3s var(--ease); }
.lm-symbols li::after { content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 1px; background: var(--red); transform: scaleX(0); transform-origin: 0 50%; transition: transform .4s var(--ease); }
.lm-symbols li:hover { color: var(--ink); }
.lm-symbols li:hover::after { transform: scaleX(1); }
.lm-scale { width: 69%; margin: clamp(48px, 5vw, 100px) 0 0 26%; }
.lm-values { list-style: none; margin: clamp(32px, 3vw, 56px) 0 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); }
.lm-values figure { overflow: hidden; }
.lm-values img { aspect-ratio: 362 / 384; object-fit: cover; transition: transform 1s var(--ease); }
.lm-values li:hover img { transform: scale(1.06); }
.lm-values figcaption { font-size: clamp(16px, 1.05vw, 20px); padding: 12px 14px 0; }
.lm-hand-row { align-items: end; }
.lm-hand-vid { grid-column: 1 / 7; aspect-ratio: 803 / 852; }
.lm-hand-copy { grid-column: 8 / 13; }
.lm-hand-copy p { max-width: 46ch; }
.lm-statement { position: relative; margin-top: clamp(48px, 5vw, 100px); aspect-ratio: 16 / 9; background: #f2f2f2; }
.lm-statement > img { position: absolute; inset: 0; height: 100%; object-fit: cover; }
.lm-statement figcaption { position: absolute; inset: 0; padding: clamp(20px, 4vw, 84px); display: flex; flex-direction: column; justify-content: space-between; }
.lm-statement span { font-size: clamp(30px, 4.2vw, 80px); line-height: 1.05; }
.lm-statement span:last-child { align-self: flex-end; text-align: right; }

/* Brand mark */
.lm-mark-row { align-items: center; }
.lm-mark-row .lm-text { grid-column: 1 / 7; }
.lm-mark-strokes { grid-column: 8 / 13; }
.lm-initials { display: flex; align-items: center; gap: 18px; margin-top: 1.6em !important; color: var(--gray); letter-spacing: .04em; }
.lm-initials i { flex: 1; height: 1px; background: var(--line); }
.lm-initials b { color: var(--red); font-weight: 700; transition: color .3s; }
.lm-initials span:hover b { color: #000; }
.lm-stagger figure:first-child { grid-column: 1 / 6; }
.lm-stagger figure:last-child { grid-column: 8 / 13; margin-top: 30%; }
.lm-stagger figure { transform: translateY(var(--y, 0)); }

/* Color */
.lm-color-row { row-gap: clamp(40px, 4vw, 80px); }
.lm-color-cards { grid-column: 1 / 6; }
.lm-swatches { grid-column: 8 / 13; grid-row: span 1; list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; }
.lm-swatch {
  position: relative; width: 100%; aspect-ratio: 242 / 436; border: 0; padding: 18px 12px; cursor: pointer;
  background: var(--c); color: #f3ede4; font: inherit; font-size: 13px; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 4px;
  transition: transform .4s var(--ease), box-shadow .4s var(--ease);
}
.lm-swatch[data-light] { color: #1b0d0c; }
.lm-swatch .dot { position: absolute; top: 34%; left: 50%; width: 28%; aspect-ratio: 1; border-radius: 50%; transform: translate(-50%, -50%); background: radial-gradient(circle at 35% 30%, rgba(255, 255, 255, .45), transparent 45%), var(--c); box-shadow: inset -6px -8px 14px rgba(0, 0, 0, .45), 0 10px 22px rgba(0, 0, 0, .3); transition: transform .5s var(--ease); }
.lm-swatch .hex { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 14px; letter-spacing: .02em; }
.lm-swatch .rgb { font-size: 11px; opacity: .7; }
.lm-swatch .copied { position: absolute; top: 12px; left: 50%; transform: translate(-50%, -6px); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; opacity: 0; transition: opacity .25s, transform .25s; }
.lm-swatch.done .copied { opacity: 1; transform: translate(-50%, 0); }
.lm-swatch:hover { z-index: 1; transform: translateY(-6px); box-shadow: 0 18px 30px -14px rgba(0, 0, 0, .5); }
.lm-swatch:hover .dot { transform: translate(-50%, -50%) scale(1.12); }
.lm-tote { grid-column: 1 / 6; }
.lm-color-copy { grid-column: 8 / 13; align-self: end; }
.lm-status { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }

/* Visual system */
.lm-system-top { grid-template-columns: minmax(0, 3fr) minmax(0, 4.5fr) minmax(0, 4.5fr); align-items: end; }
.lm-system-mid { grid-template-columns: minmax(0, 2.6fr) minmax(0, 2.6fr) minmax(0, 4fr); align-items: center; }
.lm-system-mid > figure img { aspect-ratio: 509 / 1080; object-fit: cover; }
.lm-card-wrap { perspective: 1400px; }
.lm-card { position: relative; display: block; width: 100%; aspect-ratio: 1000 / 609; padding: 0; border: 0; background: none; cursor: pointer; transform-style: preserve-3d; transition: transform .9s var(--ease); }
.lm-card[aria-pressed="true"] { transform: rotateY(180deg); }
.lm-card .face { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; box-shadow: 0 24px 40px -24px rgba(0, 0, 0, .45); }
.lm-card .back { transform: rotateY(180deg); outline: 1px solid var(--line); }
.lm-card img { width: 100%; height: 100%; object-fit: cover; }
@media (hover: hover) { .lm-card:not([aria-pressed="true"]):hover { transform: rotateY(-12deg) rotateX(4deg); } }
.lm-hint { margin-top: 18px !important; font-size: 13px; color: #a3a3a3; text-align: center; }
.lm-carousel { position: relative; margin-top: clamp(48px, 5vw, 100px); aspect-ratio: 16 / 9; background: #111; touch-action: pan-y; }
.lm-slides, .lm-slide { position: absolute; inset: 0; }
.lm-slide { opacity: 0; transition: opacity 1s var(--ease); }
.lm-slide.is-on { opacity: 1; }
.lm-slide img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.04); transition: transform 6s linear; }
.lm-slide.is-on img { transform: scale(1); }
.lm-controls { position: absolute; left: 50%; transform: translateX(-50%); bottom: clamp(12px, 1.6vw, 28px); display: flex; align-items: center; gap: 14px; }
.lm-controls button { width: 44px; height: 44px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .5); background: rgba(0, 0, 0, .25); color: #fff; font-size: 16px; cursor: pointer; transition: background .25s; }
.lm-controls button:hover { background: rgba(255, 255, 255, .2); }
.lm-controls .dots { display: flex; gap: 8px; }
.lm-controls .dots i { width: 6px; height: 6px; border-radius: 50%; background: rgba(255, 255, 255, .4); transition: background .3s, transform .3s; }
.lm-controls .dots i.is-on { background: #fff; transform: scale(1.3); }

/* Applications + social */
.lm-apps { margin-top: clamp(40px, 4vw, 80px); }
.lm-social-top .lm-text { grid-column: 1 / 7; }
.lm-reel { grid-column: 8 / 12; aspect-ratio: 604 / 1074; }
.lm-social-bottom { align-items: end; }
.lm-social-bottom figure { grid-column: 1 / 6; }
.lm-social-bottom .lm-text { grid-column: 7 / 13; }

/* Next project link sits on the site ground below the white article */
body.case-lore-marketing .next { margin-inline: max(var(--gutter), env(safe-area-inset-left, 0px)); }

/* Motion */
.lm-js .lm .rv { opacity: 0; transform: translateY(26px); transition: opacity 1s var(--ease), transform 1s var(--ease); transition-delay: calc(var(--i, 0) * 90ms); }
.lm-js .lm .rv.in { opacity: 1; transform: none; }
.lm-js .lm-symbols li { opacity: 0; transform: translateY(10px); transition: opacity .6s var(--ease), transform .6s var(--ease), color .3s; transition-delay: calc(var(--i) * 120ms + 300ms); }
.lm-js .lm-symbols.in li { opacity: 1; transform: none; }
.lm-js .lm-scale img { clip-path: inset(0 100% 0 0); transition: clip-path 1.8s cubic-bezier(.6, .1, .2, 1); }
.lm-js .lm-scale.in img { clip-path: inset(0); }
.lm-js .lm .rv.lm-reel, .lm-js .lm .rv.vid { transform: translateY(26px) scale(.98); }
.lm-js .lm .rv.lm-reel.in, .lm-js .lm .rv.vid.in { transform: none; }

@media (prefers-reduced-motion: reduce) {
  .lm *, .lm *::before, .lm *::after { animation: none !important; transition: none !important; }
  .lm-js .lm .rv, .lm-js .lm-symbols li { opacity: 1; transform: none; }
  .lm-js .lm-scale img { clip-path: none; }
  .lm-hero img, .lm-apps img, .lm-stagger figure { transform: none !important; }
}

/* Tablet and phone */
@media (max-width: 900px) {
  .lm-cols, .lm-wide { display: block; columns: 1; }
  .lm-cols p + p { margin-top: 1em; }
  .lm-grid { grid-template-columns: minmax(0, 1fr); row-gap: 32px; }
  .lm-grid > *, .lm-stagger figure:first-child, .lm-stagger figure:last-child { grid-column: 1 / -1 !important; }
  .lm-stagger figure:last-child { margin-top: 0; width: 80%; justify-self: end; }
  .lm-stagger figure:first-child { width: 80%; }
  .lm-pillars { grid-template-columns: minmax(0, 1fr); }
  .lm-gallery { height: clamp(320px, 110vw, 520px); gap: 6px; }
  .lm-panel.is-on { flex-grow: 5; }
  .lm-bigL { font-size: 46vw; }
  .lm-serif-row .lm-bigL { justify-self: start; }
  .lm-scale { width: auto; margin: 48px var(--pad) 0; }
  .lm-values { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 62vw; overflow-x: auto; scroll-snap-type: x mandatory; padding-inline: var(--pad); gap: 10px; scrollbar-width: none; }
  .lm-values li { scroll-snap-align: start; }
  .lm-system-top, .lm-system-mid { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 10px; }
  .lm-system-top > .lm-text, .lm-system-mid > .lm-card-wrap { grid-column: 1 / -1 !important; }
  .lm-system-top > figure, .lm-system-mid > figure { grid-column: auto !important; }
  .lm-carousel { aspect-ratio: 4 / 3; }
  .lm-reel { width: 72%; justify-self: center; }
  .lm-swatch { aspect-ratio: 1 / 1.3; }
  .lm-swatch .rgb { display: none; }
  .lm-statement { aspect-ratio: 4 / 5; }
  .lm-nav { padding-inline: 0; }
  .lm-nav ol { padding-inline: var(--pad); -webkit-mask-image: linear-gradient(90deg, #000 85%, transparent); mask-image: linear-gradient(90deg, #000 85%, transparent); }
}
