/* ==========================================================================   
   Variables
   ========================================================================== */

:root {
  /* Colors */
  --color-background: #0f1721; /* deep navy base */
  --color-surface: #111827; /* slightly lighter navy for sections */
  --color-surface-alt: #1f2933; /* cards / elevated surfaces */
  --color-text: #f9fafb; /* primary text on dark */
  --color-text-muted: #9ca3af; /* secondary text */
  --color-border-subtle: #27303c;

  --color-primary: #1c3f60; /* refined navy primary */
  --color-primary-soft: #234a6f;
  --color-primary-contrast: #f9fafb;

  --color-success: #3ba37b;
  --color-warning: #d89b37;
  --color-danger: #e15353;

  --color-sand: #d1b894; /* warm sand accent */
  --color-sand-soft: #e3cfad;
  --color-olive-muted: #656d4a; /* muted olive accent */

  --gray-50:  #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2933;
  --gray-900: #0b1120;

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

  --font-size-xs: 0.75rem;  /* 12px */
  --font-size-sm: 0.875rem; /* 14px */
  --font-size-base: 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.2;
  --line-height-snug: 1.35;
  --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-14: 3.5rem;  /* 56px */
  --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: 9999px;

  /* Shadows (subtle, editorial) */
  --shadow-sm: 0 8px 18px rgba(0, 0, 0, 0.18);
  --shadow-md: 0 16px 40px rgba(0, 0, 0, 0.28);
  --shadow-soft: 0 18px 60px rgba(0, 0, 0, 0.32);

  /* Transitions */
  --transition-fast: 120ms ease-out;
  --transition-base: 180ms ease-out;
  --transition-slow: 260ms ease-out;
}

/* Motion reduction */
@media (prefers-reduced-motion: reduce) {
  :root {
    --transition-fast: 0ms;
    --transition-base: 0ms;
    --transition-slow: 0ms;
  }
}


/* ==========================================================================   
   Reset / Normalize
   ========================================================================== */

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

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

body {
  margin: 0;
}

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

ul[role="list"],
ol[role="list"] {
  list-style: none;
  margin: 0;
  padding: 0;
}

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

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

button,
[role="button"] {
  cursor: pointer;
}

button[disabled],
[aria-disabled="true"] {
  cursor: not-allowed;
}

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

img {
  height: auto;
}

textarea {
  resize: vertical;
}

:focus {
  outline: none;
}

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


/* ==========================================================================   
   Base
   ========================================================================== */

body {
  min-height: 100vh;
  font-family: var(--font-sans);
  font-size: var(--font-size-base);
  line-height: var(--line-height-normal);
  background-color: var(--color-background);
  color: var(--color-text);
  text-rendering: geometricPrecision;
  -webkit-font-smoothing: antialiased;
}

main {
  min-height: 100vh;
}

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

p:last-child {
  margin-bottom: 0;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-serif);
  font-weight: 500;
  line-height: var(--line-height-tight);
  letter-spacing: 0.02em;
  color: var(--gray-50);
  margin-bottom: var(--space-3);
}

h1 {
  font-size: clamp(2.5rem, 4vw, var(--font-size-5xl));
}

h2 {
  font-size: clamp(1.9rem, 3vw, var(--font-size-4xl));
}

h3 {
  font-size: clamp(1.6rem, 2.5vw, var(--font-size-3xl));
}

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

h5 {
  font-size: var(--font-size-xl);
}

h6 {
  font-size: var(--font-size-lg);
}

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

a:hover {
  color: var(--color-sand);
}

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

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

strong {
  font-weight: 600;
}

hr {
  border: none;
  border-top: 1px solid var(--color-border-subtle);
  margin: var(--space-8) 0;
}


/* ==========================================================================   
   Utilities
   ========================================================================== */

/* Layout */

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

@media (min-width: 1280px) {
  .container {
    max-width: 1200px;
  }
}

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

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

/* Flex */

.flex {
  display: flex;
}

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

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

.flex-row {
  flex-direction: row;
}

.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-xs {
  gap: var(--space-2);
}

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

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

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

/* Grid */

.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-8);
}

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

/* Visibility */

.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;
}

.hidden {
  display: none !important;
}

/* Alignment & text */

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

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

