/* ==========================================================================
   Culinary Advisors clone -- shared stylesheet
   Real computed values sourced from docs/content-catalog.md "Sitewide
   chrome" section (colors, fonts, hover rules) -- not guessed.
   ========================================================================== */

:root {
  --navy: #2d425c;      /* primary text/nav color, computed live */
  --tan: #ad8b67;       /* hover accent, computed live */
  --white: #ffffff;
  --black: #000000;     /* live body <p> computed color */
  --banner-bg-url: url("https://culinaryadvisors.com/wp-content/uploads/2023/10/CA-WebsiteBanner-AllPages.jpg");
  --font-rubik: "Rubik", Arial, Helvetica, sans-serif;
  --font-josefin: "Josefin Sans", Georgia, serif;
  --nav-breakpoint: 992px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--black);
  font-family: var(--font-josefin);
  font-weight: 300;
  font-size: 16px;
  line-height: 1.6;
  background: #fff;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--navy); text-decoration: none; }
a:hover { color: var(--navy); text-decoration: none; }
ul { margin: 0; padding: 0; list-style: none; }
p { margin: 0 0 1.2em; }
h1, h2, h3 { font-family: var(--font-josefin); font-weight: 700; color: var(--black); margin: 0 0 0.6em; }
h1 { font-size: 2.1rem; }
h2 { font-size: 1.6rem; }
h3 { font-size: 1.2rem; }
.container { max-width: 1140px; margin: 0 auto; padding: 0 24px; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* -------------------------------------------------------------------- */
/* Buttons -- live stylesheet has two competing .x-btn:hover rules; the
   inline Cornerstone <style id="cs-inline-css"> block loads AFTER the
   theme's integrity-light.css in DOM order, so at equal specificity the
   tan/white variant wins the cascade on the live site (confirmed by
   inspecting document.styleSheets order directly against culinaryadvisors.com/contact/,
   not just assumed) -- replicated here as the sole rule. */
.btn, button, input[type="submit"], .x-btn {
  display: inline-block;
  font-family: var(--font-rubik);
  font-weight: 300;
  font-size: 16px;
  color: var(--navy);
  background-color: var(--white);
  border: 2px solid var(--navy);
  border-radius: 2px;
  padding: 0.75em 1.75em;
  cursor: pointer;
  transition: color 0.15s ease, background-color 0.15s ease, border-color 0.15s ease;
}
.btn:hover, button:hover, input[type="submit"]:hover, .x-btn:hover {
  color: var(--tan);
  border-color: var(--tan);
  background-color: var(--white);
  text-shadow: rgba(0, 0, 0, 0.5) 0 0.075em 0.075em;
}

/* -------------------------------------------------------------------- */
/* Header */
.site-header { position: relative; background: transparent; color: var(--black); }
.header-inner { position: relative; }

.nav-desktop {
  display: none;
  align-items: center;
  justify-content: space-between;
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px 24px;
}
.nav-side { display: flex; align-items: center; gap: 36px; }
.nav-side > li { position: relative; }
.nav-side > li > a {
  font-family: var(--font-josefin);
  font-weight: 400;
  font-size: 16px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--navy);
  padding: 6px 2px;
}
.nav-side > li > a:hover { color: var(--tan); text-decoration: none; }
.logo img { width: 120px; height: auto; }

.has-submenu { position: relative; }
.has-submenu .submenu {
  position: absolute;
  top: 100%; left: 50%;
  transform: translateX(-50%);
  min-width: 240px;
  background: var(--white);
  box-shadow: 0 10px 30px rgba(0,0,0,0.12);
  padding: 10px 0;
  opacity: 0;
  visibility: hidden;
  transform: translateX(-50%) translateY(6px);
  transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s ease;
  z-index: 40;
}
.has-submenu:hover .submenu,
.has-submenu:focus-within .submenu {
  opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0);
}
.has-submenu .submenu li a {
  display: block;
  padding: 8px 22px;
  font-family: var(--font-rubik);
  font-weight: 300;
  font-size: 14px;
  white-space: nowrap;
  color: var(--navy);
}
.has-submenu .submenu li a:hover { color: var(--tan); }

.nav-mobile-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
}
.nav-mobile-bar .logo-mobile img { width: 96px; }
.hamburger {
  width: 40px; height: 34px;
  background: transparent; border: 0; cursor: pointer;
  display: flex; flex-direction: column; justify-content: space-between;
  padding: 4px;
}
.hamburger span { display: block; height: 3px; width: 100%; background: var(--navy); border-radius: 2px; transition: transform 0.2s ease, opacity 0.2s ease; }
.hamburger[aria-expanded="true"] span:nth-child(1) { transform: translateY(13px) rotate(45deg); }
.hamburger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.hamburger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-13px) rotate(-45deg); }

