/* ===================================================================
   JD's Vegan Dives — Global Styles
   =================================================================== */

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

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-family);
  font-size: var(--font-size-base);
  line-height: var(--line-height);
  color: var(--text-primary);
  background-color: var(--bg);
  min-height: 100vh;
  overflow-x: hidden;
}

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

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

a:hover {
  color: var(--accent-mint);
}

h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: var(--text-primary);
}

h1 { font-size: clamp(32px, 5vw, 56px); }
h2 { font-size: clamp(24px, 3.5vw, 40px); }
h3 { font-size: clamp(18px, 2.5vw, 24px); }

/* --- Container --- */
.jdvd-container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.jdvd-container--narrow {
  max-width: var(--container-narrow);
}

/* --- Site Header --- */
.jdvd-site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  height: var(--header-height);
  background: var(--surface-translucent);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  transition: height 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

/* Transparent header on homepage */
.home .jdvd-site-header {
  position: fixed;
  width: 100%;
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border-bottom: none;
}

.home .jdvd-site-header .jdvd-site-logo,
.home .jdvd-site-header .jdvd-nav a {
  color: rgba(255, 255, 255, 0.85);
}

.home .jdvd-site-header .jdvd-nav a:hover,
.home .jdvd-site-header .jdvd-nav a.active {
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
}

.home .jdvd-site-header .jdvd-site-logo span {
  background: linear-gradient(135deg, #d4af37, #f5e6b8);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.jdvd-site-header.is-shrunk {
  height: 56px;
  box-shadow: var(--shadow-sm);
}

.jdvd-site-header .jdvd-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.jdvd-site-logo {
  font-size: var(--font-size-xl);
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.03em;
  transition: transform var(--transition-fast);
}

.jdvd-site-logo:hover {
  color: var(--text-primary);
  transform: scale(1.02);
}

.jdvd-site-logo span {
  background: var(--gradient-accent);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.jdvd-nav {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  list-style: none;
}

.jdvd-nav a {
  font-size: var(--font-size-sm);
  font-weight: 500;
  color: var(--text-secondary);
  transition: color var(--transition-fast), background var(--transition-fast);
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-sm);
  position: relative;
}

.jdvd-nav a:hover {
  color: var(--text-primary);
  background: var(--accent-08);
}

.jdvd-nav a.active {
  color: var(--text-primary);
  background: var(--accent-18);
  font-weight: 600;
}

@media (max-width: 768px) {
  .jdvd-site-header {
    height: auto;
  }

  .jdvd-site-header .jdvd-container {
    flex-direction: column;
    align-items: stretch;
    gap: var(--space-2);
    padding-top: var(--space-2);
    padding-bottom: var(--space-2);
  }

  .jdvd-site-header .jdvd-site-logo {
    align-self: flex-start;
  }

  .jdvd-site-header nav {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
  }

  .jdvd-site-header .jdvd-nav {
    display: flex;
    flex-wrap: nowrap;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    gap: var(--space-2);
    padding-bottom: 2px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }

  .jdvd-site-header .jdvd-nav::-webkit-scrollbar {
    display: none;
  }

  .jdvd-site-header .jdvd-nav a {
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
    font-size: var(--font-size-sm);
    padding: 10px 14px;
    width: auto;
  }
}

/* --- Site Footer --- */
.jdvd-site-footer {
  background: var(--gradient-dark);
  color: var(--text-on-dark);
  padding: var(--space-9) 0 var(--space-6);
  position: relative;
  overflow: hidden;
}

.jdvd-site-footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--gradient-accent);
}

.jdvd-footer-inner {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: var(--space-7);
}

.jdvd-footer-brand {
  font-size: var(--font-size-xl);
  font-weight: 800;
  color: #fff;
  margin-bottom: var(--space-3);
  letter-spacing: -0.03em;
}

