/* ============================================================
   EXUDE — Luxury Perfume House
   base.css — reset, design tokens, typography, buttons, utilities
   ============================================================ */

/* ---------- 1. RESET ---------- */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 120px;
  overflow-x: hidden;
}

body {
  min-height: 100vh;
  overflow-x: visible;
  background-color: var(--white);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--fs-base);
  font-weight: 300;
  line-height: var(--lh-base);
  letter-spacing: 0.01em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color var(--t-slow) var(--ease-out),
    color var(--t-slow) var(--ease-out);
}

img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
  height: auto;
}

input,
button,
textarea,
select {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
  outline: none;
}

button {
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

ul,
ol {
  list-style: none;
}

table {
  border-collapse: collapse;
  width: 100%;
}

::selection {
  background-color: var(--gold);
  color: var(--charcoal);
}

/* ---------- 2. DESIGN TOKENS ---------- */

:root {
  /* Colors */
  --white: #ffffff;
  --off-white: #fafafa;
  --ivory: #f5f0e8;
  --gold: #d4af37;
  --gold-dark: #c9a227;
  --gold-light: #f5e6c8;
  --charcoal: #0a0a0a;
  --ink: #1a1a1a;
  --grey: #6b6b6b;

  /* Derived tones */
  --grey-light: #9a9a9a;
  --grey-soft: #d4d4d4;
  --line: rgba(10, 10, 10, 0.1);
  --line-gold: rgba(212, 175, 55, 0.35);
  --overlay: rgba(10, 10, 10, 0.55);

  /* Typography */
  --font-heading: "Playfair Display", "Times New Roman", serif;
  --font-body: "Montserrat", "Helvetica Neue", Arial, sans-serif;
  --font-quote: "Cormorant Garamond", Georgia, serif;

  --fs-hero: clamp(3.5rem, 14vw, 11rem);
  --fs-display: clamp(2.75rem, 7vw, 6rem);
  --fs-h1: clamp(2.25rem, 5.2vw, 4.25rem);
  --fs-h2: clamp(1.85rem, 4vw, 3.25rem);
  --fs-h3: clamp(1.4rem, 2.6vw, 2.1rem);
  --fs-h4: clamp(1.15rem, 1.8vw, 1.5rem);
  --fs-h5: 1.05rem;
  --fs-h6: 0.9rem;
  --fs-base: 1rem;
  --fs-sm: 0.875rem;
  --fs-xs: 0.75rem;
  --fs-eyebrow: 0.7rem;

  --lh-tight: 1.05;
  --lh-heading: 1.18;
  --lh-snug: 1.45;
  --lh-base: 1.75;

  --ls-tight: -0.02em;
  --ls-normal: 0.01em;
  --ls-wide: 0.08em;
  --ls-wider: 0.18em;
  --ls-widest: 0.32em;

  /* Spacing scale */
  --space-3xs: 0.25rem;
  --space-2xs: 0.5rem;
  --space-xs: 0.75rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2.5rem;
  --space-xl: 4rem;
  --space-2xl: 6rem;
  --space-3xl: 8rem;
  --space-4xl: 11rem;

  /* Layout */
  --container-max: 1400px;
  --container-wide: 1600px;
  --container-pad: clamp(1.25rem, 5vw, 4rem);
  --nav-height: 88px;
  --banner-height: 38px;

  /* Motion */
  --t-fast: 0.25s;
  --t-base: 0.5s;
  --t-slow: 0.8s;
  --t-slower: 1.2s;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0.05, 0.36, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);

  /* Elevation */
  --shadow-xs: 0 2px 8px rgba(10, 10, 10, 0.04);
  --shadow-sm: 0 6px 20px rgba(10, 10, 10, 0.06);
  --shadow-md: 0 14px 40px rgba(10, 10, 10, 0.08);
  --shadow-lg: 0 30px 70px rgba(10, 10, 10, 0.12);
  --shadow-gold: 0 18px 45px rgba(212, 175, 55, 0.28);
  --shadow-gold-soft: 0 10px 30px rgba(212, 175, 55, 0.18);

  /* Misc */
  --radius-sm: 2px;
  --radius-md: 4px;
  --border: 1px solid var(--line);
  --z-nav: 900;
  --z-cart-bar: 950;
  --z-overlay: 1000;
  --z-modal: 1100;
}

