:root {
  /* Color Palette */
  --color-background: #f5f4f2; /* soft warm off-white */
  --color-surface: #ffffff;
  --color-text: #1d2026; /* near-black charcoal */
  --color-muted-text: #5b616b;
  --color-primary: #1d3557; /* deep navy */
  --color-primary-soft: #2e4568;
  --color-success: #3b7d5a; /* muted olive-leaning green */
  --color-warning: #c28a3a; /* warm sand/gold */
  --color-danger: #b04a4a;

  --gray-50: #f8f9fb;
  --gray-100: #eef1f5;
  --gray-200: #dde2eb;
  --gray-300: #c3cad6;
  --gray-400: #a3acbb;
  --gray-500: #848ea0;
  --gray-600: #5b616b; /* shared with muted text */
  --gray-700: #434750;
  --gray-800: #2c3038;
  --gray-900: #181b20;

  /* Typography */
  --font-sans: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-serif: "Playfair Display", "Georgia", "Times New Roman", serif;
  --font-mono: "SF Mono", ui-monospace, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;

  --font-size-xs: 0.75rem;   /* 12px */
  --font-size-sm: 0.875rem;  /* 14px */
  --font-size-md: 1rem;      /* 16px */
  --font-size-lg: 1.125rem;  /* 18px */
  --font-size-xl: 1.25rem;   /* 20px */
  --font-size-2xl: 1.5rem;   /* 24px */
  --font-size-3xl: 1.875rem; /* 30px */
  --font-size-4xl: 2.25rem;  /* 36px */
  --font-size-5xl: 3rem;     /* 48px */

  --line-height-tight: 1.1;
  --line-height-snug: 1.25;
  --line-height-normal: 1.5;
  --line-height-relaxed: 1.7;

  /* Spacing Scale (0–96px) */
  --space-0: 0;
  --space-1: 0.25rem;  /* 4px */
  --space-2: 0.5rem;   /* 8px */
  --space-3: 0.75rem;  /* 12px */
  --space-4: 1rem;     /* 16px */
  --space-5: 1.25rem;  /* 20px */
  --space-6: 1.5rem;   /* 24px */
  --space-7: 1.75rem;  /* 28px */
  --space-8: 2rem;     /* 32px */
  --space-10: 2.5rem;  /* 40px */
  --space-12: 3rem;    /* 48px */
  --space-16: 4rem;    /* 64px */
  --space-20: 5rem;    /* 80px */
  --space-24: 6rem;    /* 96px */

  /* Radius */
  --radius-none: 0;
  --radius-sm: 0.25rem;   /* 4px */
  --radius-md: 0.5rem;    /* 8px */
  --radius-lg: 0.75rem;   /* 12px */
  --radius-xl: 1rem;      /* 16px */
  --radius-full: 999px;

  /* Shadows - subtle, editorial */
  --shadow-xs: 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-sm: 0 8px 24px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 16px 40px rgba(15, 23, 42, 0.08);
  --shadow-soft-elevated: 0 30px 80px rgba(15, 23, 42, 0.12);

  /* Transitions */
  --transition-fast: 120ms ease-out;
  --transition-normal: 200ms ease-out;
  --transition-slow: 320ms ease-out;
}

/*======================================
  RESET & NORMALIZE
======================================*/

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

html {
  margin: 0;
  padding: 0;
  scroll-behavior: smooth;
  text-size-adjust: 100%;
}

body {
  margin: 0;
}

h1,
 h2,
 h3,
 h4,
 h5,
 h6,
 p,
 figure,
 blockquote,
 dl,
 dd {
  margin: 0;
}

ul,
ol {
  margin: 0;
  padding: 0;
}

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

button,
input,
select,
textarea {
  margin: 0;
  font: inherit;
  color: inherit;
}

button {
  border: none;
  background: none;
  padding: 0;
}

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

:focus {
  outline: none;
}

/*======================================
  BASE TYPOGRAPHY & LAYOUT
======================================*/

body {
  min-height: 100vh;
  font-family: var(--font-sans);
  font-size: var(--font-size-md);
  line-height: var(--line-height-relaxed);
  background-color: var(--color-background);
  color: var(--color-text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1,
 h2,
 h3,
 h4,
 h5,
 h6 {
  font-family: var(--font-serif);
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--color-text);
}

h1 {
  font-size: clamp(2.5rem, 2.2rem + 1vw, 3.25rem);
  line-height: var(--line-height-tight);
  margin-bottom: var(--space-4);
}

h2 {
  font-size: clamp(2rem, 1.8rem + 0.6vw, 2.5rem);
  line-height: var(--line-height-snug);
  margin-bottom: var(--space-4);
}

h3 {
  font-size: clamp(1.5rem, 1.4rem + 0.4vw, 2rem);
  line-height: var(--line-height-snug);
  margin-bottom: var(--space-3);
}

h4 {
  font-size: 1.25rem;
  line-height: var(--line-height-normal);
  margin-bottom: var(--space-2);
}

h5 {
  font-size: 1.125rem;
  line-height: var(--line-height-normal);
  margin-bottom: var(--space-2);
}

h6 {
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  line-height: var(--line-height-normal);
  margin-bottom: var(--space-2);
}

p {
  margin-bottom: var(--space-4);
  color: var(--color-muted-text);
}

strong {
  font-weight: 600;
}

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

code,
pre {
  font-family: var(--font-mono);
}

/* Links - understated, premium */

a {
  position: relative;
  color: var(--color-primary);
  transition: color var(--transition-normal);
}

a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -0.1em;
  width: 0;
  height: 1px;
  background-color: currentColor;
  transition: width var(--transition-normal);
}

