/* Francis Klein Paris v3: modern layer over the v1 charter (same palette and fonts).
   Detoured frames on soft "jewel case" tiles, rounded pills, arch hero, motion-ready classes. */
:root {
  --paper: #FCF8F3;
  --case: #F6EEE5;
  --case-2: #EFE3D6;
  --radius: 16px;
  --ease: cubic-bezier(.2, .7, .1, 1);
  --glow: #E07AA6;
}
body { background: var(--paper); }
::selection { background: var(--rose); color: #fff; }
:focus-visible { outline: 2px solid var(--rose); outline-offset: 3px; }

/* announce: a slow ribbon of messages */
.announce { overflow: hidden; padding: 11px 0; white-space: nowrap; font-size: 13.5px; letter-spacing: .02em; }
.announce-track { display: inline-flex; animation: fkMq 38s linear infinite; }
.announce-track span { padding: 0 34px; display: inline-flex; align-items: center; gap: 34px; }
.announce-track span::after { content: ''; width: 7px; height: 7px; background: var(--gold-l); clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%); }
.announce-track { padding-left: 100%; }
@keyframes fkMq { from { transform: translateX(0); } to { transform: translateX(-100%); } }

/* header: glass, shrinks on scroll, animated underline */
.site-header { background: rgba(252,248,243,.82); backdrop-filter: blur(16px) saturate(1.3); -webkit-backdrop-filter: blur(16px) saturate(1.3); transition: padding .35s var(--ease), box-shadow .35s; }
body.scrolled .site-header { padding-top: 12px; padding-bottom: 12px; box-shadow: 0 10px 30px -18px rgba(27,23,20,.35); }
.logo-name { letter-spacing: .16em; transition: font-size .35s var(--ease); }
body.scrolled .logo-name { font-size: 23px; }
.nav-left a::after, .nav-right a::after { content: ''; position: absolute; left: 0; right: 0; bottom: -2px; height: 1px; background: var(--rose); transform: scaleX(0); transform-origin: right; transition: transform .45s var(--ease); }
.nav-left a:hover::after, .nav-right a:hover::after, [data-nav].is-active::after { transform: scaleX(1); transform-origin: left; }
.nav-right a[data-nav="bag"] { display: inline-flex; align-items: center; gap: 6px; }

/* buttons: pills with a soft lift */
.btn { border-radius: 999px; transition: background .25s, color .25s, box-shadow .3s, transform .35s var(--ease); }
.btn:hover { transform: translateY(-2px); }
.btn-primary { box-shadow: 0 10px 24px -14px rgba(185,60,104,.9); }
.btn-primary:hover { box-shadow: 0 16px 30px -14px rgba(185,60,104,.9); }
.chip, .chip-gold, .badge, .cc-chips button, .bubble-label, .finder-box, .tile, .note-box, .ai-note, .store, .store-paris, .twin, .upsell > div, .check, .modal-card, .tryon-card, .pay-box { border-radius: 12px; }
.chip { border-radius: 999px; }
.badge { border-radius: 999px; }
.finder-box { border-radius: 999px; padding-left: 26px; }
.finder-box .btn { border-radius: 999px; }
.field input, .field textarea, .field select, .input, .base-select { border-radius: 10px; }
.inline-form input { border-radius: 999px 0 0 999px; padding-left: 24px; }
.inline-form .btn { border-radius: 0 999px 999px 0; }