/* ---------- 3. TYPOGRAPHY ---------- */

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-heading);
  font-weight: 400;
  line-height: var(--lh-heading);
  letter-spacing: var(--ls-tight);
  color: var(--ink);
}

h1 {
  font-size: var(--fs-h1);
  line-height: var(--lh-tight);
}

h2 {
  font-size: var(--fs-h2);
}

h3 {
  font-size: var(--fs-h3);
}

h4 {
  font-size: var(--fs-h4);
  line-height: var(--lh-snug);
}

h5 {
  font-size: var(--fs-h5);
  font-family: var(--font-body);
  font-weight: 500;
  letter-spacing: var(--ls-wide);
}

h6 {
  font-size: var(--fs-h6);
  font-family: var(--font-body);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: var(--ls-wider);
}

p {
  font-size: var(--fs-base);
  line-height: var(--lh-base);
  color: var(--grey);
  max-width: 68ch;
}

strong,
b {
  font-weight: 500;
  color: var(--ink);
}

em {
  font-style: italic;
}

blockquote,
.quote {
  font-family: var(--font-quote);
  font-style: italic;
  font-weight: 300;
  line-height: 1.55;
  letter-spacing: var(--ls-normal);
  color: var(--ink);
}

a {
  position: relative;
  transition: color var(--t-base) var(--ease-out),
    opacity var(--t-base) var(--ease-out);
}

a:hover {
  color: var(--gold-dark);
}

/* Section headings */

.section-title {
  font-family: var(--font-heading);
  font-size: var(--fs-h2);
  font-weight: 400;
  line-height: var(--lh-tight);
  letter-spacing: var(--ls-tight);
  color: var(--ink);
  text-wrap: balance;
}

.section-title--light {
  color: var(--white);
}

.section-title--gold {
  color: var(--gold);
}

.eyebrow {
  display: inline-block;
  font-family: var(--font-body);
  font-size: var(--fs-eyebrow);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: var(--ls-widest);
  color: var(--gold-dark);
  line-height: 1;
  margin-bottom: var(--space-sm);
}

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

.eyebrow--center {
  display: block;
  text-align: center;
}

.eyebrow::after {
  content: "";
  display: block;
  width: 34px;
  height: 1px;
  margin-top: var(--space-sm);
  background-color: var(--gold);
}

.eyebrow--center::after {
  margin-left: auto;
  margin-right: auto;
}

.lede {
  font-size: 1.05rem;
  line-height: 1.85;
  color: var(--grey);
}

.text-center {
  text-align: center;
}

.text-center p {
  margin-left: auto;
  margin-right: auto;
}

/* ---------- 4. BUTTONS ---------- */

.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2xs);
  min-height: 54px;
  padding: 0 var(--space-lg);
  font-family: var(--font-body);
  font-size: var(--fs-xs);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: var(--ls-wider);
  line-height: 1;
  text-align: center;
  white-space: nowrap;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  overflow: hidden;
  isolation: isolate;
  cursor: pointer;
  transition: color var(--t-base) var(--ease-out),
    border-color var(--t-base) var(--ease-out),
    box-shadow var(--t-base) var(--ease-out),
    transform var(--t-base) var(--ease-out);
}

.btn > * {
  position: relative;
  z-index: 2;
}

.btn::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 0;
  height: 100%;
  transition: width var(--t-slow) var(--ease-out);
}

.btn:hover::before {
  width: 100%;
}

.btn:active {
  transform: translateY(1px);
}

.btn:focus-visible {
  outline: 1px solid var(--gold);
  outline-offset: 3px;
}

.btn[disabled],
.btn.is-disabled {
  opacity: 0.45;
  pointer-events: none;
}

/* Filled gold */
.btn-gold {
  background-color: var(--gold);
  border-color: var(--gold);
  color: var(--charcoal);
}

.btn-gold::before {
  background-color: var();
}

.btn-gold:hover {
  color: var(--white);
  border-color: var(--charcoal);
  box-shadow: var(--shadow-gold);
}

/* Outlined gold */
.btn-outline {
  background-color: transparent;
  border-color: var(--gold);
  color: var(--ink);
}

