/* ═══════════════════════════════════════════════════════════════
   CLARITY — global.css
   CSS Custom Properties · Reset · Typography · Utilities · Grid
   ═══════════════════════════════════════════════════════════════ */

/* ─── Root Variables ─── */
:root {
  /* ── Colors ── */
  --teal-deep:    #1A5F5A;
  --teal-mid:     #2D8B7A;
  --teal-light:   #4BBFA0;
  --teal-soft:    #A8D8CF;
  --teal-pale:    #EAF5F2;
  --gold:         #C9A84C;
  --gold-light:   #E8D5A3;
  --charcoal:     #1E2A2A;
  --slate:        #4A5568;
  --warm-white:   #FAFAF8;
  --pure-white:   #FFFFFF;

  /* Error / Success */
  --error:        #E53E3E;
  --success:      #38A169;
  --warning:      #D69E2E;
  --info:         #3182CE;

  /* ── Typography ── */
  --font-display: 'Cormorant Garamond', Georgia, serif;
  --font-body:    'DM Sans', system-ui, sans-serif;
  --font-accent:  'Playfair Display', Georgia, serif;

  /* ── Spacing ── */
  --section-py:   100px;
  --container:    1200px;
  --gap:          32px;
  --gap-lg:       48px;
  --radius:       12px;
  --radius-lg:    20px;
  --radius-full:  9999px;

  /* ── Shadows ── */
  --shadow-sm:    0 2px 8px rgba(26, 95, 90, 0.08);
  --shadow-md:    0 8px 24px rgba(26, 95, 90, 0.12);
  --shadow-lg:    0 16px 48px rgba(26, 95, 90, 0.16);
  --shadow-xl:    0 24px 64px rgba(26, 95, 90, 0.20);

  /* ── Transitions ── */
  --transition:      0.3s ease;
  --transition-slow: 0.6s ease;
  --transition-fast: 0.15s ease;

  /* ── Z-index scale ── */
  --z-base:     0;
  --z-above:    10;
  --z-dropdown: 100;
  --z-sticky:   200;
  --z-overlay:  500;
  --z-nav:      600;
  --z-modal:    700;
  --z-toast:    800;
  --z-top:      9999;

  /* ── Remix Icon sizes ── */
  --icon-sm:  16px;
  --icon-md:  20px;
  --icon-lg:  24px;
  --icon-xl:  32px;
  --icon-2x:  40px;
  --icon-3x:  48px;

  /* ── Nav height (used for offset calculations) ── */
  --nav-height: 80px;
}

/* ─── Remix Icon Size Utilities ─── */
[class*="ri-"].ri-sm { font-size: var(--icon-sm); line-height: 1; }
[class*="ri-"].ri-md { font-size: var(--icon-md); line-height: 1; }
[class*="ri-"].ri-lg { font-size: var(--icon-lg); line-height: 1; }
[class*="ri-"].ri-xl { font-size: var(--icon-xl); line-height: 1; }
[class*="ri-"].ri-2x { font-size: var(--icon-2x); line-height: 1; }
[class*="ri-"].ri-3x { font-size: var(--icon-3x); line-height: 1; }

/* ─── Modern CSS Reset ─── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: var(--nav-height);
}
body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.7;
  color: var(--charcoal);
  background-color: var(--warm-white);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img, picture, video, canvas, svg {
  display: block;
  max-width: 100%;
}
img {
  height: auto;
  object-fit: cover;
}
input, button, textarea, select { font: inherit; }
p, h1, h2, h3, h4, h5, h6 { overflow-wrap: break-word; }
a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition);
}
ul, ol { list-style: none; }
button { cursor: pointer; border: none; background: none; }
table { border-collapse: collapse; }
address { font-style: normal; }

/* ─── Typography Scale ─── */
h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.15;
  color: var(--charcoal);
}
h4, h5, h6 {
  font-family: var(--font-body);
  font-weight: 600;
  line-height: 1.4;
  color: var(--charcoal);
}
h1 { font-size: clamp(2.75rem, 5.5vw, 5rem); }
h2 { font-size: clamp(2.25rem, 4vw, 3.75rem); }
h3 { font-size: clamp(1.75rem, 2.5vw, 2.5rem); }
h4 { font-size: clamp(1.25rem, 2vw, 1.625rem); }
h5 { font-size: 1.125rem; }
h6 { font-size: 1rem; }

p { color: var(--slate); }

