/* Southern Palace Lotus — component styles.
   Needs tokens.css (colour, type, spacing, radius, shadow, easing, duration custom properties).
   Every colour here is a token; the only literals are photographic scrims and the foil gradients' stops,
   which are the mark's own gold values. */

/* ---------------------------------------------------------------- base */
:where(html) { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
:where(body) {
  margin: 0;
  background: var(--surface);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.85;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  word-break: keep-all;
  overflow-wrap: anywhere;
}
:where(img, video, svg) { display: block; max-width: 100%; }
:where(a) { color: inherit; }
::selection { background: #cab27f; color: #0c0b0a; }
:where(a, button, input, [tabindex]):focus-visible { outline: 2px solid transparent; outline-offset: 2px; box-shadow: var(--focus-ring); }
.spl-sr { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* ---------------------------------------------------------------- the mark */
.spl-lotus { width: var(--lotus-size, 64px); height: auto; aspect-ratio: 868 / 770; overflow: visible; fill: currentColor; }
.spl-lotus--gold, .spl-lotus--ivory, .spl-lotus--ink { color: var(--gold); }
.spl-lotus--ivory { color: var(--ink); }
[data-theme="ivory"] .spl-lotus--ivory { color: var(--surface); }
.spl-lotus--ink { color: var(--ink); }
.spl-lotus__line { fill: none; stroke: var(--gold); stroke-width: 2.6; stroke-linejoin: round; opacity: 0; }
.spl-lotus.is-drawing .spl-lotus__line { opacity: 1; }
.spl-lotus.is-drawing .spl-lotus__line { stroke-dasharray: var(--len, 2000); stroke-dashoffset: var(--len, 2000); animation: spl-draw var(--duration-bloom, 1400ms) var(--ease-silk, cubic-bezier(.65, 0, .35, 1)) forwards; animation-delay: var(--d, 0ms); }
.spl-lotus.is-drawing .spl-lotus__fill { opacity: 0; animation: spl-fade 900ms var(--ease-bloom, cubic-bezier(.22, 1, .36, 1)) forwards; animation-delay: calc(var(--duration-bloom, 1400ms) * .72); }
@keyframes spl-draw { to { stroke-dashoffset: 0; } }
@keyframes spl-fade { to { opacity: 1; } }

.spl-wordmark { width: var(--wordmark-width, 240px); height: auto; aspect-ratio: 1166 / 151; color: var(--ink); overflow: visible; fill: currentColor; }
.spl-wordmark--gold { color: var(--gold); }
.spl-lockup { display: inline-grid; justify-items: center; gap: calc(var(--lockup-size, 120px) * .14); text-decoration: none; }
.spl-lockup .spl-lotus { --lotus-size: var(--lockup-size, 120px); }
.spl-lockup .spl-wordmark { --wordmark-width: calc(var(--lockup-size, 120px) * 1.9); }

/* ---------------------------------------------------------------- foil text */
.spl-foil {
  font-style: normal;
  background: linear-gradient(100deg, #967d4f 0%, #cab27f 26%, #f1dba2 46%, #cab27f 58%, #b79e6e 78%, #e2ca93 100%);
  background-size: 220% 100%;
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
  animation: spl-sheen 7s var(--ease-silk, cubic-bezier(.65, 0, .35, 1)) infinite;
}
[data-theme="ivory"] .spl-foil {                 /* large text only: darkest stop 5.6:1, lightest 3.5:1 on ivory */
  background-image: linear-gradient(100deg, #6e5226 0%, #7a5c2c 30%, #9b7b45 48%, #7a5c2c 64%, #6e5226 100%);
}
@keyframes spl-sheen { 0%, 100% { background-position: 100% 0; } 50% { background-position: 0% 0; } }

/* ---------------------------------------------------------------- eyebrow */
.spl-eyebrow {
  display: inline-flex; align-items: center; gap: var(--space-3);
  margin: 0;
  font-family: var(--font-sans); font-size: 11.5px; line-height: 1.4; font-weight: 500;
  letter-spacing: .32em; text-transform: uppercase;
  color: var(--accent-ink);
}
.spl-eyebrow::before { content: ""; width: 28px; height: 1px; background: currentColor; opacity: .7; flex: none; }
.spl-eyebrow--center::after { content: ""; width: 28px; height: 1px; background: currentColor; opacity: .7; flex: none; }
.spl-eyebrow--bare::before { display: none; }
.spl-eyebrow__index { font-family: var(--font-display); font-style: italic; font-weight: 400; font-size: 16px; letter-spacing: .02em; text-transform: none; }

/* ---------------------------------------------------------------- heading block */
.spl-heading { display: grid; gap: var(--space-3); justify-items: start; }
.spl-heading--center { justify-items: center; text-align: center; }
.spl-heading__title {
  margin: var(--space-2) 0 0;
  font-family: var(--font-serif); font-weight: 300;
  font-size: clamp(30px, 3.6vw, 48px); line-height: 1.34; letter-spacing: -.03em;
  color: var(--ink);
}
.spl-heading__title--xl { font-size: clamp(32px, 4.4vw, 54px); line-height: 1.3; }
.spl-heading__latin {
  margin: 0;
  font-family: var(--font-display); font-style: italic; font-weight: 400;
  font-size: clamp(18px, 1.7vw, 22px); line-height: 1.35; letter-spacing: .01em;
  color: var(--accent-ink);
}

/* ---------------------------------------------------------------- buttons */
.spl-btn {
  position: relative; isolation: isolate; overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center; gap: 14px;
  min-height: 52px; padding: 0 30px;
  border: 1px solid transparent; border-radius: var(--radius-none);
  font-family: var(--font-sans); font-size: 12px; line-height: 1; font-weight: 500;
  letter-spacing: .22em; text-transform: uppercase; text-decoration: none; white-space: nowrap;
  cursor: pointer; background: none; color: var(--ink);
  transition: background-color var(--duration-quick, 240ms) var(--ease-bloom, cubic-bezier(.22, 1, .36, 1)), color var(--duration-quick, 240ms) var(--ease-bloom, cubic-bezier(.22, 1, .36, 1)),
              border-color var(--duration-quick, 240ms) var(--ease-bloom, cubic-bezier(.22, 1, .36, 1)), box-shadow var(--duration-calm, 700ms) var(--ease-bloom, cubic-bezier(.22, 1, .36, 1));
}
.spl-btn:lang(ko), .spl-btn .spl-btn__ko { letter-spacing: .08em; }
.spl-btn--primary { background: var(--action); color: var(--on-action); }
.spl-btn--primary:hover { background: var(--action-hover); box-shadow: var(--shadow-glow); }
.spl-btn--primary::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(105deg, transparent 30%, rgb(255 255 255 / .42) 50%, transparent 70%);
  transform: translateX(-130%); transition: transform 1100ms var(--ease-bloom, cubic-bezier(.22, 1, .36, 1));
}
.spl-btn--primary:hover::after { transform: translateX(130%); }
.spl-btn--outline { border-color: var(--accent-ink); color: var(--ink); }
.spl-btn--outline:hover { background: var(--ink); border-color: var(--ink); color: var(--surface); }
.spl-btn--text { min-height: 0; padding: 8px 0; border: 0; color: var(--ink); }
.spl-btn--text::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px;
  background: var(--accent-ink); transform-origin: left; transform: scaleX(.35);
  transition: transform var(--duration-calm, 700ms) var(--ease-bloom, cubic-bezier(.22, 1, .36, 1));
}
.spl-btn--text:hover::after { transform: scaleX(1); }
.spl-btn__arrow { width: 22px; height: 10px; flex: none; transition: transform var(--duration-calm, 700ms) var(--ease-bloom, cubic-bezier(.22, 1, .36, 1)); }
.spl-btn__arrow path { fill: none; stroke: currentColor; stroke-width: 1.2; }
.spl-btn:hover .spl-btn__arrow { transform: translateX(5px); }
.spl-btn--external .spl-btn__arrow { width: 12px; height: 12px; }
.spl-btn--external:hover .spl-btn__arrow { transform: translate(3px, -3px); }
.spl-btn--block { width: 100%; }

/* ---------------------------------------------------------------- ornament */
.spl-ornament { display: flex; align-items: center; gap: var(--space-4); width: var(--ornament-width, 100%); margin-inline: auto; color: var(--gold); }
.spl-ornament__line { flex: 1; height: 1px; background: linear-gradient(90deg, transparent, var(--gold)); opacity: .7; }
.spl-ornament__line + .spl-lotus + .spl-ornament__line { background: linear-gradient(90deg, var(--gold), transparent); }
.spl-ornament .spl-lotus { --lotus-size: 30px; flex: none; }

/* ---------------------------------------------------------------- arch & frames */
.spl-arch { position: relative; overflow: hidden; border-radius: var(--radius-arch) var(--radius-arch) 0 0; background: var(--surface-sunken); }
.spl-arch > img, .spl-arch > video { width: 100%; height: 100%; object-fit: cover; }
.spl-arch::after {                              /* inner gold hairline following the arch */
  content: ""; position: absolute; inset: 10px; border: 1px solid color-mix(in srgb, var(--gold) 55%, transparent);
  border-bottom: 0; border-radius: inherit; pointer-events: none;
}

/* ---------------------------------------------------------------- medallion */
.spl-medallion { position: relative; width: var(--medallion-size, 360px); max-width: 100%; aspect-ratio: 1; margin: 0; }
.spl-medallion::before, .spl-medallion::after { content: ""; position: absolute; border-radius: var(--radius-full); pointer-events: none; }
.spl-medallion::before { inset: 6%; border: 1px solid var(--line-strong); }
.spl-medallion::after { inset: 9.5%; border: 1px solid var(--gold); box-shadow: var(--shadow-glow); }
.spl-medallion__frame { position: absolute; inset: 11.5%; overflow: hidden; border-radius: var(--radius-full); background: var(--surface-sunken); }
.spl-medallion__frame img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transform: scale(1.07); transition: opacity var(--duration-calm, 700ms) var(--ease-bloom, cubic-bezier(.22, 1, .36, 1)), transform 1600ms var(--ease-bloom, cubic-bezier(.22, 1, .36, 1)); }
.spl-medallion__frame img.is-leaving { opacity: 0; transform: scale(1.12); }
.spl-medallion__orbit { position: absolute; inset: 0; width: 100%; height: 100%; animation: spl-spin 80s linear infinite; }
.spl-medallion__orbit text { fill: var(--accent-ink); font-family: var(--font-sans); font-size: 5px; font-weight: 500; letter-spacing: .3em; text-transform: uppercase; }
@keyframes spl-spin { to { transform: rotate(360deg); } }

/* ---------------------------------------------------------------- swatches */
.spl-swatches { margin: 0; padding: 0; border: 0; min-width: 0; }
.spl-swatches__legend { display: flex; align-items: baseline; gap: var(--space-3); margin-bottom: var(--space-4); padding: 0; font-family: var(--font-sans); font-size: 11.5px; font-weight: 500; letter-spacing: .32em; text-transform: uppercase; color: var(--ink-faint); }
.spl-swatches__value { font-family: var(--font-display); font-style: italic; font-size: 20px; font-weight: 400; letter-spacing: .01em; text-transform: none; color: var(--ink); }
.spl-swatches__list { display: flex; flex-wrap: wrap; gap: var(--space-3); }
.spl-swatch { position: relative; display: inline-grid; place-items: center; width: 40px; height: 40px; cursor: pointer; }
.spl-swatch input { position: absolute; inset: 0; margin: 0; opacity: 0; cursor: pointer; }
.spl-swatch__dot {
  width: 28px; height: 28px; border-radius: var(--radius-full); background: var(--swatch);
  box-shadow: 0 0 0 1px var(--ink-faint), inset 0 1px 2px rgb(255 255 255 / .22), inset 0 -2px 4px rgb(0 0 0 / .25);
  transition: box-shadow var(--duration-quick, 240ms) var(--ease-bloom, cubic-bezier(.22, 1, .36, 1)), transform var(--duration-calm, 700ms) var(--ease-bloom, cubic-bezier(.22, 1, .36, 1));
}
.spl-swatch:hover .spl-swatch__dot { transform: scale(1.08); }
.spl-swatch input:checked + .spl-swatch__dot { box-shadow: 0 0 0 4px var(--surface), 0 0 0 5px var(--accent-ink), inset 0 1px 2px rgb(255 255 255 / .22); }
.spl-swatch input:focus-visible + .spl-swatch__dot { box-shadow: var(--focus-ring); }

/* ---------------------------------------------------------------- features */
.spl-features { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); counter-reset: f; }
.spl-feature { display: grid; grid-template-columns: 52px 1fr; gap: var(--space-4); padding: var(--space-5) 0; border-bottom: 1px solid var(--line); }
.spl-feature__no { font-family: var(--font-display); font-style: italic; font-weight: 300; font-size: 26px; line-height: 1; color: var(--accent-ink); padding-top: 4px; }
.spl-feature__title { margin: 0 0 6px; font-family: var(--font-serif); font-weight: 400; font-size: 18px; line-height: 1.45; letter-spacing: -.01em; color: var(--ink); }
.spl-feature__title em { margin-left: 10px; font-family: var(--font-display); font-style: italic; font-weight: 400; font-size: 17px; letter-spacing: .01em; color: var(--accent-ink); }
.spl-feature__text { margin: 0; font-size: 14px; line-height: 1.8; color: var(--ink-muted); }

/* ---------------------------------------------------------------- product card */
.spl-card { display: grid; gap: var(--space-5); align-content: start; }
.spl-card__media { position: relative; display: block; aspect-ratio: 4 / 5; overflow: hidden; background: var(--surface-sunken); }
.spl-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 1600ms var(--ease-bloom, cubic-bezier(.22, 1, .36, 1)); }
.spl-card__media:hover img { transform: scale(1.045); }
.spl-card__media--arch { border-radius: var(--radius-arch) var(--radius-arch) 0 0; }
.spl-card__body { display: grid; gap: var(--space-2); justify-items: start; }
.spl-card__title { margin: var(--space-2) 0 0; font-family: var(--font-serif); font-weight: 400; font-size: 24px; line-height: 1.45; letter-spacing: -.01em; }
.spl-card__latin { margin: 0; font-family: var(--font-display); font-style: italic; font-size: 19px; color: var(--accent-ink); }
.spl-card__meta { margin: 0 0 var(--space-4); font-size: 12.5px; letter-spacing: .02em; color: var(--ink-faint); }

/* ---------------------------------------------------------------- marquee */
.spl-marquee { position: relative; overflow: hidden; padding: 22px 0; border-block: 1px solid var(--line); color: var(--accent-ink);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.spl-marquee__track { display: flex; width: max-content; animation: spl-marquee var(--marquee-duration, 48s) linear infinite; }
.spl-marquee:hover .spl-marquee__track { animation-play-state: paused; }
.spl-marquee__item { display: inline-flex; align-items: center; gap: 42px; padding-right: 42px; font-family: var(--font-display); font-style: italic; font-weight: 300; font-size: clamp(26px, 3vw, 40px); line-height: 1; white-space: nowrap; }
.spl-marquee__item .spl-lotus { --lotus-size: 26px; }
@keyframes spl-marquee { to { transform: translateX(-50%); } }

/* ---------------------------------------------------------------- motion preferences */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .spl-lotus.is-drawing .spl-lotus__line { stroke-dashoffset: 0; }
  .spl-lotus.is-drawing .spl-lotus__fill { opacity: 1; }
}
