/* ============================================================
   LEVARIS — levaris.co
   Fractional CIO for Manufacturing Companies
   ============================================================ */

/* ── Reset & Base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --taupe: #CEC9BE;
  --taupe-light: #E8E4DD;
  --dark: #2C2C2C;
  --heading: #1A1A1A;
  --forest: #4A6741;
  --forest-dark: #3A5333;
  --bronze: #8B7355;
  --warm-gray: #6B6560;
  --white: #FFFFFF;
  --border: #C4BFB5;
  --shadow: rgba(0,0,0,0.08);
  --shadow-md: rgba(0,0,0,0.12);
  --transition: 0.3s ease;
  --max-width: 1100px;
  --max-width-narrow: 800px;
}

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: 'Inter', Arial, Helvetica, sans-serif;
  background-color: var(--taupe);
  color: var(--dark);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ── Typography ── */
h1, h2, h3, h4 {
  font-family: 'Playfair Display', Georgia, 'Times New Roman', serif;
  color: var(--heading);
  line-height: 1.2;
  font-weight: 700;
}

h1 { font-size: clamp(2rem, 5vw, 3.2rem); margin-bottom: 0.5em; }
h2 { font-size: clamp(1.5rem, 3.5vw, 2rem); margin-bottom: 0.4em; }
h3 { font-size: clamp(1.1rem, 2.5vw, 1.35rem); color: var(--forest-dark); margin-bottom: 0.3em; }

p { font-size: 1.125rem; margin-bottom: 1.2em; }
p:last-child { margin-bottom: 0; }

a { color: var(--forest); text-decoration: underline; text-underline-offset: 3px; transition: color var(--transition); }
a:hover { color: var(--forest-dark); }

strong { font-weight: 600; }

/* ── Skip Link ── */
.skip-link {
  position: absolute; top: -100px; left: 16px;
  background: var(--forest); color: var(--white);
  padding: 12px 20px; z-index: 10000;
  font-weight: 600; text-decoration: none; border-radius: 0 0 6px 6px;
}
.skip-link:focus { top: 0; }

/* ── Header / Navigation ── */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  background: rgba(206, 201, 190, 0.95);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  transition: box-shadow var(--transition);
}
.site-header.scrolled { box-shadow: 0 2px 20px var(--shadow-md); }

.header-inner {
  max-width: var(--max-width);
  margin: 0 auto; padding: 16px 24px;
  display: flex; align-items: center; justify-content: space-between;
}

.logo { text-decoration: none; display: flex; align-items: center; gap: 10px; }
.logo-img { height: 36px; width: auto; }
.logo-wordmark {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.35rem; font-weight: 700; color: var(--heading);
  letter-spacing: 0.06em; text-decoration: none;
}

.nav-links { display: flex; gap: 32px; list-style: none; align-items: center; }
.nav-links a {
  text-decoration: none; color: var(--dark); font-weight: 500;
  font-size: 0.95rem; letter-spacing: 0.02em;
  position: relative; padding-bottom: 4px;
  transition: color var(--transition);
}
.nav-links a::after {
  content: ''; position: absolute; bottom: 0; left: 0;
  width: 0; height: 2px; background: var(--forest);
  transition: width var(--transition);
}
.nav-links a:hover { color: var(--forest); }
.nav-links a:hover::after, .nav-links a.active::after { width: 100%; }
.nav-links a.active { color: var(--forest); }

/* Mobile menu toggle */
.menu-toggle {
  display: none; background: none; border: none; cursor: pointer;
  width: 32px; height: 24px; position: relative; z-index: 1001;
}
.menu-toggle span {
  display: block; width: 100%; height: 2px; background: var(--dark);
  position: absolute; left: 0; transition: all 0.3s ease;
}
.menu-toggle span:nth-child(1) { top: 0; }
.menu-toggle span:nth-child(2) { top: 50%; transform: translateY(-50%); }
.menu-toggle span:nth-child(3) { bottom: 0; }
.menu-toggle.open span:nth-child(1) { top: 50%; transform: translateY(-50%) rotate(45deg); }
.menu-toggle.open span:nth-child(2) { opacity: 0; }
.menu-toggle.open span:nth-child(3) { bottom: 50%; transform: translateY(50%) rotate(-45deg); }

