/* ==========================================================================
   issalt.com — The Single Source of Truth for Salt
   CSS Architecture: Utility-first, performance-optimized
   ========================================================================== */

/* ---------- CSS Custom Properties ---------- */
:root {
  /* Light Mode (default) */
  --color-bg: #FAFAF8;
  --color-bg-alt: #F0EFEB;
  --color-bg-card: #FFFFFF;
  --color-text: #1A1A18;
  --color-text-muted: #6B6B63;
  --color-text-subtle: #9C9C93;
  --color-accent: #C8411B;
  --color-accent-hover: #A83515;
  --color-border: #E2E1DC;
  --color-border-strong: #D0CFC8;
  --color-search-bg: #FFFFFF;
  --color-search-border: #D0CFC8;
  --color-tag-bg: #F0EFEB;
  --color-tag-text: #4A4A44;
  --color-hero-gradient-start: #FAFAF8;
  --color-hero-gradient-end: #F0EFEB;
  --color-crystal: rgba(200, 65, 27, 0.06);
  --color-nav-bg: rgba(250, 250, 248, 0.92);
  --shadow-sm: 0 1px 2px rgba(26,26,24,0.04);
  --shadow-md: 0 4px 12px rgba(26,26,24,0.06);
  --shadow-lg: 0 8px 30px rgba(26,26,24,0.08);
  --shadow-card: 0 1px 3px rgba(26,26,24,0.04), 0 6px 16px rgba(26,26,24,0.04);
}

[data-theme="dark"] {
  --color-bg: #121210;
  --color-bg-alt: #1C1C19;
  --color-bg-card: #1E1E1B;
  --color-text: #EDEDEB;
  --color-text-muted: #A0A097;
  --color-text-subtle: #6B6B63;
  --color-accent: #E0633E;
  --color-accent-hover: #F07A58;
  --color-border: #2C2C28;
  --color-border-strong: #3A3A35;
  --color-search-bg: #1E1E1B;
  --color-search-border: #3A3A35;
  --color-tag-bg: #2C2C28;
  --color-tag-text: #BDBDB5;
  --color-hero-gradient-start: #121210;
  --color-hero-gradient-end: #1C1C19;
  --color-crystal: rgba(224, 99, 62, 0.06);
  --color-nav-bg: rgba(18, 18, 16, 0.94);
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.2);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.25);
  --shadow-lg: 0 8px 30px rgba(0,0,0,0.3);
  --shadow-card: 0 1px 3px rgba(0,0,0,0.15), 0 6px 16px rgba(0,0,0,0.15);
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: 'DM Sans', system-ui, -apple-system, sans-serif;
  background-color: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
  transition: background-color 0.3s ease, color 0.3s ease;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

/* ---------- Typography ---------- */
.font-display {
  font-family: 'Instrument Serif', 'Georgia', serif;
}

h1, h2, h3 {
  font-family: 'Instrument Serif', 'Georgia', serif;
  font-weight: 400;
  line-height: 1.15;
}

/* ---------- Layout ---------- */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

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

/* ---------- Navigation ---------- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: var(--color-nav-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-border);
  transition: background 0.3s ease, border-color 0.3s ease;
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}

.nav__logo {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: 'DM Sans', sans-serif;
  font-weight: 700;
  font-size: 1.125rem;
  letter-spacing: -0.03em;
  color: var(--color-text);
}

.nav__logo .dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  background: var(--color-accent);
  border-radius: 50%;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 28px;
  list-style: none;
}

.nav__link {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-text-muted);
  letter-spacing: 0.01em;
  position: relative;
}

.nav__link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 1.5px;
  background: var(--color-accent);
  transition: width 0.25s ease;
}

.nav__link:hover {
  color: var(--color-text);
}

.nav__link:hover::after {
  width: 100%;
}

.nav__actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Dark Mode Toggle */
.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  background: var(--color-bg-card);
  cursor: pointer;
  transition: all 0.2s ease;
  color: var(--color-text-muted);
}

.theme-toggle:hover {
  border-color: var(--color-border-strong);
  color: var(--color-text);
}

.theme-toggle svg {
  width: 18px;
  height: 18px;
}

.theme-toggle .icon-moon,
[data-theme="dark"] .theme-toggle .icon-sun {
  display: none;
}

[data-theme="dark"] .theme-toggle .icon-moon {
  display: block;
}

/* Mobile Menu */
.nav__hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav__hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--color-text);
  border-radius: 1px;
  transition: all 0.3s ease;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: 140px 0 80px;
  background: linear-gradient(180deg, var(--color-hero-gradient-start) 0%, var(--color-hero-gradient-end) 100%);
  overflow: hidden;
}

.hero__crystal {
  position: absolute;
  border-radius: 50%;
  background: var(--color-crystal);
  filter: blur(60px);
  pointer-events: none;
}

.hero__crystal--1 {
  width: 500px;
  height: 500px;
  top: -100px;
  right: -100px;
}

.hero__crystal--2 {
  width: 350px;
  height: 350px;
  bottom: -50px;
  left: -50px;
}