a:hover::after {
  width: 100%;
}

a:hover {
  color: var(--color-primary-soft);
}

/*======================================
  ACCESSIBILITY & MOTION
======================================*/

:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

/*======================================
  UTILITIES
======================================*/

/* Layout Containers */

.container {
  width: 100%;
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--space-4);
  padding-right: var(--space-4);
  max-width: 1200px;
}

.container-fluid {
  width: 100%;
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--space-4);
  padding-right: var(--space-4);
}

/* Flex Utilities */

.flex {
  display: flex;
}

.inline-flex {
  display: inline-flex;
}

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

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

.flex-col {
  display: flex;
  flex-direction: column;
}

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

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

.items-start {
  align-items: flex-start;
}

.items-end {
  align-items: flex-end;
}

.justify-center {
  justify-content: center;
}

.justify-between {
  justify-content: space-between;
}

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

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

/* Grid Utilities */

.grid {
  display: grid;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-6);
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-6);
}

@media (max-width: 768px) {
  .grid-2,
  .grid-3 {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Visually Hidden (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: 0;
}

/* Simple spacing helpers for vertical rhythm */

.section {
  padding-top: var(--space-12);
  padding-bottom: var(--space-12);
}

.section--compact {
  padding-top: var(--space-8);
  padding-bottom: var(--space-8);
}

/*======================================
  COMPONENTS
======================================*/

/* Buttons - minimalist, solid primary and ghost variants */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 0.75rem 1.75rem;
  border-radius: var(--radius-full);
  border: 1px solid transparent;
  font-size: var(--font-size-sm);
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition:
    background-color var(--transition-normal),
    color var(--transition-normal),
    border-color var(--transition-normal),
    box-shadow var(--transition-normal),
    transform var(--transition-fast);
}

.btn-primary {
  background-color: var(--color-primary);
  color: #ffffff!important;
  box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
  background-color: var(--color-primary-soft);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.btn-primary:active {
  transform: translateY(0);
  box-shadow: var(--shadow-xs);
}

.btn-ghost {
  background-color: transparent;
  color: var(--color-text);
  border-color: var(--gray-300);
}

.btn-ghost:hover {
  border-color: var(--color-text);
  background-color: rgba(255, 255, 255, 0.6);
}

.btn-outline {
  background-color: transparent;
  color: var(--color-primary);
  border-color: var(--color-primary);
}

.btn-outline:hover {
  color: #ffffff;
  background-color: var(--color-primary);
}

.btn:disabled,
.btn[aria-disabled="true"] {
  cursor: not-allowed;
  opacity: 0.6;
  box-shadow: none;
  transform: none;
}

.btn:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 3px;
}

/* Form Inputs */

.input,
.select,
.textarea {
  width: 100%;
  padding: 0.75rem 0.9rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--gray-300);
  background-color: #ffffff;
  color: var(--color-text);
  font-size: var(--font-size-sm);
  line-height: 1.4;
  transition:
    border-color var(--transition-normal),
    box-shadow var(--transition-normal),
    background-color var(--transition-normal);
}

.input::placeholder,
.textarea::placeholder {
  color: var(--gray-400);
}

.input:focus-visible,
.select:focus-visible,
.textarea:focus-visible {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 1px var(--color-primary);
}

.input:disabled,
.select:disabled,
.textarea:disabled {
  background-color: var(--gray-100);
  color: var(--gray-500);
  cursor: not-allowed;
}

.textarea {
  min-height: 120px;
  resize: vertical;
}

label {
  display: block;
  margin-bottom: var(--space-2);
  font-size: var(--font-size-sm);
  font-weight: 500;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--gray-700);
}

/* Cards - for product previews & editorial blocks */

.card {
  background-color: var(--color-surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xs);
  padding: var(--space-5);
  border: 1px solid rgba(12, 15, 25, 0.06);
}

.card--elevated {
  box-shadow: var(--shadow-soft-elevated);
}

.card-header {
  margin-bottom: var(--space-4);
}

.card-media {
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-bottom: var(--space-4);
}

.card-footer {
  margin-top: var(--space-4);
}

/* Simple badge for categories / collection tags */

.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-full);
  font-size: var(--font-size-xs);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background-color: var(--gray-100);
  color: var(--gray-700);
}

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

.badge--primary {
  background-color: rgba(29, 53, 87, 0.08);
  color: var(--color-primary);
}

/* Image treatments for editorial feel */

.img-cover {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.img-rounded {
  border-radius: var(--radius-lg);
}

/* Helper class for subdued separators */

.divider {
  height: 1px;
  width: 100%;
  background: linear-gradient(to right, transparent, rgba(15, 23, 42, 0.1), transparent);
  border: none;
}