/* ── Buttons ── */
.btn {
  display: inline-block; padding: 14px 32px;
  font-family: 'Inter', Arial, sans-serif; font-size: 1rem; font-weight: 600;
  text-decoration: none; border-radius: 4px; letter-spacing: 0.02em;
  transition: all var(--transition); cursor: pointer; border: none;
}
.btn-primary {
  background: var(--forest); color: var(--white);
}
.btn-primary:hover {
  background: var(--forest-dark); color: var(--white);
  box-shadow: 0 4px 16px rgba(74, 103, 65, 0.3);
  transform: translateY(-1px);
}
.btn-secondary {
  background: transparent; color: var(--forest);
  border: 2px solid var(--forest);
}
.btn-secondary:hover {
  background: var(--forest); color: var(--white);
}

/* ── Sections ── */
.section {
  padding: 80px 24px;
}
.section-alt { background: var(--taupe-light); }
.section-dark { background: var(--dark); color: var(--taupe); }
.section-dark h2, .section-dark h3 { color: var(--white); }
.section-dark p { color: var(--taupe); }

.container { max-width: var(--max-width); margin: 0 auto; }
.container-narrow { max-width: var(--max-width-narrow); margin: 0 auto; }

.section-label {
  font-family: 'Inter', Arial, sans-serif;
  font-size: 0.8rem; font-weight: 600; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--bronze);
  margin-bottom: 12px;
}

/* ── Hero ── */
.hero {
  padding: 160px 24px 100px;
  min-height: 80vh;
  display: flex; align-items: center;
}
.hero .container { max-width: var(--max-width); }
.hero h1 { font-size: clamp(2.2rem, 5.5vw, 3.5rem); max-width: 700px; }
.hero .subtitle {
  font-size: clamp(1.1rem, 2.5vw, 1.35rem);
  color: var(--forest-dark); font-weight: 500;
  margin-bottom: 1.5em; max-width: 600px;
}
.hero p { font-size: 1.15rem; max-width: 640px; margin-bottom: 1.5em; }
.hero-cta { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 2em; }

/* ── Stats Row ── */
.stats-row {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 32px; margin: 48px 0;
}
.stat { text-align: center; }
.stat-number {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 3rem; font-weight: 700; color: var(--forest);
  line-height: 1.1; display: block;
}
.stat-label {
  font-size: 0.9rem; color: var(--warm-gray);
  margin-top: 4px; line-height: 1.4;
}

/* ── Cards Grid ── */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 24px; margin: 32px 0; }
.card {
  background: var(--white); border-radius: 8px; padding: 32px;
  box-shadow: 0 1px 4px var(--shadow);
  transition: box-shadow var(--transition), transform var(--transition);
}
.card:hover { box-shadow: 0 4px 20px var(--shadow-md); transform: translateY(-2px); }
.card h3 { margin-bottom: 12px; }
.card .card-meta {
  font-size: 0.9rem; color: var(--warm-gray); font-style: italic;
  margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--border);
}

/* ── Testimonials ── */
.testimonials { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 24px; margin: 32px 0; }
.testimonial {
  border-left: 4px solid var(--forest);
  padding: 24px 24px 24px 28px;
  background: var(--white); border-radius: 0 8px 8px 0;
}
.testimonial blockquote {
  font-size: 1.05rem; font-style: italic; line-height: 1.7;
  margin-bottom: 12px;
}
.testimonial cite {
  font-style: normal; font-weight: 600; color: var(--bronze);
  font-size: 0.9rem; display: block;
}

/* ── Engagement List ── */
.engagement-list { list-style: none; margin: 24px 0; }
.engagement-list li {
  padding: 16px 0; border-bottom: 1px solid var(--border);
  display: flex; gap: 16px; align-items: flex-start;
}
.engagement-list li:last-child { border-bottom: none; }
.engagement-label {
  font-weight: 700; color: var(--forest-dark); width: 280px; flex-shrink: 0;
}

