/* ============================================================
   SCENT SMART — Site stylesheet
   Shared layout + component styles for all pages.
   Depends on ../colors_and_type.css for tokens.
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

/* Off-canvas decorative orbs/blobs must never create a horizontal scrollbar. */
html, body { overflow-x: hidden; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg1);
  font-family: var(--font-sans);
  font-size: var(--body);
  line-height: var(--lh-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; }

.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section { padding-block: var(--section-y); position: relative; }
.section--soft { background: var(--bg); }
.section--tint { background: var(--bg); }

.center { text-align: center; }
.measure { max-width: 640px; margin-inline: auto; }
.measure-sm { max-width: 520px; margin-inline: auto; }

/* ---------------- NAV ---------------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,0.72);
  backdrop-filter: saturate(180%) blur(18px);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s ease, background .3s ease;
}
.nav.is-scrolled {
  border-bottom-color: var(--border);
  background: rgba(255,255,255,0.85);
}
.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
  gap: 24px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-serif);
  font-weight: var(--w-serif-bold);
  font-size: 1.5rem;
  letter-spacing: 0.01em;
  color: var(--ink);
  white-space: nowrap;
}
.brand__mark {
  width: 26px; height: 26px;
  flex: none;
  display: grid; place-items: center;
}
.brand__mark svg { width: 100%; height: 100%; display: block; }

.nav__links {
  display: flex;
  align-items: center;
  gap: 36px;
}
.nav__link {
  font-size: 0.95rem;
  font-weight: var(--w-med);
  color: var(--gray-600);
  transition: color .2s ease;
}
.nav__link:hover { color: var(--ink); }
.nav__link.is-active { color: var(--teal-700); }

.nav__right { display: flex; align-items: center; gap: 14px; }

.nav__toggle {
  display: none;
  background: none; border: none;
  width: 40px; height: 40px;
  align-items: center; justify-content: center;
  color: var(--ink);
}

/* ---------------- BUTTONS ---------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  font-family: var(--font-sans);
  font-weight: var(--w-semi);
  font-size: 0.975rem;
  line-height: 1;
  padding: 14px 24px;
  border-radius: var(--r-pill);
  border: 1px solid transparent;
  transition: transform .18s ease, background .2s ease, box-shadow .25s ease, border-color .2s ease, color .2s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px) scale(0.99); }

.btn--primary {
  background: var(--teal-700);
  color: #fff;
  box-shadow: var(--shadow-teal);
}
.btn--primary:hover { background: var(--teal-900); box-shadow: 0 16px 34px rgba(14,124,123,0.26); }

.btn--ghost {
  background: #fff;
  color: var(--ink);
  border-color: var(--border-strong);
  box-shadow: var(--shadow-xs);
}
.btn--ghost:hover { border-color: var(--gray-400); background: var(--bg-soft); }

.btn--quiet {
  background: transparent;
  color: var(--teal-700);
  padding-inline: 6px;
}
.btn--quiet:hover { color: var(--teal-900); }

.btn--sm { padding: 10px 18px; font-size: 0.9rem; }
.btn--lg { padding: 17px 30px; font-size: 1.05rem; }

/* ---------------- CARDS ---------------- */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-sm);
}
.card--lg { border-radius: var(--r-lg); }
.card--pad { padding: clamp(22px, 3vw, 34px); }
.card--hover { transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease; }
.card--hover:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--border-strong); }

/* ---------------- NOTE TAGS ---------------- */
.tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-sans);
  font-size: 0.825rem;
  font-weight: var(--w-med);
  color: var(--teal-900);
  background: var(--teal-050);
  border: 1px solid var(--teal-100);
  padding: 6px 13px;
  border-radius: var(--r-pill);
  white-space: nowrap;
}
.tag--neutral {
  color: var(--gray-600);
  background: var(--gray-100);
  border-color: var(--gray-200);
}
.tag--dot::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%;
  background: var(--teal-300);
}

