/* ============================================================
   NOAH & DANI WEDDING WEBSITE — Shared Styles
   Colors are driven by CSS custom properties set by main.js
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,500;1,300;1,400&family=DM+Sans:wght@300;400;500&display=swap');

/* ---- CSS Variables (overridden by JS based on color preset) ---- */
:root {
  --bar1:      #7B8E8E;
  --bar2:      #F2EDE4;
  --bar3:      #B89A72;
  --primary:   #7B8E8E;
  --accent:    #B89A72;
  --bg:        #FAF8F4;
  --text:      #2C2C2C;
  --text-light:#6B6B6B;
  --white:     #ffffff;
  --nav-height: 60px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 16px;
  line-height: 1.7;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

footer { margin-top: auto; }

/* ---- NAVIGATION ---- */
nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--white);
  border-bottom: 1px solid rgba(0,0,0,0.08);
  height: var(--nav-height);
  display: flex;
  align-items: center;
  justify-content: center;
}

.nav-inner {
  display: flex;
  align-items: center;
  gap: 2rem;
  padding: 0 2rem;
  width: 100%;
  max-width: 900px;
  justify-content: center;
  position: relative;
}

.nav-logo {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.1rem;
  font-weight: 400;
  color: var(--text);
  position: absolute;
  left: 1.5rem;
  text-decoration: none;
  letter-spacing: 0.05em;
  white-space: nowrap;
  z-index: 1;
}

.nav-links {
  display: flex;
  gap: 1.5rem;
  list-style: none;
  flex-wrap: wrap;
  justify-content: center;
}

.nav-links a {
  text-decoration: none;
  color: var(--text-light);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  transition: color 0.2s;
}

.nav-links a:hover,
.nav-links a.active { color: var(--primary); }

/* Mobile hamburger */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  position: absolute;
  right: 1.5rem;
  top: 50%;
  transform: translateY(-50%);
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  margin: 5px 0;
  transition: 0.3s;
}

/* ---- HERO BARS (inner pages — injected by JS) ---- */
.hero-bars {
  display: flex;
  height: 130px;
  overflow: hidden;
  flex-shrink: 0;
}
.hero-bars .bar-1 { flex: 0 0 25%; background: var(--bar1); position: relative; overflow: hidden; }
.hero-bars .bar-2 { flex: 1;       background: var(--bar2); position: relative; overflow: hidden; display: flex; align-items: center; justify-content: center; }
.hero-bars .bar-3 { flex: 0 0 25%; background: var(--bar3); position: relative; overflow: hidden; }

.bar-title { text-align: center; color: white; padding: 0 1rem; width: 100%; }
.bar-title h1 {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 300;
  font-size: 2.4rem;
  letter-spacing: 0.05em;
  line-height: 1.1;
  margin: 0;
}
.bar-title p {
  font-size: 0.75rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  opacity: 0.85;
  margin-top: 0.3rem;
}

/* ---- PAGE HEADER (for inner pages) ---- */
.page-header {
  background: var(--bg);
  color: var(--text);
  text-align: center;
  padding: 2.5rem 2rem 2rem;
  border-bottom: 1px solid rgba(0,0,0,0.06);
}
.page-header h1 {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 300;
  font-size: 2.8rem;
  letter-spacing: 0.05em;
  margin-bottom: 0.4rem;
  color: var(--primary);
}
.page-header p {
  font-size: 0.85rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-light);
}

/* ---- CONTENT CONTAINER ---- */
.container {
  max-width: 780px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* ---- SECTIONS ---- */
section {
  padding: 3.5rem 0;
}

section + section {
  border-top: 1px solid rgba(0,0,0,0.07);
}

.section-title {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 400;
  font-size: 1.9rem;
  margin-bottom: 0.5rem;
  color: var(--primary);
}

.section-subtitle {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--text-light);
  margin-bottom: 1.5rem;
}

