@import url('https://fonts.googleapis.com/css2?family=Archivo:wght@500;700;800;900&family=Public+Sans:wght@400;500;600;700&family=IBM+Plex+Mono:wght@400;500;600&display=swap');

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: #FAF8F3;
  color: #16212C;
  font-family: 'Public Sans', sans-serif;
}
a { color: #CC6A34; text-decoration: none; }
a:hover { color: #16212C; }
input, textarea { font-family: 'Public Sans', sans-serif; }
input::placeholder, textarea::placeholder { color: #8A8578; }
img { max-width: 100%; }

.wrap { max-width: 1280px; margin: 0 auto; }
.mono { font-family: 'IBM Plex Mono', monospace; }
.eyebrow {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #CC6A34;
  margin-bottom: 20px;
}
.eyebrow::after {
  content: '';
  display: block;
  width: 28px;
  height: 2px;
  background: #CC6A34;
  margin-top: 10px;
}
h1, h2, h3 { font-family: 'Archivo', sans-serif; margin: 0; }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: #FAF8F3;
  border-bottom: 1px solid rgba(22,33,44,0.14);
}
.site-header-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 16px 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.brand { display: flex; align-items: center; text-decoration: none; }
.brand img { height: 38px; width: auto; object-fit: contain; display: block; }
.nav-row { display: flex; gap: 26px; flex-wrap: wrap; align-items: center; }
.nav-row a {
  font-family: 'IBM Plex Mono', monospace !important;
  font-size: 13px !important;
  letter-spacing: 0.08em !important;
  text-transform: uppercase !important;
  color: #16212C;
  padding-bottom: 4px;
  border-bottom: 2px solid transparent;
}
.nav-row a:hover { color: #CC6A34; }
.nav-row a.active { color: #CC6A34; border-bottom: 2px solid #CC6A34; }
.hamburger { display: none; flex-direction: column; gap: 5px; cursor: pointer; padding: 12px; }
.hamburger span { width: 26px; height: 2px; background: #16212C; display: block; }
.mobile-nav { display: none; flex-direction: column; padding: 8px 20px 20px 20px; border-top: 1px solid rgba(22,33,44,0.1); }
.mobile-nav a {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 15px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #16212C;
  padding: 14px 4px;
}
.mobile-nav a.active { color: #CC6A34; }
.mobile-nav.open { display: flex; }

@media (max-width: 767px) {
  .nav-row { display: none; }
  .hamburger { display: flex; }
}

/* Footer */
.site-footer { background: #182530; padding: 64px 40px 32px 40px; }
.footer-inner { max-width: 1280px; margin: 0 auto; }
.footer-top { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 40px; margin-bottom: 48px; align-items: flex-start; }
.footer-logo img { height: 120px; object-fit: contain; filter: brightness(0) invert(1); opacity: 0.92; }
.footer-links { display: flex; gap: 48px; flex-wrap: wrap; }
.footer-col { display: flex; flex-direction: column; gap: 10px; }
.footer-col a {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #B9C0C7;
}
.footer-col a:hover { color: #FAF8F3; }
.footer-bottom { border-top: 1px solid rgba(250,248,243,0.12); padding-top: 24px; font-size: 13px; color: #8A9199; text-align: center; }

.btn {
  display: inline-block;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 16px 28px;
  cursor: pointer;
  border: none;
}
.btn-primary { background: #CC6A34; color: #FAF8F3; }
.btn-dark { background: #16212C; color: #FAF8F3; }
.btn-dark:hover { color: #CC6A34; }
.btn-outline { background: transparent; color: #16212C; border: 1px solid rgba(22,33,44,0.3); }

.card { border: 1px solid rgba(22,33,44,0.14); padding: 32px; }
.card h3 { font-weight: 800; font-size: 20px; margin-bottom: 12px; }
.card p { font-size: 15px; line-height: 1.6; color: #3A4652; margin: 0; }

.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
@media (max-width: 1099px) { .grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 767px) { .grid-3 { grid-template-columns: 1fr; gap: 20px; } }

.two-col { display: grid; grid-template-columns: 340px 1fr; gap: 64px; align-items: center; }
@media (max-width: 899px) { .two-col { grid-template-columns: 1fr; } }

.contact-form { display: flex; flex-direction: column; gap: 16px; max-width: 480px; }
.contact-form input, .contact-form textarea {
  padding: 14px 16px;
  border: 1px solid rgba(22,33,44,0.2);
  background: #FAF8F3;
  font-size: 15px;
}
.contact-form textarea { resize: vertical; }

.social-link {
  width: 40px; height: 40px;
  border: 1px solid rgba(22,33,44,0.2);
  display: flex; align-items: center; justify-content: center;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  color: #16212C;
}
.gallery-item { transition: opacity 0.2s ease; }
.gallery-item:hover { opacity: 0.85; }
#lightbox.open { display: flex !important; }
#lightbox-prev:hover, #lightbox-next:hover, #lightbox-close:hover { color: #FAF8F3; }


/* Responsive layout fixes */
@media (min-width: 768px) and (max-width: 1099px) {
  .hero-grid { grid-template-columns: 1fr 280px !important; gap: 28px !important; padding: 0 40px !important; }
  .hero-grid > div:first-child { margin-top: 0 !important; }
  .hero-photo { margin-top: 0 !important; }
  .hero-photo img { max-width: 240px !important; }
  .hero-banner h1 { font-size: clamp(30px, 4.4vw, 42px) !important; }
}
@media (max-width: 1099px) {
  .footer-logo { display: none !important; }
  .footer-top { flex-direction: column !important; align-items: center !important; justify-items: center !important; text-align: center !important; margin-bottom: 24px !important; }
  .footer-links { flex-direction: column !important; align-items: center !important; justify-content: center !important; width: 100% !important; gap: 20px !important; }
  .footer-col { align-items: center !important; gap: 8px !important; }
  .photo-gallery { grid-template-columns: repeat(3, 1fr) !important; }
  .sec-pad { padding-top: 80px !important; padding-bottom: 80px !important; }
  .contact-form input, .contact-form textarea, .formkit-input { font-size: 16px !important; }
  .grid-3 { align-items: start !important; }
}
@media (max-width: 900px) {
  .contact-grid { justify-items: stretch !important; }
  .contact-grid > div { width: 100% !important; }
  .img-text-grid, .about-grid, .contact-grid, .book-row-grid {
    grid-template-columns: 1fr !important;
    justify-items: center !important;
  }
  .img-text-grid img, .book-row-grid img {
    max-width: 280px !important;
    margin: 0 auto !important;
  }
  .img-text-grid > div:first-child { margin-top: 0 !important; padding-top: 0 !important; }
  .img-text-grid > div:last-child { padding-top: 0 !important; }
  .book-row-grid > div { padding-top: 0 !important; }
  .about-grid { gap: 32px !important; }
  .about-grid img {
    position: static !important;
    height: 380px !important;
    top: auto !important;
    margin-top: 0 !important;
    order: -1;
    max-width: 100% !important;
  }
  .contact-grid { gap: 40px !important; }
  .photo-gallery { grid-template-columns: repeat(3, 1fr) !important; }
  .footer-top { text-align: center !important; justify-items: center !important; margin-bottom: 24px !important; }
  .footer-top > div { display: flex !important; flex-direction: column !important; align-items: center !important; }
  .footer-logo { display: none !important; }
  .footer-links { flex-direction: column !important; align-items: center !important; justify-content: center !important; width: 100% !important; gap: 20px !important; }
  .footer-col { align-items: center !important; gap: 8px !important; }
  .site-footer { padding: 40px 40px 32px 40px !important; }
  .book-row-grid > div { text-align: center !important; }
  .book-row-grid > div > * { margin-left: auto !important; margin-right: auto !important; }
  .img-text-grid > div { text-align: center !important; }
  .img-text-grid > div > * { margin-left: auto !important; margin-right: auto !important; }
  .img-text-grid > div > div { justify-content: center !important; }
}
@media (max-width: 650px) {
  .photo-gallery { grid-template-columns: repeat(2, 1fr) !important; }
  .photo-gallery img { height: 160px !important; }
  .book-row-grid img { max-width: 220px !important; }
}
@media (min-width: 768px) and (max-width: 1099px) {
  .training-hero-grid { grid-template-columns: 1fr 280px !important; gap: 28px !important; }
}
@media (max-width: 767px) {
  .training-hero-grid { grid-template-columns: 1fr !important; }
  .training-hero-grid > div:last-child { height: 260px !important; margin-top: 24px !important; }
  .contact-form button, .formkit-submit { width: 100%; }
}
@media (max-width: 767px) {
  .video-grid { grid-template-columns: 1fr !important; }
  .video-grid a[style*="width:60%"] { width: 100% !important; }
  .card p { font-size: 16px !important; }
  .hero-grid { grid-template-columns: 1fr !important; gap: 0 !important; padding: 0 20px !important; }
  .hero-grid > div:first-child { margin-top: 0 !important; }
  .hero-banner h1 { font-size: clamp(28px, 9vw, 36px) !important; margin-bottom: 24px !important; }
  .hero-banner p { margin-bottom: 24px !important; }
  .hero-photo { margin-top: 32px !important; display: flex !important; justify-content: center !important; }
  .hero-photo img {
    max-width: 78% !important;
    width: auto !important;
    height: 34vh !important;
    max-height: 280px !important;
    -webkit-mask-image: linear-gradient(to bottom, transparent 0%, black 14%, black 76%, transparent 100%) !important;
    mask-image: linear-gradient(to bottom, transparent 0%, black 14%, black 76%, transparent 100%) !important;
  }
  .btn-row { flex-direction: column !important; align-items: stretch !important; }
  .btn-row .btn { width: 100% !important; text-align: center !important; }
}
@media (max-width: 600px) {
  .sec-pad { padding-left: 20px !important; padding-right: 20px !important; }
  .wrap, .site-header-inner { padding-left: 20px !important; padding-right: 20px !important; }
}
@media (max-width: 700px) {
  .sec-pad { padding-top: 64px !important; padding-bottom: 64px !important; }
}
@media (max-width: 380px) {
  .brand img { height: 48px !important; }
  .brand span { font-size: 16px !important; }
}

/* Hero mobile reorder: eyebrow -> h1 -> p -> photo -> button, no overlap */
@media (max-width: 767px) {
  .hero-grid > div:first-child { display: contents !important; }
  .hero-grid .eyebrow { order: 1; }
  .hero-grid h1 { order: 2; }
  .hero-grid p { order: 3; }
  .hero-photo { order: 4; margin-top: 32px !important; margin-bottom: 32px !important; }
  .hero-grid .btn-primary { order: 5; width: 100%; text-align: center; box-sizing: border-box; }
  .hero-photo img {
    max-width: 78% !important;
    width: 78% !important;
    height: auto !important;
    max-height: none !important;
    -webkit-mask-image: none !important;
    mask-image: none !important;
  }
}

/* Book rows: tight, cohesive grouping, no clipping */
@media (max-width: 1023px) {
  .book-row-grid { gap: 28px !important; }
  .book-row-grid img { max-width: 240px !important; }
}
@media (max-width: 767px) {
  .book-row-grid { margin-bottom: 12px; }
}

/* Dark CTA section mobile */
@media (max-width: 767px) {
  .cta-dark { padding: 56px 24px !important; }
  .cta-dark h2 { font-size: clamp(24px, 6.5vw, 30px) !important; line-height: 1.3 !important; }
}

/* Fix: center eyebrow underline when parent text is centered (mobile/tablet only) */
@media (max-width: 1099px) {
  .book-row-grid > div .eyebrow,
  .img-text-grid > div .eyebrow {
    text-align: center !important;
  }
  .book-row-grid > div .eyebrow::after,
  .img-text-grid > div .eyebrow::after {
    margin-left: auto !important;
    margin-right: auto !important;
  }
}

/* Fix: reduce excessive top space above hero eyebrow on mobile */
@media (max-width: 767px) {
  .hero-banner { padding-top: 28px !important; }
}