/* ---------- the jewel case: cutout frames on a warm tile ---------- */
.media.white, .media.jewel { background:
  radial-gradient(60% 55% at 50% 52%, color-mix(in srgb, var(--glow) 30%, #fff) 0%, rgba(255,255,255,0) 70%),
  radial-gradient(120% 90% at 50% 40%, #FFFDFB 0%, var(--case) 70%, var(--case-2) 100%); transition: background .6s; }
.media.jewel::after, .jewel-stage::after { content: ''; position: absolute; left: 22%; right: 22%; bottom: 13%; height: 9%; border-radius: 50%; background: radial-gradient(closest-side, rgba(60,30,30,.18), rgba(60,30,30,0)); pointer-events: none; }
.media .photo { filter: drop-shadow(0 14px 14px rgba(40,20,20,.18)); transition: transform .8s var(--ease), filter .5s; }
.card { border-radius: var(--radius); overflow: hidden; background: #fff; border: 1px solid rgba(27,23,20,.06); transition: transform .5s var(--ease), box-shadow .5s var(--ease); }
.card:hover { transform: translateY(-5px); box-shadow: 0 26px 50px -24px rgba(60,25,35,.35); }
.card:hover .media .photo { transform: scale(1.07) rotate(-1.5deg); }
.card .media.white, .card .media.jewel { border-bottom: 0; }
.card .media { height: 240px; }
.card-name { letter-spacing: .02em; }
.card.feature { background: radial-gradient(80% 60% at 80% 10%, rgba(185,60,104,.35), transparent 70%), var(--green); }
.vdots span.on { box-shadow: 0 0 0 1.5px #fff, 0 0 0 2.5px var(--rose); }
.vswatch, .vdots span { background-color: var(--case); background-size: 88% auto; background-position: center; }
.vswatch { width: 54px; height: 32px; border-radius: 999px; }
.vdots span { width: 26px; height: 15px; border-radius: 999px; }

.pdp-gallery .main.jewel-stage { height: 600px; }
.jewel-stage .photo { padding: 8% 9%; }
.jewel-stage canvas.spark, .hj-frame canvas.spark { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; mix-blend-mode: screen; z-index: 2; }
.pdp-variants .media { border-radius: 12px; border: 1px solid rgba(27,23,20,.06) !important; }
.pdp-variants .media.is-on { outline: 2px solid var(--rose); }
.pdp-info { background: var(--paper); }
.twin .media { border-radius: 10px; }

/* ---------- home: arch hero with a floating jewel ---------- */
.hero3 { position: relative; display: grid; grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr); gap: 0; min-height: clamp(600px, 84vh, 860px); background:
  radial-gradient(60% 70% at 85% 30%, rgba(185,60,104,.28), transparent 70%),
  radial-gradient(50% 60% at 10% 100%, rgba(195,154,77,.18), transparent 70%), var(--green); color: var(--cream); overflow: hidden; }
.hero3-text { padding: clamp(60px, 8vw, 120px) var(--pad) 70px; display: flex; flex-direction: column; justify-content: center; position: relative; z-index: 2; }
.hero3-title { font-size: clamp(48px, 5.6vw, 92px) !important; margin-top: 20px; }
.hero3-title .ln { display: block; overflow: hidden; padding-bottom: .06em; }
.hero3-title .ln > span { display: inline-block; }
.hero3-lead { font-size: 17px; line-height: 1.8; color: rgba(246,239,226,.82); max-width: 440px; margin: 26px 0 0; font-weight: 300; }
.hero3 .btn-row { margin-top: 36px; }
.hero3-visual { position: relative; padding: 40px var(--pad) 40px 0; display: flex; align-items: flex-end; justify-content: flex-end; }
.hero3-arch { position: relative; width: min(88%, 620px); height: 100%; min-height: 520px; border-radius: 320px 320px 0 0; overflow: hidden; box-shadow: 0 0 0 1px rgba(227,193,117,.55), 0 0 0 10px rgba(15,54,44,1), 0 0 0 11px rgba(227,193,117,.35); }
.hero3-arch img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 22%; }
.hero3-arch::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(15,54,44,0) 55%, rgba(15,54,44,.55)); }
.hero3-jewel { position: absolute; left: -2%; bottom: 9%; width: min(64%, 600px); z-index: 3; display: block; }
.hj-frame { position: relative; aspect-ratio: 1084 / 370; }
.hj-frame img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 30px 30px rgba(0,0,0,.5)) drop-shadow(0 4px 8px rgba(0,0,0,.35)); }
.hj-label { display: inline-grid; gap: 2px; margin: 10px 0 0 8%; padding: 12px 18px; border-radius: 14px; background: rgba(252,248,243,.94); color: var(--ink); box-shadow: 0 16px 30px -16px rgba(0,0,0,.6); }
.hj-label span { font-size: 12px; color: var(--muted); }
.hj-label b { font-family: var(--serif); font-weight: 500; font-size: 20px; }
.hj-label em { font-style: normal; font-size: 13px; color: var(--rose-d); }
.hero3-jewel:hover .hj-label em { text-decoration: underline; }
.hero3-dots { position: absolute; right: calc(var(--pad) + 10px); bottom: 22px; display: flex; gap: 8px; z-index: 4; }
.hero3-dots button { width: 28px; height: 28px; border-radius: 50%; border: 0; background: none; padding: 0; cursor: pointer; display: grid; place-items: center; }
.hero3-dots i { width: 8px; height: 8px; border-radius: 50%; background: rgba(246,239,226,.5); transition: transform .3s, background .3s; }
.hero3-dots .is-on i { background: var(--gold-l); transform: scale(1.4); }

