/* Home: nine chapters, each with its own motion. Scroll-driven values arrive as CSS variables from js/home.js. */

.ch { position: relative; }
.ch-head { display: grid; gap: 18px; justify-items: start; max-width: 780px; }

/* ================= 00 · FLIGHT ================= */
.hero { height: 190vh; }
.hero-pin {
  --p: 0;        /* 0 → 1 while the carpet comes towards you */
  --dark: 0;     /* the room darkens into the weave chapter */
  position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden;
  background:
    radial-gradient(70% 55% at 50% 42%, color-mix(in srgb, var(--surface) 95%, transparent) 0%, transparent 70%),
    repeating-linear-gradient(90deg, transparent 0 13px, color-mix(in srgb, var(--ink) 3.5%, transparent) 13px 14px),
    var(--bg);
}
.hero-pin::after {           /* night falls behind the rug as it comes close */
  content: ''; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: var(--night); opacity: var(--dark);
}
.motes { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; opacity: calc(1 - var(--p)); }
.hero-word {
  --fs: max(88px, min(19.6vw, 36vh, 360px));   /* capped by height too, so wide, short screens keep PERSIAN clear of the headline */
  --pb: 14vh;                                    /* lifts the word half this far above the middle */
  position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none;
  padding-bottom: var(--pb);
}
.hero-word .persian {
  position: relative; display: block;
  font: 400 var(--fs)/.78 var(--serif); letter-spacing: calc(-.045em + var(--p) * .5em);
  white-space: nowrap; color: var(--ink); opacity: calc(1 - var(--p) * 1.3);
  transform: translateY(calc(var(--p) * -8vh)) scale(calc(1 + var(--p) * .12));
}
.hero-word .royal {             /* placed from the middle of the screen, measured in sizes of PERSIAN */
  position: absolute; left: 50%; top: 50%;
  translate: calc(-50% - 1.36 * var(--fs)) calc(-50% - var(--pb) / 2 - .6 * var(--fs));
  font: italic 500 max(30px, calc(var(--fs) * .27))/1 var(--serif); color: var(--lapis); letter-spacing: -.02em;
  rotate: -7deg; opacity: calc(1 - var(--p) * 1.6);
}
/* the word is drawn twice: whole behind the carpet, and its lower part again in front,
   so the carpet seems to fly through the letters */
.hero-word-back { z-index: 1; }
.hero-word-back .royal { visibility: hidden; }
.hero-word-front { z-index: 3; }
.hero-word-front .persian { -webkit-clip-path: inset(57% 0 0 0); clip-path: inset(57% 0 0 0); }
.hero-pin.is-tight .hero-word-front .persian { -webkit-clip-path: none; clip-path: none; }   /* very short phones: the carpet has to cross the word, so all of it stays in front */

.hero-stage { position: absolute; inset: 0; z-index: 2; }
.cloth { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: pan-y; cursor: grab; }
.cloth.is-grabbing { cursor: grabbing; }
.cloth-shadow {
  position: absolute; left: 0; top: 0; width: 46%; height: 9%; border-radius: 50%; pointer-events: none; z-index: -1;
  background: radial-gradient(closest-side, rgba(22, 25, 43, .42), rgba(22, 25, 43, .12) 60%, transparent);
  filter: blur(10px); will-change: transform, opacity;
}
[data-theme='dark'] .cloth-shadow { background: radial-gradient(closest-side, rgba(0, 0, 0, .7), transparent); }
.cloth-fallback {
  position: absolute; left: 50%; top: 46%; width: min(36vw, 420px); translate: -50% -50%;
  transform: perspective(900px) rotateX(58deg) rotateZ(-8deg); border-radius: 4px; box-shadow: var(--shadow-lg);
  animation: float 6s ease-in-out infinite;
}
@keyframes float { 50% { translate: -50% calc(-50% - 14px); } }

.hero-copy {
  position: absolute; z-index: 4; left: var(--gutter); bottom: max(6vh, 64px); max-width: 520px;
  display: grid; gap: 16px; justify-items: start;
  opacity: calc(1 - var(--p) * 2.2); transform: translateY(calc(var(--p) * -40px));
}
.hero-title { font: 400 clamp(36px, 3.9vw, 62px)/1.02 var(--serif); letter-spacing: -.02em; text-wrap: balance; }
.hero-title em { color: var(--lapis); }
.hero-sub { color: var(--ink-2); font-size: 17px; max-width: 30em; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 4px; }

.flying {
  position: absolute; z-index: 4; right: var(--gutter); bottom: max(6vh, 64px);
  display: grid; gap: 4px; min-width: 270px; padding: 16px 18px 14px; border-radius: 18px;
  background: color-mix(in srgb, var(--surface) 72%, transparent); border: 1px solid var(--line);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); box-shadow: var(--shadow);
  opacity: calc(1 - var(--p) * 2.2); transform: translateY(calc(var(--p) * -40px));
}
.flying-tag { font: 800 12px/1 var(--sans); letter-spacing: .2em; text-transform: uppercase; color: var(--madder); display: flex; align-items: center; gap: 8px; }
.flying-tag::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; animation: blink 1.8s ease-in-out infinite; }
@keyframes blink { 50% { opacity: .25; } }
.flying-name { font: 500 26px/1.15 var(--serif); text-decoration: none; margin-top: 6px; }
@media (pointer: coarse) { .flying-name { padding-block: 7px; margin-block: -1px -7px; } }   /* a taller target for a finger, same place on screen */
@media (hover: hover) { .flying-name:hover { color: var(--lapis); } }
.flying-meta { color: var(--ink-3); font-size: 13.5px; }
.flying-price { font: 700 15px/1.4 var(--sans); }
.flying-actions { display: flex; align-items: center; gap: 12px; margin-top: 8px; }
.flying-hint { font-size: 12.5px; color: var(--ink-3); }
.flying.swap .flying-name, .flying.swap .flying-meta, .flying.swap .flying-price { animation: swap .7s var(--silk); }
@keyframes swap { 0% { opacity: 1; } 35% { opacity: 0; transform: translateY(-8px); } 36% { transform: translateY(8px); } 100% { opacity: 1; transform: none; } }

.scroll-cue {
  position: absolute; z-index: 4; left: 50%; bottom: 18px; translate: -50% 0;
  display: grid; justify-items: center; gap: 8px; font: 700 12px/1 var(--sans); letter-spacing: .24em; text-transform: uppercase; color: var(--ink-3);
  opacity: calc(1 - var(--p) * 4);
}
.scroll-cue i { width: 1.5px; height: 42px; background: linear-gradient(var(--saffron), transparent); transform-origin: top; animation: thread 2.2s var(--silk) infinite; }
@keyframes thread { 0% { transform: scaleY(0); } 55% { transform: scaleY(1); } 100% { transform: scaleY(1); opacity: 0; } }

