:root {
    --primary: #e63946;
    --dark: #121212;
    --light-bg: #1e1e1e;
    --text: #ffffff;
    --gray: #a0a0a0;
    --gold: #ffd700;
    --blueprint-bg: #0f172a;
    --blueprint-line: rgba(34, 211, 238, 0.15);
    --transition: all 0.3s ease;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--dark);
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: auto;
    padding: 0 20px;
}

p { color: #ccc; }

/* NAVBAR */
.navbar {
    position: fixed;
    top: 0; width: 100%;
    background: rgba(18, 18, 18, 0.95);
    padding: 20px 0;
    z-index: 999;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo { font-size: 1.5rem; font-weight: 700; letter-spacing: 2px; }
.logo span { color: var(--primary); }
.nav-links { display: flex; list-style: none; gap: 30px; }
.nav-links a { color: var(--text); text-decoration: none; font-weight: 600; font-size: 0.9rem; text-transform: uppercase; transition: var(--transition); }
.nav-links a:hover { color: var(--primary); }

/* STRUCTURAL OPTIONS PANEL BOX */
.structural-options-panel {
    width: 100%;
    max-width: 400px;
    text-align: left;
    margin-bottom: 5px;
}

.coordinate-instruction {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 6px;
    padding-left: 2px;
}

/* HERO SYSTEM - SIMPLE HEADLINE FORMAT WITH LOWER IMAGE LINE SLIDER */
.hero-block-wrapper {
    margin-top: 100px;
    margin-bottom: 40px;
    padding: 20px 0;
    display: flex;
    flex-direction: column;
    gap: 40px;
    width: 100%;
}

.hero-simple-headline {
    text-align: center;
    max-width: 850px;
    margin: 0 auto;
    padding: 20px 0 10px 0;
}

.hero-simple-headline h1 {
    font-family: 'Playfair Display', serif;
    font-size: 4.2rem;
    color: #ffffff;
    margin-bottom: 12px;
    font-weight: 700;
}

.hero-simple-headline h2 {
    font-family: 'Inter', sans-serif;
    font-size: 1.5rem;
    font-weight: 400;
    color: var(--primary);
    letter-spacing: 0.5px;
    margin-bottom: 15px;
}

.hero-simple-headline p {
    font-size: 1.2rem;
    color: var(--gray);
    margin-bottom: 30px;
    font-weight: 300;
}

.hero-btn-row {
    display: flex;
    justify-content: center;
}

.hero-slider-row-line {
    width: 100%;
    padding: 0;
}

.hero-carousel-viewport {
    height: 480px;
    width: 100%;
    position: relative;
    overflow: hidden;
    background-color: #0d0d0d;
}

.hero-slide-frame {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    opacity: 0;
    z-index: 1;
    transition: opacity 1.2s ease-in-out;
    background-size: cover;
    background-position: center;
}

.hero-slide-frame.active-frame {
    opacity: 1;
    z-index: 2;
}

.hero-slide-frame::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(to bottom, rgba(18,18,18,0.3) 0%, rgba(18,18,18,0.0) 100%);
}

/* WHY RWD ROOFING STATIC SECTION WITH BACKLIGHT HOVER EFFECTS */
.why-rwd-section {
    padding: 60px 0;
    text-align: center;
}

.why-rwd-header {
    max-width: 800px;
    margin: 0 auto 50px auto;
}

.why-rwd-subtitle {
    color: var(--primary);
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    display: block;
    margin-bottom: 10px;
}

.why-rwd-header h2 {
    font-family: 'Playfair Display', serif;
    font-size: 2.8rem;
    color: #ffffff;
    margin-bottom: 20px;
}

.why-rwd-header p {
    font-size: 1.05rem;
    color: var(--gray);
    line-height: 1.7;
}

.why-rwd-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
}

.feature-card {
    background: #181818;
    border: 1px solid #2a2a2a;
    border-radius: 12px;
    padding: 35px 25px;
    text-align: left;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

/* Backlight highlight on hover without popups */
.feature-card:hover {
    border-color: var(--primary);
    box-shadow: 0 0 25px rgba(230, 57, 70, 0.25);
    transform: translateY(-5px);
}

.feature-icon {
    font-size: 2rem;
    color: var(--primary);
    margin-bottom: 20px;
}

.feature-card h3 {
    font-size: 1.25rem;
    color: #ffffff;
    margin-bottom: 12px;
    font-weight: 700;
}

.feature-card p {
    font-size: 0.95rem;
    color: var(--gray);
    line-height: 1.6;
}

/* VECTOR INTERACTIVE INTRO PRELOADER */
#blueprint-preloader {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background-color: var(--blueprint-bg);
    z-index: 10000;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: transform 0.8s cubic-bezier(0.77, 0, 0.175, 1);
}

