/* Makomkom Safaris - Mobile-first static styles */

:root {
  --bg: #fbf6ea; /* ivory sand */
  --surface: #fffaf0;
  --card: #ffffff;
  --text: #13212c; /* charcoal */
  --muted: #4f6170;
  --brand: #d7b66a; /* sand */
  --brand-2: #2aa198; /* delta water */
  --border: rgba(19, 33, 44, 0.14);
  --shadow: 0 12px 28px rgba(17, 24, 39, 0.12);

  --radius: 16px;
  --radius-sm: 12px;
  --container: 1120px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  color-scheme: light;
}

body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, "Noto Sans", "Liberation Sans", sans-serif;
  line-height: 1.6;
  color: var(--text);
  background:
    radial-gradient(1100px 520px at 8% 0%, rgba(215, 182, 106, 0.28), transparent 62%),
    radial-gradient(980px 480px at 92% 10%, rgba(42, 161, 152, 0.18), transparent 58%),
    linear-gradient(180deg, var(--bg), #f4ecd8 70%, #efe4ca);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* Accessibility */
.skip-link {
  position: absolute;
  left: -999px;
  top: 12px;
  z-index: 9999;
  padding: 10px 14px;
  border-radius: 999px;
  background: var(--brand);
  color: #1a1205;
  font-weight: 700;
}
.skip-link:focus {
  left: 12px;
  outline: 3px solid rgba(19, 33, 44, 0.28);
}

.container {
  width: min(var(--container), 100% - 32px);
  margin-inline: auto;
}

.muted {
  color: var(--muted);
}

.badge {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  padding: 6px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.70);
  font-size: 14px;
  color: var(--muted);
}
.badge strong {
  color: var(--text);
}

/* Header / Nav */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(10px);
  background: rgba(251, 246, 234, 0.78);
}

.header-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
}

.brand {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 10px;
}
img.brand-logo {
  height: 88px !important;
  width: auto !important;
  max-width: none;
  border-radius: 6px;
}
.brand-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.brand .name {
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 20px;
}
.brand .tagline {
  font-size: 15px;
  color: var(--muted);
}

.nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.78);
  color: var(--text);
}
.nav-toggle:focus-visible {
  outline: 3px solid rgba(215, 182, 106, 0.45);
  outline-offset: 2px;
}

.nav-toggle .bars {
  width: 18px;
  height: 14px;
  position: relative;
}
.nav-toggle .bars span {
  position: absolute;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 180ms ease, opacity 180ms ease, top 180ms ease;
}
.nav-toggle .bars span:nth-child(1) { top: 0; }
.nav-toggle .bars span:nth-child(2) { top: 6px; }
.nav-toggle .bars span:nth-child(3) { top: 12px; }

.nav {
  display: none;
  gap: 10px;
}

.nav a {
  display: inline-flex;
  align-items: center;
  padding: 10px 12px;
  border-radius: 999px;
  border: 1px solid transparent;
  color: var(--muted);
  font-weight: 600;
  font-size: 14px;
}
.nav a[aria-current="page"] {
  color: var(--text);
  border-color: rgba(215, 182, 106, 0.35);
  background: rgba(215, 182, 106, 0.10);
}
.nav a:focus-visible {
  outline: 3px solid rgba(215, 182, 106, 0.45);
  outline-offset: 2px;
}

.nav.is-open {
  display: flex;
  flex-direction: column;
  width: 100%;
  padding-bottom: 14px;
}

/* Mobile: full-width menu row below logo + hamburger (pages without body.nav-drawer) */
@media (max-width: 899px) {
  body:not(.nav-drawer) .nav.is-open {
    flex-basis: 100%;
    order: 3;
    align-items: stretch;
    padding-top: 12px;
    margin-top: 4px;
    border-top: 1px solid var(--border);
    box-sizing: border-box;
  }
  body:not(.nav-drawer) .nav.is-open a {
    width: 100%;
    justify-content: center;
    box-sizing: border-box;
  }
}

