/* ColonyTrack Marketing Site — Custom Styles */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,700;0,800;1,400;1,700&family=Inter:wght@400;500;600;700&display=swap');

:root {
  --cream: #F5F0E8;
  --cream-light: #FAF7F2;
  --cream-dark: #EDE7DA;
  --brown-900: #2C1810;
  --brown-800: #3D2518;
  --brown-700: #4A3020;
  --brown-600: #5C3D28;
  --brown-500: #7A5230;
  --amber-500: #D4A04A;
  --amber-600: #C08B30;
  --amber-700: #A67620;
  --amber-warm: #C99A2E;
  --green-muted: #5A7A50;
  --footer-bg: #3D2518;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  color: var(--brown-900);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
}

/* The page must never scroll sideways on mobile. `clip` prevents horizontal
   overflow WITHOUT turning html/body into a scroll container, so the sticky
   nav keeps working (plain `overflow-x: hidden` can break sticky). Media is
   capped so an oversized image can't push the layout wider than the viewport. */
html, body { overflow-x: clip; max-width: 100%; }
img { max-width: 100%; height: auto; }

h1, h2, h3, .serif {
  font-family: 'Playfair Display', Georgia, serif;
}

/* Honeycomb SVG pattern */
.honeycomb-bg {
  background-image: url("data:image/svg+xml,%3Csvg width='60' height='70' viewBox='0 0 60 70' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M30 5L55 20V50L30 65L5 50V20L30 5Z' fill='none' stroke='%23D4A04A' stroke-width='0.5' opacity='0.12'/%3E%3C/svg%3E");
  background-size: 60px 70px;
}

/* Dashed path decoration */
.dashed-path {
  position: relative;
}
.dashed-path::after {
  content: '';
  position: absolute;
  width: 2px;
  height: 80px;
  border-left: 2px dashed var(--brown-500);
  opacity: 0.2;
  left: 50%;
  bottom: -40px;
  transform: translateX(-50%);
}

/* Bee illustration (small decorative) */
.bee-icon {
  display: inline-block;
  width: 40px;
  height: 40px;
}

/* Nav */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(245, 240, 232, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(0,0,0,0.06);
}

.site-nav .nav-inner {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 1.5rem;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.site-nav .logo {
  font-family: 'Inter', sans-serif;
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--brown-900);
  text-decoration: none;
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.site-nav .logo img {
  width: 32px;
  height: 32px;
  display: block;
  flex-shrink: 0;
}

.site-nav .nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.site-nav .nav-links a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--brown-600);
  text-decoration: none;
  transition: color 0.2s;
}

.site-nav .nav-links a:hover {
  color: var(--brown-900);
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--amber-600);
  color: white;
  font-weight: 600;
  font-size: 0.9rem;
  padding: 0.6rem 1.5rem;
  border-radius: 8px;
  text-decoration: none;
  transition: background 0.2s, transform 0.1s;
  border: none;
  cursor: pointer;
}

.btn-primary:hover {
  background: var(--amber-700);
  transform: translateY(-1px);
}

.btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  color: var(--brown-700);
  font-weight: 600;
  font-size: 0.9rem;
  padding: 0.6rem 1.5rem;
  border-radius: 8px;
  border: 2px solid var(--brown-700);
  text-decoration: none;
  transition: all 0.2s;
  cursor: pointer;
}

.btn-outline:hover {
  background: var(--brown-700);
  color: white;
}

/* Hero */
.hero {
  position: relative;
  overflow: hidden;
}

.hero-image-container {
  position: relative;
  width: 100%;
  max-width: 1140px;
  margin: 0 auto;
  border-radius: 16px;
  overflow: hidden;
  aspect-ratio: 16 / 7;
  background: var(--brown-600);
}

.hero-image-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.hero-image-container .hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, rgba(44,24,16,0.65) 0%, rgba(44,24,16,0.2) 70%, transparent 100%);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 3rem 4rem;
}

.hero-overlay h1 {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 700;
  color: white;
  line-height: 1.1;
  margin-bottom: 0.75rem;
}

.hero-overlay p {
  font-size: 1.15rem;
  color: rgba(255,255,255,0.85);
  margin-bottom: 1.5rem;
  max-width: 420px;
}

/* Section spacing */
.section {
  padding: 5rem 1.5rem;
}

.section-inner {
  max-width: 1140px;
  margin: 0 auto;
}

/* Story */
.story-section {
  background: var(--cream-light);
}

.story-card {
  display: flex;
  align-items: center;
  gap: 2rem;
  max-width: 700px;
  margin: 0 auto;
}

