/* ============================================
   Carles & Co. — Shared Stylesheet
   Layered for Tailwind v4 compatibility
   ============================================ */

/* ─── Base Reset ──────────────────────────── */
@layer base {
  html { scroll-behavior: smooth; }
  body { font-family: "Lato", sans-serif; color: #333; overflow-x: hidden; }
}

/* ─── Components ──────────────────────────── */
@layer components {

  /* Navbar */
  #main-nav {
    transition: background 0.3s, box-shadow 0.3s;
  }
  #main-nav.scrolled {
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.25);
  }
  #main-nav .nav-link.active {
    opacity: 1;
    border-bottom: 2px solid #EDB932;
    padding-bottom: 2px;
  }

  /* Hero Video */
  .hero-video-container {
    position: relative;
    width: 100%;
    height: 50vh;
    min-height: 350px;
    overflow: hidden;
  }
  .hero-video-container video {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    transform: translate(-50%, -50%);
    object-fit: cover;
  }
  .hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
      to bottom,
      rgba(0,0,0,0.15) 0%,
      rgba(0,0,0,0.05) 40%,
      rgba(0,0,0,0.05) 60%,
      rgba(0,0,0,0.3) 100%
    );
  }

  /* Agent Photos */
  .agent-photo {
    position: absolute;
    bottom: 0;
    height: 80%;
    max-height: 400px;
    width: auto;
    object-fit: contain;
    pointer-events: none;
  }
  .agent-photo.andrew { left: 0; }
  .agent-photo.victoria { right: 0; }

  /* Service Cards */
  .service-cards-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
  }
  .service-card {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    aspect-ratio: 3/4;
    cursor: pointer;
    display: block;
  }
  .service-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
  }
  .service-card:hover img {
    transform: scale(1.05);
  }
  .service-card .card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
      to top,
      rgba(0,0,0,0.65) 0%,
      rgba(0,0,0,0.15) 50%,
      transparent 100%
    );
  }
  .service-card .card-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px 16px;
    color: white;
  }

  /* Property Bento Grid */
  .property-bento-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    grid-template-rows: 200px 200px;
    gap: 6px;
  }
  .property-bento-item {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
  }
  .bento-col1   { grid-column: 1; grid-row: 1 / 3; }
  .bento-col2-r1 { grid-column: 2; grid-row: 1; }
  .bento-col2-r2 { grid-column: 2; grid-row: 2; }
  .bento-col3   { grid-column: 3; grid-row: 1 / 3; }
  .bento-col4-r1 { grid-column: 4; grid-row: 1; }
  .bento-col4-r2 { grid-column: 4; grid-row: 2; }
  .bento-col5   { grid-column: 5; grid-row: 1 / 3; }

  .property-bento-item img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
  }
  .property-bento-item:hover img {
    transform: scale(1.05);
  }
  .property-bento-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.55) 0%, transparent 60%);
  }
  .property-bento-label {
    position: absolute;
    bottom: 14px;
    left: 14px;
    color: white;
    font-family: "Josefin Sans", sans-serif;
    font-weight: 600;
    font-size: 15px;
    z-index: 2;
  }
}

/* ─── Responsive overrides (components layer) ─ */
@layer components {
  @media (max-width: 1024px) {
    .agent-photo { height: 65%; }
  }
  @media (max-width: 768px) {
    .agent-photo { height: 55%; max-height: 280px; }
    .agent-photo.andrew { left: -20px; }
    .agent-photo.victoria { right: -20px; }
    .service-cards-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  }
  @media (max-width: 480px) {
    .agent-photo { height: 45%; max-height: 200px; }
  }
  @media (max-width: 900px) {
    .property-bento-grid {
      grid-template-columns: repeat(2, 1fr);
      grid-template-rows: repeat(4, 180px);
      gap: 6px;
    }
    .bento-col1   { grid-column: 1; grid-row: 1; }
    .bento-col2-r1 { grid-column: 2; grid-row: 1; }
    .bento-col3   { grid-column: 1; grid-row: 2; }
    .bento-col4-r1 { grid-column: 2; grid-row: 2; }
    .bento-col5   { grid-column: 1 / -1; grid-row: 3; }
    .bento-col2-r2 { grid-column: 1; grid-row: 4; }
    .bento-col4-r2 { grid-column: 2; grid-row: 4; }
  }
}

/* ─── Scroll Reveal (unlayered — must override utilities) ─ */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.active {
  opacity: 1;
  transform: translateY(0);
}
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }
.reveal-delay-5 { transition-delay: 0.5s; }
.reveal-delay-6 { transition-delay: 0.6s; }