/* ── Bullet Lists ── */
.content-list { list-style: none; margin: 16px 0 24px; }
.content-list li {
  padding: 8px 0 8px 24px; position: relative;
  font-size: 1.05rem;
}
.content-list li::before {
  content: ''; position: absolute; left: 0; top: 18px;
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--forest); opacity: 0.6;
}

/* ── Steps ── */
.steps { counter-reset: step; margin: 32px 0; }
.step {
  display: flex; gap: 24px; margin-bottom: 32px;
  align-items: flex-start;
}
.step-number {
  counter-increment: step;
  flex-shrink: 0; width: 48px; height: 48px;
  background: var(--forest); color: var(--white);
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.2rem; font-weight: 700;
}
.step-number::before { content: counter(step); }
.step-content h3 { margin-bottom: 8px; }

/* ── Comparison ── */
.comparison {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 32px; margin: 32px 0;
}

/* ── CTA Banner ── */
.cta-banner {
  text-align: center; padding: 64px 24px;
  background: var(--taupe-light); border-radius: 12px;
  margin: 48px 0;
}
.cta-banner h2 { margin-bottom: 16px; }
.cta-banner p { max-width: 580px; margin: 0 auto 24px; }
.cta-contact {
  font-size: 0.95rem; color: var(--warm-gray); margin-top: 16px;
}
.cta-contact a { color: var(--forest); }

/* ── Footer ── */
.site-footer {
  background: var(--dark); color: var(--taupe);
  padding: 48px 24px 32px;
}
.footer-inner {
  max-width: var(--max-width); margin: 0 auto;
  display: flex; justify-content: space-between; align-items: flex-start;
  flex-wrap: wrap; gap: 32px;
}
.footer-brand .footer-logo { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; }
.footer-brand .logo-wordmark { color: var(--taupe); font-size: 1.2rem; }
.footer-brand .logo-img { height: 28px; filter: brightness(0) invert(0.8); }
.footer-brand p { font-size: 0.9rem; color: var(--warm-gray); margin-top: 8px; max-width: 320px; }
.footer-links { display: flex; gap: 48px; }
.footer-links-col h4 {
  font-family: 'Inter', Arial, sans-serif;
  font-size: 0.8rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--taupe); margin-bottom: 12px;
}
.footer-links-col a {
  display: block; color: var(--warm-gray); text-decoration: none;
  font-size: 0.9rem; padding: 4px 0; transition: color var(--transition);
}
.footer-links-col a:hover { color: var(--white); }
.footer-bottom {
  max-width: var(--max-width); margin: 32px auto 0;
  padding-top: 24px; border-top: 1px solid rgba(206,201,190,0.15);
  font-size: 0.85rem; color: var(--warm-gray);
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px;
}
.footer-bottom a { color: var(--warm-gray); text-decoration: none; }
.footer-bottom a:hover { color: var(--taupe); }

/* ── Divider ── */
.divider { width: 60px; height: 3px; background: var(--forest); margin: 24px 0; border-radius: 2px; }
.divider-center { margin-left: auto; margin-right: auto; }

