/* ==============================
   BASEMENT PAGE CSS (FINAL CLEAN)
   Fixes CTA border + clipping
   Does NOT break FAQ
   ============================== */

/* ========= Base ========= */
:root{
  --gold:#c8a45b;
  --gold2:#e6cd8c;
  --cream:#fffbe3;
}

*,
*::before,
*::after{ box-sizing:border-box; }

html, body{
  font-family:'Inter', sans-serif !important;
  max-width:100vw;
  background:#000;
  color:#fff;

  /* SAFE: prevents sideways scroll without hiding vertical content */
  overflow-x:hidden;
}

h1,h2,h3,h4,h5,h6,.font-serif{
  font-family:'DM Serif Display', serif !important;
}

nav,nav *, .navbar,.navbar *{
  font-family:'Inter', sans-serif !important;
  font-weight:500 !important;
}

[x-cloak]{ display:none !important; }

/* Gold text gradient */
.gradient-gold{
  background:linear-gradient(180deg,#fff 0%,#f3e6bb 38%,#c8a45b 100%);
  -webkit-background-clip:text;
  background-clip:text;
  -webkit-text-fill-color:transparent;
  color:transparent;
}

/* ========= Hero pre-hide (prevents flash) ========= */
#basement-hero p.text-xs,
#basement-hero h1,
#basement-hero p.mt-4,
#basement-hero .mt-8{
  opacity:0;
  transform:translateY(10px);
  will-change:opacity,transform;
}

@media (prefers-reduced-motion:reduce){
  #basement-hero p.text-xs,
  #basement-hero h1,
  #basement-hero p.mt-4,
  #basement-hero .mt-8{
    opacity:1 !important;
    transform:none !important;
  }
}

/* ========= Scroll reveal helpers ========= */
.reveal{
  opacity:0;
  transform:translateY(16px);
  transition:opacity .6s ease, transform .6s ease;
}
.reveal.in-view{ opacity:1; transform:none; }

.nlx-reveal{
  opacity:0;
  transform:translateY(14px);
  transition:opacity .7s ease, transform .7s ease;
  will-change:opacity, transform;
}
.nlx-reveal.opacity-0.translate-y-4{
  transition:opacity .7s ease, transform .7s ease;
}
.opacity-100{ opacity:1 !important; }
.translate-y-0{ transform:translateY(0) !important; }

#contact-cta-basement .fade-item{
  opacity:0;
  transform:translateY(14px);
  transition:opacity .7s ease, transform .7s ease;
}
#contact-cta-basement.in-view .fade-item{
  opacity:1;
  transform:none;
}

@media (prefers-reduced-motion:reduce){
  .reveal,
  .nlx-reveal,
  #contact-cta-basement .fade-item{
    transition:none !important;
    transform:none !important;
    opacity:1 !important;
    will-change:auto !important;
  }
}

/* Kill any leftover tilt */
.tilt,
.tilt:hover,
.tilt:focus,
.tilt:active{
  transform:none !important;
  transition:none !important;
  will-change:auto !important;
}

/* =========================
   CTA (fixed border system)
   ========================= */

/* Wrapper gradient border */
.nlx-gradient-border{
  position:relative;
  border-radius:1.5rem;   /* rounded-3xl */
  padding:2px;            /* border thickness */
  background:linear-gradient(180deg,var(--gold),var(--gold2),#ffffff);
}

/* Inner panel MUST have padding */
.nlx-gradient-border > .nlx-border-inner{
  background:#000;
  border-radius:calc(1.5rem - 2px);
  padding: clamp(18px, 4vw, 48px);
}

/* CTA safety so text never clips */
#contact-cta-basement{
  overflow:visible;
}
#contact-cta-basement h2,
#contact-cta-basement p{
  max-width:100%;
  overflow-wrap:anywhere;
}

/* Gradient text */
.nlx-gradient-text{
  display:inline-block;
  background:linear-gradient(
    180deg,
    var(--gold) 0%,
    var(--gold2) 45%,
    #ffffff 75%,
    #ffffff 100%
  );
  -webkit-background-clip:text;
  background-clip:text;
  -webkit-text-fill-color:transparent;
  color:transparent;

  /* prevents bottom clipping */
  padding-bottom:.08em;
}