.lead {
  font-size: clamp(1.1rem, 1.5vw, 1.25rem);
  line-height: 1.8;
  color: var(--slate);
}
.caption {
  font-size: 0.875rem;
  color: var(--slate);
}
.overline {
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--teal-mid);
  display: block;
}
.display-text {
  font-family: var(--font-display);
  font-style: italic;
  color: var(--teal-mid);
}
.italic-accent {
  font-family: var(--font-accent);
  font-style: italic;
  color: var(--teal-mid);
}

/* ─── Layout Containers ─── */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 24px;
}
.container-sm {
  width: 100%;
  max-width: 800px;
  margin-inline: auto;
  padding-inline: 24px;
}
.container-lg {
  width: 100%;
  max-width: 1400px;
  margin-inline: auto;
  padding-inline: 24px;
}
.container-full { padding-inline: 24px; }

/* ─── Grid System ─── */
.grid           { display: grid; gap: var(--gap); }
.grid-2         { grid-template-columns: repeat(2, 1fr); }
.grid-3         { grid-template-columns: repeat(3, 1fr); }
.grid-4         { grid-template-columns: repeat(4, 1fr); }
.grid-auto      { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid-auto-sm   { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.grid-auto-lg   { grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); }
.col-span-2     { grid-column: span 2; }

/* ─── Flex Utilities ─── */
.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-col      { display: flex; flex-direction: column; }
.flex-wrap     { flex-wrap: wrap; }
.items-start   { align-items: flex-start; }
.items-center  { align-items: center; }
.gap-xs        { gap: 8px; }
.gap-sm        { gap: 16px; }
.gap-md        { gap: var(--gap); }
.gap-lg        { gap: var(--gap-lg); }

/* ─── Section Layout ─── */
.section    { padding-block: var(--section-py); }
.section-sm { padding-block: 64px; }
.section-lg { padding-block: 140px; }

.section-header {
  text-align: center;
  max-width: 700px;
  margin: 0 auto var(--gap-lg);
}
.section-header .overline { margin-bottom: 12px; }
.section-header h2 { margin-bottom: 20px; }
.section-header p  { font-size: 1.1rem; }
.section-header .divider { margin-top: 20px; }

/* ─── Background Utilities ─── */
.bg-white   { background-color: var(--pure-white); }
.bg-warm    { background-color: var(--warm-white); }
.bg-pale    { background-color: var(--teal-pale); }
.bg-teal    { background-color: var(--teal-deep); color: var(--pure-white); }
.bg-charcoal{ background-color: var(--charcoal); color: var(--pure-white); }
.bg-gradient-teal {
  background: linear-gradient(135deg, var(--teal-deep) 0%, var(--teal-mid) 100%);
}
.bg-gradient-warm {
  background: linear-gradient(135deg, var(--warm-white) 0%, var(--teal-pale) 100%);
}

/* ─── Text Utilities ─── */
.text-teal    { color: var(--teal-mid); }
.text-deep    { color: var(--teal-deep); }
.text-gold    { color: var(--gold); }
.text-slate   { color: var(--slate); }
.text-white   { color: var(--pure-white); }
.text-charcoal{ color: var(--charcoal); }
.text-center  { text-align: center; }
.text-left    { text-align: left; }
.text-right   { text-align: right; }
.font-light   { font-weight: 300; }
.font-regular { font-weight: 400; }
.font-medium  { font-weight: 500; }
.font-semi    { font-weight: 600; }
.font-bold    { font-weight: 700; }
.font-display { font-family: var(--font-display); }
.font-accent  { font-family: var(--font-accent); }

/* ─── Spacing Utilities ─── */
.mt-xs  { margin-top: 8px; }
.mt-sm  { margin-top: 16px; }
.mt-md  { margin-top: 32px; }
.mt-lg  { margin-top: 48px; }
.mt-xl  { margin-top: 64px; }
.mb-xs  { margin-bottom: 8px; }
.mb-sm  { margin-bottom: 16px; }
.mb-md  { margin-bottom: 32px; }
.mb-lg  { margin-bottom: 48px; }
.mb-xl  { margin-bottom: 64px; }
.py-sm  { padding-block: 16px; }
.py-md  { padding-block: 32px; }
.py-lg  { padding-block: 48px; }
.px-sm  { padding-inline: 16px; }
.px-md  { padding-inline: 32px; }
.p-sm   { padding: 16px; }
.p-md   { padding: 32px; }
.p-lg   { padding: 48px; }

/* ─── Divider ─── */
.divider {
  width: 60px;
  height: 3px;
  background: linear-gradient(90deg, var(--teal-mid), var(--teal-light));
  border-radius: 2px;
  margin: 16px auto;
}
.divider-left  { margin-left: 0; }
.divider-right { margin-right: 0; }
.divider-gold {
  background: linear-gradient(90deg, var(--gold), var(--gold-light));
}

/* ─── Scroll Progress Bar ─── */
.scroll-progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0%;
  background: linear-gradient(90deg, var(--teal-mid), var(--gold));
  z-index: var(--z-top);
  transition: width 0.1s linear;
}

