/* ── NMR Strategic Writing: Shared Styles ── */
@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,300..600;1,9..144,300..600&family=DM+Sans:wght@300;400;500&display=swap');

:root {
  --charcoal:          #474747;
  --charcoal-soft:     #5c5c5c;
  --teal:              #558a86;
  --teal-light:        #6ba8a4;
  --terracotta:        #a63e14;
  --terracotta-light:  #c25520;
  --blush:             #e8d8d0;
  --blush-light:       #f4f2ec;
  --blush-mid:         #d4c9c0;
  --cream:             #f4f2ec;
  --text-dark:         #1a1a1a;
  --text-mid:          #474747;
  --text-soft:         #7a7470;
  --border:            #ddd8d0;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; font-optical-sizing: auto; }
html { scroll-behavior: smooth; overflow-x: hidden; }
body {
  background: var(--cream);
  color: var(--text-dark);
  font-family: 'DM Sans', sans-serif;
  font-weight: 300;
  line-height: 1.7;
  overflow-x: hidden;
}
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.022;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 180px;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* NAV */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 200;
  padding: 1.6rem 5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(244, 242, 236, 0.93);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  animation: fadeIn 0.8s ease both;
}
.nav-logo {
  font-family: 'Fraunces', serif;
  font-weight: 500;
  font-size: 1.2rem;
  color: var(--charcoal);
  letter-spacing: 0.06em;
  text-decoration: none;
  line-height: 1;
  flex-shrink: 0;
}
.nav-logo span { color: var(--terracotta); }
.nav-links {
  display: flex;
  gap: 2.75rem;
  list-style: none;
  align-items: center;
}
.nav-links a {
  font-size: 0.72rem;
  font-weight: 400;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--text-mid);
  text-decoration: none;
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--charcoal); }
.nav-links a.active { color: var(--terracotta); border-bottom: 1.5px solid var(--terracotta); padding-bottom: 2px; }
.nav-cta {
  color: var(--charcoal) !important;
}
.nav-cta:hover { color: var(--terracotta) !important; }

.nav-secondary-item { display: none; }
.nav-secondary-toggle-wrap { position: relative; display: flex; align-items: center; }
.nav-secondary-toggle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.4rem;
}
.nav-secondary-toggle span {
  display: block;
  width: 18px;
  height: 1.5px;
  background: var(--charcoal);
  transition: background 0.2s;
}
.nav-secondary-toggle.is-open span { background: var(--terracotta); }
.nav-secondary-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 0.85rem;
  background: #fff;
  border: 1px solid var(--border);
  box-shadow: 0 12px 24px rgba(0,0,0,0.08);
  padding: 1rem 1.5rem;
  flex-direction: column;
  gap: 0.85rem;
  min-width: 160px;
  z-index: 210;
}
.nav-secondary-dropdown.is-open { display: flex; }
.nav-secondary-dropdown a {
  font-size: 0.72rem;
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-mid);
  text-decoration: none;
  transition: color 0.2s;
}
.nav-secondary-dropdown a:hover { color: var(--terracotta); }

.nav-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}
.nav-hamburger span {
  display: block;
  width: 22px;
  height: 1.5px;
  background: var(--charcoal);
}

/* PAGE HERO (inner pages) */
.page-hero {
  padding: 10rem 5.5rem 6rem;
  background: var(--charcoal);
  position: relative;
  overflow: hidden;
  animation: fadeIn 0.9s ease both;
}
.page-hero::before {
  content: '';
  position: absolute;
  bottom: -80px; right: -80px;
  width: 400px; height: 400px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(85,138,134,0.12) 0%, transparent 65%);
  pointer-events: none;
}
.page-hero::after {
  content: '';
  position: absolute;
  top: -60px; left: -60px;
  width: 300px; height: 300px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(166,62,20,0.1) 0%, transparent 65%);
  pointer-events: none;
}
.page-eyebrow {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.68rem;
  font-weight: 400;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--teal-light);
  margin-bottom: 1.75rem;
}
.page-eyebrow span {
  display: block;
  width: 28px; height: 1px;
  background: var(--teal-light);
}
.page-title {
  font-family: 'Fraunces', serif;
  font-size: clamp(2.8rem, 5vw, 5rem);
  font-weight: 300;
  line-height: 1.1;
  color: #fff;
  letter-spacing: -0.015em;
  max-width: 700px;
}
.page-title em {
  font-style: italic;
  font-weight: 350;
  color: var(--blush);
}
.page-sub {
  margin-top: 1.75rem;
  font-size: 1rem;
  font-weight: 300;
  color: rgba(255,255,255,0.6);
  line-height: 1.85;
  max-width: 520px;
}