.mobile-nav-backdrop {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.4);
  opacity: 0; visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
  z-index: 90;
}
.mobile-nav-backdrop.is-open { opacity: 1; visibility: visible; }

.mobile-nav-panel {
  position: fixed; top: 0; right: 0; bottom: 0;
  width: min(320px, 86vw);
  background: var(--white);
  box-shadow: -8px 0 30px rgba(0,0,0,0.2);
  transform: translateX(100%);
  /* visibility:hidden while closed removes the panel's links from the tab
     order, matching live's own closed-panel behavior -- delayed so the
     slide-out transition still plays before the panel actually hides. */
  visibility: hidden;
  transition: transform 0.28s ease, visibility 0s linear 0.28s;
  z-index: 100;
  overflow-y: auto;
  padding: 60px 0 40px;
}
.mobile-nav-panel.is-open {
  transform: translateX(0);
  visibility: visible;
  transition: transform 0.28s ease, visibility 0s linear 0s;
}
.mobile-nav-close {
  position: absolute; top: 14px; right: 16px;
  background: none; border: 0; font-size: 30px; line-height: 1; cursor: pointer; color: var(--navy);
}
.mobile-nav-viewport { position: relative; }
.mobile-nav-list > li > a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 28px;
  font-family: var(--font-rubik);
  font-weight: 300;
  font-size: 16px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--navy);
  border-bottom: 1px solid #eee;
}
.mobile-nav-arrow {
  flex: 0 0 auto;
  font-size: 18px;
  line-height: 1;
  color: var(--navy);
}

/* Drill-down layer: matches live's real mobile-nav mechanism (verified by
   inspecting culinaryadvisors.com's own DOM/computed styles) -- tapping
   "About"/"Portfolio" does not expand an in-place accordion, it swaps the
   whole top-level list for a sibling layer with a "Back" control plus
   that item's sub-links. Live achieves the visual swap by covering the
   (still-technically-visible) old layer with an absolutely positioned
   sibling inside an overflow:hidden, animated-height wrapper; this clone
   reproduces the same user-visible behavior more simply with a plain
   display:none toggle driven by site.js, which the task only requires to
   match behavior/structure, not the exact technique. */
#mobile-nav-list.is-hidden { display: none; }
.mobile-nav-submenu { display: none; }
.mobile-nav-submenu.is-open { display: block; }
.mobile-nav-back {
  display: block;
  width: 100%;
  text-align: left;
  background: none;
  border: 0;
  padding: 14px 28px;
  font-family: var(--font-rubik);
  font-weight: 300;
  font-size: 16px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--navy);
  border-bottom: 1px solid #eee;
  cursor: pointer;
}
.mobile-nav-back:hover { color: var(--tan); }
.mobile-nav-submenu .submenu li a {
  display: block;
  padding: 14px 28px;
  font-family: var(--font-rubik);
  font-weight: 300;
  font-size: 16px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--navy);
  border-bottom: 1px solid #eee;
}
.mobile-nav-submenu .submenu li a:hover { color: var(--tan); }

@media (min-width: 992px) {
  .nav-desktop { display: flex; }
  .nav-mobile-bar, .mobile-nav-panel, .mobile-nav-backdrop { display: none; }
}

/* -------------------------------------------------------------------- */
/* Footer */
.site-footer { background: var(--white); color: var(--black); border-top: 1px solid #eee; margin-top: 60px; }
.footer-inner {
  max-width: 1140px; margin: 0 auto; padding: 40px 24px;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px;
  font-family: var(--font-rubik); font-weight: 300;
}
.footer-social { display: flex; gap: 16px; order: 1; }
.social-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 50%;
  border: 1px solid var(--navy); color: var(--navy);
}
.social-icon:hover { color: var(--tan); border-color: var(--tan); }
/* Facebook icon carries hide-classes at every breakpoint on the live site
   -- preserved as effectively hidden here, matching live behavior. */
.footer-social-hidden { display: none !important; }

.footer-nav ul { display: flex; flex-wrap: wrap; gap: 20px; order: 2; }
.footer-nav a { font-size: 15px; color: var(--navy); }
.footer-nav a:hover { color: var(--tan); }