.btn-outline::before {
  background-color: var();
}

.btn-outline:hover {
  color: var(--charcoal);
  border-color: var(--gold);
}

.btn-outline--light {
  border-color: rgba(212, 175, 55, 0.7);
  color: var(--white);
}

.btn-outline--light:hover {
  color: var(--charcoal);
}

/* Charcoal outline */
.btn-dark {
  background-color: transparent;
  border-color: var(--ink);
  color: var(--ink);
}

.btn-dark::before {
  background-color: var(--ink);
}

.btn-dark:hover {
  color: var(--white);
  border-color: var(--ink);
}

/* Text only */
.btn-text {
  min-height: auto;
  padding: 0 0 6px;
  color: var(--ink);
  border: none;
  border-bottom: 1px solid var(--gold);
  border-radius: 0;
  overflow: visible;
}

.btn-text::before {
  display: none;
}

.btn-text::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 100%;
  height: 1px;
  background-color: var(--ink);
  transform: scaleX(0);
  transform-origin: right center;
  transition: transform var(--t-slow) var(--ease-out);
}

.btn-text:hover {
  color: var(--gold-dark);
}

.btn-text:hover::after {
  transform: scaleX(1);
  transform-origin: left center;
}

.btn-sm {
  min-height: 42px;
  padding: 0 var(--space-md);
  font-size: 0.68rem;
}

.btn-lg {
  min-height: 62px;
  padding: 0 var(--space-xl);
}

.btn-block {
  width: 100%;
}

/* Underlined link style used in nav + inline */
.link-underline {
  position: relative;
  display: inline-block;
  padding-bottom: 4px;
  font-size: var(--fs-sm);
  letter-spacing: var(--ls-wide);
}

.link-underline::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 1px;
  background-color: currentColor;
  transform: scaleX(0);
  transform-origin: right center;
  transition: transform var(--t-slow) var(--ease-out);
}

.link-underline:hover::after,
.link-underline.is-active::after {
  transform: scaleX(1);
  transform-origin: left center;
}

/* ---------- 5. LAYOUT UTILITIES ---------- */

.container {
  width: 100%;
  max-width: var(--container-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--container-pad);
  padding-right: var(--container-pad);
}

.container--wide {
  max-width: var(--container-wide);
}

.container--narrow {
  max-width: 880px;
}

.section {
  position: relative;
  padding-top: var(--space-3xl);
  padding-bottom: var(--space-3xl);
}

.section--tight {
  padding-top: var(--space-2xl);
  padding-bottom: var(--space-2xl);
}

.section--loose {
  padding-top: var(--space-4xl);
  padding-bottom: var(--space-4xl);
}

.section--ivory {
  background-color: var(--ivory);
}

.section--off-white {
  background-color: var(--off-white);
}

.section--charcoal {
  background-color: var(--charcoal);
  color: var(--white);
}

.section--charcoal h1,
.section--charcoal h2,
.section--charcoal h3,
.section--charcoal h4,
.section--charcoal p {
  color: var(--white);
}

.section--charcoal p {
  color: rgba(255, 255, 255, 0.66);
}

.section-head {
  max-width: 720px;
  margin-bottom: var(--space-2xl);
}

