/* ==========================================================================
   Rupa's premium presentation theme — Midnight Garnet & Champagne

   This layer deliberately sits after the structural stylesheets. It changes
   colour, depth, finish and rhythm without coupling the visual refresh to the
   application's templates or behaviour.
   ========================================================================== */

/* --------------------------------------------------------------- Palette */
:root {
  --paper: #f4eee4;
  --paper-deep: #e7ddcf;
  --ink: #251b1d;
  --onyx: #160f12;
  --graphite: #21191c;
  --stone: #6f625a;

  --gold: #a9782d;
  --gold-dark: #704a14;
  --gold-light: #e0bf78;
  --wine: #6b2339;
  --wine-soft: #f0e2e3;
  --olive: #59604b;
  --olive-soft: #e9e8dd;
  --brand-deep: #2c111b;

  --bg: #f5efe6;
  --bg-alt: #fffcf7;
  --bg-sunken: #e9dfd2;
  --bg-inverse: var(--onyx);
  --surface: #fffdf9;
  --surface-raised: #fffefa;
  --surface-muted: #f0e8dd;

  --text: var(--ink);
  --text-muted: #685b55;
  --text-subtle: #86766d;
  --text-inverse: var(--paper);
  --text-on-gold: #1d1308;

  --line: #ddd0c0;
  --line-strong: #c5b39f;
  --line-gold: rgba(169, 120, 45, 0.48);
  --line-inverse: rgba(244, 238, 228, 0.16);

  --accent: #a47427;
  --accent-hover: #704a14;
  --accent-bright: #d0a653;
  --accent-soft: rgba(169, 120, 45, 0.12);
  --accent-secondary: var(--wine);

  --overlay-scrim: rgba(22, 10, 15, 0.68);
  --scrim: rgba(15, 8, 11, 0.68);
  --focus-ring: 0 0 0 2px var(--surface), 0 0 0 4px var(--gold);

  --radius-sm: 5px;
  --radius-md: 9px;
  --radius-lg: 14px;
  --radius-xl: 22px;

  --shadow-xs: 0 1px 2px rgba(38, 22, 17, 0.06);
  --shadow-sm: 0 2px 5px rgba(38, 22, 17, 0.07), 0 8px 20px rgba(38, 22, 17, 0.05);
  --shadow-md: 0 5px 14px rgba(38, 22, 17, 0.08), 0 22px 45px rgba(38, 22, 17, 0.09);
  --shadow-lg: 0 10px 30px rgba(28, 14, 18, 0.12), 0 38px 80px rgba(28, 14, 18, 0.14);

  --image-bg: #e6dacc;
}

:root[data-theme="dark"] {
  --bg: #140e11;
  --bg-alt: #1a1216;
  --bg-sunken: #0e090b;
  --surface: #21171b;
  --surface-raised: #2a1d22;
  --surface-muted: #1a1215;
  --text: #f5ecdf;
  --text-muted: #c5b4a7;
  --text-subtle: #9f8b7e;
  --line: rgba(245, 236, 223, 0.13);
  --line-strong: rgba(245, 236, 223, 0.26);
  --line-gold: rgba(224, 191, 120, 0.46);
  --gold: #ddb96c;
  --gold-dark: #b1873f;
  --gold-light: #edcf8d;
  --accent: #ddb96c;
  --accent-hover: #f0d597;
  --accent-bright: #edcf8d;
  --accent-soft: rgba(221, 185, 108, 0.15);
  --wine: #e0a5b7;
  --wine-soft: #2c1b21;
  --olive: #c0c99f;
  --olive-soft: #21251d;
  --image-bg: #30242a;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #140e11;
    --bg-alt: #1a1216;
    --bg-sunken: #0e090b;
    --surface: #21171b;
    --surface-raised: #2a1d22;
    --surface-muted: #1a1215;
    --text: #f5ecdf;
    --text-muted: #c5b4a7;
    --text-subtle: #9f8b7e;
    --line: rgba(245, 236, 223, 0.13);
    --line-strong: rgba(245, 236, 223, 0.26);
    --line-gold: rgba(224, 191, 120, 0.46);
    --gold: #ddb96c;
    --gold-dark: #b1873f;
    --gold-light: #edcf8d;
    --accent: #ddb96c;
    --accent-hover: #f0d597;
    --accent-bright: #edcf8d;
    --accent-soft: rgba(221, 185, 108, 0.15);
    --wine: #e0a5b7;
    --wine-soft: #2c1b21;
    --olive: #c0c99f;
    --olive-soft: #21251d;
    --image-bg: #30242a;
  }
}