.story-card img {
  width: 140px;
  height: 140px;
  object-fit: cover;
  border-radius: 12px;
  flex-shrink: 0;
}

.story-card .story-text {
  font-family: 'Playfair Display', Georgia, serif;
  font-style: italic;
  font-size: 1.35rem;
  line-height: 1.5;
  color: var(--brown-800);
}

.story-card .story-label {
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--brown-900);
  margin-bottom: 0.5rem;
  font-style: normal;
}

.story-block {
  max-width: 700px;
  margin: 0 auto;
}

.story-body {
  margin-top: 2rem;
}

.story-body p {
  font-size: 1rem;
  color: var(--brown-700);
  line-height: 1.8;
  margin-bottom: 1rem;
}

.story-body p:last-child {
  margin-bottom: 0;
}

.story-body em {
  font-style: italic;
  color: var(--brown-900);
}

/* Bee divider */
.bee-divider {
  text-align: center;
  padding: 0.75rem 0;
  position: relative;
}

.bee-divider svg {
  opacity: 0.5;
}

.bee-divider::before,
.bee-divider::after {
  content: '';
  position: absolute;
  top: 50%;
  width: 60px;
  border-top: 1px dashed rgba(90, 60, 30, 0.2);
}

.bee-divider::before { right: calc(50% + 30px); }
.bee-divider::after { left: calc(50% + 30px); }

/* Screenshots / Context Section */
.context-section {
  background: var(--cream);
}

.context-heading {
  text-align: center;
  margin-bottom: 3rem;
}

.context-heading h2 {
  font-size: 2rem;
  font-weight: 700;
}

/* Phone carousel */
.phone-carousel {
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: var(--amber-500) transparent;
  padding: 0.5rem 0 1rem;
  margin: 0 -1.5rem;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

.phone-carousel::-webkit-scrollbar {
  height: 6px;
}

.phone-carousel::-webkit-scrollbar-track {
  background: transparent;
}

.phone-carousel::-webkit-scrollbar-thumb {
  background: var(--amber-500);
  border-radius: 3px;
}

.phone-carousel-track {
  display: flex;
  gap: 1.5rem;
  width: max-content;
}

.phone-item {
  text-align: center;
  flex-shrink: 0;
}

.phone-frame {
  width: 180px;
  height: 360px;
  background: var(--cream-dark);
  border-radius: 24px;
  border: 3px solid var(--brown-600);
  overflow: hidden;
  margin: 0 auto 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--brown-500);
  font-size: 0.85rem;
  position: relative;
  box-shadow: 0 4px 16px rgba(0,0,0,0.1);
}

.phone-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.phone-item p {
  font-size: 0.85rem;
  color: var(--brown-600);
  font-weight: 500;
}

@media (min-width: 769px) {
  .phone-carousel {
    margin: 0;
    padding-left: 0;
    padding-right: 0;
  }

  .phone-carousel-track {
    justify-content: center;
  }
}

/* ── Screenshot tile grid ── */
.screen-tile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 1.5rem;
}

.screen-tile {
  background: white;
  border-radius: 16px;
  padding: 1.25rem 1.25rem 1rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
  display: flex;
  flex-direction: column;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.screen-tile:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.12);
}

.screen-tile-img-wrap {
  position: relative;
  overflow: hidden;
  border-radius: 10px;
  margin-bottom: 1rem;
}

.screen-tile-img {
  width: 100%;
  height: 300px;
  object-fit: cover;
  object-position: top;
  display: block;
  background: var(--cream-dark);
}

.screen-tile-zoom {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
}

.screen-tile:hover .screen-tile-zoom {
  background: rgba(0,0,0,0.25);
}

.screen-tile-zoom svg {
  opacity: 0;
  transition: opacity 0.15s;
  filter: drop-shadow(0 1px 3px rgba(0,0,0,0.4));
}

.screen-tile:hover .screen-tile-zoom svg {
  opacity: 1;
}

.screen-tile-body {
  flex: 1;
}

.screen-tile h4 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--brown-900);
  margin: 0 0 0.4rem;
}

.screen-tile p {
  font-size: 0.9rem;
  color: var(--brown-600);
  line-height: 1.6;
  margin: 0;
}

/* Lightbox */
.ct-lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0,0,0,0.88);
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  /* A drag on the photo must not pan the page behind it. */
  overscroll-behavior: contain;
  touch-action: none;
}

.ct-lightbox.open {
  display: flex;
}