/* ---------------- PRICE / SAVINGS ---------------- */
.price { display: inline-flex; align-items: baseline; gap: 10px; }
.price__now {
  font-family: var(--font-serif);
  font-weight: var(--w-serif-semi);
  font-size: 1.6rem;
  color: var(--ink);
}
.price__was {
  font-size: 1rem;
  color: var(--gray-400);
  text-decoration: line-through;
  text-decoration-color: var(--gray-300);
}
.savings {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  font-weight: var(--w-semi);
  color: var(--teal-700);
  background: var(--teal-050);
  border-radius: var(--r-pill);
  padding: 5px 12px;
}

/* ---------------- MATCH RING ---------------- */
.match-ring {
  --size: 96px;
  --pct: 92;
  position: relative;
  width: var(--size);
  height: var(--size);
  display: grid;
  place-items: center;
  flex: none;
}
.match-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); display: block; }
.match-ring__track { fill: none; stroke: var(--gray-200); }
.match-ring__bar {
  fill: none;
  stroke: var(--teal-300);
  stroke-linecap: round;
  transition: stroke-dashoffset 1.1s cubic-bezier(.2,.7,.2,1);
}
.match-ring__label {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 1;
}
.match-ring__num {
  font-family: var(--font-serif);
  font-weight: var(--w-serif-semi);
  font-size: calc(var(--size) * 0.30);
  color: var(--ink);
}
.match-ring__cap {
  font-family: var(--font-sans);
  font-size: 0.62rem;
  font-weight: var(--w-semi);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gray-400);
  margin-top: 4px;
}

/* Slim match bar variant */
.match-bar { width: 100%; }
.match-bar__head {
  display: flex; justify-content: space-between; align-items: baseline;
  margin-bottom: 8px;
}
.match-bar__pct {
  font-family: var(--font-serif); font-weight: var(--w-serif-semi);
  font-size: 1.05rem; color: var(--teal-700);
}
.match-bar__track {
  height: 6px; border-radius: var(--r-pill);
  background: var(--gray-200); overflow: hidden;
}
.match-bar__fill {
  height: 100%; border-radius: var(--r-pill);
  background: linear-gradient(90deg, var(--teal-700), var(--teal-300));
}

/* ---------------- BOTTLE PLACEHOLDER (stylized, flat) ---------------- */
.bottle {
  --bw: 64px;
  width: var(--bw);
  height: calc(var(--bw) * 1.7);
  flex: none;
  display: grid;
  place-items: end center;
}
.bottle svg { width: 100%; height: 100%; display: block; overflow: visible; }

/* ---------------- EYEBROW PILL ---------------- */
.eyebrow-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-sans);
  font-size: var(--eyebrow);
  font-weight: var(--w-semi);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--teal-700);
  background: var(--teal-050);
  border: 1px solid var(--teal-100);
  padding: 7px 15px;
  border-radius: var(--r-pill);
}

/* ---------------- DIVIDER ---------------- */
.hr { height: 1px; background: var(--border); border: 0; }

/* ---------------- FOOTER ---------------- */
.footer { background: var(--bg); border-top: 1px solid var(--border); }
.footer__inner {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 40px;
  padding-block: clamp(48px, 7vw, 80px);
}
.footer__cols-title {
  font-size: 0.8rem; font-weight: var(--w-semi);
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--gray-400); margin-bottom: 18px;
}
.footer__link {
  display: block; color: var(--gray-600);
  font-size: 0.95rem; margin-bottom: 12px;
  transition: color .2s ease;
}
.footer__link:hover { color: var(--teal-700); }
.footer__note {
  display: flex; align-items: center; gap: 9px;
  font-size: 0.85rem; color: var(--gray-400);
  margin-top: 18px;
}
.footer__note::before {
  content: ""; width: 8px; height: 8px; border-radius: 50%;
  background: var(--teal-300);
  flex: none;
}
.footer__bottom {
  border-top: 1px solid var(--border);
  padding-block: 26px;
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px;
  font-size: 0.85rem; color: var(--gray-400);
}

/* ---------------- UTIL ---------------- */
.stack-sm > * + * { margin-top: 10px; }
.stack > * + * { margin-top: 18px; }
.stack-lg > * + * { margin-top: 28px; }
.cluster { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
.grid { display: grid; gap: clamp(18px, 2.4vw, 28px); }
.cols-2 { grid-template-columns: repeat(2, 1fr); }
.cols-3 { grid-template-columns: repeat(3, 1fr); }
.cols-4 { grid-template-columns: repeat(4, 1fr); }

/* reveal — pure-CSS load animation by default (bulletproof, never stuck hidden).
   When JS is present (html.js) we upgrade to scroll-triggered reveals. */
@keyframes reveal-in {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: none; }
}
.reveal { opacity: 0; transform: translateY(24px); animation: reveal-in .8s cubic-bezier(.2,.7,.2,1) both; }