/* ---------------------------------------------------------- Page finish */
body {
  background-color: var(--bg);
  background-image:
    radial-gradient(circle at 0 0, color-mix(in srgb, var(--wine-soft) 66%, transparent), transparent 28rem),
    radial-gradient(circle at 100% 18rem, color-mix(in srgb, var(--accent-soft) 72%, transparent), transparent 32rem);
  background-attachment: fixed;
}

h1,
h2,
h3 {
  font-feature-settings: "kern" 1, "liga" 1, "swsh" 1;
}

h1 {
  text-wrap: balance;
}

.section {
  position: relative;
}

.section--surface {
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--surface) 98%, var(--wine-soft)), var(--surface) 58%,
      color-mix(in srgb, var(--surface) 97%, var(--accent-soft)));
}

.section--sunken {
  border-block: 1px solid color-mix(in srgb, var(--line) 80%, transparent);
  background:
    radial-gradient(circle at 8% 5%, color-mix(in srgb, var(--wine-soft) 74%, transparent), transparent 24rem),
    linear-gradient(155deg, var(--bg-sunken), color-mix(in srgb, var(--bg-sunken) 74%, var(--surface)));
}

.section--wine {
  background:
    radial-gradient(circle at 86% 18%, color-mix(in srgb, var(--wine) 10%, transparent), transparent 23rem),
    linear-gradient(145deg, var(--wine-soft), color-mix(in srgb, var(--wine-soft) 64%, var(--surface)));
}

.section--olive {
  background:
    radial-gradient(circle at 10% 84%, color-mix(in srgb, var(--olive) 11%, transparent), transparent 24rem),
    linear-gradient(145deg, var(--olive-soft), color-mix(in srgb, var(--olive-soft) 68%, var(--surface)));
}

.section-head {
  margin-bottom: clamp(var(--space-xl), 4vw, var(--space-2xl));
}

.section-head__text::after {
  display: block;
  width: 3.75rem;
  height: 1px;
  margin-top: var(--space-lg);
  background: linear-gradient(90deg, var(--gold), transparent);
  content: "";
}