/* Freeze the page while the lightbox is open so a swipe can't move it. */
body.ct-noscroll { overflow: hidden; }

.ct-lightbox-inner {
  position: relative;
  max-width: 420px;
  width: 100%;
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.ct-lightbox-inner img {
  /* Fit within the viewport so a tall portrait screenshot stays centered and
     the caption below it stays in view (was width:100% with no height cap,
     which overflowed and pushed the close button off the top of the screen). */
  max-width: 100%;
  max-height: 80vh;
  width: auto;
  height: auto;
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
  display: block;
  /* Pinch/double-tap zoom is handled in JS, so the image owns its own touch
     gestures (the overlay stays touch-action:none to block page panning). */
  touch-action: none;
  transform-origin: center center;
}

.ct-lightbox-caption {
  text-align: center;
  margin-top: 1rem;
  color: rgba(255,255,255,0.8);
  font-size: 0.9rem;
  font-weight: 600;
}

.ct-lightbox-close {
  /* Pinned to the viewport corner (fixed, not absolute) so it's always
     reachable no matter how tall the image is. */
  position: fixed;
  top: 1rem;
  right: 1rem;
  width: 2.75rem;
  height: 2.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.45);
  border: none;
  border-radius: 9999px;
  color: white;
  font-size: 1.75rem;
  line-height: 1;
  z-index: 10000;
  cursor: pointer;
  line-height: 1;
  opacity: 0.7;
}

.ct-lightbox-close:hover { opacity: 1; }


/* Pricing callout */
.pricing-callout {
  text-align: center;
  padding: 4rem 1.5rem 1.5rem;
  background: var(--cream);
}

.pricing-callout h2 {
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1.4;
  color: var(--brown-900);
}

/* Footer */
.site-footer {
  background: var(--footer-bg);
  color: rgba(255,255,255,0.7);
  padding: 3rem 1.5rem;
  text-align: center;
}

.site-footer .footer-inner {
  max-width: 700px;
  margin: 0 auto;
}

.site-footer .footer-tagline {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.15rem;
  color: rgba(255,255,255,0.9);
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

.site-footer .footer-links {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.site-footer .footer-links a {
  color: rgba(255,255,255,0.6);
  text-decoration: underline;
  font-size: 0.85rem;
  transition: color 0.2s;
}

.site-footer .footer-links a:hover {
  color: white;
}

.site-footer .copyright {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.4);
}

/* Sparkle icon in footer */
.footer-sparkle {
  display: inline-block;
  margin-top: 1rem;
  opacity: 0.4;
}

/* Mobile menu */
.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  color: var(--brown-900);
}

.mobile-menu {
  display: none;
  padding: 1rem 1.5rem 1.5rem;
  background: var(--cream-light);
  border-top: 1px solid rgba(0,0,0,0.06);
}

.mobile-menu.active {
  display: block;
}

.mobile-menu a {
  display: block;
  padding: 0.6rem 0;
  color: var(--brown-700);
  text-decoration: none;
  font-weight: 500;
}

/* Honeycomb decorative corners */
.honeycomb-corner {
  position: absolute;
  opacity: 0.08;
  pointer-events: none;
}

/* Responsive */
@media (max-width: 768px) {
  .site-nav .nav-links { display: none; }
  .mobile-menu-btn { display: block; }

  .hero-image-container {
    border-radius: 0;
    aspect-ratio: 3 / 4;
  }

  .hero-image-container .hero-overlay {
    padding: 2rem 1.5rem;
    justify-content: flex-end;
    background: linear-gradient(to top, rgba(44,24,16,0.75) 0%, rgba(44,24,16,0.3) 50%, transparent 100%);
  }

  .story-card {
    flex-direction: column;
    text-align: center;
  }

  .story-card img {
    width: 120px;
    height: 120px;
  }

  .phone-frame {
    width: 160px;
    height: 320px;
  }

  .section {
    padding: 3rem 1rem;
  }
}

/* Lightbox */
#lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0,0,0,0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s;
}

#lightbox.active {
  opacity: 1;
  pointer-events: auto;
}

#lightbox img {
  max-height: 90vh;
  max-width: 90vw;
  border-radius: 16px;
  box-shadow: 0 8px 40px rgba(0,0,0,0.4);
}

#lightbox span {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  color: white;
  font-size: 2rem;
  cursor: pointer;
  line-height: 1;
  opacity: 0.7;
  transition: opacity 0.2s;
}

#lightbox span:hover {
  opacity: 1;
}