.blueprint-canvas { position: relative; width: 100%; max-width: 850px; text-align: center; padding: 20px; }
.blueprint-svg { width: 100%; height: auto; max-height: 420px; }
.grid-line, .line-vertical { stroke: var(--blueprint-line); stroke-width: 1; }
.roof-vector-wire { fill: none; stroke: #22d3ee; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1200; stroke-dashoffset: 1200; animation: drawPerspectiveLines 3.2s cubic-bezier(0.4, 0, 0.2, 1) forwards; }
.roof-vector-accent { fill: none; stroke: var(--primary); stroke-width: 1.5; stroke-linecap: round; stroke-dasharray: 400; stroke-dashoffset: 400; animation: drawPerspectiveLines 2.5s cubic-bezier(0.4, 0, 0.2, 1) 0.6s forwards; }
.intro-brand-container { margin-top: -10px; text-align: center; display: flex; flex-direction: column; align-items: center; }
.intro-logo-embossed { font-size: 5.5rem; font-weight: 900; letter-spacing: 8px; color: var(--primary); text-transform: uppercase; -webkit-text-stroke: 1.5px #ffffff; text-shadow: -1px -1px 0px rgba(255,255,255,0.7), 1px 1px 0px rgba(0,0,0,0.8), 2px 4px 10px rgba(0,0,0,0.9), 0px 0px 25px rgba(230, 57, 70, 0.4); opacity: 0; transform: translateY(60px); animation: slideUpEmbossedLogo 1.2s cubic-bezier(0.16, 1, 0.3, 1) 2.2s forwards; }
.intro-tagline-minimal { font-family: 'Inter', sans-serif; font-size: 1rem; font-weight: 400; color: #ffffff; text-transform: uppercase; letter-spacing: 9px; margin-top: 5px; padding-left: 9px; opacity: 0; animation: fadeInTagline 1.4s ease 3s forwards; }

@keyframes drawPerspectiveLines { to { stroke-dashoffset: 0; } }
@keyframes slideUpEmbossedLogo { to { opacity: 1; transform: translateY(0); } }
@keyframes fadeInTagline { to { opacity: 1; } }

/* CARDS CATALOG LAYOUT */
.btn-primary { display: inline-block; padding: 15px 40px; background: var(--primary); color: #fff; text-decoration: none; font-weight: 700; border-radius: 4px; transition: var(--transition); border: none; cursor: pointer; text-transform: uppercase; font-size: 0.85rem; letter-spacing: 1px; }
.btn-primary:hover { transform: translateY(-3px); box-shadow: 0 10px 20px rgba(230, 57, 70, 0.3); }
.btn-secondary { background: transparent; color: var(--text); border: 2px solid var(--text); padding: 12px 25px; border-radius: 5px; font-weight: 600; text-transform: uppercase; font-size: 0.8rem; cursor: pointer; transition: var(--transition); text-decoration: none; display: inline-block; }
.btn-secondary:hover { background: var(--text); color: var(--dark); }
.section-title { text-align: center; font-size: 2.2rem; margin-bottom: 40px; font-family: 'Playfair Display', serif; }
.services-layout-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 35px; padding: 20px 0; }
.card { background: var(--light-bg); padding: 30px; border-radius: 12px; border: 1px solid rgba(255,255,255,0.05); display: flex; flex-direction: column; justify-content: space-between; transition: var(--transition); box-shadow: 0 8px 20px rgba(0,0,0,0.3); }
.card:hover { border-color: var(--primary); transform: translateY(-6px); }
.pricing-block { margin: 15px 0; }
.current-price { font-size: 1.6rem; font-weight: 700; color: var(--primary); }
.old-price { text-decoration: line-through; color: var(--gray); margin-left: 10px; font-size: 1.1rem; }
.card-action-footer { display: flex; gap: 15px; margin-top: 15px; }
.card-action-footer .btn-primary, .card-action-footer .btn-secondary { flex: 1; text-align: center; padding: 12px 5px; font-size: 0.8rem; }

/* LEAFLET CONTAINER INBUILT SATELLITE STYLE MAPS */
.form-map-instance {
    height: 380px;
    width: 100%;
    border-radius: 10px;
    margin: 20px 0;
    border: 1px solid #333;
    z-index: 5;
    background-color: #222;
}

/* REVIEWS & FORM FIELD SCULPTS */
.reviews-wrapper { display: grid; grid-template-columns: 1.4fr 1fr; gap: 40px; margin-top: 40px; }
.reviews-feed { display: flex; flex-direction: column; gap: 20px; max-height: 500px; overflow-y: auto; padding-right: 15px; }
.review-card-item { background: var(--light-bg); padding: 25px; border-radius: 8px; border-left: 4px solid var(--primary); animation: fadeInUp 0.4s ease both; }
.review-card-item h4 { margin-bottom: 5px; font-size: 1.1rem; color: #fff; }
.gold-stars { color: var(--gold); font-size: 1.1rem; margin-bottom: 10px; text-shadow: 0 0 4px rgba(255, 215, 0, 0.4); }
.review-form-box { background: #181818; padding: 30px; border-radius: 8px; border: 1px solid #2a2a2a; }
.review-form-box h3 { margin-bottom: 20px; }
.quote-box { background: #111; padding: 40px; border-radius: 10px; border: 1px solid rgba(255,255,255,0.02); }

.quote-form-layout input, .quote-form-layout textarea,
.review-form-box input, .review-form-box select, .review-form-box textarea,
.modal-form-layout input, .modal-form-layout textarea {
    width: 100%; padding: 12px; margin-bottom: 15px; background: #252525; border: 1px solid #333; color: #fff; border-radius: 6px; font-family: inherit;
}
.quote-form-layout textarea, .review-form-box textarea { height: 120px; resize: none; }
.modal-form-layout textarea { height: 90px; resize: none; width: 100%; max-width: 400px; margin-bottom: 10px; }
.form-group-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
.centered-action-row { display: flex; justify-content: center; width: 100%; margin-top: 10px; }

/* MODALS CONFIG */
.modal { display: none; position: fixed; z-index: 2000; left: 0; top: 0; width: 100%; height: 100%; overflow: auto; background-color: rgba(0,0,0,0.85); backdrop-filter: blur(5px); padding-top: 30px; }
.modal-content { background-color: var(--light-bg); margin: auto; padding: 40px; border: 1px solid #333; width: 90%; max-width: 600px; border-radius: 15px; position: relative; }
.text-center { text-align: center; }
.modal-header-accent { color: #fff; margin-bottom: 5px; }
.modal-pricing-display { font-size: 1.5rem; font-weight: bold; color: var(--primary); margin-bottom: 20px; }
.close-modal-trigger { position: absolute; right: 20px; top: 15px; color: var(--gray); font-size: 28px; font-weight: bold; cursor: pointer; }
.close-modal-trigger:hover { color: #fff; }
.modal-form-layout { display: flex; flex-direction: column; align-items: center; width: 100%; }
.modal-form-layout input { width: 100%; max-width: 400px; }
.paypal-container-centered { width: 100%; max-width: 400px; margin-top: 10px; display: flex; justify-content: center; flex-direction: column; }
.payment-note { font-size: 0.8rem; color: var(--gray); text-align: center; margin-top: 15px; }

section { margin: 80px 0; }
.footer { background: #0a0a0a; padding: 60px 0 20px; margin-top: 100px; }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 40px; }
.footer h3, .footer h4 { margin-bottom: 15px; color: #fff; }
.footer ul { list-style: none; }
.footer ul li { margin-bottom: 10px; }
.footer ul li a { color: var(--gray); text-decoration: none; transition: var(--transition); }
.footer ul li a:hover { color: var(--primary); }
.certs i { font-size: 1.8rem; margin-right: 15px; color: var(--gray); }
.copyright { text-align: center; margin-top: 50px; border-top: 1px solid #222; padding-top: 20px; color: var(--gray); }

@keyframes fadeInUp { from { opacity: 0; transform: translateY(15px); } to { opacity: 1; transform: translateY(0); } }

@media (max-width: 768px) {
    .hero-simple-headline h1 { font-size: 2.8rem; }
    .hero-simple-headline h2 { font-size: 1.2rem; }
    .hero-carousel-viewport { height: 320px; }
    .form-group-grid, .reviews-wrapper, .why-rwd-cards-grid { grid-template-columns: 1fr; }
    .intro-logo-embossed { font-size: 3.8rem; letter-spacing: 5px; }
    .why-rwd-header h2 { font-size: 2.1rem; }
}

/* RESPONSIVE POLISH: shared layout for phone, tablet, laptop and large displays */
:root { color-scheme: dark; }
html { scroll-padding-top: 95px; }
body { min-width: 320px; }
.container { width: min(100%, 1240px); }
.logo { display: flex; flex-direction: column; gap: 0; text-decoration: none; color: #fff; line-height: 1.05; white-space: nowrap; }
.logo small { display: block; margin-top: 6px; color: #c7c7c7; font-size: .58rem; font-weight: 500; letter-spacing: .5px; text-transform: none; }
.nav-toggle { display: none; background: transparent; border: 1px solid #454545; border-radius: 8px; width: 44px; height: 42px; padding: 9px; color: #fff; cursor: pointer; }
.nav-toggle span { display: block; height: 2px; background: #fff; margin: 5px 0; border-radius: 2px; }
.nav-links a { display: inline-flex; align-items: center; min-height: 40px; }
.hero-block-wrapper { gap: 28px; margin-top: 112px; padding-top: 12px; }
.hero-simple-headline { width: 100%; padding-inline: 8px; }
.hero-simple-headline h1 { font-size: clamp(2.5rem, 5.2vw, 4.2rem); line-height: 1.1; }
.hero-simple-headline h2 { font-size: clamp(1.1rem, 2vw, 1.5rem); line-height: 1.4; }
.hero-simple-headline p { max-width: 760px; margin-inline: auto; }
.hero-btn-row { flex-wrap: wrap; }
.hero-carousel-viewport { width: 100%; max-width: 1672px; aspect-ratio: 1672 / 941; height: auto; max-height: none; margin: 0 auto; overflow: hidden; background: #050505; }
.hero-carousel-track { display: flex; width: 100%; height: 100%; transform: translateX(0); transition: transform .85s cubic-bezier(.22,.61,.36,1); will-change: transform; }
.hero-slide-frame { position: relative; inset: auto; flex: 0 0 100%; width: 100%; height: 100%; opacity: 1; z-index: auto; transition: none; background: #050505; display: flex; align-items: center; justify-content: center; }
.hero-slide-frame::before { display: none; }
.hero-slide-frame img { display: block; width: 100%; height: 100%; object-fit: contain; object-position: center; }
.carousel-caption { text-align: center; font-size: .85rem; color: #aaa; padding: 10px 14px 0; letter-spacing: .3px; }
.map-help-text { width: 100%; max-width: 650px; margin: 8px auto 12px; color: #bdbdbd; font-size: .88rem; line-height: 1.55; }
.map-help-text strong { color: #fff; }
.map-status { color: #bdbdbd; font-size: .85rem; margin: -10px 0 15px; line-height: 1.5; }
.order-status-message { width: 100%; max-width: 520px; padding: 13px 15px; margin: 14px auto 0; border-radius: 8px; font-size: .9rem; line-height: 1.5; overflow-wrap: anywhere; }
.order-status-message.status-success { background: rgba(34,197,94,.12); border: 1px solid rgba(34,197,94,.4); color: #baf7ca; }
.order-status-message.status-error { background: rgba(230,57,70,.12); border: 1px solid rgba(230,57,70,.45); color: #ffc4c8; }
button:disabled { opacity: .48; cursor: not-allowed; }
button, input, select, textarea { font: inherit; }
input, select, textarea { min-width: 0; }
input:focus-visible, select:focus-visible, textarea:focus-visible, button:focus-visible, a:focus-visible { outline: 2px solid #e63946; outline-offset: 3px; }
.form-map-instance { width: 100%; min-height: 260px; max-width: 100%; overflow: hidden; touch-action: pan-x pan-y; }
.leaflet-container { font-family: 'Inter', sans-serif; background: #161616; }
.leaflet-control-attribution { font-size: 10px !important; }
.modal-open { overflow: hidden; }
.modal { padding: 20px 0; }
.modal-content { max-height: calc(100dvh - 40px); overflow-y: auto; overscroll-behavior: contain; }
.card-action-footer { flex-wrap: wrap; }
.card-action-footer > * { min-width: 0; }
#quoteForm, #orderForm { min-width: 0; }
#quoteForm textarea, #orderForm textarea { resize: vertical; min-height: 100px; }

@media (min-width: 1600px) {
  .container { max-width: 1280px; }
  .hero-carousel-viewport { max-width: 1672px; }
}
@media (max-width: 1024px) {
  .container { padding-inline: 22px; }
  .nav-links { gap: 15px; }
  .nav-links a { font-size: .78rem; }
  .reviews-wrapper { grid-template-columns: 1fr; }
  .hero-block-wrapper { margin-top: 105px; }
  .modal-content { padding: 32px 24px; }
}
@media (max-width: 768px) {
  .navbar { padding: 12px 0; }
  .nav-content { gap: 12px; }
  .logo { font-size: 1.25rem; letter-spacing: 1.5px; }
  .logo small { white-space: normal; max-width: 190px; font-size: .52rem; letter-spacing: 0; line-height: 1.3; }
  .nav-toggle { display: block; flex: 0 0 44px; }
  .nav-content nav { position: absolute; top: 100%; left: 0; right: 0; background: rgba(18,18,18,.98); border-bottom: 1px solid #333; padding: 0 20px; display: none; }
  .nav-content nav.nav-open { display: block; }
  .nav-links { display: flex; flex-direction: column; gap: 3px; padding: 10px 0 16px; }
  .nav-links a { display: flex; width: 100%; padding: 8px 4px; min-height: 44px; font-size: .85rem; }
  .hero-block-wrapper { margin-top: 88px; gap: 20px; padding-top: 6px; }
  .hero-simple-headline { padding: 16px 0 8px; }
  .hero-simple-headline h1 { font-size: clamp(2.25rem, 10vw, 3rem); }
  .hero-simple-headline h2 { font-size: 1.08rem; }
  .hero-simple-headline p { font-size: 1rem; margin-bottom: 20px; }
  .hero-btn-row { gap: 10px !important; }
  .hero-btn-row .btn-primary, .hero-btn-row .btn-secondary { padding: 12px 16px; font-size: .76rem; }
  .hero-carousel-viewport { width: 100%; aspect-ratio: 1672 / 941; }
  .carousel-caption { font-size: .75rem; line-height: 1.5; }
  .container { padding-inline: 18px; }
  section { margin: 54px 0; }
  .section-title { font-size: clamp(1.65rem, 6vw, 2.1rem); margin-bottom: 26px; }
  .why-rwd-section { padding: 30px 0; }
  .why-rwd-header { margin-bottom: 30px; }
  .why-rwd-header h2 { font-size: clamp(1.75rem, 6vw, 2.2rem); }
  .why-rwd-cards-grid, .services-layout-grid, .form-group-grid, .reviews-wrapper { grid-template-columns: minmax(0, 1fr); }
  .services-layout-grid { gap: 18px; }
  .card { padding: 24px 20px; }
  .card-action-footer { gap: 10px; }
  .card-action-footer .btn-primary, .card-action-footer .btn-secondary { min-height: 44px; font-size: .72rem; }
  .quote-box { padding: 24px 18px; }
  .form-map-instance { height: 310px; min-height: 260px; margin: 14px 0; }
  .modal { padding: 10px 0; }
  .modal-content { width: calc(100% - 20px); padding: 28px 16px 20px; max-height: calc(100dvh - 20px); }
  .close-modal-trigger { right: 12px; top: 8px; min-width: 36px; min-height: 36px; display: grid; place-items: center; }
  .modal-form-layout .form-group-grid { gap: 0; }
  .modal-form-layout input, .quote-form-layout input, .quote-form-layout textarea, .modal-form-layout textarea { font-size: 16px; }
  .footer { padding-top: 38px; margin-top: 60px; }
}
@media (max-width: 420px) {
  .container { padding-inline: 14px; }
  .hero-btn-row { flex-direction: column; align-items: stretch !important; }
  .hero-btn-row a { text-align: center; }
  .card-action-footer { flex-direction: column; }
  .card-action-footer > * { width: 100%; }
  .form-map-instance { height: 270px; }
  .intro-tagline-minimal { font-size: .65rem; letter-spacing: 4px; padding-left: 4px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}


/* Targeted Leaflet rendering fix: keep tile dimensions under Leaflet's control. */
.leaflet-container img.leaflet-tile {
    max-width: none !important;
    max-height: none !important;
}
.leaflet-container .leaflet-tile,
.leaflet-container .leaflet-marker-icon,
.leaflet-container .leaflet-marker-shadow {
    visibility: visible;
}
