/* Topo Prints - Style Overrides */

/* Site Header */
.site-header {
  padding: 1.5rem 2rem;
  border-bottom: 1px solid var(--paper-dark, #ebd9b5);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--paper, #f5e6c8);
}

.site-header .logo {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 1.25rem;
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  color: #1a1a1a;
}

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

.site-header nav a {
  font-family: "DM Sans", -apple-system, sans-serif;
  font-size: 0.85rem;
  color: #666;
  text-decoration: none;
  transition: color 0.2s;
}

.site-header nav a:hover {
  color: #1a1a1a;
}

.site-header nav a.active {
  color: #1a1a1a;
  font-weight: 500;
}

/* Flat Manila background instead of textured paper */
:root {
  --paper: #f5e6c8;  /* Manila/cream */
  --paper-dark: #ebd9b5;
}

/* Remove the texture overlay entirely */
.texture-overlay {
  display: none !important;
}

/* Higher contrast map preview */
.leaflet-tile-pane {
  filter: grayscale(60%) contrast(1.2) !important;
}

/* Make map container background match */
.map-preview .leaflet-container {
  background: #e8dcc8 !important;
}

/* Selection overlay - constrain to fit within map */
.selection-overlay {
  border: 2px dashed #333 !important;
  background: rgba(50, 50, 50, 0.08) !important;
  width: min(70%, 250px) !important;
  max-width: 250px !important;
  max-height: 250px !important;
}

/* Ensure map preview clips overflow */
.map-preview {
  overflow: hidden !important;
}

/* Slightly warmer ink for Manila bg */
/* Lock body/app background to Manila - style presets should only affect the SVG preview */
body,
.app,
html {
  background: var(--paper) !important;
  background-color: #f5e6c8 !important;
}

/* Hamburger button - hidden on desktop */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  flex-direction: column;
  gap: 5px;
  z-index: 101;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: #1a1a1a;
  border-radius: 1px;
  transition: transform 0.3s, opacity 0.3s;
}

.nav-toggle.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle.active span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Mobile responsive header */
@media (max-width: 600px) {
  .site-header {
    padding: 1rem 1.25rem;
    position: relative;
  }
  
  .site-header .logo {
    font-size: 1rem;
  }

  .nav-toggle {
    display: flex;
  }
  
  .site-header nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--paper, #f5e6c8);
    flex-direction: column;
    padding: 1rem 1.5rem;
    gap: 0;
    border-bottom: 1px solid var(--paper-dark, #ebd9b5);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    z-index: 100;
  }

  .site-header nav.nav-open {
    display: flex;
  }
  
  .site-header nav a {
    font-size: 0.9rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(0,0,0,0.06);
  }

  .site-header nav a:last-child {
    border-bottom: none;
  }
  
  /* Gallery header uses different markup */
  header {
    padding: 1rem 1.25rem;
  }
  
  header nav {
    width: 100%;
    justify-content: center;
    gap: 1.25rem;
    order: 1;
    padding-top: 0.5rem;
    border-top: 1px solid var(--paper-dark, #ebd9b5);
  }
  
  header nav a {
    font-size: 0.75rem;
  }
  
  /* Gallery hero */
  .hero {
    padding: 2.5rem 1.25rem 2rem;
  }
  
  .hero h1 {
    font-size: 1.75rem;
  }
  
  .hero p {
    font-size: 0.95rem;
  }
  
  /* Gallery grid */
  .gallery {
    padding: 0 1.25rem 3rem;
    gap: 1.5rem;
  }
  
  .card-image {
    padding: 1.25rem;
  }
  
  .card-content {
    padding: 1.25rem;
  }
  
  .card-title {
    font-size: 1.25rem;
  }
  
  .card-description {
    font-size: 0.85rem;
  }
  
  /* CTA section */
  .cta {
    padding: 2.5rem 1.25rem;
  }
  
  .cta h2 {
    font-size: 1.4rem;
  }
}

/* Style preset containment - ensure preview backgrounds don't leak to app */
.preview-frame {
  background: var(--paper) !important;
}

/* Allow SVG container to show the style-appropriate background */
.preview-frame .svg-container {
  background: inherit;
}

/* The SVG itself should control its own background via the rect fill */
.preview-frame .svg-container svg {
  background: transparent !important;
}