.footer-contact { display: flex; flex-direction: column; gap: 4px; font-size: 14px; order: 3; }
.footer-contact a { color: var(--navy); }
.footer-contact a:hover { color: var(--tan); }

@media (max-width: 700px) {
  .footer-inner { flex-direction: column; align-items: flex-start; }
}

/* -------------------------------------------------------------------- */
/* Page banner (shared all-pages background used on interior pages) */
.page-banner {
  background: var(--banner-bg-url) center/cover no-repeat;
  padding: 70px 0 40px;
  color: var(--white);
}
.page-banner-inner { max-width: 1140px; margin: 0 auto; padding: 0 24px; }
.page-banner h1 { color: var(--white); margin: 0; }

main { display: block; }
.section { padding: 50px 0; }
.section .container > h2:first-child { margin-top: 0; }
.section-alt { background: #f7f5f2; }

/* -------------------------------------------------------------------- */
/* Home: hero carousel */
.hero-carousel {
  position: relative;
  width: 100%;
  aspect-ratio: 2000 / 900;
  max-height: 640px;
  overflow: hidden;
  background: #ddd;
}
.hero-slide {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
  opacity: 0; transition: opacity 0.9s ease;
}
.hero-slide.is-active { opacity: 1; }
.hero-nav-btn {
  position: absolute; top: 50%; transform: translateY(-50%);
  background: rgba(255,255,255,0.85); border: 0; width: 44px; height: 44px; border-radius: 50%;
  font-size: 20px; cursor: pointer; color: var(--navy); z-index: 5;
}
.hero-nav-btn:hover { background: var(--white); color: var(--tan); }
.hero-prev { left: 16px; }
.hero-next { right: 16px; }
.hero-dots { position: absolute; bottom: 16px; left: 50%; transform: translateX(-50%); display: flex; gap: 8px; z-index: 5; }
.hero-dot { width: 10px; height: 10px; border-radius: 50%; background: rgba(255,255,255,0.6); border: 0; padding: 0; cursor: pointer; }
.hero-dot.is-active { background: var(--white); }

.intro-text { font-family: var(--font-josefin); font-weight: 300; font-size: 1.6rem; line-height: 1.5; max-width: 900px; margin: 40px auto; text-align: center; padding: 0 24px; }

/* Portfolio category tile strip (home + hub) */
.tile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 22px;
}
.tile {
  display: block;
  position: relative;
  border-radius: 4px;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background: #eee;
  color: var(--white);
}
.tile img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.35s ease; }
.tile:hover img { transform: scale(1.06); }
.tile-label {
  position: absolute; inset: auto 0 0 0;
  padding: 14px 16px;
  background: linear-gradient(to top, rgba(0,0,0,0.65), transparent);
  font-family: var(--font-rubik);
  font-weight: 300;
  font-size: 17px;
  color: var(--white);
}
.tile:hover .tile-label { color: var(--tan); }

/* What we do / differentiator tiles */
.wwd-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 30px; text-align: center; }
.wwd-item img { width: 64px; height: 64px; object-fit: contain; margin: 0 auto 14px; }
.wwd-item h2 { font-size: 1.1rem; }

.diff-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 30px; }
.diff-item h3 { color: var(--navy); }

/* Instagram feed */
.insta-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
.insta-item { position: relative; aspect-ratio: 1; overflow: hidden; cursor: pointer; border: 0; padding: 0; background: #eee; }
.insta-item img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s ease; }
.insta-item:hover img { transform: scale(1.08); }
.insta-overlay {
  position: absolute; inset: 0;
  background: rgba(45,66,92,0.55);
  color: var(--white);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-rubik); font-size: 14px;
  opacity: 0; transition: opacity 0.2s ease;
}
.insta-item:hover .insta-overlay { opacity: 1; }

.insta-lightbox {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(0,0,0,0.85);
  display: none; align-items: center; justify-content: center; padding: 24px;
}
.insta-lightbox.is-open { display: flex; }
.insta-lightbox-inner { max-width: 640px; width: 100%; background: var(--white); border-radius: 4px; overflow: hidden; position: relative; }
.insta-lightbox-inner img { width: 100%; }
.insta-lightbox-caption { padding: 16px 20px; font-size: 14px; max-height: 30vh; overflow-y: auto; }
.insta-lightbox-close {
  position: absolute; top: 10px; right: 10px;
  background: rgba(255,255,255,0.9); border: 0; border-radius: 50%;
  width: 36px; height: 36px; font-size: 20px; cursor: pointer; color: var(--navy);
}