.js .reveal { animation: none; transition: opacity .9s cubic-bezier(.2,.7,.2,1), transform .9s cubic-bezier(.2,.7,.2,1); }
.js .reveal.is-in { opacity: 1; transform: none; }

/* ---------------- SKELETON LOADING ---------------- */
@keyframes skeleton-shimmer {
  0%   { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}
.skeleton {
  background: linear-gradient(90deg, var(--gray-100) 25%, var(--gray-200) 37%, var(--gray-100) 63%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.4s ease-in-out infinite;
  border-radius: var(--r-sm);
}
.skeleton--text   { height: 0.8em; border-radius: var(--r-pill); }
.skeleton--bottle { width: 56px; height: 95px; border-radius: var(--r-sm); margin-inline: auto; }
.skeleton--pill   { height: 1.6em; width: 140px; border-radius: var(--r-pill); }
/* skeleton cards reuse the real card shells; only their inner blocks shimmer */
.cologne-card.is-skeleton, .dupe-row.is-skeleton,
.original-card.is-skeleton { pointer-events: none; }
@media (prefers-reduced-motion: reduce) { .skeleton { animation: none; } }

/* ============================================================
   LIQUID GLASS + MIST + ORBS
   ============================================================ */
.glass {
  background: linear-gradient(155deg, rgba(255,255,255,0.74), rgba(255,255,255,0.40));
  backdrop-filter: blur(26px) saturate(170%);
  -webkit-backdrop-filter: blur(26px) saturate(170%);
  border: 1px solid rgba(255,255,255,0.85);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.95),
    inset 0 0 0 1px rgba(255,255,255,0.25),
    0 26px 70px rgba(26,29,31,0.10),
    0 4px 14px rgba(26,29,31,0.05);
}
.glass--tint {
  background: linear-gradient(155deg, rgba(243,244,246,0.78), rgba(255,255,255,0.42));
  border-color: rgba(229,231,235,0.9);
}
.glass--solid {
  background: linear-gradient(155deg, rgba(255,255,255,0.9), rgba(255,255,255,0.74));
  backdrop-filter: blur(20px) saturate(150%);
  -webkit-backdrop-filter: blur(20px) saturate(150%);
}

/* faint blurred color orbs */
.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.5;
  z-index: 0;
  pointer-events: none;
}
.orb--teal   { background: radial-gradient(circle, rgba(107,114,128,0.28), transparent 70%); }
.orb--deep   { background: radial-gradient(circle, rgba(58,63,69,0.20), transparent 70%); }
.orb--silver { background: radial-gradient(circle, rgba(201,207,214,0.55), transparent 70%); }
.orb--warm   { background: radial-gradient(circle, rgba(244,238,221,0.6), transparent 70%); }
.section > .container { position: relative; z-index: 1; }

