/* ==========================================================================
   Silver AI Consulting — Design System
   Clean, modern, scannable. Reference: morningside.ai / benai.co
   ========================================================================== */

/* --- CSS Custom Properties --- */
:root {
  --bg-cream: #f5f1ee;
  --bg-beige: #e8e2de;
  --bg-white: #feffff;
  --bg-dark: #493b35;

  --text-primary: #493b35;
  --text-secondary: #7a6b62;
  --text-on-dark: #feffff;
  --text-on-dark-muted: #d9d0c9;

  --accent: #f24b2e;
  --accent-hover: #d93e23;
  --accent-warm: #a58372;

  --border: #d9d0c9;
  --border-on-dark: rgba(165, 131, 114, 0.3);

  --shadow: rgba(73, 59, 53, 0.08);
  --shadow-lg: rgba(73, 59, 53, 0.12);

  --font-heading: 'Playfair Display', Georgia, serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --container-max: 1200px;
  --nav-height: 72px;
  --radius: 0;
  --radius-lg: 0;

  --section-padding: clamp(64px, 8vw, 120px);
}

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-padding-top: var(--nav-height);
  overflow-x: hidden;
}

body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text-primary);
  background-color: var(--bg-cream);
  overflow-x: hidden;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

ul {
  list-style: none;
}

::selection {
  background: rgba(242, 75, 46, 0.15);
  color: var(--text-primary);
}

/* --- Skip Link --- */
.skip-link {
  position: absolute;
  top: -100%;
  left: 16px;
  z-index: 9999;
  padding: 12px 24px;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  border-radius: 0;
  transition: top 0.2s;
}

.skip-link:focus {
  top: 0;
}

/* --- Layout --- */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 2rem;
}

.text-center {
  text-align: center;
  margin-left: auto;
  margin-right: auto;
}

/* --- Typography --- */
h1, h2 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.15;
  color: var(--text-primary);
}

h3 {
  font-family: var(--font-body);
  font-weight: 600;
  line-height: 1.3;
  color: var(--text-primary);
}

h1 {
  font-size: clamp(2.25rem, 5vw, 3.5rem);
  letter-spacing: -0.02em;
}

h2 {
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
  letter-spacing: -0.01em;
}

h3 {
  font-size: 1.125rem;
}

.section-headline {
  margin-bottom: 2rem;
  max-width: 700px;
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 1rem;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
  white-space: nowrap;
  text-decoration: none;
}

.btn:focus-visible {
  outline: 2px solid rgba(242, 75, 46, 0.4);
  outline-offset: 2px;
}

.btn-primary {
  background: var(--accent);
  color: var(--bg-white);
  padding: 0.75rem 1.5rem;
}

.btn-primary:hover {
  background: var(--accent-hover);
  transform: translate(-2px, -2px);
  box-shadow: 4px 4px 0 0 var(--text-primary);
}

.btn-primary:active {
  transform: translate(0, 0);
  box-shadow: none;
}

.btn-lg {
  padding: 1rem 2rem;
  font-size: 1.0625rem;
}

/* Text link */
.text-link {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: opacity 0.2s ease;
}

.text-link:hover {
  opacity: 0.8;
}

/* --- Navigation --- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10000;
  background: rgba(245, 241, 238, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.15s ease;
}

.site-header.scrolled {
  border-bottom-color: var(--border);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 2rem;
  height: var(--nav-height);
}

.nav-logo {
  display: flex;
  align-items: center;
}

.nav-logo-img {
  height: 48px;
  width: auto;
}

.nav-links {
  display: flex;
  gap: 2rem;
}

.nav-links a {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--text-primary);
  transition: color 0.15s ease;
}

.nav-links a:hover {
  color: var(--accent);
}

.nav-links a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
  border-radius: 2px;
}

.nav-cta {
  padding: 0.625rem 1.25rem;
  font-size: 0.875rem;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px;
}

.nav-toggle-bar {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: all 0.3s ease;
}

/* ==========================================================================
   SECTIONS
   ========================================================================== */

.section {
  padding: var(--section-padding) 0;
}

.section-cream {
  background-color: var(--bg-cream);
}

.section-beige {
  background-color: var(--bg-beige);
}

.section-white {
  background-color: var(--bg-white);
}

.section-dark {
  background-color: var(--bg-dark);
}

.section-dark .section-headline,
.section-dark h2 {
  color: var(--text-on-dark);
}