.jdvd-footer-brand span {
  background: var(--gradient-accent);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.jdvd-footer-tagline {
  color: rgba(255, 255, 255, 0.5);
  font-size: var(--font-size-sm);
  line-height: 1.6;
  max-width: 320px;
}

.jdvd-footer-heading {
  font-size: var(--font-size-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(255, 255, 255, 0.55);
  margin-bottom: var(--space-4);
}

.jdvd-site-footer .jdvd-nav {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.jdvd-site-footer .jdvd-nav a {
  color: rgba(255, 255, 255, 0.75);
  font-size: var(--font-size-sm);
  padding: 0;
  background: none;
}

.jdvd-site-footer .jdvd-nav a:hover {
  color: #fff;
  background: none;
}

/* Newsletter CTA in footer */
.jdvd-footer-newsletter {
  display: flex;
  gap: var(--space-2);
  margin-top: var(--space-3);
}

.jdvd-footer-newsletter input {
  flex: 1;
  padding: 10px 14px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  font-size: var(--font-size-sm);
  font-family: var(--font-family);
  outline: none;
  transition: border-color var(--transition-fast);
}

.jdvd-footer-newsletter input::placeholder {
  color: rgba(255, 255, 255, 0.3);
}

.jdvd-footer-newsletter input:focus {
  border-color: var(--accent-light);
}

.jdvd-footer-newsletter button {
  padding: 10px 18px;
  border: none;
  border-radius: var(--radius-sm);
  background: var(--accent);
  color: #fff;
  font-size: var(--font-size-sm);
  font-weight: 600;
  cursor: pointer;
  font-family: var(--font-family);
  transition: background var(--transition-fast);
}

.jdvd-footer-newsletter button:hover {
  background: var(--accent-hover);
}

.jdvd-footer-copy {
  font-size: var(--font-size-xs);
  margin-top: var(--space-7);
  padding-top: var(--space-5);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  text-align: center;
  color: rgba(255, 255, 255, 0.3);
}

@media (max-width: 768px) {
  .jdvd-footer-inner {
    grid-template-columns: 1fr;
    gap: var(--space-6);
  }
}

/* --- Buttons --- */
.jdvd-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  font-family: var(--font-family);
  font-size: var(--font-size-sm);
  font-weight: 600;
  padding: 12px 24px;
  border-radius: var(--radius-full);
  border: none;
  cursor: pointer;
  transition: all var(--transition-normal);
  text-decoration: none;
  line-height: 1;
  position: relative;
  overflow: hidden;
}

.jdvd-btn--primary {
  background: var(--accent);
  color: var(--text-on-accent);
  box-shadow: 0 2px 8px rgba(11, 61, 46, 0.25);
}

.jdvd-btn--primary:hover {
  background: var(--accent-hover);
  color: var(--text-on-accent);
  box-shadow: 0 4px 16px rgba(11, 61, 46, 0.35);
  transform: translateY(-1px);
}

.jdvd-btn--secondary {
  background: transparent;
  color: rgba(255, 255, 255, 0.85);
  border: 2px solid rgba(255, 255, 255, 0.3);
}

.jdvd-btn--secondary:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.55);
  transform: translateY(-1px);
}

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

.jdvd-btn--ghost:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.06);
}

.jdvd-btn--sm {
  font-size: var(--font-size-xs);
  padding: 8px 16px;
}

.jdvd-btn--lg {
  font-size: var(--font-size-base);
  padding: 16px 32px;
}

.jdvd-btn--full {
  width: 100%;
}

/* --- Chips / Tags --- */
.jdvd-chip {
  display: inline-flex;
  align-items: center;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: var(--font-size-xs);
  font-weight: 600;
  background: var(--surface-subtle);
  color: var(--text-secondary);
  transition: all var(--transition-fast);
  letter-spacing: 0.01em;
}

.jdvd-chip--accent {
  background: var(--accent-18);
  color: var(--accent-mint);
}

/* --- Section --- */
.jdvd-section {
  padding: var(--space-9) 0;
}

.jdvd-section__header {
  text-align: center;
  margin-bottom: var(--space-7);
}

.jdvd-section__label {
  display: inline-block;
  font-size: var(--font-size-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--accent-mint);
  margin-bottom: var(--space-3);
  background: var(--accent-08);
  padding: 6px 16px;
  border-radius: var(--radius-full);
}

.jdvd-section__subtitle {
  color: var(--text-secondary);
  font-size: var(--font-size-lg);
  margin-top: var(--space-3);
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
}

/* --- Divider --- */
.jdvd-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border), transparent);
  margin: var(--space-7) 0;
}

/* --- Visually hidden --- */
.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;
}