/* Placeholder image styling — remove when real images added */
.placeholder-img {
  background: linear-gradient(135deg, var(--cream-dark) 0%, var(--amber-500) 100%);
  opacity: 0.6;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  color: var(--brown-700);
}

/* Cookie consent banner */
#ct-cookie-banner {
  position: fixed;
  left: 1rem;
  right: 1rem;
  bottom: 1rem;
  z-index: 9999;
  background: var(--brown-900);
  color: var(--cream-light);
  border-radius: 0.75rem;
  box-shadow: 0 12px 32px rgba(0,0,0,0.35);
  padding: 1rem 1.25rem;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  opacity: 0;
  transform: translateY(1rem);
  transition: opacity 0.25s ease, transform 0.25s ease;
}
#ct-cookie-banner.ct-cc-visible {
  opacity: 1;
  transform: translateY(0);
}
.ct-cc-inner {
  max-width: 1080px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
}
.ct-cc-text {
  flex: 1 1 320px;
  font-size: 0.875rem;
  line-height: 1.55;
  margin: 0;
  color: var(--cream-light);
}
.ct-cc-text a {
  color: var(--amber-500);
  text-decoration: underline;
}
.ct-cc-text a:hover {
  color: var(--amber-warm);
}
.ct-cc-actions {
  display: flex;
  gap: 0.5rem;
  flex-shrink: 0;
}
.ct-cc-btn {
  border: none;
  border-radius: 0.5rem;
  padding: 0.55rem 1.1rem;
  font-size: 0.875rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
.ct-cc-accept {
  background: var(--amber-500);
  color: var(--brown-900);
}
.ct-cc-accept:hover {
  background: var(--amber-600);
}
.ct-cc-reject {
  background: transparent;
  color: var(--cream-light);
  border: 1px solid rgba(245,240,232,0.35);
}
.ct-cc-reject:hover {
  background: rgba(245,240,232,0.08);
}
@media (max-width: 540px) {
  #ct-cookie-banner {
    left: 0.5rem;
    right: 0.5rem;
    bottom: 0.5rem;
    padding: 0.85rem 1rem;
  }
  .ct-cc-inner {
    flex-direction: column;
    align-items: stretch;
  }
  .ct-cc-actions {
    justify-content: flex-end;
  }
}


/* === Homepage "app, up close" tour (v2) — moved from inline index.html === */
.v2-section {
        background-color: var(--cream);
        padding: 1.5rem 1.5rem 4rem;
        font-family: 'Inter', system-ui, -apple-system, sans-serif;
      }
      .v2-container {
        max-width: 1200px;
        margin: 0 auto;
      }
      .v2-main-title {
        color: var(--brown-900);
        font-size: 2.25rem;
        text-align: center;
        margin: 0;
      }
      .v2-subtitle {
        color: var(--brown-600);
        font-size: 1.125rem;
        text-align: center;
        margin: 0.75rem 0 0;
        line-height: 1.5;
      }
      .v2-header {
        margin-bottom: 4rem;
      }
      .v2-group {
        margin-bottom: 4rem;
      }
      .v2-group-header {
        border-bottom: 2px solid var(--amber-500);
        padding-bottom: 0.5rem;
        margin-bottom: 2rem;
        display: inline-block;
      }
      .v2-group-title {
        color: var(--brown-800);
        font-size: 1.5rem;
        margin: 0;
      }
      .v2-grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
      }
      @media (min-width: 640px) {
        .v2-grid {
          grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
          gap: 2rem;
        }
      }
      .v2-tile {
        background: var(--cream-light);
        border: 1px solid var(--cream-dark);
        border-radius: 1rem;
        padding: 0.75rem;
        cursor: pointer;
        transition: box-shadow 0.2s, transform 0.2s;
      }
      @media (min-width: 640px) {
        .v2-tile {
          padding: 1rem;
        }
      }
      .v2-tile:hover {
        box-shadow: 0 10px 20px -5px rgba(61, 37, 24, 0.15);
        transform: translateY(-3px);
      }
      .v2-tile img {
        width: 100%;
        border-radius: 0.5rem;
        display: block;
        margin-bottom: 1rem;
        box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1);
      }
      .v2-tile-body {
        text-align: left;
      }
      .v2-tile-body h3 {
        font-family: 'Playfair Display', Georgia, serif;
        font-size: 1.05rem;
        font-weight: 700;
        color: var(--brown-900);
        margin: 0 0 0.4rem;
        line-height: 1.3;
      }
      .v2-tile-body p {
        font-size: 0.875rem;
        color: var(--brown-600);
        line-height: 1.5;
        margin: 0;
      }