.section-head--center {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.section-head p {
  margin-top: var(--space-md);
}

.grid {
  display: grid;
  gap: var(--space-lg);
}

.flex {
  display: flex;
}

.flex-center {
  display: flex;
  align-items: center;
  justify-content: center;
}

.flex-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.flex-wrap {
  flex-wrap: wrap;
}

.gap-sm {
  gap: var(--space-sm);
}

.gap-md {
  gap: var(--space-md);
}

.gap-lg {
  gap: var(--space-lg);
}

.mt-sm {
  margin-top: var(--space-sm);
}

.mt-md {
  margin-top: var(--space-md);
}

.mt-lg {
  margin-top: var(--space-lg);
}

.mt-xl {
  margin-top: var(--space-xl);
}

.mb-md {
  margin-bottom: var(--space-md);
}

.mb-lg {
  margin-bottom: var(--space-lg);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Gold hairline divider */
.gold-line {
  width: 100%;
  height: 1px;
  border: 0;
  background: linear-gradient(
    to right,
    transparent,
    var(--gold) 20%,
    var(--gold) 80%,
    transparent
  );
  opacity: 0.5;
}

.gold-line--short {
  width: 64px;
  margin: 0 auto;
}

.gold-rule {
  width: 52px;
  height: 1px;
  background-color: var(--gold);
  border: 0;
  margin: var(--space-md) 0;
}

.gold-rule--center {
  margin-left: auto;
  margin-right: auto;
}

/* ---------- 6. REVEAL ANIMATIONS ---------- */

.reveal {
  opacity: 0;
  transform: translateY(60px);
  transition: opacity 1.2s var(--ease-out), transform 1.2s var(--ease-out);
  will-change: opacity, transform;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-left {
  transform: translateX(-60px);
}

.reveal-right {
  transform: translateX(60px);
}

.reveal-scale {
  transform: scale(0.94);
}

.reveal-left.visible,
.reveal-right.visible,
.reveal-scale.visible {
  transform: translate(0, 0) scale(1);
}

.reveal-delay-1 {
  transition-delay: 0.12s;
}

.reveal-delay-2 {
  transition-delay: 0.24s;
}

.reveal-delay-3 {
  transition-delay: 0.36s;
}

.reveal-delay-4 {
  transition-delay: 0.48s;
}

.reveal-delay-5 {
  transition-delay: 0.6s;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .reveal,
  .reveal-left,
  .reveal-right,
  .reveal-scale {
    opacity: 1;
    transform: none;
    transition: none;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

/* ---------- 7. FORM CONTROLS ---------- */

.field {
  position: relative;
  display: block;
  width: 100%;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 14px 2px;
  font-size: var(--fs-sm);
  color: var(--ink);
  border-bottom: 1px solid var(--grey-soft);
  border-radius: 0;
  background: transparent;
  transition: border-color var(--t-base) var(--ease-out);
}

.field input::placeholder,
.field textarea::placeholder {
  color: var(--grey-light);
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-bottom-color: var(--gold);
}

.field--gold input,
.field--gold select,
.field--gold textarea {
  border-bottom-color: var(--gold);
}

.field label {
  display: block;
  margin-bottom: var(--space-2xs);
  font-size: var(--fs-eyebrow);
  text-transform: uppercase;
  letter-spacing: var(--ls-wider);
  color: var(--grey);
}

.field--error input,
.field--error select,
.field--error textarea {
  border-bottom-color: #b3261e;
}

.field-error {
  display: block;
  margin-top: 6px;
  font-size: var(--fs-xs);
  color: #b3261e;
}

/* ---------- 8. GOLD ICON / BADGE CHIPS ---------- */

.chip {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2xs);
  padding: 7px 14px;
  font-size: var(--fs-xs);
  font-weight: 500;
  letter-spacing: var(--ls-wide);
  text-transform: uppercase;
  color: var(--ink);
  background-color: transparent;
  border: 1px solid var(--line);
  border-radius: 999px;
  transition: border-color var(--t-base) var(--ease-out),
    color var(--t-base) var(--ease-out),
    background-color var(--t-base) var(--ease-out);
}

.chip:hover,
.chip.is-active {
  color: var(--charcoal);
  background-color: var(--gold-light);
  border-color: var(--gold);
}

.price {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  color: var(--ink);
  letter-spacing: var(--ls-normal);
}

.price-old {
  margin-left: var(--space-2xs);
  font-family: var(--font-body);
  font-size: var(--fs-sm);
  color: var(--grey-light);
  text-decoration: line-through;
}

.badge {
  display: inline-block;
  padding: 5px 10px;
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: var(--ls-wide);
  text-transform: uppercase;
  color: var(--charcoal);
  background-color: var(--gold);
}

.badge--outline {
  color: var(--gold);
  background-color: transparent;
  border: 1px solid var(--gold);
}

/* ---------- 9. SCROLLBAR ---------- */

* {
  scrollbar-width: thin;
  scrollbar-color: var(--gold) transparent;
}

::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--off-white);
}

::-webkit-scrollbar-thumb {
  background-color: var(--gold);
  border-radius: 999px;
}

::-webkit-scrollbar-thumb:hover {
  background-color: var(--gold-dark);
}

body::-webkit-scrollbar-track {
  background: var(--charcoal);
}