.text-muted {
  color: var(--color-text-muted);
}

/* Spacing helpers (limited, for layout fine‑tuning) */

.mt-0 { margin-top: 0; }
.mt-4 { margin-top: var(--space-4); }
.mt-8 { margin-top: var(--space-8); }
.mb-4 { margin-bottom: var(--space-4); }
.mb-8 { margin-bottom: var(--space-8); }


/* ==========================================================================   
   Components
   ========================================================================== */

/* Buttons */

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

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

.btn-primary {
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-olive-muted) 100%);
  color: var(--color-primary-contrast);
  border-color: rgba(255, 255, 255, 0.04);
  box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-soft);
  background: linear-gradient(135deg, var(--color-primary-soft) 0%, var(--color-olive-muted) 100%);
}

.btn-outline {
  border-color: var(--gray-600);
  color: var(--gray-50);
  background-color: rgba(15, 23, 33, 0.6);
  backdrop-filter: blur(12px);
}

.btn-outline:hover {
  background-color: rgba(24, 35, 46, 0.9);
  border-color: var(--color-sand);
}

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

.btn-ghost:hover {
  background-color: rgba(255, 255, 255, 0.04);
}

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

/* Inputs */

.input,
.select,
.textarea {
  width: 100%;
  padding: 0.7rem 0.9rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border-subtle);
  background-color: rgba(15, 23, 33, 0.9);
  color: var(--color-text);
  font-size: var(--font-size-sm);
  line-height: var(--line-height-normal);
  transition:
    border-color var(--transition-base),
    box-shadow var(--transition-base),
    background-color var(--transition-base);
}

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

.input:focus-visible,
.select:focus-visible,
.textarea:focus-visible {
  outline: none;
  border-color: var(--color-sand);
  box-shadow: 0 0 0 1px var(--color-sand);
  background-color: rgba(15, 23, 33, 1);
}

.input[disabled],
.select[disabled],
.textarea[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
}

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

.form-helper {
  margin-top: var(--space-1);
  font-size: var(--font-size-xs);
  color: var(--gray-500);
}

.form-error {
  margin-top: var(--space-1);
  font-size: var(--font-size-xs);
  color: var(--color-danger);
}

/* Card */

.card {
  position: relative;
  background: radial-gradient(circle at top, rgba(209, 184, 148, 0.12), transparent 55%),
              linear-gradient(135deg, rgba(17, 24, 39, 0.9), rgba(15, 23, 33, 0.98));
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  border: 1px solid rgba(148, 163, 184, 0.18);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.card--subtle {
  background: rgba(15, 23, 33, 0.9);
  border-radius: var(--radius-md);
  padding: var(--space-5);
  border: 1px solid var(--color-border-subtle);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.02);
}

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

.card-title {
  font-family: var(--font-serif);
  font-size: var(--font-size-2xl);
  margin-bottom: var(--space-1);
}

.card-subtitle {
  font-size: var(--font-size-sm);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--gray-500);
}

.card-body {
  color: var(--color-text-muted);
}

/* Image treatments for editorial feel */

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

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

.img-border {
  border-radius: var(--radius-lg);
  border: 1px solid rgba(148, 163, 184, 0.35);
}

/* Badges / pills (e.g., collection tags, seasonal labels) */

.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.6rem;
  border-radius: var(--radius-full);
  font-size: var(--font-size-xs);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  border: 1px solid rgba(148, 163, 184, 0.4);
  color: var(--gray-300);
  background-color: rgba(17, 24, 39, 0.8);
}

.badge--sand {
  border-color: rgba(209, 184, 148, 0.6);
  color: var(--color-sand-soft);
}

.badge--olive {
  border-color: rgba(101, 109, 74, 0.7);
  color: var(--color-sand);
}

/* Status colors */

.badge-success {
  border-color: rgba(59, 163, 123, 0.7);
  color: #bbf7d0;
}

.badge-warning {
  border-color: rgba(216, 155, 55, 0.7);
  color: #fef3c7;
}

.badge-danger {
  border-color: rgba(225, 83, 83, 0.7);
  color: #fee2e2;
}


/* ==========================================================================   
   Accessibility & Motion
   ========================================================================== */

@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;
  }
}