.section-head--center .section-head__text::after {
  margin-inline: auto;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

.section-head h2 {
  font-size: clamp(2.3rem, 3.8vw, 3.8rem);
}

.kicker {
  color: var(--wine);
  letter-spacing: 0.2em;
}

.kicker::before,
.kicker--center::after {
  background: linear-gradient(90deg, var(--gold), var(--gold-light));
}

/* --------------------------------------------------------------- Header */
.announcement {
  background: linear-gradient(90deg, #1e0c13, var(--brand-deep) 48%, #1e0c13);
  border-bottom: 1px solid rgba(224, 191, 120, 0.24);
}

.announcement__inner {
  min-height: 2.65rem;
}

.demo-banner {
  border-bottom-color: color-mix(in srgb, var(--warning) 54%, transparent);
  background: color-mix(in srgb, var(--warning-soft) 88%, var(--surface));
  font-weight: 600;
  letter-spacing: 0.02em;
}

.site-header {
  border-bottom-color: var(--line-gold);
  background: color-mix(in srgb, var(--surface-raised) 92%, transparent);
  box-shadow: 0 1px 0 color-mix(in srgb, var(--gold) 13%, transparent);
  backdrop-filter: saturate(140%) blur(18px);
}

.site-header.is-scrolled {
  box-shadow: var(--shadow-md);
}

.header-utility {
  border-bottom-color: color-mix(in srgb, var(--line-gold) 52%, transparent);
  background: color-mix(in srgb, var(--brand-deep) 5%, var(--surface-muted));
}

.brand {
  color: var(--brand-deep);
}

:root[data-theme="dark"] .brand {
  color: var(--gold-light);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .brand {
    color: var(--gold-light);
  }
}

.brand__mark {
  font-size: clamp(2.05rem, 2.4vw, 2.55rem);
  font-weight: 500;
  letter-spacing: -0.035em;
}

.brand__sub {
  border-top-color: var(--gold);
  color: var(--accent-hover);
  letter-spacing: 0.24em;
}

.nav-primary__link {
  padding-inline: 0.65rem;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.075em;
  text-transform: uppercase;
}

.nav-primary__link:hover,
.nav-primary__item[data-open="true"] > .nav-primary__link,
.nav-primary__link[aria-current="page"] {
  color: var(--wine);
}

.nav-primary__link[aria-current="page"]::after {
  bottom: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

/* The expanded catalogue navigation is intentionally generous. Switching to
   the drawer a little earlier keeps laptop headers composed instead of
   squeezing the final actions against the viewport edge. */
@media (max-width: 94.99rem) {
  .nav-primary {
    display: none;
  }

  .icon-btn.header-menu-toggle {
    display: inline-flex;
  }
}

.icon-btn {
  border-radius: 50%;
}

.icon-btn:hover {
  border-color: var(--line-gold);
  background: var(--accent-soft);
  color: var(--accent-hover);
}

.mega,
.search-panel {
  border-color: var(--line-gold);
  background:
    radial-gradient(circle at 80% 0, var(--accent-soft), transparent 24rem),
    var(--surface-raised);
}

.mega__image {
  border-color: color-mix(in srgb, var(--line-gold) 60%, var(--line));
  border-radius: var(--radius-md);
  background: linear-gradient(145deg, var(--surface), var(--surface-muted));
}

.drawer {
  border-right-color: var(--line-gold);
  background:
    radial-gradient(circle at 0 0, var(--wine-soft), transparent 22rem),
    var(--bg);
}

/* --------------------------------------------------------------- Hero */
.hero {
  border-bottom: 1px solid var(--line-gold);
  background: var(--brand-deep);
}

.hero::after {
  position: absolute;
  z-index: 1;
  inset: var(--space-md);
  border: 1px solid rgba(224, 191, 120, 0.2);
  content: "";
  pointer-events: none;
}

.hero__scrim {
  background:
    linear-gradient(90deg, rgba(20, 7, 12, 0.86) 0%, rgba(20, 7, 12, 0.58) 47%, rgba(20, 7, 12, 0.26) 100%),
    linear-gradient(0deg, rgba(20, 7, 12, 0.54), transparent 54%);
}

.hero__content {
  position: relative;
  z-index: 2;
}

.hero__content h1,
.hero__content .hero__headline {
  max-width: 12ch;
  font-weight: 400;
  text-shadow: 0 3px 24px rgba(0, 0, 0, 0.32);
}

.hero__content .kicker {
  color: var(--gold-light);
}

.hero__actions .btn--primary {
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.25);
}

.hero-band__arrow,
.hero-band__dots {
  border-color: rgba(224, 191, 120, 0.32);
  background: rgba(31, 11, 18, 0.82);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(12px);
}

.discovery-paths {
  border-bottom-color: rgba(224, 191, 120, 0.28);
  background:
    radial-gradient(circle at 50% 140%, rgba(169, 120, 45, 0.18), transparent 35rem),
    var(--brand-deep);
}

.discovery-paths a {
  border-color: rgba(244, 238, 228, 0.12);
  color: var(--on-dark);
}

.discovery-paths a:hover {
  background: rgba(224, 191, 120, 0.09);
  color: var(--gold-light);
}

.discovery-paths small {
  color: var(--on-dark-muted);
}

.discovery-paths__number,
.discovery-paths a > :last-child {
  color: var(--gold-light);
}

.assurances {
  border-color: var(--line-gold);
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--surface-muted) 92%, var(--wine-soft)),
      var(--surface-muted), color-mix(in srgb, var(--surface-muted) 92%, var(--accent-soft)));
}

.assurances__item + .assurances__item {
  position: relative;
}

@media (min-width: 62rem) {
  .assurances__item + .assurances__item::before {
    position: absolute;
    top: 0;
    bottom: 0;
    left: calc(var(--space-lg) * -0.5);
    width: 1px;
    background: var(--line);
    content: "";
  }
}

/* ------------------------------------------------------------- Actions */
.btn {
  border-radius: var(--radius-md);
  font-size: var(--step--1);
  font-weight: 650;
  letter-spacing: 0.055em;
  text-transform: uppercase;
}