/* ---- BUTTONS ---- */
.btn {
  display: inline-block;
  padding: 0.75rem 2.5rem;
  border: 1.5px solid var(--primary);
  color: var(--primary);
  background: transparent;
  text-decoration: none;
  font-size: 0.8rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.2s;
  font-family: 'DM Sans', sans-serif;
}
.btn:hover {
  background: var(--primary);
  color: var(--white);
}
.btn-solid {
  background: var(--primary);
  color: var(--white);
}
.btn-solid:hover {
  background: var(--accent);
  border-color: var(--accent);
}

/* ---- CARDS / LIST ITEMS ---- */
.card {
  background: var(--white);
  border: 1px solid rgba(0,0,0,0.07);
  padding: 1.75rem 2rem;
  margin-bottom: 1rem;
}

.card h3 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.3rem;
  font-weight: 400;
  margin-bottom: 0.4rem;
  color: var(--primary);
}

/* ---- FOOTER ---- */
footer {
  background: var(--bar1);
  color: rgba(255,255,255,0.5);
  text-align: center;
  padding: 2rem;
  font-size: 0.8rem;
  letter-spacing: 0.05em;
}
footer a { color: rgba(255,255,255,0.7); }

/* ---- COLOR PICKER PANEL ---- */
#color-panel {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 200;
}

#color-toggle {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--primary);
  border: none;
  cursor: pointer;
  font-size: 1.1rem;
  color: white;
  box-shadow: 0 2px 12px rgba(0,0,0,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-left: auto;
}

#color-drawer {
  display: none;
  background: white;
  border: 1px solid rgba(0,0,0,0.1);
  border-radius: 8px;
  padding: 1.5rem;
  width: 280px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.15);
  margin-bottom: 0.75rem;
}

#color-drawer.open { display: block; }

#color-drawer h4 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.1rem;
  margin-bottom: 1rem;
  color: var(--text);
}

.preset-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}

.preset-swatch {
  border: none;
  cursor: pointer;
  border-radius: 4px;
  overflow: hidden;
  height: 36px;
  display: flex;
  flex-direction: column;
  transition: transform 0.15s;
  outline: 2px solid transparent;
}
.preset-swatch:hover { transform: scale(1.05); }
.preset-swatch.active { outline: 2px solid var(--text); }
.preset-swatch span {
  flex: 1;
  display: block;
}

.preset-label {
  display: block;
  text-align: center;
  font-size: 0.65rem;
  margin-top: 0.2rem;
  color: var(--text-light);
}

.custom-colors h5 {
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-light);
  margin-bottom: 0.75rem;
}

.color-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
  font-size: 0.82rem;
}

.color-row label { flex: 1; color: var(--text-light); }

.color-row input[type="color"] {
  width: 36px;
  height: 28px;
  border: 1px solid rgba(0,0,0,0.12);
  border-radius: 4px;
  cursor: pointer;
  padding: 2px;
  background: none;
}

.color-row input[type="text"] {
  width: 80px;
  border: 1px solid rgba(0,0,0,0.15);
  border-radius: 4px;
  padding: 0.2rem 0.4rem;
  font-size: 0.78rem;
  font-family: monospace;
}

.color-apply {
  width: 100%;
  margin-top: 0.75rem;
  padding: 0.6rem;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* ---- RESPONSIVE ---- */
@media (max-width: 768px) {
  .nav-toggle { display: block; }
  .nav-links {
    display: none;
    position: absolute;
    top: var(--nav-height);
    left: 0; right: 0;
    background: white;
    flex-direction: column;
    padding: 1rem 2rem;
    border-bottom: 1px solid rgba(0,0,0,0.08);
    gap: 1rem;
    text-align: center;
  }
  .nav-links.open { display: flex; }
  .nav-inner { position: relative; justify-content: flex-start; }

  .page-header h1 { font-size: 2rem; }
  .section-title { font-size: 1.5rem; }
  .container { padding: 0 1.25rem; }

  #color-panel { bottom: 1rem; right: 1rem; }
  #color-drawer { width: 260px; }

  /* Hero bars: hide subtitle on mobile so title fits */
  .bar-title p { display: none; }
}
