/* =============================================================
   /samples/ page: "Style samples" (three directions).
   Uses the tokens and components from styles.css. Signature elements:
   a thin amber rule with a large outlined 01 / 02 / 03 index in the intro,
   per-card motion meters, and cards whose hover behaviour mirrors the style they show.
   ============================================================= */
.samples-page .site-header { background: var(--night); border-bottom-color: var(--line); }
.samples-page .site-nav ul a[aria-current] { color: var(--text); }

/* ---------- Intro ---------- */
.sm-hero { position: relative; padding: calc(var(--head-h) + clamp(40px, 6vw, 84px)) 0 clamp(36px, 5vw, 64px); overflow: hidden;
  background: radial-gradient(60% 70% at 85% 30%, rgba(255, 181, 71, .09), transparent 70%), radial-gradient(50% 60% at 0% 100%, rgba(85, 120, 200, .10), transparent 70%); }
.sm-hero-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: clamp(24px, 5vw, 80px); align-items: center; }
.sm-label { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem .7rem; color: var(--muted); letter-spacing: .06em; line-height: 1.4; margin-bottom: clamp(18px, 2.4vw, 28px); }
.sm-label .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--amber); box-shadow: 0 0 14px 2px rgba(255, 181, 71, .7); }
.sm-label .sep { color: var(--dim); }
.sm-title { font-size: clamp(2.3rem, 5.2vw, 4.6rem); line-height: .96; letter-spacing: -.05em; font-weight: 780; margin-bottom: clamp(20px, 2.6vw, 32px); text-wrap: balance; }
.sm-hero .lead { max-width: 56ch; }
.sm-chips { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1.6rem; }
.sm-chips li { font: 400 .74rem/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); border: 1px solid var(--line-2); border-radius: 999px; padding: .55rem .85rem; }
.sm-chips li::before { content: "+"; color: var(--amber); margin-right: .45rem; }

/* Index: large outlined numerals that jump to each sample (static; fills amber on hover/focus) */
.sm-index { justify-self: end; width: min(100%, 440px); }
.sm-index ol { border-top: 2px solid var(--amber); }
.sm-index li { border-bottom: 1px solid var(--line); }
.sm-index a { display: flex; align-items: center; gap: clamp(14px, 2vw, 26px); padding: clamp(14px, 1.6vw, 20px) 0; text-decoration: none; color: var(--muted); transition: color .3s; }
.sm-n { position: relative; display: inline-block; font: 800 clamp(3.4rem, 6.2vw, 5.4rem)/.9 var(--display); letter-spacing: -.05em; font-variation-settings: "opsz" 96; color: transparent; -webkit-text-fill-color: transparent; -webkit-text-stroke: 1.5px var(--line-2); min-width: 2ch; }
/* The amber fill is its own layer (a copy of the numeral, wiped up from the bottom) so it never depends on a colour
   transition of transparent text, which some engines skip when text-stroke is in use. */
.sm-n::after { content: attr(data-n); position: absolute; left: 0; top: 0; color: var(--amber); -webkit-text-fill-color: var(--amber); -webkit-text-stroke: 1.5px var(--amber); clip-path: inset(100% -14px -14px -14px); transition: clip-path .5s var(--ease); pointer-events: none; }
.sm-t { font: 400 .78rem/1.3 var(--mono); letter-spacing: .08em; text-transform: uppercase; }
.sm-index a:hover, .sm-index a:focus-visible { color: var(--text); }
.sm-index a:hover .sm-n::after, .sm-index a:focus-visible .sm-n::after, .sm-index a.is-current .sm-n::after { clip-path: inset(-14px); }
.sm-index a.is-current { color: var(--text); }
.sm-index a:focus-visible { outline-offset: 2px; }