/* -------------------------------------------------------------------- */
/* About: team grid */
.team-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 34px; }
.team-card { text-align: center; }
.team-card img { border-radius: 4px; margin: 0 auto 14px; aspect-ratio: 4/5; object-fit: cover; }
.team-card h2 { font-size: 1rem; margin-bottom: 4px; }
.team-card .team-contact { font-family: var(--font-rubik); font-size: 14px; margin-bottom: 10px; }
.team-card .team-contact a { display: block; color: var(--navy); }
.team-card .bio-btn img { width: 140px; margin: 0 auto; }
.team-grid.emeritus .team-card h2 { font-size: 0.95rem; }

.values-list, .principles-list { display: flex; flex-wrap: wrap; gap: 12px 28px; padding: 0; }
.values-list li, .principles-list li {
  font-family: var(--font-rubik);
  background: #f7f5f2;
  padding: 8px 18px;
  border-radius: 20px;
  font-size: 15px;
  color: var(--navy);
}

.photo-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 24px; }
.photo-grid figure { margin: 0; }
.photo-grid img { border-radius: 4px; aspect-ratio: 4/3; object-fit: cover; }
.photo-grid figcaption { font-size: 14px; margin-top: 8px; color: #333; }

.press-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 20px; }
.press-grid a { display: block; border-radius: 4px; overflow: hidden; }
.press-grid img { aspect-ratio: 16/10; object-fit: cover; transition: transform 0.3s ease; }
.press-grid a:hover img { transform: scale(1.05); }

/* -------------------------------------------------------------------- */
/* Services list */
.services-list { columns: 2; column-gap: 40px; }
.services-list li { font-family: var(--font-rubik); padding: 8px 0; border-bottom: 1px solid #eee; break-inside: avoid; }
@media (max-width: 700px) { .services-list { columns: 1; } }

/* -------------------------------------------------------------------- */
/* Portfolio category pages */
.featured-project { padding: 30px 0; border-top: 1px solid #eee; }
.featured-project:first-of-type { border-top: 0; }
.featured-project .subheading { font-family: var(--font-rubik); color: var(--navy); font-size: 1.05rem; margin: -8px 0 16px; }
.featured-project .project-images { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 18px; margin-top: 20px; }
.featured-project .project-images figure { margin: 0; }
.featured-project .project-images img { border-radius: 4px; aspect-ratio: 4/3; object-fit: cover; }
.featured-project .project-images figcaption { font-size: 13px; color: #555; margin-top: 6px; }

.experience-columns { columns: 2; column-gap: 40px; }
@media (max-width: 700px) { .experience-columns { columns: 1; } }

/* No break-inside:avoid on .experience-group itself: on live, a single
   long unlabeled list (e.g. Embassy's 34 items) genuinely splits across
   both columns mid-list, so the <ul> must stay freely breakable. Only
   keep a labeled group's heading glued to the start of its own list. */
.experience-group { margin-bottom: 24px; }
.experience-group h3 { color: var(--navy); font-family: var(--font-rubik); font-size: 1.05rem; break-after: avoid-column; }
.experience-group p { font-size: 15px; color: #333; }
.experience-list { margin: 0; padding-left: 20px; font-size: 15px; color: #333; }
.experience-list li { padding: 4px 0; break-inside: avoid; }

/* -------------------------------------------------------------------- */
/* Contact form */
.contact-form { max-width: 640px; }
.form-row { display: flex; gap: 20px; margin-bottom: 20px; flex-wrap: wrap; }
.form-field { flex: 1 1 220px; display: flex; flex-direction: column; }
.form-field label { font-family: var(--font-rubik); font-size: 14px; margin-bottom: 6px; color: var(--navy); }
.form-field .sub-label { font-weight: 300; font-size: 13px; color: #555; }
.form-field input, .form-field textarea {
  font-family: var(--font-josefin);
  font-size: 16px;
  padding: 10px 12px;
  border: 1px solid #ccc;
  border-radius: 3px;
}
.form-field textarea { min-height: 140px; resize: vertical; }
.form-field input:invalid, .form-field textarea:invalid { box-shadow: none; }
.contact-form .required-flag { color: #b04141; }
.contact-info { margin-bottom: 40px; }
.contact-info h2 { font-size: 1.1rem; }

/* -------------------------------------------------------------------- */
@media (max-width: 700px) {
  h1 { font-size: 1.7rem; }
  h2 { font-size: 1.35rem; }
  .intro-text { font-size: 1.25rem; }
}