.marquee { background: var(--rose); color: #FFF8F2; overflow: hidden; padding: 14px 0; white-space: nowrap; }
.marquee-track { display: inline-flex; animation: fkMq2 70s linear infinite; }
.marquee span { font-family: var(--serif); font-style: italic; font-size: clamp(24px, 2.6vw, 36px); padding: 0 .4em; display: inline-flex; align-items: center; gap: .8em; }
.marquee span::after { content: ''; width: .38em; height: .38em; background: var(--gold-l); clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%); }
@keyframes fkMq2 { to { transform: translateX(-50%); } }

.avatar-img { width: 52px; height: 52px; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 2px var(--paper), 0 0 0 3px var(--gold); }

.shop-colors { padding-bottom: 80px; }
.color-grid { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 14px; margin-top: 32px; }
.color-tile { display: grid; gap: 4px; justify-items: center; text-align: center; padding: 22px 8px 18px; border-radius: var(--radius); background: #fff; border: 1px solid rgba(27,23,20,.06); transition: transform .5s var(--ease), box-shadow .5s; }
.color-tile:hover { transform: translateY(-5px); box-shadow: 0 22px 40px -22px rgba(60,25,35,.35); }
.color-tile .slab { width: 72px; height: 46px; border-radius: 24px 24px 24px 6px; margin-bottom: 10px; box-shadow: inset 0 1px 0 rgba(255,255,255,.4), inset 0 -8px 14px rgba(0,0,0,.2), 0 10px 18px -10px rgba(0,0,0,.5); transition: transform .5s var(--ease); position: relative; }
.color-tile .slab::after { content: ''; position: absolute; inset: 0; border-radius: inherit; background: linear-gradient(115deg, rgba(255,255,255,.5) 0 8%, transparent 22%); }
.color-tile:hover .slab { transform: rotate(-6deg) scale(1.06); }
.color-tile b { font-family: var(--serif); font-weight: 500; font-size: 19px; }

.collection-card .media.col-stage { height: 340px; background: linear-gradient(160deg, #6E1F3E, #3D1124); }
.collection-card.col-1 .media.col-stage { background: linear-gradient(160deg, #1D5C4B, #0A271F); }
.collection-card.col-2 .media.col-stage { background: linear-gradient(160deg, #7A5532, #2C1C10); }
.col-stage img { position: absolute; width: 78%; filter: drop-shadow(0 18px 18px rgba(0,0,0,.45)); transition: transform 1.1s var(--ease); }
.col-stage img:nth-child(1) { left: 2%; top: 14%; transform: rotate(-9deg); }
.col-stage img:nth-child(2) { right: 0; bottom: 12%; transform: rotate(7deg); }
.collection-card:hover .col-stage img:nth-child(1) { transform: rotate(-4deg) translate(-4%, -4%); }
.collection-card:hover .col-stage img:nth-child(2) { transform: rotate(3deg) translate(4%, 4%); }
.collection-card .arrow { font-size: 20px; color: var(--rose); transition: transform .4s var(--ease); }
.collection-card:hover .arrow { transform: translateX(6px); }

.tryon-promo { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, .9fr); gap: 70px; align-items: center; padding: 100px var(--pad); background: radial-gradient(60% 70% at 15% 30%, rgba(185,60,104,.25), transparent 70%), var(--green); }
.device { border-radius: 20px; padding: 10px; background: linear-gradient(145deg, #2b3a35, #0b1a15); box-shadow: 0 50px 90px -40px rgba(0,0,0,.8), inset 0 0 0 1px rgba(255,255,255,.08); transform: perspective(1600px) rotateY(-10deg) rotateX(3deg); transition: transform 1s var(--ease); }
.device:hover { transform: perspective(1600px) rotateY(-3deg) rotateX(1deg); }
.device img { border-radius: 12px; width: 100%; }
.facts { display: grid; gap: 12px; margin: 26px 0 32px; padding: 0; list-style: none; }
.facts li { display: grid; grid-template-columns: 26px 1fr; font-size: 16px; color: rgba(246,239,226,.84); }
.facts li::before { content: ''; width: 13px; height: 13px; margin-top: 6px; background: var(--gold-l); clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%); }
.look-closer > .media, .split > .media.cover { border-radius: 0; }
.split > .media.cover { border-radius: var(--radius); }
.countup { font-weight: 500; color: var(--rose-d); font-variant-numeric: tabular-nums; }

/* ---------- shop ---------- */
.finder { background: radial-gradient(60% 80% at 50% 0%, rgba(185,60,104,.28), transparent 70%), var(--green); }
.f-colors { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.f-color { display: flex; align-items: center; gap: 8px; border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 6px 10px 6px 6px; font-size: 13.5px; color: var(--text-2); cursor: pointer; transition: border-color .2s, background .2s; }
.f-color span { width: 18px; height: 18px; border-radius: 50%; flex: 0 0 auto; }
.f-color:hover { border-color: var(--gold); }
.f-color.is-on { border-color: var(--rose); background: rgba(185,60,104,.08); color: var(--ink); }
.results { gap: 22px; }

/* ---------- integrated try-on ---------- */
.tryon3 { padding: 40px var(--pad) 50px; background: radial-gradient(50% 60% at 90% 0%, rgba(185,60,104,.25), transparent 70%), var(--green); }
.tryon3-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap; margin-bottom: 24px; }
.tryon3 .back { font-size: 15px; color: rgba(246,239,226,.8); border-bottom: 1px solid rgba(227,193,117,.6); padding-bottom: 2px; }
.tryon3 .back:hover { color: var(--cream); }
.tryon3-frame { position: relative; border-radius: 18px; overflow: hidden; background: #0b241d; box-shadow: 0 40px 80px -40px rgba(0,0,0,.8), 0 0 0 1px rgba(227,193,117,.3); min-height: 420px; }
.tryon3-frame iframe { display: block; width: 100%; height: min(82vh, 880px); min-height: 560px; border: 0; background: var(--paper); }
.tryon3-wait { display: grid; place-items: center; min-height: 520px; }
.tryon3-wait .spinner { width: 90px; height: 90px; }
.tryon3-wait .spinner .r2 { inset: 14px; }
.tryon3-note { font-size: 14px; color: rgba(246,239,226,.6); margin: 16px 0 0; max-width: 820px; line-height: 1.7; }
.tryon3-fallback { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 50px; align-items: center; padding: 60px; min-height: 520px; }
.tf-art { aspect-ratio: 16/9; display: grid; place-items: center; border-radius: 50%; background: radial-gradient(closest-side, rgba(185,60,104,.35), transparent); }
.tf-art img { width: 92%; filter: drop-shadow(0 30px 30px rgba(0,0,0,.5)); }

/* ---------- page transition curtain ---------- */
.pt { position: fixed; inset: 0; z-index: 200; display: none; place-items: center; background: var(--green); pointer-events: none; }
.pt svg { width: min(260px, 60vw); }
.pt path { fill: none; stroke: var(--gold-l); stroke-width: 1.4; }
.page-enter { animation: none; }

/* reveal (added by motion.js only to elements below the fold) */
.rv { opacity: 0; transform: translateY(30px); transition: opacity .9s var(--ease), transform 1.1s var(--ease); }
.rv.in { opacity: 1; transform: none; }

/* misc polish */
.section-head { border-bottom: 0; padding-bottom: 0; }
.store { transition: transform .4s var(--ease), box-shadow .4s; }
.store:hover { transform: translateY(-3px); box-shadow: 0 16px 30px -20px rgba(60,25,35,.35); }
.concierge { border-radius: 22px 0 0 22px; }
.bubble-avatar { animation: none; }
.concierge-bubble { animation: fkFloat 6s ease-in-out infinite; }
.summary { border-radius: var(--radius); }
.config-preview .stage { border-radius: var(--radius); }
.fly-dot { border-radius: 50%; background: var(--rose); }

@media (max-width: 1180px) {
  .color-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .announce { font-size: 12.5px; padding: 8px 0; }
  body.scrolled .logo-name { font-size: 17px; }
  .hero3 { grid-template-columns: 1fr; min-height: 0; }
  .hero3-text { padding: 40px var(--pad) 8px; }
  .hero3-title { font-size: clamp(40px, 11vw, 56px) !important; }
  .hero3 .btn-row { flex-direction: column; }
  .hero3 .btn-row .btn { width: 100%; }
  .hero3-visual { padding: 30px var(--pad) 90px; justify-content: center; }
  .hero3-arch { width: 100%; min-height: 0; aspect-ratio: 4 / 4.4; height: auto; border-radius: 200px 200px 0 0; }
  .hero3-jewel { left: 4%; right: 4%; bottom: 26px; width: auto; }
  .hj-label { margin-left: 6%; padding: 10px 14px; }
  .hj-label b { font-size: 17px; }
  .hero3-dots { right: var(--pad); bottom: 34px; }
  .marquee { padding: 10px 0; }
  .color-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
  .color-tile { padding: 14px 4px 12px; }
  .color-tile .slab { width: 52px; height: 34px; }
  .color-tile b { font-size: 15px; }
  .color-tile .small { font-size: 11.5px; }
  .collection-card .media.col-stage { height: 230px; }
  .tryon-promo { grid-template-columns: 1fr; gap: 36px; padding: 64px var(--pad); }
  .device { transform: none; }
  .card .media { height: 170px; }
  .pdp-gallery .main.jewel-stage { height: 320px; }
  .vswatch { width: 48px; height: 30px; }
  .tryon3 { padding: 22px 0 30px; }
  .tryon3-head, .tryon3-note { padding: 0 var(--pad); }
  .tryon3-head .btn-row { width: 100%; }
  .tryon3-head .btn-row .btn { flex: 1; }
  .tryon3-frame { border-radius: 0; }
  .tryon3-frame iframe { height: calc(100svh - 110px); min-height: 520px; }
  .tryon3-fallback { grid-template-columns: 1fr; padding: 30px var(--pad); gap: 20px; }
  .f-colors { grid-template-columns: 1fr 1fr 1fr; }
  .concierge { border-radius: 0; }
}
@media (max-width: 520px) {
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .card .media { height: 130px; }
  .card-body { padding: 14px; }
  .card-name { font-size: 16px; }
  .card-foot .vdots { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .announce-track, .marquee-track { animation: none; }
  .rv { opacity: 1; transform: none; }
}
@media (max-width: 900px) { .results { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; } }
body[data-route="tryon"] .concierge-bubble { display: none; }