/* ---------- Cards ---------- */
.sm-cards-sec { padding-top: clamp(16px, 3vw, 40px); }
.sm-note { display: flex; flex-wrap: wrap; align-items: center; gap: .8rem 1.2rem; padding: 1rem 1.2rem; margin-bottom: clamp(28px, 3.4vw, 44px); border: 1px dashed var(--line-2); border-radius: 12px; background: var(--night-2); }
.sm-note p { margin: 0; color: var(--muted); font-size: .98rem; flex: 1 1 22rem; }
.sm-note strong { color: var(--text); font-weight: 650; }
.sm-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(16px, 2vw, 28px); perspective: 1400px; }
.sm-card { display: flex; flex-direction: column; background: var(--night-2); border: 1px solid var(--line); border-radius: 18px; padding: 14px 14px 22px; position: relative; transition: border-color .4s, box-shadow .5s; }
.sm-cards:not(.hover-lock) .sm-card:hover, .sm-card:focus-within { border-color: rgba(255, 181, 71, .5); box-shadow: 0 30px 70px -34px rgba(0, 0, 0, .9), 0 0 50px -14px rgba(255, 181, 71, .25); }
.sm-frame { position: relative; border-radius: 12px; overflow: hidden; background: var(--night-3); box-shadow: 0 0 0 1px var(--line); transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); transition: transform .6s var(--ease); }
.sm-shot { overflow: hidden; aspect-ratio: 8 / 5; background: var(--night-3); }
.sm-shot img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.sm-stamp { position: absolute; right: 10px; bottom: 10px; font: 500 .62rem/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--night); background: var(--amber); padding: .38rem .5rem; border-radius: 4px; transform: rotate(-3deg); }
.sm-body { display: flex; flex-direction: column; flex: 1; padding: 1.2rem .5rem 0; }
.sm-kicker { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin: 0 0 .8rem; font: 400 .74rem/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--amber); }
.meter { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); }
.meter i { width: 18px; height: 8px; border-radius: 2px; background: var(--line-2); }
.meter i.on { background: var(--amber); }
.meter b { font-weight: 400; margin-left: .45rem; }
.sm-name { font-size: var(--fs-h3); line-height: 1.08; letter-spacing: -.035em; margin-bottom: .7rem; }
.sm-desc { color: var(--muted); font-size: .98rem; margin-bottom: .8rem; }
.sm-good { font-size: .92rem; line-height: 1.45; color: var(--text); margin-bottom: 1rem; padding-left: .8rem; border-left: 2px solid var(--amber); }
.sm-desktop { display: flex; gap: .65rem; align-items: flex-start; font-size: .9rem; line-height: 1.45; color: var(--text); background: rgba(255, 181, 71, .09); border: 1px solid rgba(255, 181, 71, .35); border-radius: 10px; padding: .7rem .8rem; margin-bottom: 1rem; }
.sm-desktop svg { width: 22px; height: 22px; flex: none; fill: none; stroke: var(--amber); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; margin-top: 1px; }
.sm-fine { margin: auto 0 1rem; padding-top: .2rem; font: 400 .68rem/1.3 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--dim); }
.sm-open { align-self: flex-start; }

/* hover behaviour mirrors each style (card 1 stays put on purpose) */
@media (hover: hover) and (pointer: fine) {
  .motion .sm-cards:not(.hover-lock) .sm-card-2:hover .sm-frame { transform: translateY(-6px); }
  .motion .sm-card-2 .sm-shot img { transition: transform 1s var(--ease); }
  .motion .sm-cards:not(.hover-lock) .sm-card-2:hover .sm-shot img { transform: scale(1.04); }
  .motion .sm-card-3 .sm-shot img { transition: transform 1.2s var(--ease); }
  .motion .sm-cards:not(.hover-lock) .sm-card-3:hover .sm-shot img { transform: scale(1.07); }
}
.motion .sm-card-3 .meter i.on { animation: pulse 1.6s ease-in-out infinite; }
.motion .sm-card-3 .meter i.on:nth-child(2) { animation-delay: .2s; } .motion .sm-card-3 .meter i.on:nth-child(3) { animation-delay: .4s; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }

/* ---------- Selected card (set by the 01/02/03 index or a #card-... link; JS adds .is-selected for about 2 seconds) ----------
   Hover is switched off for every card while .hover-lock is on (during the highlight, and afterwards until the pointer really moves),
   so a pointer left resting where the page scrolled to can't make a card look active. */
.sm-card.is-selected { border-color: var(--amber); outline: 2px solid var(--amber); outline-offset: 5px; box-shadow: 0 0 0 6px rgba(255, 181, 71, .12), 0 0 60px -10px rgba(255, 181, 71, .45); }
.sm-tag { position: absolute; z-index: 3; top: 0; left: 22px; transform: translateY(-50%); font: 500 .68rem/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--night); background: var(--amber); padding: .42rem .65rem; border-radius: 5px; pointer-events: none; }
.motion .sm-card.is-selected .sm-tag { animation: tagin .45s var(--ease) both; }
.motion .sm-card.is-selected { animation: selring 1.1s ease-out both; }
@keyframes tagin { from { opacity: 0; transform: translateY(-20%); } to { opacity: 1; transform: translateY(-50%); } }
@keyframes selring { from { outline-offset: 14px; outline-color: rgba(255, 181, 71, 0); } to { outline-offset: 5px; outline-color: var(--amber); } }

/* ---------- CTA ---------- */
.sm-cta { padding-top: 0; }
.sm-cta-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.6rem 3rem; padding: clamp(28px, 4vw, 52px); border: 1px solid var(--line); border-radius: 22px; background: linear-gradient(135deg, var(--night-3), var(--night-2)); }
.sm-cta-inner > div { flex: 1 1 26rem; }
.sm-cta h2 { max-width: 20ch; margin-bottom: .8rem; }
.sm-cta p:not(.label) { color: var(--muted); max-width: 52ch; margin: 0; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .sm-cards { grid-template-columns: 1fr; max-width: 640px; margin-inline: auto; }
  .sm-card { padding-bottom: 24px; }
}
@media (max-width: 900px) {
  .sm-hero-grid { grid-template-columns: 1fr; }
  .sm-index { justify-self: start; width: 100%; max-width: 440px; }
}
@media (max-width: 640px) {
  .sm-note { padding: .9rem 1rem; }
  .sm-open { align-self: stretch; }
  .sm-title { font-size: clamp(2.1rem, 10vw, 3rem); }
}