/* ---- HERO fragrance background (video upgrades over animated mist) ---- */
.hero__bg { position: absolute; inset: 0; overflow: hidden; z-index: 0; }
.hero__video {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; opacity: 0; transition: opacity 1.4s ease;
}
.hero__video.is-ready { opacity: 0.72; }
.hero__mist { position: absolute; inset: -10%; }
.hero__mist .blob {
  position: absolute; border-radius: 50%; filter: blur(60px);
  mix-blend-mode: multiply; opacity: 0.55;
  will-change: transform;
}
.blob-1 { width: 46vw; height: 46vw; left: 4%;  top: -6%;  background: radial-gradient(circle, rgba(107,114,128,0.22), transparent 65%); animation: drift1 26s ease-in-out infinite; }
.blob-2 { width: 40vw; height: 40vw; right: 2%; top: 10%;  background: radial-gradient(circle, rgba(58,63,69,0.16), transparent 65%); animation: drift2 32s ease-in-out infinite; }
.blob-3 { width: 36vw; height: 36vw; left: 30%; top: 28%;  background: radial-gradient(circle, rgba(201,207,214,0.65), transparent 65%); animation: drift3 30s ease-in-out infinite; }
.blob-4 { width: 30vw; height: 30vw; right: 22%; top: -4%; background: radial-gradient(circle, rgba(244,238,221,0.7), transparent 65%); animation: drift1 36s ease-in-out infinite reverse; }
@keyframes drift1 { 0%,100% { transform: translate(0,0) scale(1); } 50% { transform: translate(6%, 8%) scale(1.12); } }
@keyframes drift2 { 0%,100% { transform: translate(0,0) scale(1.05); } 50% { transform: translate(-7%, 5%) scale(0.92); } }
@keyframes drift3 { 0%,100% { transform: translate(0,0) scale(1); } 50% { transform: translate(4%, -7%) scale(1.15); } }
.hero__veil {
  position: absolute; inset: 0; z-index: 1;
  background:
    radial-gradient(115% 80% at 50% 26%, rgba(255,255,255,0) 0%, rgba(255,255,255,0.5) 48%, #ffffff 80%),
    linear-gradient(180deg, rgba(255,255,255,0.25) 0%, rgba(255,255,255,0) 18%, rgba(255,255,255,0) 52%, #ffffff 88%);
}
.hero > .container { position: relative; z-index: 2; }
@media (prefers-reduced-motion: reduce) {
  .hero__mist .blob { animation: none; }
}

/* ---------------- PAGE HEADER + STUB COMPONENTS ---------------- */
.page-head { padding-top: clamp(120px, 16vw, 200px); padding-bottom: clamp(40px, 6vw, 72px); text-align: center; position: relative; overflow: hidden; }
.page-head__eyebrow { margin-bottom: 18px; }
.page-head h1 { margin: 0 auto; max-width: 16ch; }
.page-head .lead { margin: 20px auto 0; max-width: 56ch; }

/* search field */
.search {
  display: flex; align-items: center; gap: 12px;
  max-width: 520px; margin: 32px auto 0;
  padding: 6px 6px 6px 20px; border-radius: var(--r-pill);
}
.search input {
  flex: 1; border: 0; background: transparent; outline: none;
  font-family: var(--font-sans); font-size: 1.0625rem; color: var(--ink);
}
.search input::placeholder { color: var(--gray-400); }

/* cologne grid */
.cologne-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(16px, 2vw, 24px); }
.cologne-card { padding: 26px 22px 22px; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 14px; min-width: 0; }
.cologne-card .bottle { --bw: 56px; }
.cologne-card > div { min-width: 0; max-width: 100%; }
.cologne-card__house { font-size: 0.74rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--gray-400); }
.cologne-card__name { font-size: 1.3rem; line-height: 1.15; text-wrap: balance; overflow-wrap: break-word; }
.cologne-card__foot { margin-top: auto; padding-top: 14px; width: 100%; border-top: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; }
.cologne-card__dupe { font-size: 0.82rem; font-weight: 600; color: var(--teal-700); }

@media (max-width: 920px) { .cologne-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 680px) { .cologne-grid { grid-template-columns: repeat(2, 1fr); } }

/* ---------------- RESPONSIVE ---------------- */
@media (max-width: 920px) {
  .footer__inner { grid-template-columns: 1fr 1fr; gap: 32px; }
  .cols-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 760px) {
  .nav__links { display: none; }
  .nav__toggle { display: inline-flex; }
  .cols-2, .cols-3 { grid-template-columns: 1fr; }
  .footer__inner { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
  .nav__inner { height: 60px; gap: 14px; }
  .brand { font-size: 1.3rem; }
  .nav__right .btn { display: none; }   /* hamburger + hero CTAs cover this */
  .btn--lg { padding: 14px 24px; font-size: 0.975rem; }  /* don't let hero CTAs dominate */
  .page-head { padding-top: clamp(96px, 26vw, 130px); }
}
@media (max-width: 480px) {
  .cols-4 { grid-template-columns: 1fr 1fr; }
  .footer__inner { grid-template-columns: 1fr; gap: 26px; }
  .footer__bottom { flex-direction: column; gap: 6px; }
}

@media (prefers-reduced-motion: reduce) {
  .reveal { animation: none; opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
}