/* ================= 01 · THE WEAVE ================= */
.weave { height: 420vh; background: var(--bg); color: var(--ink); }
.weave-pin {
  --w: 0;      /* weaving progress 0 → 1 */
  --done: 0;   /* the knots melt into the photo */
  position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden;
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; gap: clamp(24px, 5vw, 90px);
  padding: calc(var(--hdr) + 2vh) calc(var(--gutter) + 40px) 4vh var(--gutter);
}
.weave-lamp {
  position: absolute; left: 26%; top: 48%; width: 90vh; height: 90vh; translate: -50% -50%; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(244, 198, 106, .2), rgba(244, 198, 106, .05) 55%, transparent);
  animation: lamp 5s ease-in-out infinite; pointer-events: none;
}
@keyframes lamp { 50% { opacity: .78; scale: .97; } }
.weave-fa {
  position: absolute; right: -2vw; bottom: -14vh; font: 500 clamp(180px, 30vw, 480px)/1 'Noto Nastaliq Urdu', serif;
  color: var(--saffron); opacity: .06; pointer-events: none; white-space: nowrap;
  transform: translateX(calc(var(--w) * -8vw));
}
.loom {
  --pad: clamp(10px, 1.6vw, 22px);
  position: relative; justify-self: center; height: min(78svh, 880px); aspect-ratio: 690 / 1050; max-width: 100%;
}
.loom-canvas, .loom-photo { position: absolute; inset: var(--pad); width: calc(100% - 2 * var(--pad)); height: calc(100% - 2 * var(--pad)); }
.loom-photo { object-fit: fill; opacity: var(--done); transition: opacity .2s linear; border-radius: 2px; }
.loom-post {
  position: absolute; top: -3%; bottom: -5%; width: calc(var(--pad) * .9); border-radius: 6px;
  background: linear-gradient(90deg, #4a2c17, #8a5a33 40%, #5a361c 70%, #2d1a0d);
  box-shadow: 0 10px 30px rgba(0, 0, 0, .5);
}
.loom-post.l { left: -2px; } .loom-post.r { right: -2px; }
.loom-beam {
  position: absolute; left: -4%; right: -4%; height: calc(var(--pad) * 1.1); border-radius: 999px;
  background: linear-gradient(180deg, #2d1a0d, #9a6a3d 35%, #6a4220 65%, #24140a);
  box-shadow: 0 8px 24px rgba(0, 0, 0, .55);
}
.loom-beam.t { top: calc(var(--pad) * -.3); } .loom-beam.b { bottom: calc(var(--pad) * -.3); }
.weave-copy { position: relative; z-index: 2; display: grid; gap: 22px; max-width: 520px; }
.weave-steps { list-style: none; margin: 0; padding: 0; position: relative; min-height: 15.5em; }
.weave-steps li {
  position: absolute; inset: 0 0 auto; display: grid; gap: 14px;
  opacity: 0; transform: translateY(26px); filter: blur(4px);
  transition: opacity .7s var(--silk), transform .9s var(--silk), filter .7s var(--silk);
}
.weave-steps li.is-on { opacity: 1; transform: none; filter: none; }
.weave-steps li.is-past { transform: translateY(-26px); }
.weave-steps h2 { font: 400 clamp(36px, 4.2vw, 68px)/1 var(--serif); letter-spacing: -.025em; }
.weave-steps em { color: var(--saffron); }
.weave-steps p { color: var(--ink-2); font-size: 17px; max-width: 30em; }
.knots { display: grid; gap: 2px; }
.knots-num { font: 400 clamp(46px, 5.4vw, 86px)/1 var(--serif); font-variant-numeric: tabular-nums lining-nums; letter-spacing: -.02em; color: var(--glow); }
.knots-lbl { font: 700 12px/1 var(--sans); letter-spacing: .22em; text-transform: uppercase; color: var(--ink-3); }
.weave-bar { height: 2px; background: var(--line); border-radius: 2px; overflow: hidden; }
.weave-bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--saffron), var(--glow)); transform-origin: left; transform: scaleX(var(--w)); }
.weave-note { color: var(--ink-3); font-size: 13px; }