/* ── Scroll Animations ── */
.fade-up {
  opacity: 0; transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.fade-up.visible { opacity: 1; transform: translateY(0); }

/* ── Form ── */
.contact-form { max-width: 560px; }
.form-group { margin-bottom: 20px; }
.form-group label {
  display: block; font-weight: 600; font-size: 0.9rem;
  margin-bottom: 6px; color: var(--dark);
}
.form-group input, .form-group textarea, .form-group select {
  width: 100%; padding: 12px 16px;
  border: 1px solid var(--border); border-radius: 4px;
  font-family: 'Inter', Arial, sans-serif; font-size: 1rem;
  color: var(--dark); background: var(--white);
  transition: border-color var(--transition);
}
.form-group input:focus, .form-group textarea:focus {
  border-color: var(--forest); outline: 2px solid var(--forest); outline-offset: 1px;
}
.form-group textarea { min-height: 140px; resize: vertical; }

/* ── About Intro + Headshot ── */
.about-intro {
  display: flex; gap: 40px; align-items: flex-start;
  margin-bottom: 32px;
}
.about-photo { flex-shrink: 0; }
.headshot {
  width: 220px; height: 280px; object-fit: cover;
  border-radius: 8px;
  box-shadow: 0 4px 20px var(--shadow-md);
}
.about-intro-text { flex: 1; }

/* ── Utility Classes ── */
.mt-sm { margin-top: 12px; }
.mt-md { margin-top: 24px; }
.mt-lg { margin-top: 32px; }
.mt-xl { margin-top: 40px; }
.text-center { text-align: center; }
.text-muted { color: var(--warm-gray); font-size: 0.95rem; }
.max-narrow { max-width: var(--max-width-narrow); margin-left: auto; margin-right: auto; }

/* ── Hero Variants ── */
.hero--short { min-height: 50vh; }
.hero--compact { min-height: 40vh; }

/* ── Contact Page Grid ── */
.contact-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 64px; align-items: start;
}
.contact-divider {
  margin-top: 40px; padding-top: 32px;
  border-top: 1px solid var(--border);
}
.calendar-placeholder {
  padding: 48px 32px; text-align: center;
  background: var(--white); border-radius: 8px;
}
.case-study-note {
  color: var(--warm-gray); font-size: 0.95rem; margin-bottom: 24px;
}

/* ── Google Calendar embed ── */
.calendar-embed {
  background: var(--white); border-radius: 8px; overflow: hidden;
  box-shadow: 0 1px 4px var(--shadow); margin-top: 32px;
}
.calendar-embed iframe { width: 100%; border: none; min-height: 600px; }

/* ── Accessibility ── */
*:focus { outline: 2px solid var(--forest); outline-offset: 3px; }
*:focus:not(:focus-visible) { outline: none; }
*:focus-visible { outline: 2px solid var(--forest); outline-offset: 3px; }

/* ── Responsive ── */
@media (max-width: 768px) {
  .hero { padding: 120px 20px 60px; min-height: auto; }
  .section { padding: 56px 20px; }
  .stats-row { grid-template-columns: repeat(2, 1fr); gap: 24px; }
  .stat-number { font-size: 2.2rem; }
  .cards { grid-template-columns: 1fr; }
  .testimonials { grid-template-columns: 1fr; }
  .comparison { grid-template-columns: 1fr; }
  .engagement-list li { flex-direction: column; gap: 4px; }
  .engagement-label { min-width: auto; }
  .step { gap: 16px; }
  .step-number { width: 40px; height: 40px; font-size: 1rem; }
  .footer-inner { flex-direction: column; }
  .footer-links { flex-direction: column; gap: 24px; }
  .footer-bottom { flex-direction: column; text-align: center; }
  .contact-grid { grid-template-columns: 1fr; gap: 40px; }
  .about-intro { flex-direction: column; align-items: center; text-align: center; }
  .about-intro .divider { margin-left: auto; margin-right: auto; }
  .headshot { width: 180px; height: 230px; }

  /* Mobile nav */
  .nav-links {
    position: fixed; top: 0; right: -100%; width: 280px; height: 100vh;
    background: var(--taupe); flex-direction: column;
    padding: 100px 32px 32px; gap: 24px;
    box-shadow: -4px 0 20px var(--shadow-md);
    transition: right 0.3s ease; z-index: 999;
  }
  .nav-links.open { right: 0; }
  .nav-links a { font-size: 1.1rem; }
  .menu-toggle { display: block; }
}

@media (max-width: 480px) {
  .hero h1 { font-size: 1.8rem; }
  p { font-size: 1rem; }
  .btn { width: 100%; text-align: center; }
  .hero-cta { flex-direction: column; }
  .stats-row { grid-template-columns: 1fr 1fr; }
}

/* ── Print ── */
@media print {
  body { background: #fff; color: #000; }
  .site-header, .site-footer, .btn, .menu-toggle { display: none; }
  .hero { padding-top: 20px; min-height: auto; }
  .section { padding: 20px 0; }
  a { color: #000; text-decoration: underline; }
}

/* ── Reduced Motion ── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
  html { scroll-behavior: auto; }
  .fade-up { opacity: 1; transform: none; }
}