.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: 100px;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--color-text-muted);
  margin-bottom: 28px;
  box-shadow: var(--shadow-sm);
}

.hero__badge span {
  color: var(--color-accent);
}

.hero__title {
  font-size: clamp(2.75rem, 6vw, 4.75rem);
  letter-spacing: -0.03em;
  margin-bottom: 20px;
  max-width: 800px;
}

.hero__title em {
  font-style: italic;
  color: var(--color-accent);
}

.hero__subtitle {
  font-size: 1.125rem;
  color: var(--color-text-muted);
  max-width: 560px;
  line-height: 1.7;
  margin-bottom: 40px;
}

/* Search */
.search {
  position: relative;
  max-width: 620px;
  margin-bottom: 24px;
}

.search__input {
  width: 100%;
  padding: 18px 56px 18px 52px;
  font-family: 'DM Sans', sans-serif;
  font-size: 1.0625rem;
  color: var(--color-text);
  background: var(--color-search-bg);
  border: 1.5px solid var(--color-search-border);
  border-radius: 14px;
  outline: none;
  box-shadow: var(--shadow-md);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.search__input::placeholder {
  color: var(--color-text-subtle);
}

.search__input:focus {
  border-color: var(--color-accent);
  box-shadow: var(--shadow-md), 0 0 0 3px rgba(200, 65, 27, 0.08);
}

.search__icon {
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--color-text-subtle);
  pointer-events: none;
}

.search__icon svg {
  width: 20px;
  height: 20px;
}

.search__kbd {
  position: absolute;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  gap: 4px;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.75rem;
  color: var(--color-text-subtle);
  pointer-events: none;
}

.search__kbd kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 24px;
  padding: 0 6px;
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  border-radius: 5px;
  font-family: inherit;
  font-size: 0.6875rem;
  font-weight: 600;
}

/* Search Suggestions Dropdown */
.search__suggestions {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  z-index: 50;
}

.search__suggestions.active {
  display: block;
}

.search__suggestion-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 18px;
  font-size: 0.9375rem;
  color: var(--color-text);
  cursor: pointer;
  transition: background 0.15s ease;
}

.search__suggestion-item:hover,
.search__suggestion-item.active {
  background: var(--color-bg-alt);
}

.search__suggestion-item .type {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--color-accent);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  flex-shrink: 0;
  min-width: 56px;
}

/* Trending Tags */
.trending {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  max-width: 620px;
}

.trending__label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--color-text-subtle);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.trending__tag {
  display: inline-flex;
  padding: 5px 12px;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--color-tag-text);
  background: var(--color-tag-bg);
  border: 1px solid var(--color-border);
  border-radius: 100px;
  transition: all 0.2s ease;
  cursor: pointer;
}

.trending__tag:hover {
  background: var(--color-bg-card);
  border-color: var(--color-border-strong);
  color: var(--color-text);
  box-shadow: var(--shadow-sm);
}

/* ---------- Stats Bar ---------- */
.stats {
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
  padding: 28px 0;
  background: var(--color-bg);
}

.stats__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  text-align: center;
}

.stats__number {
  font-family: 'Instrument Serif', serif;
  font-size: 2rem;
  letter-spacing: -0.02em;
  color: var(--color-text);
}

.stats__label {
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  margin-top: 2px;
}

/* ---------- Sections (Generic) ---------- */
.section {
  padding: 80px 0;
}

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

.section__header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 48px;
  gap: 24px;
}

.section__eyebrow {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-accent);
  margin-bottom: 10px;
}

.section__title {
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
  letter-spacing: -0.025em;
}

.section__desc {
  font-size: 1rem;
  color: var(--color-text-muted);
  margin-top: 8px;
  max-width: 500px;
}

.section__link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-accent);
  white-space: nowrap;
  flex-shrink: 0;
  transition: gap 0.2s ease;
}

.section__link:hover {
  gap: 10px;
}

/* ---------- Pillar Cards ---------- */
.pillars {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.pillar {
  position: relative;
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: 16px;
  padding: 36px 28px 28px;
  overflow: hidden;
  transition: all 0.25s ease;
  box-shadow: var(--shadow-card);
}

.pillar:hover {
  border-color: var(--color-border-strong);
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.pillar__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  margin-bottom: 20px;
  font-size: 1.25rem;
}

.pillar__title {
  font-size: 1.25rem;
  margin-bottom: 10px;
  letter-spacing: -0.015em;
}

.pillar__text {
  font-size: 0.9375rem;
  color: var(--color-text-muted);
  line-height: 1.65;
  margin-bottom: 20px;
}

.pillar__links {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-top: 16px;
  border-top: 1px solid var(--color-border);
}

.pillar__sublink {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 0;
  font-size: 0.875rem;
  color: var(--color-text-muted);
  transition: color 0.15s ease;
}

.pillar__sublink:hover {
  color: var(--color-accent);
}

.pillar__sublink svg {
  width: 14px;
  height: 14px;
  opacity: 0;
  transform: translateX(-4px);
  transition: all 0.2s ease;
}

.pillar__sublink:hover svg {
  opacity: 1;
  transform: translateX(0);
}

/* ---------- FAQ Section ---------- */
.faq-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.faq-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: 10px;
  font-size: 0.9375rem;
  color: var(--color-text);
  transition: all 0.2s ease;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
}

