/* ============================================================
   PerfumerySHK — Base Styles
   Reset, Typography, Global Defaults
   ============================================================ */

/* ── Modern Reset ─────────────────────────────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  -moz-text-size-adjust: 100%;
  text-size-adjust: 100%;
  hanging-punctuation: first last;
}

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: var(--weight-regular);
  line-height: var(--leading-normal);
  color: var(--text-primary);
  background-color: var(--bg-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  min-height: 100vh;
}

/* ── Typography ───────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: var(--weight-bold);
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-tight);
  color: var(--text-primary);
  text-wrap: balance;
}

h1 {
  font-size: var(--text-4xl);
  letter-spacing: var(--tracking-tighter);
}

h2 {
  font-size: var(--text-3xl);
}

h3 {
  font-size: var(--text-2xl);
}

h4 {
  font-size: var(--text-xl);
}

h5 {
  font-size: var(--text-lg);
}

h6 {
  font-size: var(--text-md);
}

p {
  text-wrap: pretty;
  max-width: 72ch;
}

a {
  color: var(--color-gold);
  text-decoration: none;
  transition: var(--transition-color);
}

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

a:focus-visible {
  outline: 2px solid var(--color-gold);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

strong, b {
  font-weight: var(--weight-semibold);
}

em, i {
  font-style: italic;
}

small {
  font-size: var(--text-sm);
}

/* ── Lists ────────────────────────────────────────────────── */
ul, ol {
  list-style: none;
}

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

img {
  font-style: italic; /* alt text style */
}

/* ── Form Elements ────────────────────────────────────────── */
input, button, textarea, select {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  border: none;
  background: none;
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
}

/* ── Table ────────────────────────────────────────────────── */
table {
  border-collapse: collapse;
  border-spacing: 0;
  width: 100%;
}

/* ── Selection ────────────────────────────────────────────── */
::selection {
  background-color: rgba(212, 175, 55, 0.3);
  color: var(--color-ivory);
}

::-moz-selection {
  background-color: rgba(212, 175, 55, 0.3);
  color: var(--color-ivory);
}

/* ── Focus Visible ────────────────────────────────────────── */
:focus-visible {
  outline: 2px solid var(--color-gold);
  outline-offset: 2px;
}

:focus:not(:focus-visible) {
  outline: none;
}

/* ── Scrollbar ────────────────────────────────────────────── */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

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

::-webkit-scrollbar-thumb {
  background: var(--color-gray-700);
  border-radius: var(--radius-full);
  border: 2px solid var(--color-charcoal);
}

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

/* Firefox scrollbar */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--color-gray-700) var(--color-charcoal);
}

/* ── Horizontal Rule ──────────────────────────────────────── */
hr {
  border: none;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(212, 175, 55, 0.3),
    transparent
  );
  margin: var(--space-8) 0;
}

/* ── Placeholder ──────────────────────────────────────────── */
::placeholder {
  color: var(--color-gray-500);
  opacity: 1;
}

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

/* ── Skip to Content ──────────────────────────────────────── */
.skip-link {
  position: absolute;
  top: -100%;
  left: var(--space-4);
  z-index: var(--z-tooltip);
  padding: var(--space-3) var(--space-6);
  background: var(--color-gold);
  color: var(--color-black);
  font-weight: var(--weight-semibold);
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  transition: top var(--duration-fast) var(--ease-out);
}

.skip-link:focus {
  top: 0;
}

/* ── Responsive Typography ────────────────────────────────── */
@media (max-width: 768px) {
  html {
    font-size: 15px;
  }

  h1 { font-size: var(--text-3xl); }
  h2 { font-size: var(--text-2xl); }
  h3 { font-size: var(--text-xl); }
  h4 { font-size: var(--text-lg); }
}

@media (max-width: 480px) {
  html {
    font-size: 14px;
  }

  h1 { font-size: var(--text-2xl); }
  h2 { font-size: var(--text-xl); }
  h3 { font-size: var(--text-lg); }
}

/* ── Print ────────────────────────────────────────────────── */
@media print {
  body {
    background: white;
    color: black;
  }

  header, footer, .no-print {
    display: none !important;
  }
}