/* ================= 03 · COLLECTIONS ================= */
.rolls { padding: 18vh var(--gutter) 16vh; overflow-x: clip; }
.rolls .ch-head { margin-bottom: 8vh; }
.rack {
  display: grid; gap: clamp(8px, 1.2vw, 14px); padding: 0 clamp(0px, 4vw, 70px) 0 4vw;
  perspective: max(1600px, 84vw); perspective-origin: 20% 50%;   /* grows with very wide screens, so the turned rolls stay inside */
}
.roll {
  --d: clamp(64px, 7.4vw, 110px);
  --spin: 0%;
  position: relative; display: flex; align-items: center; gap: 22px;
  width: calc(100% - var(--off, 0%)); height: var(--d); padding: 0; border: 0; background: none; text-align: left; cursor: pointer;
  margin-left: var(--off, 0%);
  transform-style: preserve-3d; transform: rotateY(-9deg) rotateZ(var(--tilt, 0deg));
  transition: transform .9s var(--silk), filter .5s;
}
.roll-body {
  position: relative; flex: 0 1 var(--len, 82%); min-width: 0; height: 100%; border-radius: 10px 16px 16px 10px; overflow: hidden;
  background: var(--img) 50% var(--spin) / 100% auto repeat, var(--c1);
  box-shadow: 0 18px 30px -18px rgba(22, 25, 43, .7);
  transition: transform .9s var(--silk), box-shadow .6s;
}
.roll-body::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(10, 8, 6, .62) 0%, rgba(10, 8, 6, .1) 20%, rgba(255, 246, 230, .26) 34%, rgba(255, 246, 230, 0) 50%, rgba(10, 8, 6, .22) 76%, rgba(10, 8, 6, .7) 100%);
}
.roll-end {
  position: absolute; left: calc(var(--d) * -.17); top: 0; width: calc(var(--d) * .36); height: var(--d); z-index: 2;
  border-radius: 50%; overflow: hidden; background: var(--c2);
  box-shadow: inset -3px 0 6px rgba(0, 0, 0, .45), 2px 0 8px rgba(0, 0, 0, .25);
}
.roll-end svg { width: 100%; height: 100%; display: block; transform: rotate(var(--spin-deg, 0deg)); }
.roll-tag {
  position: relative; flex: none; display: grid; gap: 2px; padding: 10px 14px 10px 26px; min-width: 150px;
  background: #fbf8f1; color: #16192b; border-radius: 4px 10px 10px 4px; box-shadow: var(--shadow);
  transform-origin: 0 50%; transform: rotate(-3deg); transition: transform .8s var(--spring);
}
.roll-tag::before {                       /* the punched hole and its string */
  content: ''; position: absolute; left: 9px; top: 50%; width: 8px; height: 8px; margin-top: -4px; border-radius: 50%;
  background: var(--bg); box-shadow: inset 0 1px 2px rgba(0, 0, 0, .35);
}
.roll-tag::after { content: ''; position: absolute; right: 100%; top: 50%; width: 24px; height: 1.5px; background: #b9a98e; }
.roll-tag b { font: 500 clamp(18px, 1.7vw, 24px)/1.1 var(--serif); }
.roll-tag small { font: 700 12px/1.2 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: #5b5e71; }
@media (hover: hover) { .rack:hover .roll:not(:hover) { filter: saturate(.75) brightness(.92); } }
.roll:focus-visible { transform: rotateY(-9deg) translateX(-2.5vw) translateZ(70px); }
@media (hover: hover) { .roll:hover { transform: rotateY(-9deg) translateX(-2.5vw) translateZ(70px); } }
@media (hover: hover) { .roll:hover .roll-body { box-shadow: 0 30px 40px -18px rgba(22, 25, 43, .8); } }
.roll:focus-visible .roll-tag { transform: rotate(4deg); }
@media (hover: hover) { .roll:hover .roll-tag { transform: rotate(4deg); } }
.roll.is-spinning .roll-body { animation: none; }

/* the roll opening into a rug (made by js) */
.unroll {
  position: fixed; z-index: 55; overflow: hidden; pointer-events: none;
  background: var(--img) center / cover no-repeat, var(--c1);
  clip-path: inset(0 0 calc(100% - var(--u, 0%)) 0);
  box-shadow: var(--shadow-lg);
}
.unroll-cyl {
  position: fixed; z-index: 56; pointer-events: none; border-radius: 999px;
  background: var(--img) 50% var(--spin, 0%) / 100% auto repeat-y, var(--c1);
}
.unroll-cyl::after {
  content: ''; position: absolute; inset: 0; border-radius: inherit;
  background: linear-gradient(180deg, rgba(10, 8, 6, .62), rgba(10, 8, 6, .1) 20%, rgba(255, 246, 230, .26) 34%, rgba(255, 246, 230, 0) 50%, rgba(10, 8, 6, .22) 76%, rgba(10, 8, 6, .7));
}

/* ================= 04 · NEW IN: THE RING ================= */
.ring-ch { padding: 16vh 0 12vh; overflow: hidden; }
.ring-ch .ch-head { padding: 0 var(--gutter); position: relative; z-index: 2; }
.ring-ghost {
  position: absolute; left: 0; top: 54%; translate: 0 -50%; pointer-events: none; white-space: nowrap;
  font: italic 400 clamp(120px, 20vw, 320px)/1 var(--serif); letter-spacing: -.04em; color: var(--ink); opacity: .05;
}
.ring-ghost span { display: inline-block; animation: ghost 70s linear infinite; }
@keyframes ghost { to { transform: translateX(-50%); } }
.ring-stage {
  position: relative; height: clamp(440px, 64vh, 660px); perspective: 1700px; perspective-origin: 50% 24%;
  display: grid; place-items: center; cursor: grab; touch-action: pan-y; user-select: none; -webkit-user-select: none;
  outline: none;
}
.ring-stage:focus-visible { outline: 2px solid var(--saffron); outline-offset: -8px; border-radius: 24px; }
.ring-stage.is-grabbing { cursor: grabbing; }
.ring {
  --w: clamp(150px, 16.5vw, 250px);
  --r: calc(var(--w) * 2.1);
  position: relative; width: var(--w); aspect-ratio: 3 / 4; transform-style: preserve-3d;
  transform: translateZ(calc(-1 * var(--r))) rotateX(-5deg) rotateY(var(--rot, 0deg));
}
.ring-card {
  position: absolute; inset: 0; transform-style: preserve-3d;
  transform: rotateY(calc(var(--i) * var(--step))) translateZ(var(--r));
}
.hang { position: absolute; inset: 0; transform-style: preserve-3d; transform-origin: 50% -14px; animation: sway 5.5s ease-in-out infinite; animation-delay: calc(var(--i) * -.7s); }
@keyframes sway { 0%, 100% { transform: rotateX(2.2deg) rotateZ(-.4deg); } 50% { transform: rotateX(-2.2deg) rotateZ(.4deg); } }
.face { position: absolute; inset: 0; border-radius: 12px; overflow: hidden; backface-visibility: hidden; -webkit-backface-visibility: hidden; box-shadow: 0 30px 50px -28px rgba(22, 25, 43, .7); }
.face img { width: 100%; height: 100%; object-fit: cover; pointer-events: none; -webkit-user-drag: none; }
.face-back { transform: rotateY(180deg); }
.face-back img { filter: brightness(.5) saturate(.55) contrast(1.15); transform: scaleX(-1); }
.face-back::after {   /* the back of a rug shows every knot */
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(circle at 50% 50%, rgba(0, 0, 0, .35) 0 1px, transparent 1.6px) 0 0 / 5px 5px;
}
.rod {
  position: absolute; left: -9%; right: -9%; top: -16px; height: 9px; border-radius: 9px; z-index: 2;
  background: linear-gradient(180deg, #f6dc9a, #c99a3c 45%, #8a6420 80%);
  box-shadow: 0 4px 8px rgba(0, 0, 0, .3);
}
.rod::before, .rod::after { content: ''; position: absolute; top: -3px; width: 15px; height: 15px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #fbe6b0, #b08433 60%, #6d4c16); }
.rod::before { left: -6px; } .rod::after { right: -6px; }
.ring-card .sheen, .card .sheen {
  position: absolute; inset: 0; pointer-events: none; mix-blend-mode: soft-light;
  background: linear-gradient(105deg, transparent 30%, rgba(255, 255, 255, .85) 48%, transparent 66%) -120% 0 / 220% 100% no-repeat;
}
.ring-card.is-front .sheen { animation: sheen 1.6s var(--silk); }
@keyframes sheen { to { background-position: 140% 0; } }
.ring-card.is-front .face-front { box-shadow: 0 40px 70px -26px rgba(22, 25, 43, .85), 0 0 0 1px rgba(226, 163, 58, .5); }
.ring-info { display: flex; align-items: center; justify-content: center; gap: 22px; padding: 0 var(--gutter); position: relative; z-index: 2; }
.ring-text { display: grid; justify-items: center; text-align: center; min-width: min(420px, 60vw); }
.ring-name { font: 400 clamp(26px, 2.6vw, 38px)/1.1 var(--serif); text-decoration: none; }
@media (pointer: coarse) { .ring-name { padding: 8px 4px; margin: -8px -4px; } }
@media (hover: hover) { .ring-name:hover { color: var(--lapis); } }
.ring-meta { color: var(--ink-3); font-size: 14px; }
.ring-text.swap > * { animation: swap .6s var(--silk); }

/* ================= 05 · ROUNDS ================= */
.rounds { height: 230vh; }
.rounds-pin {
  position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden;
  display: grid; grid-template-rows: auto 1fr; padding: calc(var(--hdr) + 5vh) var(--gutter) 4vh;
}
.rounds-floor { position: relative; }
.rounds-floor::after {   /* the floor line the rounds roll along */
  content: ''; position: absolute; left: calc(-1 * var(--gutter)); right: calc(-1 * var(--gutter)); bottom: 3vh; height: 1px;
  background: linear-gradient(90deg, transparent, var(--line-2) 20%, var(--line-2) 80%, transparent);
}
.round {
  --tx: 0px; --rz: 0deg; --lift: 0px;
  position: absolute; left: var(--x); bottom: var(--y); width: var(--d); aspect-ratio: 1;
  transform: translateX(var(--tx)) translateY(var(--lift)); text-decoration: none; color: inherit;
  transition: --lift .6s var(--silk);
}
.round-disc { position: absolute; inset: 0; transform: rotate(var(--rz)); }
.round-disc img { width: 100%; height: 100%; border-radius: 50%; animation: spin var(--idle, 90s) linear infinite; animation-play-state: paused; }
.round.is-landed .round-disc img { animation-play-state: running; }
@keyframes spin { to { transform: rotate(360deg); } }
.round-shadow {
  position: absolute; left: 8%; right: 8%; bottom: -5%; height: 9%; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(22, 25, 43, .38), transparent); filter: blur(4px); z-index: -1;
}
.round-ring { position: absolute; inset: -10%; width: 120%; height: 120%; pointer-events: none; animation: spin 40s linear infinite reverse; opacity: 0; transition: opacity .6s; }
.round-ring text { font: 700 9.5px var(--sans); letter-spacing: .3em; text-transform: uppercase; fill: var(--ink-2); }
.round:focus-visible .round-ring { opacity: 1; animation-duration: 14s; }
@media (hover: hover) { .round:hover .round-ring { opacity: 1; animation-duration: 14s; } }
.round:focus-visible { --lift: -14px; }
@media (hover: hover) { .round:hover { --lift: -14px; } }
@media (hover: hover) { .round:hover .round-disc img { animation-duration: 14s; } }
.round-label {
  position: absolute; left: 50%; bottom: 6%; translate: -50% 12px; white-space: nowrap; text-align: center;
  padding: 8px 14px; border-radius: 999px; background: color-mix(in srgb, var(--surface) 88%, transparent);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); box-shadow: var(--shadow);
  font: 500 16px/1.15 var(--serif); opacity: 0; transition: opacity .5s, translate .6s var(--silk);
}
.round-label small { display: block; font: 600 12px/1.4 var(--sans); color: var(--ink-3); }
.round.is-landed .round-label { opacity: 1; translate: -50% 0; }

/* ================= 06 · RUNNERS: THE CORRIDOR ================= */
.corridor { height: 320vh; }
.corridor-pin {
  --u: 0;   /* unrolled 0 → 1 */
  position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden;
  background: linear-gradient(180deg, var(--bg-2), var(--bg) 60%);
}
.hall { position: absolute; inset: 0; perspective: 760px; perspective-origin: 50% 36%; overflow: hidden; }
.hall > * { position: absolute; left: 50%; top: 40%; transform-style: preserve-3d; }
.hall-floor {
  width: 900px; height: 4200px; transform-origin: 0 0;
  transform: translate3d(-450px, 270px, calc(150px + var(--u) * 420px)) rotateX(-90deg);
  background:
    linear-gradient(180deg, transparent 0%, color-mix(in srgb, var(--bg) 70%, transparent) 92%),
    repeating-linear-gradient(180deg, transparent 0 318px, rgba(90, 58, 28, .55) 318px 320px),
    repeating-linear-gradient(90deg, #b48552 0 148px, #9c6f40 148px 150px),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, .05) 0 3px, transparent 3px 11px),
    #b48552;
}
[data-theme='dark'] .hall-floor { filter: brightness(.55) saturate(.9); }
.hall-wall {
  width: 4200px; height: 620px; transform-origin: 0 0; display: flex; align-items: center;
  background: linear-gradient(90deg, color-mix(in srgb, var(--surface) 92%, #c9b89c), color-mix(in srgb, var(--bg-2) 80%, #000) 80%);
}
.hall-left { transform: translate3d(-450px, -350px, calc(150px + var(--u) * 420px)) rotateY(90deg); flex-direction: row; }
.hall-right { transform: translate3d(450px, -350px, calc(-4050px + var(--u) * 420px)) rotateY(-90deg); flex-direction: row-reverse; }
.hall-wall img { height: 230px; width: auto; aspect-ratio: 3 / 4; object-fit: cover; margin: 0 260px; border: 10px solid #f7f1e6; box-shadow: 0 20px 30px -16px rgba(0, 0, 0, .6); }
.hall-end {
  width: 900px; height: 620px; transform: translate3d(-450px, -350px, calc(-4050px + var(--u) * 420px));
  background: color-mix(in srgb, var(--bg-2) 70%, #000); display: grid; place-items: center;
}
.hall-door { width: 230px; height: 420px; margin-top: 200px; border-radius: 115px 115px 0 0; background: radial-gradient(90% 70% at 50% 80%, #fff3d6, #f0c46a 55%, #b9822e); box-shadow: 0 0 120px 40px rgba(244, 198, 106, .45); }
.runner { position: absolute; left: 310px; top: 110px; width: 280px; height: 1500px; transform-style: preserve-3d; }
.runner-flat {   /* the texture is stored near-end first, so it grows away from the viewer */
  position: absolute; left: 0; top: 0; width: 100%; height: calc(var(--u) * 100%);
  background: var(--runner-img, none) 50% 0 / 100% 1500px no-repeat;
  box-shadow: 0 0 0 2px rgba(0, 0, 0, .15), 0 30px 40px rgba(0, 0, 0, .25);
}
.runner-roll {
  --rd: calc(118px - var(--u) * 74px);
  position: absolute; left: -6px; width: calc(100% + 12px); height: var(--rd); top: calc(var(--u) * 100%);
  transform-origin: 50% 0; transform: rotateX(-90deg);
  border-radius: 999px; background: var(--runner-img, none) 50% 0 / 100% auto, #6d7c86;
}
.runner-roll::after {
  content: ''; position: absolute; inset: 0; border-radius: inherit;
  background: linear-gradient(180deg, rgba(0, 0, 0, .6), rgba(255, 255, 255, .18) 35%, rgba(0, 0, 0, .1) 55%, rgba(0, 0, 0, .72));
}
.corridor-copy {
  position: absolute; z-index: 2; left: var(--gutter); top: calc(var(--hdr) + 6vh); max-width: 470px; display: grid; gap: 18px; justify-items: start;
  padding: 26px 28px; border-radius: 22px; background: color-mix(in srgb, var(--bg) 78%, transparent);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); border: 1px solid var(--line);
}
.corridor-copy .ch-title { font-size: clamp(36px, 4.2vw, 64px); }
.corridor-metres { font: 600 13px/1 var(--sans); color: var(--ink-3); letter-spacing: .06em; }
.corridor-rug { font: 600 13px/1.45 var(--sans); color: var(--ink-3); text-decoration: none; }
@media (hover: hover) { .corridor-rug:hover { color: var(--ink); text-decoration: underline; } }
@media (pointer: coarse) { .corridor-rug { padding: 12px 0; margin: -12px 0; } }

/* phones: the runner unrolls straight down the screen, 4 m against a tape measure (the hall is for wide screens) */
.runway { display: none; }
@media (max-width: 640px) {
  .hall { display: none; }
  .corridor-pin {
    --rw: min(28vw, calc((100svh - var(--hdr) - 84px) / 5));   /* 80 × 400 cm: the rug is five times as long as it is wide */
    background: radial-gradient(80% 50% at 82% 48%, color-mix(in srgb, var(--saffron) 12%, transparent), transparent 70%), linear-gradient(180deg, var(--bg-2), var(--bg) 75%);
  }
  .runway { display: block; position: absolute; right: var(--gutter); top: calc(var(--hdr) + 22px); width: calc(var(--rw) + 46px); height: calc(var(--rw) * 5); }
  .runway-rug { position: absolute; right: 0; top: 0; bottom: 0; width: var(--rw); filter: drop-shadow(0 12px 16px rgba(0, 0, 0, .45)); }
  .runway-flat {   /* laid out at full length and uncovered from the top, so unrolling shows more rug, never a squashed one */
    position: absolute; inset: 0; background: var(--runner-img, none) 50% 0 / 100% 100% no-repeat;
    clip-path: inset(0 0 calc((1 - var(--u)) * 100%) 0);
  }
  .runway-rug::before, .runway-rug::after {   /* fringes: the top one shows from the start, the bottom one when it is all out */
    content: ''; position: absolute; left: 7%; right: 7%; height: 9px;
    background: repeating-linear-gradient(90deg, #ece2cc 0 1.5px, transparent 1.5px 4px);
  }
  .runway-rug::before { bottom: 100%; }
  .runway-rug::after { top: 100%; opacity: clamp(0, calc((var(--u) - .97) * 34), 1); }
  .runway-roll {   /* the rest of the rug, still rolled: it travels down and gets thinner */
    position: absolute; left: -6px; right: -6px; top: calc(var(--u) * 100%); height: calc(var(--rw) * (.52 - var(--u) * .36)); translate: 0 -38%;
    border-radius: 999px; opacity: clamp(0, calc((1 - var(--u)) * 30), 1);
    background: linear-gradient(180deg, rgba(0, 0, 0, .62), rgba(255, 255, 255, .2) 34%, rgba(0, 0, 0, .08) 56%, rgba(0, 0, 0, .7)), var(--runner-img, none) 50% 100% / 100% auto, #6d7c86;
  }
  .runway-tape {   /* a tick every 25 cm, a longer one and a label every metre */
    position: absolute; left: 0; top: 0; bottom: 0; width: 38px;
    background: linear-gradient(var(--saffron), var(--saffron)) right 0 top 0 / 1px 100% no-repeat, repeating-linear-gradient(180deg, color-mix(in srgb, var(--saffron) 75%, transparent) 0 1px, transparent 1px 6.25%) right 0 top 0 / 7px 100% no-repeat;
  }
  .runway-tape span { position: absolute; right: 12px; top: calc(var(--m) * 25%); translate: 0 -50%; font: 700 12px/1 var(--sans); color: var(--saffron); white-space: nowrap; }
  .runway-tape span::after { content: ''; position: absolute; left: calc(100% + 2px); top: 50%; width: 12px; height: 1.5px; background: var(--saffron); }
  .corridor-pin .corridor-copy {   /* (beats the tablet rule further down: the words keep left of the runner) */
    left: var(--gutter); right: calc(var(--gutter) + var(--rw) + 60px); top: calc(var(--hdr) + 18px); max-width: none;
    padding: 0; gap: 12px; background: none; border: 0; border-radius: 0; -webkit-backdrop-filter: none; backdrop-filter: none;
  }
  .corridor-copy .ch-title { font-size: clamp(27px, 8.2vw, 36px); }
  .corridor-copy .ch-lead { font-size: 14.5px; }
}
@media (max-width: 640px) and (max-height: 700px) { .corridor-copy .ch-lead { display: none; } }
@media (max-width: 360px) {   /* the narrow column: the chapter label stays on one line */
  .corridor-pin .corridor-copy .eyebrow { letter-spacing: .14em; }
  .corridor-pin .corridor-copy .eyebrow::before { display: none; }
}
.corridor-metres b { font: 400 30px/1 var(--serif); color: var(--ink); font-variant-numeric: tabular-nums; margin-right: 4px; }

/* ================= 07 · KILIMS ================= */
.kilims { padding-bottom: 12vh; overflow: hidden; }
.kilim-band { display: block; width: 100%; height: clamp(84px, 11vw, 150px); }
.kilims-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; gap: 6vw; padding: 12vh var(--gutter) 9vh; }
.flag { position: relative; margin: 0; height: clamp(440px, 72vh, 740px); }
.flag-rail {
  position: absolute; left: 34%; right: 34%; top: 4%; height: 10px; border-radius: 10px; z-index: 2;
  background: linear-gradient(180deg, #f6dc9a, #c99a3c 45%, #8a6420 80%); box-shadow: 0 6px 12px rgba(0, 0, 0, .25);
}
.flag-rail::before, .flag-rail::after { content: ''; position: absolute; top: -5px; width: 20px; height: 20px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #fbe6b0, #b08433 60%, #6d4c16); }
.flag-rail::before { left: -12px; } .flag-rail::after { right: -12px; }
.flag-cloth { position: absolute; inset: 0; width: 100%; height: 100%; }
.flag-fallback { position: absolute; left: 50%; top: 5%; height: 78%; translate: -50% 0; box-shadow: var(--shadow-lg); }
.flag figcaption { position: absolute; left: 0; right: 0; bottom: 0; text-align: center; font: 500 18px/1.4 var(--serif); }
.flag figcaption a { text-decoration: none; }
@media (hover: hover) { .flag figcaption a:hover { color: var(--lapis); } }
.flag figcaption span { display: block; font: 600 12px/1.6 var(--sans); color: var(--ink-3); letter-spacing: .04em; }
.marquee { overflow: hidden; padding: 9px 0; touch-action: pan-y; cursor: grab; -webkit-user-select: none; user-select: none; }
.marquee.is-grabbing { cursor: grabbing; }
.marquee img { -webkit-user-drag: none; pointer-events: none; }
.marquee-track { display: flex; gap: 16px; width: max-content; will-change: transform; }
.marquee img { height: clamp(150px, 17vw, 250px); aspect-ratio: 3 / 4; object-fit: cover; border-radius: 12px; box-shadow: var(--shadow); }

/* ================= 08 · RUG CARE ================= */
.care-ch { height: 330vh; }
.care-pin {
  --j: 0;
  position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden;
  display: grid; align-content: center; justify-items: start; gap: 4vh; padding: calc(var(--hdr) + 2vh) var(--gutter) 5vh;
}
.journey { position: relative; width: 100%; height: clamp(280px, 40vh, 380px); }
.journey-path { position: absolute; left: 0; top: 0; width: 100%; height: 120px; overflow: visible; }
.journey-path path { fill: none; stroke: var(--line-2); stroke-width: 2; stroke-dasharray: 2 9; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.journey-rug {
  position: absolute; left: 0; top: 0; width: clamp(54px, 5vw, 76px); aspect-ratio: 690 / 1050; z-index: 3;
  translate: -50% -50%; transform: translate(var(--jx, 0px), var(--jy, 0px));
}
.journey-rug span {
  position: absolute; inset: 0; border-radius: 3px; background: var(--hero-img, none) center / cover;
  box-shadow: 0 14px 22px -10px rgba(22, 25, 43, .6); transition: transform .8s var(--silk), filter .8s;
}
.journey[data-at='collect'] .journey-rug span { transform: rotate(-90deg) scaleX(.42); filter: brightness(.9); }
.journey[data-at='dust'] .journey-rug span { animation: shake .35s ease-in-out infinite; filter: sepia(.35) brightness(.86); }
.journey[data-at='wash'] .journey-rug span { filter: saturate(1.25) brightness(1.05); }
.journey[data-at='wash'] .journey-rug::after { content: ''; position: absolute; inset: -6px; border-radius: 6px; background: linear-gradient(120deg, transparent 30%, rgba(120, 190, 255, .55) 50%, transparent 70%) -100% 0 / 200% 100%; animation: water 1.1s linear infinite; mix-blend-mode: screen; }
.journey[data-at='dry'] .journey-rug span { transform: rotateX(16deg) translateY(-6px); animation: dry-sway 2.4s ease-in-out infinite; transform-origin: top; }
.journey[data-at='mend'] .journey-rug::after { content: ''; position: absolute; left: -4px; right: -4px; bottom: -3px; height: 3px; background: repeating-linear-gradient(90deg, var(--saffron) 0 5px, transparent 5px 9px); animation: stitch 1s steps(6) infinite; }
.journey[data-at='home'] .journey-rug span { transform: perspective(300px) rotateX(55deg); box-shadow: 0 20px 18px -8px rgba(22, 25, 43, .55); }
@keyframes shake { 25% { transform: translateX(-3px) rotate(-3deg); } 75% { transform: translateX(3px) rotate(3deg); } }
@keyframes water { to { background-position: 100% 0; } }
@keyframes dry-sway { 50% { transform: rotateX(-10deg) translateY(-6px); } }
@keyframes stitch { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
.stations { list-style: none; margin: 0; padding: 0; position: absolute; left: 0; right: 0; top: 120px; display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; }
.stations li { display: grid; justify-items: center; text-align: center; gap: 6px; opacity: .6; transition: opacity .6s, transform .8s var(--silk); transform: translateY(10px); }   /* stations still ahead: quieter, but readable */
.stations li.is-on { opacity: 1; transform: none; }
.stations b { font: 500 22px/1.1 var(--serif); }
.stations span:last-child { color: var(--ink-3); font-size: 14px; max-width: 13em; }
.st-art { position: relative; width: 70px; height: 70px; border-radius: 50%; display: grid; place-items: center; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); }
.stations li.is-on .st-art { border-color: var(--saffron); }
.st-art i { position: relative; display: block; width: 34px; height: 24px; }
.i-van { background: var(--lapis); border-radius: 4px 9px 3px 3px; }
.i-van::before, .i-van::after { content: ''; position: absolute; bottom: -5px; width: 9px; height: 9px; border-radius: 50%; background: var(--ink); border: 2px solid var(--surface); }
.i-van::before { left: 4px; } .i-van::after { right: 4px; }
.is-on .i-van { animation: drive 1.2s ease-in-out infinite; }
@keyframes drive { 50% { transform: translateX(4px); } }
.i-dust { background: radial-gradient(circle, var(--ink-3) 1.4px, transparent 2px) 0 0 / 8px 8px; border-radius: 50%; }
.is-on .i-dust { animation: puff 1.4s ease-out infinite; }
@keyframes puff { from { transform: scale(.6); opacity: 1; } to { transform: scale(1.5); opacity: 0; } }
.i-wash { border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%; background: linear-gradient(#7cc0ff, #2a6fd6); width: 22px !important; height: 30px !important; }
.is-on .i-wash { animation: drip 1.3s ease-in infinite; }
@keyframes drip { 0% { transform: translateY(-6px); opacity: 0; } 30% { opacity: 1; } 100% { transform: translateY(8px); opacity: 0; } }
.i-dry { border-top: 2px solid var(--ink-3); }
.i-dry::after { content: ''; position: absolute; left: 6px; right: 6px; top: 2px; height: 18px; background: var(--hero-img, none) center / cover; transform-origin: top; }
.is-on .i-dry::after { animation: dry-sway 2s ease-in-out infinite; }
.i-mend { width: 30px !important; height: 3px !important; background: repeating-linear-gradient(90deg, var(--saffron) 0 5px, transparent 5px 8px); }
.i-mend::before { content: ''; position: absolute; right: -4px; top: -10px; width: 2px; height: 18px; background: var(--ink-2); transform: rotate(35deg); }
.is-on .i-mend::before { animation: needle .8s ease-in-out infinite; }
@keyframes needle { 50% { transform: rotate(35deg) translateY(5px); } }
.i-home { width: 28px !important; height: 18px !important; background: var(--hero-img, none) center / cover; transform: perspective(60px) rotateX(48deg); border-radius: 2px; }

/* ================= 09 · SHOWROOM ================= */
.showroom { padding: 0 var(--gutter) 14vh; overflow: hidden; background: var(--bg); }
.sign-wrap { position: relative; height: clamp(220px, 34vh, 360px); margin: 0 calc(-1 * var(--gutter)) 9vh; overflow: hidden; }
.sign { width: 100%; height: 100%; object-fit: cover; object-position: 50% 40%; filter: brightness(.9) saturate(1.1); animation: neon 6s ease-in-out infinite; }
.sign-wrap::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 55%, var(--bg)); }
@keyframes neon { 0%, 100% { filter: brightness(.9) saturate(1.1); } 4% { filter: brightness(.6); } 6% { filter: brightness(1.05) saturate(1.2); } 50% { filter: brightness(1) saturate(1.15); } }
.showroom-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); align-items: center; gap: 6vw; }
.deck { --f: 0; position: relative; height: clamp(380px, 58vh, 600px); }
.deck-card {
  position: absolute; left: 50%; top: 52%; width: clamp(150px, 15vw, 236px); aspect-ratio: 3 / 4; margin: 0;
  border-radius: 14px; overflow: hidden; box-shadow: var(--shadow-lg); border: 6px solid #f7f1e6;
  transform: translate(-50%, -50%) translateX(calc(var(--f) * var(--x))) translateY(calc(var(--f) * var(--y))) rotate(calc(var(--f) * var(--a)));
  transition: transform .6s var(--silk); transform-origin: 50% 120%;
}
.deck-card img { width: 100%; height: 100%; object-fit: cover; }
.deck-card { cursor: pointer; -webkit-tap-highlight-color: transparent; }
/* the photo chosen with a tap or click comes to the front, lifted and nearly straight */
.deck-card.is-top { z-index: 10; transform: translate(-50%, -50%) translateX(calc(var(--f) * var(--x))) translateY(calc(var(--f) * var(--y) - 30px)) rotate(calc(var(--f) * var(--a) * .25)) scale(1.1); box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .75); }
@media (hover: hover) { .deck-card:hover { z-index: 9; transform: translate(-50%, -50%) translateX(calc(var(--f) * var(--x))) translateY(calc(var(--f) * var(--y) - 26px)) rotate(calc(var(--f) * var(--a) * .5)) scale(1.06); } }
.visit { display: grid; gap: 20px; justify-items: start; }
.visit-addr { display: flex; align-items: flex-start; gap: 10px; font-style: normal; color: var(--ink-2); font-size: 15px; line-height: 1.45; }
.visit-addr svg { flex: none; width: 21px; height: 21px; margin-top: 1px; fill: none; stroke: var(--saffron); stroke-width: 1.8; stroke-linejoin: round; }
.visit-addr b { display: block; color: var(--ink); font-weight: 700; }
.visit-addr a { color: var(--ink); font-weight: 700; text-decoration-color: var(--saffron); text-underline-offset: 3px; }
@media (pointer: coarse) { .visit-addr a { padding: 12px 4px; margin: -12px -4px; } }
/* the main shop on the map: full width, 150 px, right above the footer */
.showroom { padding-bottom: 0; }
.map-wrap { height: 150px; margin: 9vh calc(-1 * var(--gutter)) 0; background: var(--bg-2); }
.map { display: block; width: 100%; height: 150px; border: 0; }   /* Google's own light map, in both themes */
.visit-actions { display: flex; flex-wrap: wrap; gap: 10px; }

/* ================= PHONES & TABLETS ================= */
@media (max-width: 960px) {
  /* tablets and phones: the card shrinks to one line at the top, clear of the headline */
  .flying { top: calc(var(--hdr) + 8px); bottom: auto; min-width: 0; padding: 10px 14px; grid-template-columns: 1fr auto; align-items: center; column-gap: 12px; border-radius: 14px; }
  .flying-tag { grid-column: 1; }
  .flying-name { font-size: 19px; margin: 0; grid-column: 1; }
  @media (pointer: coarse) { .flying-name { padding-block: 11px; margin-block: -11px; } }
  .flying-meta, .flying-price, .flying-hint { display: none; }
  .flying-actions { grid-column: 2; grid-row: 1 / span 2; margin: 0; }

  .weave-pin { grid-template-columns: 1fr; grid-template-rows: auto 1fr; align-content: start; gap: 18px; padding: calc(var(--hdr) + 10px) var(--gutter) 18px; }
  .loom { height: min(46svh, 520px); }
  .weave-copy { gap: 12px; }
  .weave-steps { min-height: 9.8em; }
  .weave-steps h2 { font-size: clamp(28px, 7.4vw, 42px); }
  .weave-steps p { font-size: 15px; }
  .knots-num { font-size: clamp(34px, 9vw, 52px); }
  .weave-note { display: none; }
  .weave-lamp { left: 50%; top: 30%; width: 70vh; height: 70vh; }

  .rack { padding-left: 6vw; perspective-origin: 10% 50%; }
  .roll { --len: 66% !important; gap: 14px; }
  .roll-tag { min-width: 0; padding: 8px 10px 8px 22px; }

  .kilims-grid { grid-template-columns: 1fr; padding-top: 8vh; }
  .flag { height: 64vh; }

  .stations { position: relative; top: 0; left: 0; padding-left: 58px; grid-template-columns: 1fr; gap: 6px; }
  .stations li { grid-template-columns: 52px 1fr; grid-template-rows: auto auto; justify-items: start; text-align: left; column-gap: 14px; row-gap: 0; }
  .stations li .st-art { grid-row: span 2; width: 52px; height: 52px; }
  .stations b { font-size: 19px; align-self: end; }
  .stations span:last-child { font-size: 13px; }
  .st-art i { transform: scale(.8); }
  .journey { height: auto; }
  .journey-path { display: none; }
  .journey-rug { left: 0; width: 34px; }
  .care-pin { gap: 3vh; }

  .showroom-grid { grid-template-columns: 1fr; gap: 6vh; }
  .corridor-copy { left: var(--gutter); right: var(--gutter); max-width: none; padding: 18px 20px; gap: 12px; }
}
@media (max-width: 640px) {
  .hero { height: 170vh; }
  .hero-word { --fs: 15.2vw; --pb: 26vh; }
  .hero-word .royal { translate: calc(-50% - 22vw) calc(-50% - var(--pb) / 2 - .78 * var(--fs)); font-size: 9vw; }   /* sits on PERSIAN; the carpet flies below */
  .hero-copy { bottom: calc(76px + env(safe-area-inset-bottom)); right: var(--gutter); gap: 12px; }
  .hero-title { font-size: clamp(30px, 8.6vw, 40px); }
  .hero-sub { font-size: 15px; }
  .flying { left: var(--gutter); right: var(--gutter); }
  .scroll-cue { display: none; }
  .btn { min-height: 46px; padding: 0 20px; }

  .rolls { padding-top: 12vh; }
  .ring-stage { height: 430px; }
  .ring-info { gap: 12px; }
  .ring-text { min-width: 0; flex: 1; }
  .rounds { height: auto; }
  .rounds-pin { position: relative; height: auto; overflow: hidden; padding-bottom: 8vh; grid-template-rows: auto auto; }
  .rounds-floor { display: grid; gap: 34px; margin-top: 5vh; }
  .rounds-floor::after { display: none; }
  .round { position: relative; left: auto; bottom: auto; justify-self: start; }
  .round:nth-child(even) { justify-self: end; }
  .round-label { font-size: 14px; padding: 6px 11px; }
  .round-ring { display: none; }
  .care-ch { height: 300vh; }
  .care-pin .ch-title { font-size: 38px; }
  .deck-card { width: 46vw; }
}
/* shorter phones: the word comes down so Royal clears the card, and the line under the headline goes to leave the
   carpet room to fly between PERSIAN and the headline (js/home.js placeOnPhone) */
@media (max-width: 640px) and (max-height: 720px) {
  .hero-word { --pb: 20vh; }
  .hero-sub { display: none; }
}
@media (max-width: 640px) and (max-height: 660px) { .hero-word { --pb: 12vh; } }
@media (max-width: 960px) and (max-height: 720px) {
  .stations span:last-child { display: none; }
  .stations li { grid-template-columns: 40px 1fr; grid-template-rows: auto; align-items: center; }
  .stations li .st-art { width: 40px; height: 40px; grid-row: auto; }
  .stations b { align-self: center; font-size: 17px; }
  .st-art i { transform: scale(.66); }
  .care-pin { gap: 2.4vh; }
  .care-pin .ch-title { font-size: 32px; }
  .care-pin .ch-lead { font-size: 14.5px; }
}
/* short phones held upright: the loom gives up some height so the knot counter stays on screen */
@media (max-width: 640px) and (max-height: 700px) {
  .loom { height: 30svh; }
  .weave-pin { gap: 12px; }
}

/* ================= A PHONE ON ITS SIDE (wide and short) ================= */
@media (max-width: 960px) and (max-height: 500px) and (orientation: landscape) {
  /* flight: PERSIAN smaller and higher, the headline on one line at the bottom, the rug's card beside it */
  .hero-word { --fs: min(15vw, 26vh); --pb: 33vh; }
  .hero-copy { bottom: calc(16px + env(safe-area-inset-bottom)); max-width: 56%; gap: 12px; }
  .hero-title { font-size: clamp(24px, 7.4vh, 32px); }
  .hero-sub, .scroll-cue { display: none; }
  .hero-cta .btn { min-height: 44px; padding: 0 18px; }
  .flying { top: auto; bottom: calc(16px + env(safe-area-inset-bottom)); }

  /* the weave: the loom and the words side by side */
  .weave-pin { grid-template-columns: auto minmax(0, 1fr); grid-template-rows: none; align-items: center; align-content: center; gap: 28px; padding: calc(var(--hdr) + 6px) var(--gutter) 10px; }
  .loom { height: calc(100svh - var(--hdr) - 34px); }
  .weave-copy { gap: 10px; }
  .weave-steps { min-height: 7.2em; }
  .weave-steps h2 { font-size: 26px; }
  .weave-steps p { font-size: 14px; }
  .knots-num { font-size: 32px; }
  .weave-lamp { left: 22%; top: 50%; }


  /* the ring: low enough for the ring and the rug's name to share the screen */
  .ring-ch { padding: 12vh 0 8vh; }
  .ring-stage { height: max(220px, calc(100svh - 140px)); }
  .ring { --w: clamp(92px, 25vh, 150px); }

  /* runners: the card keeps to the left, so the corridor shows */
  .corridor-copy { right: auto; max-width: min(400px, 50%); top: calc(var(--hdr) + 8px); padding: 14px 18px; gap: 8px; }
  .corridor-copy .ch-title { font-size: 26px; }
  .corridor-copy .ch-lead { font-size: 13.5px; }

  /* kilims: the words and the hanging kilim side by side */
  .kilims-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); padding-top: 6vh; }
  .flag { height: calc(100svh - var(--hdr) - 20px); }

  /* rug care: the words and the button on the left, the stations on the right */
  .care-pin { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-rows: auto auto; align-content: center; column-gap: 32px; row-gap: 14px; padding: calc(var(--hdr) + 6px) var(--gutter) 10px; }
  .care-pin > .ch-head { grid-column: 1; grid-row: 1; gap: 10px; }
  .care-pin > .journey { grid-column: 2; grid-row: 1 / span 2; align-self: center; }
  .care-pin > .btn { grid-column: 1; grid-row: 2; align-self: start; }
  .care-pin .ch-title { font-size: 28px; }
  .stations { gap: 4px; }

}

@media (prefers-reduced-motion: reduce) {
  .hero, .weave, .rounds, .corridor, .care-ch { height: auto; }
  .hero-pin, .weave-pin, .rounds-pin, .corridor-pin, .care-pin { position: relative; }
  .round-disc img, .round-ring, .hang, .ring-ghost span, .sign { animation: none !important; }
}
