/* Heavenly Constructions — Global Design + Responsive Layer
   Loaded after each page's existing styles so one file controls the final UI. */
:root{
  --hc-gold:#c79a3e;
  --hc-gold-light:#f0d998;
  --hc-ink:#0d1a33;
  --hc-paper:#fffdf9;
  --hc-chalk:#f6f4ee;
  --hc-line:#ded9ce;
  --hc-shadow:0 18px 50px rgba(13,26,51,.10);
  --hc-shadow-hover:0 24px 60px rgba(13,26,51,.16);
}

html{width:100%;max-width:100%;}
body{width:100%;max-width:100%;overflow-x:hidden;}
/* clip (not hidden) keeps the window as the scroller, so taps, sticky header and scroll effects work on phones */
@supports (overflow:clip){html,body{overflow-x:clip;}}
*,*::before,*::after{max-width:100%;}
img,video,iframe{max-width:100%;height:auto;}
input,select,textarea,button{max-width:100%;}

/* Consistent page rhythm */
.container{width:min(1240px,100%);}
section{position:relative;}
section[style*="background"]{background-clip:padding-box;}

/* Header / navigation */
header{width:100%;}
.nav-wrap{min-width:0;}
.logo{min-width:0;}
.logo .wordmark{min-width:0;}
nav.primary-nav{min-width:0;}
.nav-main{white-space:nowrap;}
.menu-toggle{width:44px;height:44px;display:none;align-items:center;justify-content:center;border:1px solid rgba(199,154,62,.35);border-radius:8px;}

/* Refined buttons */
.btn{min-height:46px;}
.btn-primary{box-shadow:0 7px 18px rgba(199,154,62,.12);}
.btn-outline{transition:background .2s ease,color .2s ease,border-color .2s ease,transform .2s ease;}
.btn-row{align-items:center;}

/* Cards / panels: keep the original luxury construction look, but make it cleaner */
.project-card,.project-page-card,.service-ov-card,.spec-card,.process-step,.est-item,.consult-card,.touch-card,.timeline-card,.about-point,.feature-card,.pkg-card,.blog-card,.faq-item,.contact-card,.goal-card{
  border-radius:10px;
}
/* Only image cards need clipping; badge cards (.process-step, .pkg-card) must let their circles overlap the top edge */
.project-card,.project-page-card,.blog-card{overflow:hidden;}
.process-step,.pkg-card{overflow:visible;}
.project-card,.project-page-card,.service-ov-card,.process-step,.est-item,.consult-card,.touch-card,.timeline-card,.feature-card,.pkg-card,.blog-card,.contact-card,.goal-card{box-shadow:0 8px 28px rgba(13,26,51,.045);}
.project-card:hover,.project-page-card:hover,.service-ov-card:hover{box-shadow:var(--hc-shadow-hover);}
.ph{border-radius:0;}

/* Packages: separate cards so the top icons sit cleanly (no grey strip behind them) */
.pkg-grid{background:transparent;border:0;gap:20px;padding-top:30px;}
.pkg-card{border:1px solid var(--hc-line);margin-top:0;}
@media (max-width:640px){.pkg-grid{gap:44px;}}

/* FAQ: proper tap target on phones, never cut off the open answer */
.faq-q{cursor:pointer;touch-action:manipulation;-webkit-tap-highlight-color:rgba(199,154,62,.15);user-select:none;-webkit-user-select:none;gap:16px;}
.faq-q .plus{flex:0 0 auto;}
.faq-item.open .faq-a{max-height:none!important;}

/* Better text wrapping everywhere */
h1,h2,h3,h4,h5,p,a,li,span{overflow-wrap:anywhere;}
.section-title{line-height:1.12;}

/* Hero */
.hero{padding:0;}
.hero-inner{width:100%;}
.hero-content{min-width:0;}
.hero h1{max-width:760px;}
.hero p.lede{max-width:650px;}
.hero-image{min-width:0;}

