/*
Theme Name:  Weil Consulting
Theme URI:   https://weilconsulting.com
Author:      Nick Weil
Description: Custom theme for Weil Consulting — Privacy, Security & Digital Risk
Version:     1.0
License:     All Rights Reserved
Text Domain: weil-consulting
*/

/* ============================================================
   All Google Fonts are loaded via functions.php (wp_enqueue_style)
   so they are properly queued in the WordPress head.
   ============================================================ */

/* === CUSTOM PROPERTIES === */
:root {
  --navy:         #1c2b4a;
  --navy-deep:    #111d35;
  --gold:         #8b6f47;
  --gold-light:   #b5935e;
  --cream:        #e8e3d8;
  --cream-dark:   #dbd5c8;
  --cream-mid:    #d0c9ba;
  --white:        #faf9f6;
  --text:         #1a1a1a;
  --text-mid:     #363330;
  --text-light:   #6b6258;
  --rule:         #c8c0b2;

  --font-display: 'Cormorant Garamond', Garamond, 'Times New Roman', Georgia, serif;
  --font-serif:   'Source Serif 4', Georgia, 'Times New Roman', serif;
  --font-ui:      'Montserrat', system-ui, -apple-system, sans-serif;

  --max-width:    820px;
  --nav-height:   64px;
  --pad-x:        2rem;
  --section-gap:  4rem;
}

/* === RESET === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
  background: var(--cream);
  color: var(--text);
  font-family: var(--font-serif);
  font-size: 1.05rem;
  line-height: 1.78;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }

/* WordPress alignment helpers */
.alignleft  { float: left;  margin: 0 1.5rem 1rem 0; }
.alignright { float: right; margin: 0 0 1rem 1.5rem; }
.aligncenter { margin: 0 auto 1rem; display: block; }

/* === TYPOGRAPHY === */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 400;
  color: var(--navy);
  line-height: 1.15;
}
h1 { font-size: clamp(2.4rem, 5vw, 3.8rem); font-weight: 300; letter-spacing: 0.04em; }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); margin-bottom: 1.25rem; }
h3 { font-size: 1.35rem; margin-bottom: 0.6rem; }
h4 { font-size: 1.05rem; font-weight: 500; color: var(--text-mid); }
p  { margin-bottom: 1.2rem; }
p:last-child { margin-bottom: 0; }
ul, ol { padding-left: 1.5rem; margin-bottom: 1.2rem; }
li { margin-bottom: 0.35rem; }
strong { font-weight: 600; color: var(--text-mid); }

/* === LAYOUT === */
.page-section {
  padding: var(--section-gap) var(--pad-x);
  max-width: var(--max-width);
  margin: 0 auto;
}
.section-rule {
  border: none;
  border-top: 1px solid var(--rule);
  margin: var(--section-gap) 0 0;
}

/* === LABEL === */
.label {
  display: block;
  font-family: var(--font-ui);
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1rem;
}

/* === NAVIGATION === */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 200;
  background: var(--navy-deep);
  border-bottom: 2px solid var(--gold);
  height: var(--nav-height);
}
.nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--pad-x);
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-brand {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--white);
  text-decoration: none;
  flex-shrink: 0;
  transition: color 0.18s;
}
.nav-brand:hover { color: var(--gold-light); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 2.25rem;
  list-style: none;
  padding: 0;
  margin: 0;
}
.nav-links li { list-style: none; padding: 0; margin: 0; }

.nav-links > li > a,
.nav-links > li > button {
  font-family: var(--font-ui);
  font-size: 0.67rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.75);
  text-decoration: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  transition: color 0.18s;
  line-height: var(--nav-height);
}
.nav-links > li > a:hover,
.nav-links > li > button:hover { color: var(--gold-light); }
.nav-links > li > a.active { color: var(--white); border-bottom: 1px solid var(--gold); }

/* Dropdown chevron via CSS */
.nav-has-dropdown > button::after {
  content: '';
  display: inline-block;
  width: 0; height: 0;
  border-left: 3.5px solid transparent;
  border-right: 3.5px solid transparent;
  border-top: 4px solid currentColor;
  margin-left: 5px;
  vertical-align: middle;
  transition: transform 0.2s;
}
.nav-has-dropdown.open > button::after { transform: rotate(180deg); }