.btn--primary {
  --btn-bg: linear-gradient(135deg, var(--gold-light), var(--accent-bright) 46%, var(--gold));
  --btn-border: var(--gold);
  box-shadow: 0 7px 18px rgba(112, 74, 20, 0.18), inset 0 1px rgba(255, 255, 255, 0.42);
}

.btn--primary:hover {
  --btn-bg: linear-gradient(135deg, #edd494, var(--gold-light) 45%, var(--accent-bright));
  --btn-border: var(--gold-dark);
  box-shadow: 0 11px 28px rgba(112, 74, 20, 0.25), inset 0 1px rgba(255, 255, 255, 0.5);
}

.btn--secondary {
  --btn-bg: color-mix(in srgb, var(--surface-raised) 90%, transparent);
  --btn-border: var(--line-gold);
  box-shadow: var(--shadow-xs);
}

.btn--secondary:hover {
  --btn-bg: var(--accent-soft);
  --btn-border: var(--gold);
  color: var(--accent-hover);
  box-shadow: var(--shadow-sm);
}

.btn--ghost:hover {
  background: var(--accent-soft);
  color: var(--accent-hover);
}

.link-etched {
  color: var(--accent-hover);
  font-weight: 650;
}

.link-etched::after {
  background: linear-gradient(90deg, var(--gold), var(--wine));
}

/* --------------------------------------------------------- Cards & media */
.card,
.panel,
.collection-consultation,
.quote-card,
.branch-card,
.compare-card {
  border-color: color-mix(in srgb, var(--line-gold) 48%, var(--line));
  background:
    linear-gradient(145deg, var(--surface-raised), color-mix(in srgb, var(--surface) 96%, var(--accent-soft)));
  box-shadow: var(--shadow-sm);
}

.card,
.panel,
.collection-consultation,
.quote-card,
.branch-card {
  border-radius: var(--radius-lg);
}

a.card {
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease),
    transform var(--dur) var(--ease-out);
}

a.card:hover,
a.card:focus-visible {
  border-color: var(--line-gold);
  box-shadow: var(--shadow-md);
  transform: translateY(-4px);
}

.media {
  background:
    radial-gradient(circle at 34% 22%, color-mix(in srgb, var(--surface) 82%, transparent), transparent 38%),
    var(--image-bg);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--line-gold) 32%, transparent);
}

.badge {
  border-color: color-mix(in srgb, var(--line-gold) 54%, var(--line));
  background: color-mix(in srgb, var(--surface-raised) 94%, transparent);
  box-shadow: 0 1px 4px rgba(38, 22, 17, 0.06);
}

.badge--gold {
  border-color: var(--line-gold);
  background: linear-gradient(135deg, var(--accent-soft), color-mix(in srgb, var(--surface) 80%, var(--accent-soft)));
  color: var(--accent-hover);
}

.product-card {
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--line-gold) 44%, var(--line));
  border-radius: var(--radius-lg);
  background: var(--surface-raised);
  box-shadow: var(--shadow-sm);
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease),
    transform var(--dur) var(--ease-out);
}

.product-card:hover,
.product-card:focus-within {
  border-color: var(--line-gold);
  box-shadow: var(--shadow-md);
  transform: translateY(-5px);
}

.product-card__media {
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  box-shadow: none;
}

.product-card:hover .product-card__media,
.product-card:focus-within .product-card__media {
  border-color: var(--line-gold);
  box-shadow: none;
  transform: none;
}

.product-card__body {
  padding: var(--space-md);
}

.product-card__brand,
.product-card__state {
  color: var(--accent-hover);
}

.product-card__name {
  font-size: clamp(1.22rem, 1.05rem + 0.45vw, 1.5rem);
  font-weight: 500;
}

.product-card__price {
  color: var(--brand-deep);
}

:root[data-theme="dark"] .product-card__price {
  color: var(--gold-light);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .product-card__price {
    color: var(--gold-light);
  }
}

.product-card__wish {
  border-color: rgba(169, 120, 45, 0.35);
  background: color-mix(in srgb, var(--surface-raised) 88%, transparent);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(10px);
}

.category-story {
  border: 1px solid var(--line-gold);
  box-shadow: var(--shadow-md);
}

.category-story__content {
  border-top-color: rgba(224, 191, 120, 0.26);
  background: linear-gradient(180deg, transparent, rgba(22, 8, 13, 0.9) 34%);
}

.category-story__link {
  color: var(--gold-light);
}