/* Generic split/grid safety */
.split,.projects-grid,.projects-page-grid,.process-grid,.pkg-grid,.faq-wrap,.contact-grid,.location-split,.goal-grid,.goal-columns,.founder-grid,.milestone-panel,.services-overview-grid,.spec-grid,.stats-grid,.feature-list,.why-intro-grid,.footer-grid,.contact-grid,.timeline-item{min-width:0;}

/* Forms */
input,select,textarea{min-height:46px;}
textarea{resize:vertical;}

/* Footer */
footer{overflow:hidden;}
.footer-grid>div{min-width:0;}
.footer-grid a{overflow-wrap:anywhere;}
.footer-bottom{align-items:center;}

/* Floating controls */
.float-actions{right:max(16px,env(safe-area-inset-right));bottom:max(16px,env(safe-area-inset-bottom));}
.fab{width:50px;height:50px;}

/* ---------- Tablet ---------- */
@media (max-width:1100px){
  .container{padding-left:24px;padding-right:24px;}
  .nav-wrap{height:76px;}
  nav.primary-nav{gap:20px;}
  .nav-actions{gap:10px;}
  .hero-inner{grid-template-columns:1fr 1fr;min-height:620px;}
  .hero-content{padding-left:32px;padding-right:32px;}
  .projects-grid{grid-template-columns:repeat(2,minmax(0,1fr));}
  .project-page-card .ph{height:210px;}
  .footer-grid{gap:32px;}
}

/* ---------- Mobile navigation ---------- */
@media (max-width:960px){
  .container{padding-left:20px;padding-right:20px;}
  header{position:sticky;top:0;}
  .nav-wrap{height:72px;}
  .menu-toggle{display:flex;flex:0 0 44px;}
  .nav-actions .btn-primary{display:none!important;}
  nav.primary-nav{
    top:72px!important;
    inset-inline:0!important;
    bottom:0!important;
    width:100vw!important;
    max-width:100vw!important;
    height:calc(100dvh - 72px);
    overflow-y:auto;
    overflow-x:hidden;
    -webkit-overflow-scrolling:touch;
    padding:18px 20px 40px!important;
  }
  nav.primary-nav .nav-item,
  nav.primary-nav>a{width:100%;max-width:100%;}
  nav.primary-nav>a{flex:0 0 auto;}
  .dropdown-panel{max-width:100%;}
  .submenu-panel{max-width:100%;}

  .hero-inner{grid-template-columns:1fr;min-height:0;}
  .hero-image{order:-1;height:clamp(260px,52vw,380px);}
  .hero-content{padding:56px 20px 64px;max-width:none;}
  .hero h1{font-size:clamp(2rem,7vw,3rem);}
  .hero p.lede{font-size:1rem;}

  .split,.why-intro-grid,.contact-grid,.location-split,.founder-grid,.goal-grid,.goal-columns,.milestone-panel{grid-template-columns:1fr!important;}
  .split{gap:36px;}
  .split .ph,.why-intro-grid .ph,.location-split .ph{height:300px;min-height:0;}

  .stats-grid{grid-template-columns:repeat(2,minmax(0,1fr));}
  .stat-cell{padding:30px 18px;}
  .projects-grid,.projects-page-grid{grid-template-columns:repeat(2,minmax(0,1fr));}
  .services-overview-grid{grid-template-columns:1fr;}
  .feature-list{grid-template-columns:repeat(2,minmax(0,1fr));}
  .pkg-grid{grid-template-columns:repeat(2,minmax(0,1fr));}
  .faq-wrap{grid-template-columns:1fr;}
  .footer-grid{grid-template-columns:repeat(2,minmax(0,1fr));}
  .cta-inner{gap:24px;}
  .contact-hero .container{width:100%;}
}