/* Dropdown — flush mount, no gap */
.nav-has-dropdown { position: relative; }
.nav-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  list-style: none;
  padding: 0;
  margin: 0;
  min-width: 240px;
  z-index: 300;
  background: var(--white);
  border: 1px solid var(--cream-mid);
  border-top: 2px solid var(--gold);
  box-shadow: 0 8px 28px rgba(0,0,0,0.18);
}
.nav-has-dropdown:hover > .nav-dropdown,
.nav-has-dropdown.open > .nav-dropdown { display: block; }
.nav-dropdown li { list-style: none; padding: 0; margin: 0; }
.nav-dropdown li a {
  display: block;
  font-family: var(--font-ui);
  font-size: 0.64rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-mid);
  text-decoration: none;
  padding: 0.7rem 1.5rem;
  transition: background 0.15s, color 0.15s;
  white-space: nowrap;
  line-height: 1;
}
.nav-dropdown li a:hover { background: var(--cream); color: var(--navy); }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.3rem;
  color: rgba(255,255,255,0.8);
}

/* === HERO === */
.hero {
  text-align: center;
  padding: 5.5rem var(--pad-x) 5rem;
  background: radial-gradient(ellipse at 50% 0%, #263760 0%, var(--navy-deep) 65%);
  border-bottom: 2px solid var(--gold);
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(
    -55deg, transparent, transparent 44px,
    rgba(255,255,255,0.018) 44px, rgba(255,255,255,0.018) 45px
  );
  pointer-events: none;
}
.hero-name {
  font-family: var(--font-display);
  font-size: clamp(2.8rem, 6vw, 5rem);
  font-weight: 300;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--white);
  margin-bottom: 0.6rem;
  line-height: 1;
  position: relative;
}
.hero-tagline {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  font-style: italic;
  color: rgba(255,255,255,0.6);
  font-weight: 300;
  position: relative;
}
.hero-rule {
  width: 2.5rem;
  height: 1px;
  background: var(--gold);
  border: none;
  margin: 2rem auto;
  opacity: 0.7;
  position: relative;
}
.hero-credentials {
  font-family: var(--font-ui);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold-light);
  position: relative;
}

/* === CALLOUT === */
.intro-block { border-bottom: 1px solid var(--rule); }
.callout {
  border-left: 3px solid var(--gold);
  background: var(--cream-dark);
  padding: 1.5rem 1.75rem;
  margin: 2.5rem 0;
}
.callout .label { margin-bottom: 0.6rem; }
.callout p { font-size: 0.97rem; margin-bottom: 0.5rem; }
.callout p:last-child { margin-bottom: 0; }

/* === SERVICES GRID === */
.services-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem 3rem;
  margin-top: 2.5rem;
}
.service-card { border-top: 2px solid var(--navy); padding-top: 1.25rem; }
.service-card h3 { font-size: 1.22rem; margin-bottom: 0.6rem; }
.service-card p { font-size: 0.92rem; color: var(--text-mid); margin-bottom: 0.9rem; }

.link-arrow {
  font-family: var(--font-ui);
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
  text-decoration: none;
  border-bottom: 1px solid var(--gold);
  padding-bottom: 0.1rem;
  transition: color 0.18s, border-color 0.18s;
}
.link-arrow:hover { color: var(--navy); border-color: var(--navy); }

/* === BOOKS BAND === */
.books-band {
  background: var(--navy-deep);
  padding: 3.5rem var(--pad-x);
  text-align: center;
  border-top: 1px solid rgba(255,255,255,0.08);
}
.books-band .label { color: var(--gold-light); }
.books-band h2 { color: var(--white); font-size: 1.7rem; font-weight: 300; margin-bottom: 0.75rem; }
.books-band p { color: rgba(255,255,255,0.55); font-size: 0.95rem; max-width: 500px; margin: 0 auto; }
.books-inner { max-width: var(--max-width); margin: 0 auto; }
.book-list { list-style: none; padding: 0; margin: 1.75rem 0 0; }
.book-list li { font-family: var(--font-serif); font-size: 0.95rem; color: rgba(255,255,255,0.75); margin-bottom: 0.6rem; font-style: italic; }
.book-list li span { font-style: normal; color: rgba(255,255,255,0.4); font-size: 0.85rem; }

/* === PAGE HEADER === */
.page-header {
  padding: 3.5rem var(--pad-x) 2.25rem;
  border-bottom: 1px solid var(--rule);
  max-width: var(--max-width);
  margin: 0 auto;
}
.page-header h1 { font-size: clamp(1.9rem, 4vw, 2.6rem); font-weight: 300; letter-spacing: 0.04em; }

/* === CREDENTIALS === */
.credentials-list { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 1.25rem; }
.credentials-list li {
  font-family: var(--font-ui);
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--navy);
  border: 1px solid var(--navy);
  padding: 0.3rem 0.75rem;
  margin: 0;
}