/* SECTION HELPERS */
.s-eyebrow {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.65rem;
  font-weight: 400;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 1.5rem;
}
.s-eyebrow i {
  display: block;
  width: 26px; height: 1px;
  background: var(--teal);
  font-style: normal;
}
.s-title {
  font-family: 'Fraunces', serif;
  font-size: clamp(2rem, 3vw, 3rem);
  font-weight: 350;
  line-height: 1.18;
  color: var(--charcoal);
  letter-spacing: -0.01em;
}
.s-title em { font-style: italic; font-weight: 300; }

/* BUTTONS */
.btn-primary {
  display: inline-block;
  background: var(--charcoal);
  color: #fff;
  padding: 1rem 2.4rem;
  font-size: 0.72rem;
  font-weight: 400;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  text-decoration: none;
  position: relative;
  overflow: hidden;
  transition: color 0.3s;
}
.btn-primary::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--terracotta);
  transform: translateX(-101%);
  transition: transform 0.38s cubic-bezier(.77,0,.18,1);
}
.btn-primary:hover::after { transform: translateX(0); }
.btn-primary-text { position: relative; z-index: 1; }

.btn-teal {
  display: inline-block;
  background: var(--teal);
  color: #fff;
  padding: 1rem 2.4rem;
  font-size: 0.72rem;
  font-weight: 400;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  text-decoration: none;
  transition: background 0.3s;
}
.btn-teal:hover { background: var(--teal-light); }

.btn-text {
  font-size: 0.72rem;
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-mid);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  transition: color 0.2s;
}
.btn-text::after { content: '→'; transition: transform 0.2s; }
.btn-text:hover { color: var(--charcoal); }
.btn-text:hover::after { transform: translateX(5px); }

/* FOOTER */
footer {
  background: #1a1a1a;
  padding: 2.75rem 5.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.25rem;
}
.footer-logo {
  font-family: 'Fraunces', serif;
  font-size: 1.1rem;
  font-weight: 500;
  color: rgba(255,255,255,0.6);
  letter-spacing: 0.06em;
  text-decoration: none;
}
.footer-logo span { color: var(--terracotta); }
.footer-links {
  display: flex;
  gap: 2rem;
  list-style: none;
}
.footer-links a {
  font-size: 0.67rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.3);
  text-decoration: none;
  transition: color 0.2s;
}
.footer-links a:hover { color: rgba(255,255,255,0.65); }
.footer-copy {
  font-size: 0.67rem;
  color: rgba(255,255,255,0.2);
  letter-spacing: 0.06em;
}

@media (max-width: 900px) {
  nav { padding: 1.4rem 1.25rem; }
  .nav-logo { font-size: 1.05rem; }
  .nav-links { gap: 1.5rem; }
  .page-hero { padding: 8rem 2rem 4rem; }
  footer { padding: 2.5rem 2rem; flex-direction: column; align-items: flex-start; }
  .footer-links { flex-wrap: wrap; gap: 0.85rem 1.5rem; }
}