/* ---------- Phones ---------- */
@media (max-width:640px){
  html{font-size:16px;}
  .container{padding-left:16px;padding-right:16px;}
  section:not(.hero):not(.pd-hero):not(.contact-hero):not(.services-hero):not(.projects-page-hero):not(.est-hero){padding:64px 0!important;}
  .nav-wrap{height:68px;}
  .logo{gap:8px;}
  .logo-mark-wrap{width:36px;height:36px;}
  .wordmark{font-size:1rem!important;}
  .wordmark small{font-size:.48rem!important;}
  nav.primary-nav{top:68px!important;height:calc(100dvh - 68px);}

  .hero-image{height:270px;}
  .hero-content{padding:46px 16px 52px;}
  .hero-badge{font-size:.68rem;margin-bottom:16px;}
  .hero h1{font-size:clamp(1.85rem,9vw,2.45rem);}
  .hero p.lede{font-size:.95rem;line-height:1.7;}
  .pill-row{gap:8px;margin:24px 0;}
  .pill{font-size:.74rem;padding:8px 12px 8px 10px;}

  h2.section-title{font-size:clamp(1.75rem,8vw,2.2rem);}
  p.section-lede{font-size:.95rem;}
  .btn-row{width:100%;}
  .btn-row .btn{flex:1 1 180px;width:100%;}
  .btn{min-height:48px;padding:13px 18px;}

  .about-points,.feature-list,.pkg-grid,.stats-grid,.projects-grid,.projects-page-grid,.footer-grid{grid-template-columns:1fr!important;}
  .stats-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;}
  .stat-cell{padding:24px 10px;}
  .stat-cell .num{font-size:1.9rem;}
  .stat-cell .lbl{font-size:.72rem;}

  .split .ph,.why-intro-grid .ph,.location-split .ph{height:240px;}
  .project-card .ph,.project-page-card .ph{height:220px;}
  .project-page-card-body{padding:20px;}
  .service-ov-card{padding:26px 22px;}
  .process-grid{grid-template-columns:1fr!important;gap:44px;padding-top:12px;}
  .process-grid::before{display:none;}
  .feature-list{gap:12px;}
  .spec-grid{grid-template-columns:1fr!important;}
  .spec-card{padding:20px;gap:12px;}

  .projects-head{align-items:flex-start;}
  .project-tabs{justify-content:flex-start;overflow-x:auto;flex-wrap:nowrap;padding-bottom:5px;margin-right:-16px;padding-right:16px;}
  .project-tab{flex:0 0 auto;}

  .est-list{padding:34px 0 64px;}
  .est-item-head{gap:10px;padding:17px 16px;}
  .est-item-head .titles{gap:10px;min-width:0;}
  .est-body-inner{padding:0 16px 22px;}
  .est-fields{grid-template-columns:1fr!important;}
  .est-calc-btn{width:100%;min-height:46px;}

  .pd-hero{min-height:560px;padding:80px 0 56px;}
  .pd-hero h1{font-size:clamp(2rem,9vw,2.7rem);}
  .pd-section:not(.hero):not(.pd-hero):not(.contact-hero):not(.services-hero):not(.projects-page-hero):not(.est-hero){padding:64px 0!important;}
  .pd-section-head{margin-bottom:34px;}
  .pd-bullet{gap:10px;}
  .spec-card h4{font-size:1.05rem;}
  .spec-card p{font-size:.88rem;}

  .timeline-item{padding-left:48px!important;}
  .timeline-card{padding:20px!important;}
  .timeline-wrap::before,.timeline-line-fill{left:18px!important;}

  .footer-grid{row-gap:30px;}
  footer{padding:60px 0 24px;}
  .footer-brand p{max-width:none;}
  .footer-bottom{margin-top:42px;flex-direction:column;align-items:flex-start;}
  .float-actions{right:12px;bottom:12px;gap:8px;}
  .fab{width:46px;height:46px;}

  .modal-box{width:calc(100vw - 28px)!important;max-width:520px;padding:28px 20px!important;}
  .contact-row .contact-btn{width:100%;}
}

@media (max-width:380px){
  .container{padding-left:14px;padding-right:14px;}
  .hero-image{height:240px;}
  .hero-content{padding-left:14px;padding-right:14px;}
  .stats-grid{grid-template-columns:1fr!important;}
  .stat-cell:nth-child(2){border-top:1px solid rgba(199,154,62,.15)!important;}
}

/* Accessibility / reduced motion */
@media (prefers-reduced-motion:reduce){
  *,*::before,*::after{scroll-behavior:auto!important;animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important;}
}