/* === TIMELINE === */
.timeline { list-style: none; padding: 0; margin: 0; }
.timeline li { display: grid; grid-template-columns: 6.5rem 1fr; gap: 1.5rem; padding: 1.25rem 0; border-bottom: 1px solid var(--rule); margin: 0; }
.timeline li:last-child { border-bottom: none; }
.timeline-date { font-family: var(--font-ui); font-size: 0.65rem; font-weight: 500; letter-spacing: 0.1em; color: var(--text-light); text-transform: uppercase; padding-top: 0.25rem; }
.timeline-org { font-family: var(--font-display); font-size: 1.1rem; font-weight: 500; color: var(--navy); margin-bottom: 0.15rem; }
.timeline-role { font-size: 0.88rem; color: var(--text-light); font-style: italic; margin: 0; }

/* === PHOTO PLACEHOLDER === */
.photo-placeholder {
  width: 175px; height: 215px;
  background: var(--cream-dark);
  border: 1px solid var(--rule);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 2rem;
}
.photo-placeholder span { font-family: var(--font-ui); font-size: 0.6rem; letter-spacing: 0.15em; text-transform: uppercase; color: var(--text-light); text-align: center; padding: 1rem; }

/* === PUBLICATIONS === */
.pub-list { list-style: none; padding: 0; margin: 0; }
.pub-list li { padding: 1.1rem 0; border-bottom: 1px solid var(--rule); font-size: 0.97rem; margin: 0; }
.pub-list li:last-child { border-bottom: none; }
.pub-title { font-family: var(--font-display); font-style: italic; font-size: 1.05rem; color: var(--navy); }
.pub-meta { font-size: 0.82rem; color: var(--text-light); display: block; margin-top: 0.2rem; }
.pub-featured { background: var(--cream-dark); padding: 1.5rem; border-left: 3px solid var(--navy); margin-bottom: 1.25rem; }
.pub-featured .pub-title { font-size: 1.2rem; }
.pub-featured .pub-meta { margin-top: 0.4rem; }

/* === SPEAKING === */
.speaking-list { list-style: none; padding: 0; margin: 0; }
.speaking-list li { padding: 0.9rem 0; border-bottom: 1px solid var(--rule); font-size: 0.95rem; margin: 0; }
.speaking-list li:last-child { border-bottom: none; }
.speaking-org { font-weight: 600; color: var(--text-mid); font-size: 0.84rem; font-family: var(--font-ui); letter-spacing: 0.04em; }

/* === SERVICE PAGES === */
.service-lead { font-size: 1.08rem; color: var(--text-mid); line-height: 1.82; margin-bottom: 2rem; font-style: italic; }
.service-offerings { list-style: none; padding: 0; margin: 0; }
.service-offerings li { padding: 1.25rem 0; border-bottom: 1px solid var(--rule); margin: 0; }
.service-offerings li:last-child { border-bottom: none; }
.offering-title { display: block; font-family: var(--font-display); font-size: 1.12rem; font-weight: 500; color: var(--navy); margin-bottom: 0.4rem; }
.offering-desc { font-size: 0.94rem; color: var(--text-mid); margin: 0; }

/* === CONTACT === */
.contact-block { display: grid; grid-template-columns: 1fr 1.6fr; gap: 4rem; margin-top: 2rem; }
.contact-info dt { font-family: var(--font-ui); font-size: 0.6rem; font-weight: 600; letter-spacing: 0.22em; text-transform: uppercase; color: var(--gold); margin-top: 1.5rem; margin-bottom: 0.25rem; }
.contact-info dt:first-child { margin-top: 0; }
.contact-info dd { font-size: 1rem; color: var(--text); margin: 0; }
.contact-info dd a { color: var(--navy); text-decoration: none; border-bottom: 1px solid var(--rule); transition: border-color 0.18s, color 0.18s; }
.contact-info dd a:hover { border-color: var(--gold); color: var(--gold); }