.section-dark p {
  color: var(--text-on-dark-muted);
}

/* ==========================================================================
   HERO
   ========================================================================== */

.hero {
  padding-top: calc(var(--nav-height) + clamp(4rem, 8vw, 8rem));
  padding-bottom: var(--section-padding);
  min-height: 80vh;
  display: flex;
  align-items: center;
  background-color: var(--bg-cream);
}

.hero-content {
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
}

.hero-headline {
  margin-bottom: 1.25rem;
  opacity: 0;
  transform: translateY(20px);
}

.hero-sub {
  font-size: clamp(1rem, 1.5vw, 1.1875rem);
  font-weight: 400;
  color: var(--text-secondary);
  max-width: 560px;
  margin: 0 auto 2rem;
  line-height: 1.6;
  opacity: 0;
  transform: translateY(20px);
}

.hero-ctas {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
  opacity: 0;
  transform: translateY(20px);
}

.hero-secondary-cta {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--text-primary);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: var(--border);
  transition: text-decoration-color 0.2s ease;
}

.hero-secondary-cta:hover {
  text-decoration-color: var(--text-primary);
}

.hero-secondary-cta:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
  border-radius: 2px;
}

/* ==========================================================================
   LOGO BAR
   ========================================================================== */

.logo-bar {
  padding: 2rem 0;
  background-color: var(--bg-cream);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.logo-bar-text {
  text-align: center;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  letter-spacing: 0.02em;
}

/* ==========================================================================
   FEATURED TESTIMONIAL
   ========================================================================== */

.featured-testimonial-section {
  padding: clamp(48px, 6vw, 80px) 0;
}

.featured-testimonial {
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
  background: var(--bg-cream);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: clamp(2rem, 4vw, 3rem);
  box-shadow: 6px 6px 0 0 var(--text-primary);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.featured-testimonial:hover {
  box-shadow: 8px 8px 0 0 var(--text-primary);
  transform: translate(-2px, -2px);
}

.featured-testimonial-quote {
  font-family: var(--font-heading);
  font-size: clamp(1.125rem, 2vw, 1.375rem);
  font-style: italic;
  line-height: 1.55;
  color: var(--text-primary);
  margin-bottom: 1.5rem;
}

.featured-testimonial .testimonial-author {
  justify-content: center;
}

/* ==========================================================================
   CARDS (shared)
   ========================================================================== */

.cards-grid {
  max-width: 960px;
  margin: 0 auto 3rem;
  display: grid;
  gap: 32px;
  grid-auto-rows: 1fr;
}

.cards-3 {
  grid-template-columns: repeat(3, 1fr);
}

.cards-2x2 {
  grid-template-columns: repeat(3, 1fr);
  max-width: 1200px;
}

.card {
  display: flex;
  flex-direction: column;
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: 6px 6px 0 0 var(--text-primary);
  transition: box-shadow 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}

.card:hover {
  box-shadow: 8px 8px 0 0 var(--text-primary);
  transform: translate(-2px, -2px);
  border-color: var(--accent-warm);
}

.card-title {
  margin-bottom: 0.5rem;
}

.card-body {
  flex: 1;
  font-size: 0.9375rem;
  color: var(--text-secondary);
  line-height: 1.55;
}

/* Bonus line below What We Do cards */
.bonus-line {
  text-align: center;
  max-width: 640px;
  margin: 1.5rem auto 0;
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.55;
}

/* ==========================================================================
   TESTIMONIALS
   ========================================================================== */

.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  max-width: 880px;
  margin: 0 auto;
}

.testimonial-card {
  background: var(--bg-cream);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 32px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: 6px 6px 0 0 var(--text-primary);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.testimonial-card:hover {
  box-shadow: 8px 8px 0 0 var(--text-primary);
  transform: translate(-2px, -2px);
}

.testimonial-quote {
  font-size: 1rem;
  font-style: italic;
  line-height: 1.6;
  color: var(--text-primary);
  margin-bottom: 1.25rem;
}

.testimonial-author {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.testimonial-img {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
}

.testimonial-name {
  display: block;
  font-style: normal;
  font-weight: 600;
  font-size: 0.9375rem;
  color: var(--text-primary);
}

.testimonial-role {
  display: block;
  font-size: 0.8125rem;
  color: var(--text-secondary);
  margin-top: 2px;
}

/* ==========================================================================
   OFFERS
   ========================================================================== */

.offer-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0;
  background: var(--accent-light);
  color: var(--accent);
  margin-bottom: 1rem;
}

.offer-card-flagship .offer-icon {
  background: var(--accent);
  color: #fff;
}

.offer-card-flagship {
  border-color: var(--accent);
  border-width: 2px;
}

.offers-cta-text {
  text-align: center;
  margin-top: 2rem;
  font-size: 0.9375rem;
  color: var(--text-secondary);
}

/* ==========================================================================
   GUARANTEE
   ========================================================================== */

.guarantee-block {
  max-width: 720px;
  margin: 0 auto;
  padding: 3rem;
  text-align: center;
  border: 2px solid var(--accent);
  border-radius: var(--radius-lg);
  background: var(--bg-cream);
  box-shadow: 6px 6px 0 0 var(--text-primary);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.guarantee-block:hover {
  box-shadow: 8px 8px 0 0 var(--text-primary);
  transform: translate(-2px, -2px);
}

.guarantee-headline {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: clamp(1.375rem, 2.5vw, 1.75rem);
  line-height: 1.3;
  color: var(--text-primary);
  margin: 0;
}

/* ==========================================================================
   ABOUT
   ========================================================================== */

.about-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: clamp(2rem, 4vw, 4rem);
  align-items: stretch;
  max-width: 880px;
  margin: 0 auto;
}

.about-text .section-headline {
  margin-bottom: 1.5rem;
}

.about-text p {
  font-size: 1rem;
  color: var(--text-primary);
  line-height: 1.65;
  max-width: 560px;
  margin-bottom: 1rem;
}

.about-text p:last-of-type {
  margin-bottom: 0;
}

.about-image-col {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
}

.about-headshot {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(100%) contrast(1.1);
}

.about-links {
  display: flex;
  gap: 1.25rem;
  margin-top: 1.25rem;
}

.about-links a {
  display: inline-flex;
  align-items: center;
  color: var(--text-primary);
  min-height: 44px;
  padding: 0.5rem 0;
  transition: color 0.2s ease, transform 0.2s ease;
}

.about-links a:hover {
  color: var(--accent);
  transform: scale(1.15);
}

/* ==========================================================================
   FINAL CTA
   ========================================================================== */

#book {
  padding: clamp(80px, 10vw, 140px) 0;
}

.final-cta-content {
  max-width: 640px;
  margin: 0 auto;
  text-align: center;
}

.final-cta-headline {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
  margin-bottom: 3.5rem;
}

.final-cta-sub {
  font-size: 1.0625rem;
  color: var(--text-on-dark-muted);
  margin-bottom: 2rem;
}

.final-cta-buttons {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.final-secondary-cta {
  color: var(--text-on-dark-muted);
  text-decoration-color: var(--border-on-dark);
}

.final-secondary-cta:hover {
  text-decoration-color: var(--text-on-dark-muted);
}

/* ==========================================================================
   FOOTER
   ========================================================================== */

.site-footer {
  background: var(--bg-dark);
  padding: 2.5rem 0;
}

.footer-grid {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.footer-col p {
  font-size: 0.875rem;
  color: var(--text-on-dark-muted);
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.footer-links a {
  display: inline-flex;
  align-items: center;
  color: var(--text-on-dark-muted);
  min-height: 44px;
  padding: 0.5rem;
  transition: color 0.2s ease, transform 0.2s ease;
}

.footer-links a:hover {
  color: var(--accent);
  transform: scale(1.15);
}

.footer-links a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
  border-radius: 2px;
}

.footer-divider {
  color: var(--border-on-dark);
  font-size: 0.875rem;
}

/* ==========================================================================
   MOBILE FLOATING CTA
   ========================================================================== */

.mobile-cta {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  padding: 0.75rem 1rem calc(0.75rem + env(safe-area-inset-bottom));
  background: rgba(245, 241, 238, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--border);
  display: none;
  transform: translateY(100%);
  transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.mobile-cta.visible {
  transform: translateY(0);
}

.mobile-cta-btn {
  width: 100%;
  text-align: center;
  min-height: 44px;
}

/* ==========================================================================
   RESPONSIVE — TABLET (768px - 1023px)
   ========================================================================== */

@media (max-width: 1023px) {
  .container {
    padding: 0 1.5rem;
  }

  .cards-3 {
    grid-template-columns: repeat(2, 1fr);
  }

  .cards-2x2 {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Let the flagship card span full width on its own row */
  .cards-2x2 .offer-card-flagship {
    grid-column: 1 / -1;
  }

  .testimonials-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .about-layout {
    grid-template-columns: 1fr;
  }

  .about-image-col {
    max-width: 240px;
  }

  .about-headshot {
    width: 100%;
  }
}

/* ==========================================================================
   RESPONSIVE — MOBILE (< 768px)
   ========================================================================== */

@media (max-width: 767px) {
  :root {
    --nav-height: 64px;
  }

  .container {
    padding: 0 1.25rem;
  }

  /* --- Mobile Nav --- */
  .nav-links {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    background: var(--bg-cream);
    z-index: 10001;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
  }

  .nav-links.open {
    opacity: 1;
    pointer-events: auto;
  }

  .nav-links a {
    font-size: 1.25rem;
    padding: 0.5rem 0;
  }

  .nav-toggle {
    display: flex;
    z-index: 10002;
  }

  .nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }

  .nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) {
    opacity: 0;
  }

  .nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }

  /* --- Hide nav CTA on mobile (floating CTA covers this) --- */
  .nav-cta {
    display: none;
  }

  /* --- Hero --- */
  .hero {
    min-height: auto;
    padding-top: calc(var(--nav-height) + 3rem);
    padding-bottom: clamp(48px, 6vw, 80px);
  }

  .hero-headline {
    margin-bottom: 1rem;
  }

  .hero-sub {
    margin-bottom: 2.5rem;
  }

  .hero-ctas {
    flex-direction: column;
    gap: 1rem;
  }

  .hero-ctas .btn-lg {
    width: 100%;
  }

  /* --- Section spacing (more breathing room) --- */
  .section-headline {
    margin-bottom: 2.5rem;
  }

  /* --- Cards --- */
  .cards-grid {
    gap: 20px;
    margin-bottom: 2rem;
  }

  .cards-3,
  .cards-2x2 {
    grid-template-columns: 1fr;
  }

  /* --- Testimonials --- */
  .testimonials-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  /* --- Featured testimonial --- */
  .featured-testimonial {
    padding: clamp(1.5rem, 4vw, 2.5rem);
  }

  .featured-testimonial-quote {
    margin-bottom: 1.75rem;
  }

  /* --- About --- */
  .about-layout {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .about-image-col {
    order: -1;
    max-width: 220px;
    margin: 0 auto;
    aspect-ratio: 1;
  }

  .about-headshot {
    width: 100%;
  }

  .about-text p {
    margin-bottom: 1.25rem;
  }

  /* --- Guarantee --- */
  .guarantee-block {
    padding: 2rem 1.5rem;
  }

  /* --- Final CTA --- */
  .final-cta-headline {
    margin-bottom: 2.5rem;
  }

  .final-cta-buttons .btn-lg {
    width: 100%;
  }

  /* --- Footer --- */
  .footer-grid {
    flex-direction: column;
    text-align: center;
    gap: 1rem;
  }

  .footer-links {
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.25rem 0.5rem;
  }

  .footer-divider {
    display: none;
  }

  /* --- Box shadows (reduce on mobile to prevent overflow) --- */
  .card,
  .testimonial-card,
  .featured-testimonial,
  .guarantee-block {
    box-shadow: 4px 4px 0 0 var(--text-primary);
  }

  .card:hover,
  .testimonial-card:hover,
  .featured-testimonial:hover,
  .guarantee-block:hover {
    box-shadow: 4px 4px 0 0 var(--text-primary);
    transform: none;
  }

  /* --- Hero secondary CTA tap target --- */
  .hero-secondary-cta {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
  }

  /* --- Mobile CTA --- */
  .mobile-cta {
    display: block;
  }

  body {
    padding-bottom: 72px;
  }
}

/* Small mobile (375px) */
@media (max-width: 480px) {
  h1 {
    font-size: 2rem;
  }

  h2 {
    font-size: 1.625rem;
  }

  .container {
    padding: 0 1rem;
  }

  .card {
    padding: 24px 20px;
  }

  .testimonial-card {
    padding: 24px 20px;
  }

  .nav-logo-img {
    height: 44px;
  }
}

/* ==========================================================================
   REDUCED MOTION
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .hero-headline,
  .hero-sub,
  .hero-ctas {
    opacity: 1;
    transform: none;
  }
}
