/* Facet & Fire (facetandfire.online): a jeweller's velvet tray under one spotlight.
   Step-cut (chamfered) frames, hairline steps, a rainbow "fire" glint. Loaded on this title's pages only.
   Every class and keyframe is prefixed facetandfire-. */

/* ---------- velvet: spotlight + faint pile noise ---------- */
#site-root[data-site='facetandfire'] {
  background-color: var(--bg);
  background-image:
    radial-gradient(120% 60% at 50% -10%, rgb(191 234 240 / .07), transparent 60%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .75 0 0 0 0 .92 0 0 0 0 .94 0 0 0 .05 0'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
  background-repeat: no-repeat, repeat;
}
/* Kalnia's 4 reads as a "Ч" and its comma as a full stop at card sizes ("£14,000" looked like "£1Ч.000").
   Figures, the comma and the pound sign come from Fraunces instead; letters stay Kalnia. */
@font-face {
  font-family: 'Facetandfire Figures'; font-weight: 100 900; font-display: swap; size-adjust: 92%;
  src: url(https://fonts.gstatic.com/s/fraunces/v38/6NUu8FyLNQOQZAnv9bYEvDiIdE9Ea92uemAk_WBq8U_9v0c2Wa0K7iN7hzFUPJH58nib14c7qv8.woff2) format('woff2');
  unicode-range: U+0030-0039, U+002C, U+00A3;
}
#site-root[data-site='facetandfire'] { --font-head: 'Facetandfire Figures', "Kalnia", system-ui, sans-serif !important; }
#site-root[data-site='facetandfire'] .font-head { font-synthesis: none; }
#site-root[data-site='facetandfire'] ::selection { background: var(--accent); color: var(--bg); }

.facetandfire-velvet {
  background-color: #071517;
  background-image:
    radial-gradient(90% 70% at 50% 0%, rgb(232 165 143 / .07), transparent 65%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .8 0 0 0 0 .9 0 0 0 0 .9 0 0 0 .06 0'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- the step cut: a chamfered octagon (--c = corner size) ---------- */
.facetandfire-cut {
  clip-path: polygon(var(--c) 0, calc(100% - var(--c)) 0, 100% var(--c), 100% calc(100% - var(--c)), calc(100% - var(--c)) 100%, var(--c) 100%, 0 calc(100% - var(--c)), 0 var(--c));
}
/* Velvet shadow sits on an unclipped wrapper (clip-path would cut a box-shadow off). */
.facetandfire-shadow { filter: drop-shadow(0 30px 30px rgb(0 0 0 / .55)); }
.facetandfire-ring1 { background: var(--accent); }
.facetandfire-ring2 { background: color-mix(in srgb, var(--accent) 55%, transparent); }
.facetandfire-ring3 { background: color-mix(in srgb, var(--accent) 32%, transparent); }
.facetandfire-gap { background: var(--bg); }
.facetandfire-velvet .facetandfire-gap { background: #071517; }

/* ---------- rainbow fire: one thin sliver crossing an element ---------- */
.facetandfire-glint { position: relative; overflow: hidden; isolation: isolate; }
.facetandfire-glint::after {
  content: ''; position: absolute; inset: -20% auto -20% 0; width: 38%; pointer-events: none; z-index: 2;
  background: linear-gradient(100deg, transparent 20%, rgb(255 120 140 / .0) 30%, rgb(255 140 120 / .32) 40%, rgb(255 225 140 / .34) 46%, rgb(150 240 190 / .32) 52%, rgb(140 200 255 / .34) 58%, rgb(200 150 255 / .28) 64%, transparent 78%);
  mix-blend-mode: screen; transform: translateX(-140%) skewX(-14deg);
}
.group:hover .facetandfire-glint::after, .facetandfire-glint:hover::after { animation: facetandfire-sweep 1.1s cubic-bezier(.3,.6,.3,1) 1; }
@keyframes facetandfire-sweep { from { transform: translateX(-140%) skewX(-14deg); } to { transform: translateX(330%) skewX(-14deg); } }

/* Images: scale 1.5% on hover. */
.facetandfire-img img { transition: transform .9s cubic-bezier(.2,.7,.2,1); }
.group:hover .facetandfire-img img { transform: scale(1.015); }

/* ---------- headings & links ---------- */
.facetandfire-h { text-decoration: underline; text-decoration-color: transparent; text-decoration-thickness: 1px; text-underline-offset: 5px; transition: text-decoration-color .25s, color .25s; }
.group:hover .facetandfire-h, .group:focus-visible .facetandfire-h { text-decoration-color: var(--accent); }

.facetandfire-link {
  color: var(--accent); text-decoration: none;
  background-image: linear-gradient(90deg, transparent, transparent), linear-gradient(currentColor, currentColor);
  background-size: 0% 1px, 100% 1px; background-position: 0 100%, 0 100%; background-repeat: no-repeat;
  padding-bottom: 1px;
}
.facetandfire-link:hover {
  background-image: linear-gradient(90deg, #ff8f9b, #ffd38a, #9df0c2, #8fd2ff, #c9a2ff, #ff8f9b), linear-gradient(currentColor, currentColor);
  animation: facetandfire-under .9s ease-out 1 both;
}
@keyframes facetandfire-under { from { background-size: 0% 1px, 100% 1px; } to { background-size: 100% 1px, 100% 1px; } }

/* Dates are written out and set in small caps. */
.facetandfire-date { font-variant-caps: small-caps; letter-spacing: .04em; font-feature-settings: 'lnum'; }
.facetandfire-caps { text-transform: uppercase; letter-spacing: .2em; }

/* ---------- header hairline: rose gold, a glint every 8s ---------- */
.facetandfire-hair { position: relative; height: 1px; background: color-mix(in srgb, var(--accent) 70%, transparent); overflow: hidden; }
.facetandfire-hair::after {
  content: ''; position: absolute; top: -1px; bottom: -1px; left: 0; width: 180px;
  background: linear-gradient(90deg, transparent, #ff8f9b, #ffd38a, #9df0c2, #8fd2ff, #c9a2ff, transparent);
  animation: facetandfire-travel 8s linear infinite; transform: translateX(-200px);
}
@keyframes facetandfire-travel { 0% { transform: translateX(-200px); } 30%, 100% { transform: translateX(calc(100vw + 40px)); } }

/* Nav items split by thin vertical hairlines. */
.facetandfire-nav > * + *::before { content: ''; position: absolute; left: 0; top: 50%; height: 14px; width: 1px; transform: translateY(-50%); background: var(--line); }
.facetandfire-nav > [aria-current='page'] { color: var(--accent); }
.facetandfire-nav > [aria-current='page']::after { content: ''; position: absolute; left: 50%; bottom: 6px; width: 6px; height: 6px; transform: translateX(-50%); background: var(--accent); clip-path: polygon(30% 0, 70% 0, 100% 30%, 100% 70%, 70% 100%, 30% 100%, 0 70%, 0 30%); }

/* ---------- buttons: rose-gold chamfered outlines that fill on hover ---------- */
.facetandfire-btn {
  --c: 9px; position: relative; isolation: isolate; display: inline-flex; align-items: center; justify-content: center; gap: .55em;
  color: var(--accent); background: var(--accent);
  clip-path: polygon(var(--c) 0, calc(100% - var(--c)) 0, 100% var(--c), 100% calc(100% - var(--c)), calc(100% - var(--c)) 100%, var(--c) 100%, 0 calc(100% - var(--c)), 0 var(--c));
  transition: color .25s;
}
.facetandfire-btn::before {
  content: ''; position: absolute; inset: 1px; z-index: -1; background: var(--btn-bg, var(--bg));
  clip-path: polygon(calc(var(--c) - .4px) 0, calc(100% - var(--c) + .4px) 0, 100% calc(var(--c) - .4px), 100% calc(100% - var(--c) + .4px), calc(100% - var(--c) + .4px) 100%, calc(var(--c) - .4px) 100%, 0 calc(100% - var(--c) + .4px), 0 calc(var(--c) - .4px));
  transition: background-color .25s;
}
.facetandfire-btn::after {
  content: ''; position: absolute; inset: 0 auto 0 0; width: 45%; z-index: -1; pointer-events: none; transform: translateX(-140%) skewX(-18deg);
  background: linear-gradient(100deg, transparent, rgb(255 255 255 / .0) 25%, #ffb3a8 40%, #ffe2a6 48%, #b9f4d2 56%, #a9dcff 64%, transparent 80%); opacity: .75;
}
.facetandfire-btn:hover, .facetandfire-btn:focus-visible { color: var(--on-accent); }
.facetandfire-btn:hover::before, .facetandfire-btn:focus-visible::before { background-color: var(--accent); }
.facetandfire-btn:hover::after { animation: facetandfire-sweep .9s ease-out 1; }
.facetandfire-btn-solid { color: var(--on-accent); }
.facetandfire-btn-solid::before { background: var(--accent); }

.facetandfire-oct { clip-path: polygon(30% 0, 70% 0, 100% 30%, 100% 70%, 70% 100%, 30% 100%, 0 70%, 0 30%); }

/* ---------- swatches: gem colour with a rainbow sheen ---------- */
.facetandfire-gem {
  background:
    linear-gradient(135deg, rgb(255 255 255 / .55) 0%, transparent 34%),
    conic-gradient(from 210deg, rgb(255 255 255 / .0), rgb(255 255 255 / .28), rgb(0 0 0 / .25), rgb(255 255 255 / .18), rgb(0 0 0 / .3), rgb(255 255 255 / .0)),
    var(--gem, var(--accent));
}

/* ---------- loupe: the only round element ---------- */
.facetandfire-loupe {
  border-radius: 9999px; overflow: hidden;
  box-shadow: 0 0 0 1px var(--accent), 0 0 0 5px var(--bg), 0 0 0 6px color-mix(in srgb, var(--accent) 45%, transparent), 0 24px 40px -18px rgb(0 0 0 / .8);
}
.facetandfire-loupe > img { width: 100%; height: 100%; object-fit: cover; transform: scale(var(--zoom, 3)); transform-origin: var(--ox, 50%) var(--oy, 45%); }
.facetandfire-loupe::after { content: ''; position: absolute; inset: 0; border-radius: inherit; background: radial-gradient(circle at 32% 26%, rgb(255 255 255 / .22), transparent 38%); pointer-events: none; }

/* ---------- carousel edge fade ---------- */
@media (max-width: 1023px) { .facetandfire-fade { -webkit-mask-image: linear-gradient(90deg, #000 0, #000 calc(100% - 44px), transparent); mask-image: linear-gradient(90deg, #000 0, #000 calc(100% - 44px), transparent); } }
@media (max-width: 767px) { .facetandfire-fade-sm { -webkit-mask-image: linear-gradient(90deg, #000 0, #000 calc(100% - 44px), transparent); mask-image: linear-gradient(90deg, #000 0, #000 calc(100% - 44px), transparent); } }

/* ---------- prose ---------- */
.facetandfire-prose { font-size: 18px; line-height: 1.78; }
.facetandfire-prose + .facetandfire-prose, .facetandfire-note + .facetandfire-prose { margin-top: 1.2em; }
@media (min-width: 768px) { .facetandfire-prose { font-size: 19px; } }
.facetandfire-prose > * + * { margin-top: 1.2em; }
.facetandfire-prose h2 { font-family: var(--font-head); font-weight: 600; font-size: 1.55em; line-height: 1.2; margin-top: 2.1em; text-align: center; scroll-margin-top: 6rem; }
.facetandfire-prose h2::after { content: ''; display: block; width: 48px; height: 9px; margin: .55em auto 0; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 9'%3E%3Cpath d='M0 4.5h19.5M28.5 4.5H48' stroke='%23e8a58f' stroke-width='1'/%3E%3Cpath d='M22.4 1h3.2l2.4 2.4v2.2L25.6 8h-3.2L20 5.6V3.4Z' fill='none' stroke='%23e8a58f'/%3E%3C/svg%3E") center / contain no-repeat; }
.facetandfire-prose h3 { font-family: var(--font-head); font-weight: 600; font-size: 1.2em; line-height: 1.3; margin-top: 1.8em; }
.facetandfire-prose a { color: var(--accent); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; text-decoration-color: color-mix(in srgb, var(--accent) 60%, transparent); }
.facetandfire-prose a:hover { text-decoration-color: var(--accent2); }
.facetandfire-prose strong { font-weight: 700; color: var(--fg); }
.facetandfire-prose ul { list-style: none; padding-left: 1.6em; }
.facetandfire-prose ul > li { position: relative; }
.facetandfire-prose ul > li::before { content: ''; position: absolute; left: -1.35em; top: .62em; width: 9px; height: 9px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 9 9'%3E%3Cpath d='M2.9.5h3.2l2.4 2.4v3.2L6.1 8.5H2.9L.5 6.1V2.9Z' fill='none' stroke='%23e8a58f'/%3E%3C/svg%3E") center / contain no-repeat; }
.facetandfire-prose ol { list-style: none; counter-reset: ff; padding-left: 2.2em; }
.facetandfire-prose ol > li { position: relative; counter-increment: ff; }
.facetandfire-prose ol > li::before { content: counter(ff, decimal-leading-zero) '.'; position: absolute; left: -2.2em; font-family: var(--font-head); font-weight: 600; color: var(--accent); }
.facetandfire-prose li + li { margin-top: .45em; }
.facetandfire-prose blockquote {
  margin: 2.2em auto; max-width: 30ch; text-align: center; font-family: var(--font-head); font-weight: 400; font-size: 1.45em; line-height: 1.35; color: var(--fg);
  padding: 1.35em 0;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 80 9'%3E%3Cpath d='M8 4.5h64' stroke='%23e8a58f'/%3E%3Cpath d='M2.4 1h2.2L7 3.4v2.2L4.6 8H2.4L0 5.6V3.4ZM75.4 1h2.2L80 3.4v2.2L77.6 8h-2.2L73 5.6V3.4Z' fill='%23e8a58f'/%3E%3C/svg%3E") top center / 80px 9px no-repeat,
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 80 9'%3E%3Cpath d='M8 4.5h64' stroke='%23e8a58f'/%3E%3Cpath d='M2.4 1h2.2L7 3.4v2.2L4.6 8H2.4L0 5.6V3.4ZM75.4 1h2.2L80 3.4v2.2L77.6 8h-2.2L73 5.6V3.4Z' fill='%23e8a58f'/%3E%3C/svg%3E") bottom center / 80px 9px no-repeat;
}
.facetandfire-prose blockquote p { margin: 0; }
.facetandfire-prose blockquote p + p { margin-top: .6em; font-family: var(--font-body, inherit); font-size: .55em; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.facetandfire-prose hr { border: 0; height: 9px; margin: 2.4em auto; width: 48px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 9'%3E%3Cpath d='M0 4.5h19.5M28.5 4.5H48' stroke='%23e8a58f'/%3E%3Cpath d='M22.4 1h3.2l2.4 2.4v2.2L25.6 8h-3.2L20 5.6V3.4Z' fill='none' stroke='%23e8a58f'/%3E%3C/svg%3E") center / contain no-repeat; }
.facetandfire-prose img { max-width: 100%; height: auto; }
.facetandfire-prose table { width: 100%; border-collapse: collapse; font-size: .85em; }
.facetandfire-prose th, .facetandfire-prose td { border-bottom: 1px solid var(--line); padding: .5em .4em; text-align: left; }

/* Drop cap: a huge rose-gold Kalnia initial; a rainbow glint crosses it once on load. */
.facetandfire-cap {
  float: left; font-family: var(--font-head); font-weight: 700; font-size: 7.4em; line-height: .78; margin: .07em .1em -.05em -.02em; padding-top: .02em;
  color: var(--accent);
  background: linear-gradient(100deg, var(--accent) 0 38%, #ffb3a8 42%, #ffe2a6 46%, #b9f4d2 50%, #a9dcff 54%, #d6b4ff 58%, var(--accent) 62% 100%) 100% 0 / 320% 100% no-repeat;
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  animation: facetandfire-capsweep 2.6s .5s cubic-bezier(.3,.6,.3,1) 1 both;
}
@media (min-width: 768px) { .facetandfire-cap { font-size: 10.4em; line-height: .76; margin-right: .08em; } }
@media (max-width: 767px) { .facetandfire-cap { font-size: 5.2em; } }
@keyframes facetandfire-capsweep { from { background-position: 100% 0; } to { background-position: 0 0; } }

/* ---------- live badge ---------- */
.facetandfire-facet { animation: facetandfire-facet 2s linear infinite; opacity: .3; }
@keyframes facetandfire-facet { 0%, 100% { opacity: .3; } 10% { opacity: 1; } 30% { opacity: .3; } }
.facetandfire-fire {
  position: absolute; inset: -3px; border-radius: 9999px; pointer-events: none;
  background: conic-gradient(from 0deg, transparent 0 70%, #ff8f9b 76%, #ffd38a 81%, #9df0c2 86%, #8fd2ff 91%, #c9a2ff 95%, transparent 100%);
  -webkit-mask: radial-gradient(circle, transparent 54%, #000 56%, #000 68%, transparent 70%); mask: radial-gradient(circle, transparent 54%, #000 56%, #000 68%, transparent 70%);
  animation: facetandfire-spin 2s linear infinite;
}
@keyframes facetandfire-spin { to { transform: rotate(360deg); } }

/* ---------- newsletter form inside "The Setting": square the shared pill form into step cuts ---------- */
.facetandfire-setting input[type='email'] { border-radius: 0 !important; border-color: color-mix(in srgb, var(--accent) 45%, transparent) !important; background: transparent !important; }
.facetandfire-setting button { border-radius: 0 !important; clip-path: polygon(9px 0, calc(100% - 9px) 0, 100% 9px, 100% calc(100% - 9px), calc(100% - 9px) 100%, 9px 100%, 0 calc(100% - 9px), 0 9px); letter-spacing: .14em; text-transform: uppercase; font-size: 13px !important; }
.facetandfire-setting form > div { border-radius: 0 !important; }

/* Comments column, opened from "Open the case". */
.facetandfire-case form, .facetandfire-case textarea, .facetandfire-case input { border-radius: 0 !important; }
.facetandfire-case form button { border-radius: 0 !important; clip-path: polygon(9px 0, calc(100% - 9px) 0, 100% 9px, 100% calc(100% - 9px), calc(100% - 9px) 100%, 9px 100%, 0 calc(100% - 9px), 0 9px); }
.facetandfire-case li > span:first-child { border-radius: 0 !important; clip-path: polygon(30% 0, 70% 0, 100% 30%, 100% 70%, 70% 100%, 30% 100%, 0 70%, 0 30%); }
.facetandfire-case h2 { font-weight: 600 !important; }

/* Menu: the case lid opens downward. */
.facetandfire-lid { animation: facetandfire-lid .38s cubic-bezier(.2,.8,.2,1) 1 both; transform-origin: top center; }
@keyframes facetandfire-lid { from { transform: translateY(-14px); clip-path: inset(0 0 100% 0); } to { transform: none; clip-path: inset(0 0 0 0); } }

@media (prefers-reduced-motion: reduce) {
  .facetandfire-hair::after, .facetandfire-facet, .facetandfire-fire, .facetandfire-lid, .facetandfire-cap,
  .group:hover .facetandfire-glint::after, .facetandfire-glint:hover::after, .facetandfire-btn:hover::after, .facetandfire-link:hover { animation: none !important; }
  .facetandfire-hair::after { display: none; }
  .facetandfire-facet { opacity: 1; }
  .facetandfire-cap { background-position: 0 0; }
  .facetandfire-img img { transition: none; }
}

/* Certificate: a hairline grid behind the "report on this piece". */
.facetandfire-grid {
  background-image:
    linear-gradient(color-mix(in srgb, var(--accent) 9%, transparent) 1px, transparent 1px),
    linear-gradient(90deg, color-mix(in srgb, var(--accent) 9%, transparent) 1px, transparent 1px);
  background-size: 22px 22px; background-position: -1px -1px;
}