/* Mobile drawer + dim backdrop — enable with class on <body> (e.g. index only) */
@media (max-width: 899px) {
  body.nav-drawer .header-inner {
    flex-wrap: nowrap;
  }

  body.nav-drawer .nav-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 200;
    background: rgba(19, 33, 44, 0.48);
    backdrop-filter: blur(4px);
  }

  body.nav-drawer.nav-is-open .nav-backdrop {
    display: block;
  }

  body.nav-drawer.nav-is-open {
    overflow: hidden;
  }

  body.nav-drawer.nav-is-open .site-header {
    z-index: 210;
    /* Safari/WebKit: backdrop-filter on an ancestor breaks position:fixed for the drawer nav */
    backdrop-filter: none;
    overflow: visible;
  }

  body.nav-drawer .nav.is-open {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: auto;
    width: min(320px, 88vw) !important;
    max-width: none;
    height: 100vh;
    height: 100dvh;
    margin: 0;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 6px;
    z-index: 211;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    background: var(--surface);
    border: none;
    border-left: 1px solid var(--border);
    border-radius: 0;
    border-top: none;
    margin-top: 0;
    padding: calc(20px + env(safe-area-inset-top, 0px)) 16px 28px;
    flex-basis: auto;
    order: 0;
    box-shadow: -12px 0 40px rgba(19, 33, 44, 0.18);
    box-sizing: border-box;
    animation: nav-drawer-slide 220ms ease forwards;
  }

  body.nav-drawer .nav.is-open a {
    width: 100%;
    justify-content: center;
    box-sizing: border-box;
  }
}

@keyframes nav-drawer-slide {
  from {
    transform: translateX(100%);
    opacity: 0.96;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@media (max-width: 899px) and (prefers-reduced-motion: reduce) {
  body.nav-drawer .nav.is-open {
    animation: none;
    transform: none;
  }
}

@media (min-width: 900px) {
  body.nav-drawer .nav-backdrop {
    display: none !important;
  }
  body.nav-drawer.nav-is-open {
    overflow: visible;
  }
  body.nav-drawer.nav-is-open .site-header {
    z-index: 50;
  }
}

@media (min-width: 900px) {
  .nav-toggle {
    display: none;
  }
  .nav {
    display: flex;
    flex-direction: row;
    align-items: center;
  }
  .nav.is-open {
    display: flex;
    flex-direction: row;
    padding-bottom: 0;
    flex-basis: auto;
    width: auto;
    margin-top: 0;
    padding-top: 0;
    border-top: none;
    order: 0;
    align-items: center;
  }
  .nav.is-open a {
    width: auto;
    justify-content: center;
  }
}

/* Main */
main {
  padding: 28px 0 48px;
}

.hero {
  padding: 26px 0 8px;
}
.hero-inner {
  display: grid;
  gap: 18px;
}

.hero-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background:
    radial-gradient(900px 420px at 18% 0%, rgba(215, 182, 106, 0.22), transparent 62%),
    radial-gradient(720px 380px at 92% 30%, rgba(42, 161, 152, 0.16), transparent 58%),
    rgba(255, 255, 255, 0.82);
  box-shadow: var(--shadow);
  overflow: hidden;
  display: grid;
}


.hero-media {
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.70);
  display: flex;
  flex-direction: column;
}

.hero-media a {
  display: block;
  flex: 1 1 auto;
}

.hero-media img {
  width: 100%;
  height: clamp(170px, 34vw, 240px);
  object-fit: cover;
  object-position: center;
  display: block;
}

.hero-media-cap {
  padding: 8px 14px 10px;
  color: var(--muted);
  font-size: 13px;
}

.hero-content {
  padding: 22px;
}

/* Side-by-side hero on desktop (image left, text right) */
@media (min-width: 900px) {
  .hero-card {
    grid-template-columns: 1.15fr 1fr;
    align-items: stretch;
  }

  .hero-media {
    border-bottom: 0;
    border-right: 1px solid var(--border);
  }

  .hero-media img {
    height: 100%;
    min-height: 520px;
  }
}

.kicker {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin: 0 0 10px;
}