/* =========================
   iPad CTA layout
   ========================= */
@media (min-width:768px) and (max-width:1023px){

  #contact-cta .md\:grid-cols-\[1\.2fr_auto\],
  #renovations-cta .md\:grid-cols-\[1\.2fr_auto\],
  #projects-cta .md\:grid-cols-\[1\.2fr_auto\],
  #contact-cta-basement .md\:grid-cols-\[1\.2fr_auto\]{
    grid-template-columns:1fr !important;
  }

  #contact-cta .md\:text-left,
  #renovations-cta .md\:text-left,
  #projects-cta .md\:text-left,
  #contact-cta-basement .md\:text-left{
    text-align:center !important;
  }

  #contact-cta .md\:mx-0,
  #renovations-cta .md\:mx-0,
  #projects-cta .md\:mx-0,
  #contact-cta-basement .md\:mx-0{
    margin-left:auto !important;
    margin-right:auto !important;
  }

  #contact-cta .md\:items-end,
  #renovations-cta .md\:items-end,
  #projects-cta .md\:items-end,
  #contact-cta-basement .md\:items-end{
    align-items:center !important;
  }
}

/* =========================
   iPad layout for Time & Cost (sub-pages)
   ========================= */
@media (min-width:768px) and (max-width:1023px){

  #time-cost-basement .max-w-7xl,
  #time-cost-kitchen .max-w-7xl,
  #time-cost-bathroom .max-w-7xl,
  #time-cost-fullhome .max-w-7xl,
  #time-cost-exterior .max-w-7xl,
  #time-cost-additions .max-w-7xl{
    max-width:640px !important;
  }

  #time-cost-basement article,
  #time-cost-kitchen article,
  #time-cost-bathroom article,
  #time-cost-fullhome article,
  #time-cost-exterior article,
  #time-cost-additions article{
    padding:1.5rem !important;
    border-radius:1.25rem !important;
  }

  #time-cost-basement .time-cost-grid-basement,
  #time-cost-kitchen .time-cost-grid,
  #time-cost-bathroom .time-cost-grid-bathroom,
  #time-cost-fullhome .time-cost-grid-fullhome,
  #time-cost-exterior .time-cost-grid-exterior,
  #time-cost-additions .time-cost-grid-additions{
    gap:1.25rem !important;
  }
}

/* iPad Pro: force iPad Air layout for Time & Cost */
@media (min-width:1024px) and (max-width:1366px){

  section[id^="time-cost-"] .max-w-7xl{
    max-width:640px !important;
  }

  section[id^="time-cost-"] .reveal.grid{
    grid-template-columns:1fr !important;
    gap:1.25rem !important;
  }

  section[id^="time-cost-"] article{
    padding:1.5rem !important;
    border-radius:1.25rem !important;
  }
}

/* =========================
   Gallery controls (inline viewer)
   ========================= */