/* LEGAL PAGE CONTENT (Privacy Policy, Terms & Conditions) */
.legal-content {
  max-width: 760px;
  margin: 0 auto;
  padding: clamp(3.5rem, 7vw, 5.5rem) clamp(2rem, 5vw, 5.5rem);
}
.legal-updated {
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-soft);
  margin-bottom: 3rem;
}
.legal-content h2 {
  font-family: 'Fraunces', serif;
  font-size: 1.4rem;
  font-weight: 500;
  color: var(--charcoal);
  margin: 2.75rem 0 1rem;
}
.legal-content h2:first-of-type { margin-top: 0; }
.legal-content p {
  font-size: 0.95rem;
  font-weight: 300;
  color: var(--text-mid);
  line-height: 1.85;
  margin-bottom: 1.1rem;
}
.legal-content ul {
  margin: 0 0 1.1rem 1.25rem;
}
.legal-content li {
  font-size: 0.95rem;
  font-weight: 300;
  color: var(--text-mid);
  line-height: 1.85;
  margin-bottom: 0.5rem;
}
.legal-content a {
  color: var(--teal);
  text-decoration: none;
  border-bottom: 1px solid var(--teal);
}
.legal-content a:hover { color: var(--terracotta); border-bottom-color: var(--terracotta); }
.legal-content strong { color: var(--text-dark); font-weight: 500; }
.legal-note {
  background: var(--blush-light);
  border: 1px solid var(--blush-mid);
  padding: 1.25rem 1.5rem;
  font-size: 0.85rem;
  font-weight: 300;
  color: var(--text-mid);
  line-height: 1.75;
  margin-bottom: 2.5rem;
}



/* NMR LOGO in nav */
.nav-logo-svg {
  height: 26px;
  width: auto;
  max-width: 180px;
  display: block;
  object-fit: contain;
}

/* ── MOBILE NAV, matches index.html / about.html / what-i-write.html / 404.html ── */
@media (max-width: 960px) {
  nav {
    padding: 1.4rem 2rem;
  }
  .nav-hamburger {
    display: flex;
  }
  .nav-secondary-item { display: block; }
  .nav-secondary-toggle-wrap { display: none; }
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--cream);
    flex-direction: column;
    align-items: flex-start;
    gap: 1.5rem;
    padding: 1.5rem 2rem 2rem;
    border-bottom: 1px solid var(--border);
    box-shadow: 0 12px 24px rgba(0,0,0,0.08);
    z-index: 199;
  }
  .nav-links.is-open {
    display: flex;
  }
  .nav-links a {
    font-size: 1rem;
  }
}

/* COOKIE CONSENT BANNER */
.cookie-banner {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 500;
  background: #1a1a1a;
  padding: 0.9rem 1.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  flex-wrap: wrap;
  font-family: 'DM Sans', sans-serif;
  box-shadow: 0 -4px 20px rgba(0,0,0,0.15);
  transform: translateY(100%);
  transition: transform 0.4s ease;
}
.cookie-banner.is-visible { transform: translateY(0); }
.cookie-banner p {
  margin: 0;
  max-width: 560px;
  font-size: 0.78rem;
  line-height: 1.6;
  color: rgba(255,255,255,0.72);
}
.cookie-banner a {
  color: rgba(255,255,255,0.95);
  text-decoration: underline;
}
.cookie-banner-actions { display: flex; gap: 0.75rem; flex-shrink: 0; }
.cookie-btn {
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.5rem 1.1rem;
  cursor: pointer;
  border: none;
  font-family: 'DM Sans', sans-serif;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.cookie-btn-accept { background: #558a86; color: #fff; }
.cookie-btn-accept:hover { background: #6ba8a4; }
.cookie-btn-reject {
  background: transparent;
  color: rgba(255,255,255,0.55);
  border: 1px solid rgba(255,255,255,0.25);
}
.cookie-btn-reject:hover { color: #fff; border-color: rgba(255,255,255,0.5); }
@media (max-width: 700px) {
  .cookie-banner { padding: 0.85rem 1.25rem; justify-content: flex-start; text-align: left; }
  .cookie-banner p { max-width: 100%; }
}