h1 {
  margin: 0 0 10px;
  font-size: clamp(30px, 4.6vw, 52px);
  line-height: 1.05;
  letter-spacing: -0.02em;
}

.lead {
  font-size: 16px;
  color: var(--muted);
  margin: 0 0 18px;
  max-width: 72ch;
}

.hero-grid {
  display: grid;
  gap: 14px;
  margin-top: 14px;
}

.hero-grid .mini {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.76);
  padding: 14px;
}
.mini h2 {
  margin: 0 0 8px;
  font-size: 16px;
}
.mini p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

@media (min-width: 900px) {
  .hero-content {
    padding: 28px;
  }
  .hero-grid {
    grid-template-columns: 1fr 1fr;
  }
}

/* Sections */
.section {
  margin-top: 28px;
}

.section-header {
  display: grid;
  gap: 8px;
  margin-bottom: 14px;
}
.section-header h2 {
  margin: 0;
  font-size: 22px;
  letter-spacing: -0.01em;
}
.section-header p {
  margin: 0;
  color: var(--muted);
}

.card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.86);
  box-shadow: var(--shadow);
}
.card.pad {
  padding: 18px;
}
.card h3 {
  margin: 0 0 10px;
  font-size: 18px;
}
.card p {
  margin: 0 0 10px;
  color: var(--muted);
}
.card p:last-child {
  margin-bottom: 0;
}

.card-img {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: var(--radius) var(--radius) 0 0;
}
.card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card-body {
  padding: 18px;
}

.cta-split {
  overflow: hidden;
}
.cta-split-img {
  overflow: hidden;
  border-radius: var(--radius) var(--radius) 0 0;
}
.cta-split-img img {
  width: 100%;
  height: 260px;
  object-fit: cover;
}
@media (min-width: 900px) {
  .cta-split {
    display: grid;
    grid-template-columns: 2fr 3fr;
    align-items: stretch;
  }
  .cta-split-img {
    border-radius: var(--radius) 0 0 var(--radius);
  }
  .cta-split-img img {
    height: 100%;
  }
  .cta-split .card-body {
    display: flex;
    flex-direction: column;
    justify-content: center;
  }
}

/* Smaller image variant (e.g. Embark card on home) */
.cta-split--compact-img .cta-split-img img {
  height: 400px;
}
@media (min-width: 900px) {
  .cta-split--compact-img {
    align-items: center;
  }
  .cta-split--compact-img .cta-split-img {
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .cta-split--compact-img .cta-split-img img {
    height: 400px;
    width: 100%;
    max-height: 400px;
    object-fit: cover;
  }
}

.card.callout {
  border-left: 5px solid var(--brand-2);
  background:
    linear-gradient(135deg, rgba(42, 161, 152, 0.07), rgba(215, 182, 106, 0.09) 70%, rgba(255, 255, 255, 0.86));
}
.card.callout h3 {
  color: var(--brand-2);
  letter-spacing: 0.02em;
}

.grid {
  display: grid;
  gap: 14px;
}
@media (min-width: 900px) {
  .grid.cols-2 {
    grid-template-columns: 1fr 1fr;
  }
  .grid.cols-3 {
    grid-template-columns: repeat(3, 1fr);
  }
}

.list {
  margin: 10px 0 0;
  padding-left: 18px;
  color: var(--muted);
}
.list li {
  margin: 6px 0;
}

.cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: 999px;
  border: 1px solid rgba(215, 182, 106, 0.4);
  background: rgba(215, 182, 106, 0.14);
  color: #1a1205;
  font-weight: 800;
  text-decoration: none;
}
.cta:hover {
  text-decoration: none;
  background: rgba(215, 182, 106, 0.20);
}
.cta:focus-visible {
  outline: 3px solid rgba(215, 182, 106, 0.45);
  outline-offset: 2px;
}

.cta.secondary {
  border-color: rgba(19, 33, 44, 0.16);
  background: rgba(255, 255, 255, 0.82);
  font-weight: 700;
}