/* Contact form */
.contact-form { margin-top: 0; }
.form-row { margin-bottom: 1.25rem; }
.form-row label { display: block; font-family: var(--font-ui); font-size: 0.6rem; font-weight: 600; letter-spacing: 0.22em; text-transform: uppercase; color: var(--gold); margin-bottom: 0.4rem; }
.form-row input,
.form-row select,
.form-row textarea {
  width: 100%;
  font-family: var(--font-serif);
  font-size: 0.95rem;
  color: var(--text);
  background: var(--white);
  border: 1px solid var(--rule);
  padding: 0.65rem 0.85rem;
  appearance: none; -webkit-appearance: none;
  border-radius: 0;
  outline: none;
  transition: border-color 0.18s;
}
.form-row input:focus,
.form-row select:focus,
.form-row textarea:focus { border-color: var(--navy); }
.form-row textarea { resize: vertical; min-height: 130px; }
.form-submit {
  font-family: var(--font-ui);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--white);
  background: var(--navy);
  border: none;
  padding: 0.85rem 2rem;
  cursor: pointer;
  transition: background 0.18s;
}
.form-submit:hover { background: var(--navy-deep); }
.form-note { font-size: 0.8rem; color: var(--text-light); margin-top: 0.75rem; font-style: italic; }
.form-success { background: var(--cream-dark); border-left: 3px solid var(--gold); padding: 1.25rem 1.5rem; margin-bottom: 1.5rem; font-size: 0.95rem; }
.form-error { background: #fdf0f0; border-left: 3px solid #b04040; padding: 1.25rem 1.5rem; margin-bottom: 1.5rem; font-size: 0.95rem; }

/* === FOOTER === */
.site-footer {
  background: var(--navy-deep);
  text-align: center;
  padding: 2.75rem var(--pad-x);
  border-top: 2px solid var(--gold);
}
.footer-inner { max-width: var(--max-width); margin: 0 auto; }
.footer-name { font-family: var(--font-display); font-size: 1.1rem; color: rgba(255,255,255,0.9); margin-bottom: 0.2rem; font-weight: 500; letter-spacing: 0.06em; }
.footer-principal { font-family: var(--font-ui); font-size: 0.62rem; letter-spacing: 0.18em; text-transform: uppercase; color: rgba(255,255,255,0.4); margin-bottom: 0.3rem; }
.footer-tagline { font-size: 0.82rem; color: rgba(255,255,255,0.35); letter-spacing: 0.08em; margin-bottom: 0.25rem; font-style: italic; }
.footer-location { font-size: 0.75rem; color: rgba(255,255,255,0.3); margin-bottom: 1.25rem; }
.footer-nav { display: flex; justify-content: center; flex-wrap: wrap; gap: 1.5rem 2rem; list-style: none; padding: 0; margin-bottom: 1.5rem; }
.footer-nav li { list-style: none; margin: 0; }
.footer-nav a { font-family: var(--font-ui); font-size: 0.59rem; letter-spacing: 0.18em; text-transform: uppercase; color: rgba(255,255,255,0.38); text-decoration: none; transition: color 0.18s; }
.footer-nav a:hover { color: var(--gold-light); }
.footer-copy { font-size: 0.7rem; color: rgba(255,255,255,0.22); margin: 0; }

/* === RESPONSIVE === */
@media (max-width: 680px) {
  :root { --pad-x: 1.25rem; }

  .site-nav {
    height: auto;
    min-height: var(--nav-height);
    overflow: visible;
  }

  .nav-inner {
    height: auto;
    min-height: var(--nav-height);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    overflow: visible;
  }

  .nav-toggle {
    display: block;
  }

  .nav-links {
    display: none;
    flex-direction: column;
    flex-basis: 100%;
    width: 100%;
    gap: 0;
    background: var(--navy-deep);
    padding: 0.75rem 0 1rem;
    margin: 0;
    border-top: 1px solid rgba(255,255,255,0.1);
    list-style: none;
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links > li {
    width: 100%;
  }

  .nav-links > li > a,
  .nav-links > li > button {
    line-height: 1;
    padding: 0.7rem var(--pad-x);
    width: 100%;
    justify-content: flex-start;
    text-align: left;
  }

  .nav-has-dropdown {
    position: static;
  }

  .nav-has-dropdown .nav-dropdown {
    position: static;
    left: auto;
    top: auto;
    transform: none;
    box-shadow: none;
    border: none;
    border-left: 2px solid var(--gold);
    background: rgba(0,0,0,0.15);
    display: none;
    margin: 0 0 0 var(--pad-x);
    min-width: 0;
    width: calc(100% - var(--pad-x));
  }

  .nav-has-dropdown.open .nav-dropdown {
    display: block;
  }

  .nav-dropdown li a {
    color: rgba(255,255,255,0.7);
    padding: 0.55rem 1rem;
    white-space: normal;
  }

  .nav-dropdown li a:hover {
    background: rgba(255,255,255,0.05);
    color: var(--gold-light);
  }

  .services-grid { grid-template-columns: 1fr; }
  .contact-block { grid-template-columns: 1fr; gap: 2rem; }
  .timeline li { grid-template-columns: 1fr; gap: 0.25rem; }
  .footer-nav { gap: 1rem; }
}