.faq-item:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
  box-shadow: var(--shadow-md);
}

.faq-item svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  opacity: 0.4;
  transition: opacity 0.2s ease;
}

.faq-item:hover svg {
  opacity: 1;
}

/* ---------- Comparison / Culinary Table Preview ---------- */
.table-preview {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow-card);
}

.table-preview table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9375rem;
}

.table-preview thead {
  background: var(--color-bg-alt);
}

.table-preview th {
  padding: 14px 20px;
  font-weight: 600;
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-muted);
  text-align: left;
  border-bottom: 1px solid var(--color-border);
}

.table-preview td {
  padding: 14px 20px;
  border-bottom: 1px solid var(--color-border);
  color: var(--color-text);
}

.table-preview tr:last-child td {
  border-bottom: none;
}

.table-preview tr:hover td {
  background: var(--color-bg-alt);
}

.salinity-bar {
  display: flex;
  align-items: center;
  gap: 8px;
}

.salinity-bar__track {
  width: 80px;
  height: 6px;
  background: var(--color-bg-alt);
  border-radius: 3px;
  overflow: hidden;
}

.salinity-bar__fill {
  height: 100%;
  background: var(--color-accent);
  border-radius: 3px;
  transition: width 0.5s ease;
}

/* ---------- CTA / Newsletter ---------- */
.cta {
  padding: 80px 0;
  text-align: center;
}

.cta__inner {
  max-width: 600px;
  margin: 0 auto;
}

.cta__title {
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}

.cta__text {
  font-size: 1rem;
  color: var(--color-text-muted);
  line-height: 1.7;
  margin-bottom: 32px;
}

.cta__links {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.9375rem;
  font-weight: 600;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn--primary {
  background: var(--color-accent);
  color: #FFFFFF;
}

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

.btn--secondary {
  background: var(--color-bg-card);
  color: var(--color-text);
  border: 1px solid var(--color-border);
}

.btn--secondary:hover {
  border-color: var(--color-border-strong);
  box-shadow: var(--shadow-sm);
}

/* ---------- Footer ---------- */
.footer {
  border-top: 1px solid var(--color-border);
  padding: 48px 0 32px;
  background: var(--color-bg);
}

.footer__grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 40px;
}

.footer__brand-desc {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  line-height: 1.7;
  margin-top: 12px;
  max-width: 280px;
}

.footer__heading {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-text-subtle);
  margin-bottom: 16px;
}

.footer__links {
  display: flex;
  flex-direction: column;
  gap: 10px;
  list-style: none;
}

.footer__link {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  transition: color 0.15s ease;
}

.footer__link:hover {
  color: var(--color-text);
}

.footer__bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 24px;
  border-top: 1px solid var(--color-border);
  font-size: 0.8125rem;
  color: var(--color-text-subtle);
}

/* ---------- Scroll Animations ---------- */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

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

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }

/* ---------- Skip to Content (Accessibility) ---------- */
.skip-link {
  position: absolute;
  top: -100%;
  left: 16px;
  z-index: 999;
  padding: 12px 20px;
  background: var(--color-accent);
  color: #fff;
  border-radius: 8px;
  font-weight: 600;
}

.skip-link:focus {
  top: 12px;
}

/* ---------- Mobile Navigation Overlay ---------- */
.nav__mobile-menu {
  display: none;
  position: fixed;
  top: 60px;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--color-bg);
  z-index: 99;
  padding: 32px 24px;
  flex-direction: column;
  gap: 8px;
}

.nav__mobile-menu.active {
  display: flex;
}

.nav__mobile-link {
  display: block;
  padding: 14px 0;
  font-size: 1.125rem;
  font-weight: 500;
  color: var(--color-text);
  border-bottom: 1px solid var(--color-border);
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .pillars {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer__grid {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }
}

@media (max-width: 768px) {
  .nav__links {
    display: none;
  }

  .nav__hamburger {
    display: flex;
  }

  .hero {
    padding: 120px 0 60px;
  }

  .stats__grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }

  .pillars {
    grid-template-columns: 1fr;
  }

  .faq-grid {
    grid-template-columns: 1fr;
  }

  .section__header {
    flex-direction: column;
    align-items: flex-start;
  }

  .footer__grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .footer__bottom {
    flex-direction: column;
    gap: 8px;
    text-align: center;
  }

  .search__kbd {
    display: none;
  }

  .table-preview {
    overflow-x: auto;
  }
}

@media (max-width: 480px) {
  .hero__title {
    font-size: 2.25rem;
  }

  .container {
    padding: 0 16px;
  }

  .section {
    padding: 56px 0;
  }
}

/* ---------- Print Styles ---------- */
@media print {
  .nav, .theme-toggle, .search, .trending, .cta {
    display: none;
  }

  body {
    background: #fff;
    color: #000;
  }
}