/* Gallery */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
@media (min-width: 700px) {
  .gallery-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
@media (min-width: 1000px) {
  .gallery-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.gallery-item {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.86);
  overflow: hidden;
}
.gallery-item .ph {
  aspect-ratio: 4 / 3;
  display: grid;
  place-items: center;
  background:
    radial-gradient(420px 240px at 20% 10%, rgba(215, 182, 106, 0.24), transparent 62%),
    radial-gradient(380px 260px at 90% 30%, rgba(42, 161, 152, 0.16), transparent 62%),
    rgba(255, 255, 255, 0.70);
}
.gallery-item .ph img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.9;
}
.gallery-item .cap {
  padding: 12px 12px 14px;
  color: var(--muted);
  font-size: 14px;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.55);
}
.footer-inner {
  padding: 22px 0;
  display: grid;
  gap: 18px;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
}
.footer-nav a {
  color: var(--muted);
  font-weight: 600;
}

.newsletter {
  display: grid;
  gap: 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  background: rgba(255, 255, 255, 0.78);
}
.newsletter .row {
  display: grid;
  gap: 10px;
}
@media (min-width: 700px) {
  .newsletter .row {
    grid-template-columns: 1fr auto;
    align-items: center;
  }
}
.newsletter input {
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(19, 33, 44, 0.16);
  background: rgba(255, 255, 255, 0.86);
  color: var(--text);
}
.newsletter input::placeholder {
  color: rgba(79, 97, 112, 0.75);
}
.newsletter .note {
  color: var(--muted);
  font-size: 13px;
  margin: 0;
}

.copyright {
  color: rgba(79, 97, 112, 0.85);
  font-size: 13px;
}

/* Small utilities */
.stack {
  display: grid;
  gap: 12px;
}
.buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

/* Lightbox */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(0, 0, 0, 0.88);
  place-items: center;
  cursor: zoom-out;
}
.lightbox.is-open {
  display: grid;
}
.lightbox img {
  max-width: 92vw;
  max-height: 90vh;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.5);
}
.lightbox-close {
  position: absolute;
  top: 12px;
  right: 16px;
  background: none;
  border: none;
  color: #fff;
  font-size: 32px;
  cursor: pointer;
  line-height: 1;
  padding: 8px;
}

/* What We Do sidebar layout */
.whatwedo-layout {
  display: grid;
  gap: 14px;
}
.whatwedo-cards .grid.cols-1-stack {
  display: grid;
  gap: 14px;
}
@media (min-width: 900px) {
  .whatwedo-layout {
    grid-template-columns: 1fr 1fr;
    align-items: start;
  }
  .whatwedo-cards .grid.cols-1-stack {
    grid-template-columns: 1fr;
  }
  .whatwedo-cards .card-img {
    aspect-ratio: 3 / 1;
  }
  .whatwedo-sidebar {
    position: sticky;
    top: 80px;
  }
}

/* Testimonials */
.testimonial-pullquote {
  margin: 0 0 20px;
  padding: 16px 18px 16px 20px;
  border-left: 4px solid var(--brand-2);
  background: linear-gradient(135deg, rgba(42, 161, 152, 0.08), rgba(215, 182, 106, 0.06));
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}
.testimonial-pullquote p {
  margin: 0;
  font-size: 1.05rem;
  font-style: italic;
  color: var(--text);
  line-height: 1.55;
}

/* Gallery preview scroll strip */
.gallery-scroll {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 8px;
  margin: 0 -16px;
  padding-left: 16px;
  padding-right: 16px;
}
.gallery-scroll a {
  flex: 0 0 auto;
  scroll-snap-align: start;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  text-decoration: none;
}
.gallery-scroll a:hover {
  text-decoration: none;
}
.gallery-scroll img {
  width: 55vw;
  max-width: 260px;
  height: 40vw;
  max-height: 180px;
  object-fit: cover;
  display: block;
}
@media (min-width: 900px) {
  .gallery-scroll {
    margin: 0;
    padding-left: 0;
    padding-right: 0;
  }
  .gallery-scroll img {
    width: 300px;
    max-width: 300px;
    height: 200px;
    max-height: 200px;
  }
}