.quote-card {
  border-top-width: 3px;
  border-top-color: var(--gold);
}

.quote-card__mark {
  color: var(--gold);
}

.collection-consultation__aside {
  border: 1px solid color-mix(in srgb, var(--line-gold) 42%, var(--line));
  border-radius: var(--radius-md);
  background: linear-gradient(145deg, var(--surface-muted), var(--wine-soft));
}

.award-specimen {
  border-color: var(--gold);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(circle at 50% 28%, rgba(224, 191, 120, 0.12), transparent 16rem),
    linear-gradient(145deg, #3a1623, var(--brand-deep));
  box-shadow: var(--shadow-lg), inset 0 0 0 6px rgba(224, 191, 120, 0.04);
}

/* --------------------------------------------------------------- Forms */
.input,
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="password"],
input[type="number"],
input[type="date"],
input[type="time"],
input[type="search"],
input[type="url"],
select,
textarea {
  border-color: color-mix(in srgb, var(--line-strong) 82%, var(--line-gold));
  background: color-mix(in srgb, var(--surface-raised) 96%, var(--accent-soft));
  box-shadow: inset 0 1px 2px rgba(38, 22, 17, 0.04), 0 1px rgba(255, 255, 255, 0.4);
}

.input:hover,
input:hover:not([type="checkbox"]):not([type="radio"]),
select:hover,
textarea:hover {
  border-color: var(--gold);
}

.input:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  border-color: var(--gold);
  background: var(--surface-raised);
  box-shadow: var(--focus-ring), inset 0 1px 2px rgba(38, 22, 17, 0.04);
}

.notice {
  border-color: color-mix(in srgb, var(--line-gold) 38%, var(--line));
  border-left-width: 3px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-xs);
}

.chip {
  border-color: color-mix(in srgb, var(--line-gold) 50%, var(--line));
  background: var(--surface-raised);
}

.chip:hover,
.chip--active {
  border-color: var(--gold);
  background: var(--accent-soft);
  color: var(--accent-hover);
}

/* -------------------------------------------------- Supporting components */
.brand-strip {
  border-color: var(--line-gold);
  background: linear-gradient(90deg, var(--surface), var(--surface-muted), var(--surface));
}

.gallery__stage {
  border-color: var(--line-gold);
  box-shadow: var(--shadow-md);
}

.timeline > li::before {
  box-shadow: 0 0 0 4px var(--surface);
}

.assist-dock__btn {
  border-color: var(--line-gold);
  background: color-mix(in srgb, var(--surface-raised) 92%, transparent);
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(14px);
}

.assist-dock__btn:hover {
  border-color: var(--gold);
  background: var(--accent-soft);
  color: var(--accent-hover);
  transform: translateY(-2px);
}

/* --------------------------------------------------------------- Footer */
.site-footer {
  position: relative;
  border-top: 1px solid var(--gold);
  background:
    radial-gradient(circle at 12% 12%, rgba(169, 120, 45, 0.14), transparent 28rem),
    radial-gradient(circle at 90% 90%, rgba(107, 35, 57, 0.24), transparent 34rem),
    linear-gradient(145deg, #170c11, var(--brand-deep) 56%, #11090d);
}

.site-footer::before {
  position: absolute;
  top: 0;
  left: 50%;
  width: min(24rem, 60vw);
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-light), transparent);
  content: "";
  transform: translateX(-50%);
}

.footer-top {
  padding-block: var(--space-3xl);
}

.footer-brand__mark {
  color: var(--gold-light);
  font-size: 2.3rem;
  letter-spacing: -0.025em;
}

.footer-col__title {
  color: var(--gold-light);
}

.footer-note {
  border-color: rgba(224, 191, 120, 0.2);
  border-left-color: var(--gold-light);
  border-radius: var(--radius-md);
  background: rgba(244, 238, 228, 0.045);
}

/* ------------------------------------------------------------ Responsive */
@media (max-width: 39.99rem) {
  .hero::after {
    inset: var(--space-xs);
  }

  .product-card__body {
    padding: var(--space-sm);
  }

  .product-card__name {
    font-size: 1.08rem;
  }

  .btn {
    letter-spacing: 0.035em;
  }
}

@media (prefers-reduced-motion: reduce) {
  .product-card,
  a.card,
  .assist-dock__btn {
    transform: none !important;
  }
}