.nvx-arrow{
  position:absolute;
  top:50%;
  transform:translateY(-50%);
  z-index:20;
  display:flex;
  align-items:center;
  justify-content:center;
  width:48px;
  height:48px;
  font-size:26px;
  font-weight:700;
  border-radius:999px;
  color:#111;
  background:linear-gradient(135deg,#c8a45b,#e6cd8c,#fffbe3);
  box-shadow:0 4px 16px rgba(0,0,0,.35);
  transition:filter .18s ease;
}
@media (hover:hover){ .nvx-arrow:hover{ filter:brightness(1.12); } }
.nvx-prev{ left:12px; }
.nvx-next{ right:12px; }

/* open fullscreen button (inline viewer) */
.nvx-fs-btn{
  position:absolute;
  right:1rem;
  bottom:1rem;
  z-index:20;
  padding:.4rem .9rem;
  border-radius:999px;
  font-size:.875rem;
  background:rgba(0,0,0,.6);
  border:1px solid rgba(255,255,255,.2);
  backdrop-filter:blur(6px);
  transition:background .2s ease;
}
@media (hover:hover){ .nvx-fs-btn:hover{ background:rgba(0,0,0,.8); } }

/* ========= Fullscreen overlay ========= */
.nvx-fs{
  position:fixed;
  inset:0;
  z-index:50;
  background:rgba(0,0,0,.95);
  display:flex;
  align-items:center;
  justify-content:center;
  padding:clamp(12px, 2vh, 24px) clamp(16px, 4vw, 48px);
}

/* bounded frame so image never fills 100% viewport */
.nvx-fs-frame{
  width:100%;
  height:100%;
  max-width:78vw;
  max-height:78vh;
  margin:0 auto;
  display:flex;
  align-items:center;
  justify-content:center;
}
@media (max-width:1024px){
  .nvx-fs-frame{ max-width:92vw; max-height:84vh; }
}

/* fullscreen image (no rounding here) */
.nvx-fs-img{
  max-width:100%;
  max-height:100%;
  object-fit:contain;
  border-radius:0;
  box-shadow:0 4px 32px rgba(0,0,0,.6);
}

/* fullscreen close (gold) */
.nvx-fs-close{
  position:absolute;
  top:calc(8px + env(safe-area-inset-top));
  right:calc(8px + env(safe-area-inset-right));
  width:48px;
  height:48px;
  border-radius:999px;
  font-weight:700;
  font-size:22px;
  display:flex;
  align-items:center;
  justify-content:center;
  color:#111;
  background:linear-gradient(135deg,#c8a45b,#e6cd8c,#fffbe3);
  box-shadow:0 4px 16px rgba(0,0,0,.35);
  transition:filter .18s ease;
  z-index:30;
}
@media (hover:hover){ .nvx-fs-close:hover{ filter:brightness(1.12); } }

/* fullscreen arrows (use same .nvx-arrow class via HTML) */
.nvx-fs-prev{ left:16px; }
.nvx-fs-next{ right:16px; }

/* fullscreen counter */
.nvx-fs-count{
  position:absolute;
  top:calc(10px + env(safe-area-inset-top));
  left:50%;
  transform:translateX(-50%);
  color:#fff;
  opacity:.8;
  font-size:.9rem;
}

/* fullscreen dots (mobile) */
.nvx-fs-dots{
  position:absolute;
  bottom:calc(18px + env(safe-area-inset-bottom));
  left:50%;
  transform:translateX(-50%);
  display:flex;
  gap:.5rem;
}
.nvx-dot{
  width:10px;
  height:10px;
  border-radius:999px;
  background:#ffffff66;
}
.nvx-dot.is-active{ background:#fff; }

/* Hide ALL gallery buttons on touch devices */
@media (hover:none), (pointer:coarse){
  .nvx-arrow,
  .nvx-fs-btn,
  .nvx-fs-prev,
  .nvx-fs-next{
    display:none !important;
  }
}

/* --- Hard override to guarantee no rounding in FS --- */
.nvx-fs .nvx-fs-frame,
.nvx-fs .nvx-fs-img,
.nvx-fs .nvx-fs-frame img{
  border-radius:0 !important;
  overflow:visible;
}

/* Dots OFF (you had this) */
.nvx-fs-dots{ display:none !important; }

/* =========================
   FAQ safety (does nothing unless something is clipping it)
   ========================= */
#faq,
#faq *{
  overflow: visible;
  max-height: none;
}

/* =========================================
   HERO WORD GRADIENT FIX (Basement)
   Forces the gradient to actually show
   ========================================= */
#basement-hero .nlx-wordgrad{
  display:inline-block;
  background:linear-gradient(
    180deg,
    var(--gold) 0%,
    var(--gold2) 45%,
    #ffffff 72%,
    #ffffff 100%
  );

  -webkit-background-clip:text;
  background-clip:text;

  /* THIS is the missing piece */
  -webkit-text-fill-color: transparent;
  color: transparent;

  /* stops bottom clipping */
  padding-bottom:.08em;
}