/* ─── Skip Navigation (Accessibility) ─── */
.skip-link {
  position: absolute;
  top: -100%;
  left: 16px;
  padding: 8px 16px;
  background: var(--teal-deep);
  color: var(--pure-white);
  border-radius: var(--radius);
  z-index: var(--z-top);
  font-weight: 600;
  transition: top var(--transition-fast);
}
.skip-link:focus { top: 16px; }

/* ─── Focus Styles (Accessibility) ─── */
:focus-visible {
  outline: 3px solid var(--teal-light);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ─── 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;
}

/* ─── Display Utilities ─── */
.hidden         { display: none !important; }
.invisible      { visibility: hidden; }
.overflow-hidden{ overflow: hidden; }
.relative       { position: relative; }
.absolute       { position: absolute; }
.full-width     { width: 100%; }

/* ─── Aspect Ratio Utilities ─── */
.aspect-square  { aspect-ratio: 1 / 1; }
.aspect-video   { aspect-ratio: 16 / 9; }
.aspect-card    { aspect-ratio: 4 / 3; }
.aspect-portrait{ aspect-ratio: 3 / 4; }

/* ─── Object Fit Utilities ─── */
.img-cover { width: 100%; height: 100%; object-fit: cover; }
.img-contain { width: 100%; height: 100%; object-fit: contain; }

/* ─── Overlay Utility ─── */
.overlay {
  position: absolute;
  inset: 0;
  background: rgba(26, 42, 42, 0.45);
}
.overlay-light {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent 40%, rgba(26, 42, 42, 0.7) 100%);
}

/* ─── Badge ─── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.05em;
}
.badge-teal  { background: var(--teal-pale); color: var(--teal-deep); }
.badge-gold  { background: #FBF5E4; color: #8B6914; }
.badge-white { background: rgba(255,255,255,0.15); color: var(--pure-white); border: 1px solid rgba(255,255,255,0.3); }
.badge-new   { background: var(--teal-mid); color: var(--pure-white); }

/* ─── Page Header (inner pages) ─── */
.page-header {
  position: relative;
  padding-block: 120px 80px;
  background: var(--bg-gradient-teal, linear-gradient(135deg, var(--teal-deep) 0%, var(--teal-mid) 100%));
  overflow: hidden;
  text-align: center;
  color: var(--pure-white);
}
.page-header::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url('https://images.unsplash.com/photo-1506905925346-21bda4d32df4?w=1600&h=600&fit=crop&q=80&auto=format') center/cover;
  opacity: 0.2;
}
.page-header .container { position: relative; z-index: 1; }
.page-header .overline  { color: var(--teal-soft); margin-bottom: 16px; }
.page-header h1         { color: var(--pure-white); margin-bottom: 20px; }
.page-header p          { color: rgba(255,255,255,0.85); max-width: 600px; margin: 0 auto; }

/* ─── Breadcrumb ─── */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.875rem;
  color: rgba(255,255,255,0.7);
  margin-bottom: 24px;
  justify-content: center;
}
.breadcrumb a:hover { color: var(--pure-white); }
.breadcrumb i { font-size: 12px; }

/* ─── Stats Strip ─── */
.stats-strip {
  background: var(--pure-white);
  box-shadow: var(--shadow-md);
  padding: 40px 0;
}
.stat-item { text-align: center; }
.stat-number {
  font-family: var(--font-display);
  font-size: clamp(2rem, 3.5vw, 3rem);
  font-weight: 700;
  color: var(--teal-deep);
  display: block;
  line-height: 1;
  margin-bottom: 8px;
}
.stat-label {
  font-size: 0.9rem;
  color: var(--slate);
  font-weight: 400;
}

/* ─── Tag Cloud ─── */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  background: var(--pure-white);
  border: 1.5px solid var(--teal-soft);
  border-radius: var(--radius-full);
  font-size: 0.875rem;
  color: var(--teal-deep);
  cursor: default;
  transition: all var(--transition);
  white-space: nowrap;
}
.tag:hover {
  background: var(--teal-pale);
  border-color: var(--teal-mid);
}
.tag.active {
  background: var(--teal-mid);
  border-color: var(--teal-mid);
  color: var(--pure-white);
}
