/*=============== GOOGLE FONTS ===============*/
@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;700;800&display=swap');

/*=============== VARIABLES CSS ===============*/
:root {
  /* Colors */
  --dominant-color: #f2f2f2;
  --secondary-color: #0a4b39;
  --accent-color: #ffb300;
  --text-color: #333;
  --text-color-light: #f2f2f2;
  --body-color: #f2f2f2;
  --container-color: #fff;
  
  /* Font and typography */
  --body-font: 'Manrope', sans-serif;
  --h1-font-size: 3.5rem;
  --h2-font-size: 2.25rem;
  --h3-font-size: 1.25rem;
  --normal-font-size: 1rem;
  --small-font-size: .875rem;

  /* Font weight */
  --font-regular: 400;
  --font-bold: 700;
  --font-extrabold: 800;

  /* z-index */
  --z-header: 100;
  --z-tooltip: 10;
  --z-fixed: 1000;
}

/*=============== BASE ===============*/
* {
  box-sizing: border-box;
  padding: 0;
  margin: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--body-font);
  font-size: var(--normal-font-size);
  background-color: var(--body-color);
  color: var(--text-color);
  transition: background-color .4s;
}

h1, h2, h3 {
  color: var(--secondary-color);
  font-weight: var(--font-bold);
}

ul {
  list-style: none;
}

a {
  text-decoration: none;
}

img, video {
  max-width: 100%;
  height: auto;
}

/*=============== REUSABLE CSS CLASSES ===============*/
.container {
  max-width: 1120px;
  margin-left: auto;
  margin-right: auto;
  padding: 0 1.5rem;
}

.section {
  padding: 6rem 0 2rem;
}

.section__title {
  font-size: var(--h2-font-size);
  font-weight: var(--font-extrabold);
  text-align: center;
  margin-bottom: 1.5rem;
}

.section__subtitle {
  text-align: center;
  margin-bottom: 3rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.6;
}

.button {
  display: inline-block;
  background-color: var(--accent-color);
  color: var(--secondary-color);
  padding: 1rem 2rem;
  font-weight: var(--font-bold);
  border-radius: .5rem;
  transition: transform .3s, box-shadow .3s;
  border: 2px solid transparent;
}

.button:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.button--ghost {
  background-color: transparent;
  border-color: var(--text-color-light);
  color: var(--text-color-light);
}
.button--ghost:hover {
  background-color: var(--text-color-light);
  color: var(--secondary-color);
}

.button--light {
    background-color: var(--dominant-color);
    color: var(--secondary-color);
}
.button--light:hover {
    background-color: var(--accent-color);
}

.button--outline-light {
    background: transparent;
    border: 2px solid var(--dominant-color);
    color: var(--dominant-color);
}
.button--outline-light:hover {
    background-color: var(--dominant-color);
    color: var(--secondary-color);
}

.button--large {
    padding: 1.25rem 2.5rem;
    font-size: 1.1rem;
}

/*=============== HEADER & NAV ===============*/
.header {
  width: 100%;
  position: fixed;
  top: 0;
  left: 0;
  z-index: var(--z-header);
  background-color: transparent;
  transition: background-color .4s, box-shadow .4s;
}

.nav {
  height: 5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav__logo img {
  height: 2.5rem; /* Adjust as needed */
  display: block;
}

.nav__list {
  display: flex;
  gap: 2rem;
}

.nav__link {
  color: var(--text-color-light);
  font-weight: var(--font-bold);
  transition: color .3s;
}

.nav__link:hover {
  color: var(--accent-color);
}

.button--header {
  color: var(--secondary-color);
  font-weight: var(--font-bold);
}

/* Scrolled header style */
.header.scrolled {
  background-color: var(--body-color);
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.header.scrolled .nav__link {
  color: var(--secondary-color);
}

.header.scrolled .nav__link:hover {
  color: var(--accent-color);
}


/*=============== HERO ===============*/
.hero {
  position: relative;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.hero__video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -2;
}

.hero__video-element {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero__overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(10, 75, 57, 0.6);
  z-index: -1;
}

.hero__container {
  text-align: center;
}

.hero__title {
  font-size: var(--h1-font-size);
  color: var(--text-color-light);
  margin-bottom: 1rem;
  font-weight: var(--font-extrabold);
}

.hero__subtitle {
  font-size: 1.25rem;
  color: var(--text-color-light);
  margin-bottom: 2rem;
  max-width: 650px;
  margin-left: auto;
  margin-right: auto;
}

.hero__buttons {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
}

/*=============== FEATURES (Intelligent Roof) ===============*/
.features__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.feature__card {
    background-color: var(--container-color);
    padding: 2.5rem 2rem;
    border-radius: .75rem;
    text-align: center;
    transition: transform .3s, box-shadow .3s;
    border: 1px solid rgba(0,0,0,0.05);
}

.feature__card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.08);
}

.feature__icon {
    font-size: 3rem;
    color: var(--accent-color);
    margin-bottom: 1rem;
}

.feature__title {
    font-size: var(--h3-font-size);
    margin-bottom: .5rem;
}

/*=============== SHOWCASE ===============*/
.showcase {
    background-color: var(--secondary-color);
}

.showcase__container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 4rem;
}

.section__title--light, .section__subtitle--light {
    color: var(--text-color-light);
    text-align: left;
}
.section__subtitle--light {
    max-width: none;
}

.showcase__tabs {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.showcase__tab-button {
    background: none;
    border: none;
    color: rgba(242, 242, 242, 0.6);
    font-size: 1.1rem;
    font-weight: var(--font-bold);
    cursor: pointer;
    padding-bottom: .5rem;
    border-bottom: 2px solid transparent;
    transition: color .3s, border-color .3s;
}

.showcase__tab-button.active {
    color: var(--accent-color);
    border-bottom-color: var(--accent-color);
}

.showcase__tab-content {
    display: none;
    color: var(--text-color-light);
    line-height: 1.7;
    margin-bottom: 2rem;
}

.showcase__tab-content.active {
    display: block;
}

.showcase__image-container {
    position: relative;
    height: 450px;
}

.showcase__image {
    position: absolute;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: .75rem;
    opacity: 0;
    transition: opacity .5s ease-in-out;
}

.showcase__image.active {
    opacity: 1;
}

/*=============== JOURNEY ===============*/
.journey__steps {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
    max-width: 700px;
    margin: 0 auto 4rem auto;
    position: relative;
}
.journey__steps::before {
    content: '';
    position: absolute;
    left: 24px;
    top: 0;
    bottom: 0;
    width: 2px;
    background-color: #ddd;
}

.journey__step {
    display: flex;
    align-items: flex-start;
    gap: 2rem;
    position: relative;
}

.journey__number {
    background-color: var(--accent-color);
    color: var(--secondary-color);
    min-width: 50px;
    height: 50px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-weight: var(--font-bold);
    font-size: 1.1rem;
    z-index: 1;
}

.journey__title {
    font-size: var(--h3-font-size);
    margin-bottom: .5rem;
    letter-spacing: 1px;
}

.journey__description {
    line-height: 1.6;
}

#journey .button--large {
    display: block;
    width: fit-content;
    margin: 0 auto;
}

/*=============== VISIONARIES ===============*/
.visionaries {
    position: relative;
    background-image: url('architectural-background.jpg'); /* Replace with your image */
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    padding: 8rem 0;
}

.visionaries__overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(10, 75, 57, 0.85);
}

.visionaries__container {
    position: relative;
    z-index: 2;
    text-align: center;
}

.visionaries__links {
    margin-top: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.visionaries__link {
    color: var(--text-color-light);
    font-size: 1.1rem;
    font-weight: var(--font-bold);
    transition: color .3s;
}

.visionaries__link:hover {
    color: var(--accent-color);
}

/*=============== FOOTER ===============*/
.footer {
    background-color: var(--secondary-color);
    color: var(--text-color-light);
    padding-top: 6rem;
}

.footer__container {
    display: flex;
    flex-direction: column;
}

.footer__content {
    text-align: center;
    border-bottom: 1px solid rgba(242, 242, 242, 0.2);
    padding-bottom: 4rem;
    margin-bottom: 2rem;
}

.footer__title {
    font-size: var(--h2-font-size);
    color: var(--text-color-light);
    margin-bottom: 1rem;
}

.footer__description {
    max-width: 600px;
    margin: 0 auto 2rem auto;
    line-height: 1.7;
    color: rgba(242, 242, 242, 0.8);
}

.footer__contact {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer__link {
    color: var(--accent-color);
    font-weight: var(--font-bold);
    transition: text-decoration .3s;
}
.footer__link:hover {
    text-decoration: underline;
}

.footer__socials {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.footer__social-link {
    font-size: 1.75rem;
    color: var(--text-color-light);
    transition: color .3s, transform .3s;
}

.footer__social-link:hover {
    color: var(--accent-color);
    transform: translateY(-3px);
}


.footer__bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 0;
    font-size: var(--small-font-size);
}

.footer__copyright, .footer__legal-link {
    color: rgba(242, 242, 242, 0.6);
}
.footer__legal {
    display: flex;
    gap: .5rem;
}
.footer__legal-link:hover {
    color: var(--accent-color);
}

/*=============== SCROLL-ON-ANIMATE ===============*/
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.animate-on-scroll.is-visible {
    opacity: 1;
    transform: translateY(0);
}


/*=============== MEDIA QUERIES ===============*/
/* For medium devices */
@media screen and (max-width: 992px) {
    .container {
        padding: 0 1rem;
    }
    .nav__menu { /* Basic mobile menu prep */
        display: none;
    }
    .showcase__container {
        grid-template-columns: 1fr;
    }
    .showcase__image-container {
        order: -1; /* Move image to top on smaller screens */
        height: 350px;
    }
    .section__title--light, .section__subtitle--light {
        text-align: center;
    }
}

/* For small devices */
@media screen and (max-width: 768px) {
    :root {
        --h1-font-size: 2.5rem;
        --h2-font-size: 1.75rem;
    }
    .features__grid {
        grid-template-columns: 1fr;
    }
    .footer__bottom {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    .hero__buttons {
        flex-direction: column;
        align-items: center;
    }
}

@media screen and (max-width: 576px) {
    .journey__steps::before {
        left: 19px;
    }
    .journey__number {
        min-width: 40px;
        height: 40px;
        font-size: 1rem;
    }
    .journey__step {
        gap: 1rem;
    }
}

/* calculator */
/* Custom range slider styling */
input[type=range]::-webkit-slider-thumb {
    -webkit-appearance: none;
    height: 24px;
    width: 24px;
    border-radius: 50%;
    background: #ffb300;
    cursor: pointer;
    border: 4px solid #0a4b32;
    margin-top: -8px; 
}

/* Animations */
.animate-fade-in {
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Base Body settings */
body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.floating-calculator-btn {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 70px;
  height: 70px;
  border-radius: 50%;
  text-decoration: none;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-content {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  backdrop-filter: blur(14px);
  background: rgba(4, 31, 25, 0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 2;
  transition: transform 0.3s ease;
}

.floating-calculator-btn:hover .btn-content {
  transform: scale(1.08);
}

/* Electric Energy Ring */
.energy-ring {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  padding: 3px;
  background: conic-gradient(
    from 0deg,
    rgba(0,255,180,0.8),
    rgba(0,255,180,0.1),
    rgba(0,255,180,0.8)
  );
  animation: spinEnergy 3s linear infinite;
  filter: blur(1px);
}

.energy-ring::before {
  content: "";
  position: absolute;
  inset: 4px;
  border-radius: 50%;
  background: rgba(4, 31, 25, 0.95);
}

/* Clockwise animation */
@keyframes spinEnergy {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Subtle glow */
.floating-calculator-btn::after {
  content: "";
  position: absolute;
  inset: -7px;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(0,255,180,0.3) 0%,
    transparent 77%
  );
  animation: pulseGlow 2.5s ease-in-out infinite;
  z-index: 0;
}

@keyframes pulseGlow {
  0% { opacity: 0.4; }
  50% { opacity: 0.8; }
  100% { opacity: 0.4; }
}

.tab-content {
  transition: all 0.4s ease;
}

.tab-button {
  transition: all 0.3s ease;
}

.tab-button:hover {
  transform: translateY(-2px);
}

.premium-card {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  padding: 1.75rem;
  max-width: 860px;
  margin: 0 auto;
  border: 1px solid rgba(15, 23, 42, 0.08);
  transition: transform 0.4s ease, box-shadow 0.4s ease, border-color 0.4s ease;
}

.premium-card:hover {
  transform: translateY(-4px);
}

.premium-card-light {
  background:
    radial-gradient(circle at top right, rgba(212, 175, 55, 0.08), transparent 30%),
    linear-gradient(180deg, rgba(255,255,255,0.98), rgba(248,250,252,0.96));
  box-shadow: 0 20px 60px rgba(15, 23, 42, 0.08);
}

.premium-card-light:hover {
  border-color: rgba(212, 175, 55, 0.22);
  box-shadow: 0 26px 70px rgba(15, 23, 42, 0.1);
}

.premium-card-dark {
  background:
    radial-gradient(circle at top right, rgba(212, 175, 55, 0.12), transparent 30%),
    linear-gradient(180deg, #0f172a 0%, #111827 100%);
  border-color: rgba(255,255,255,0.08);
  box-shadow: 0 22px 70px rgba(2, 6, 23, 0.24);
}

.premium-card-dark:hover {
  border-color: rgba(212, 175, 55, 0.28);
}

.premium-topline {
  width: 58px;
  height: 2px;
  background: linear-gradient(90deg, #d4af37, rgba(212, 175, 55, 0.18));
}

.premium-eyebrow {
  display: inline-block;
  margin-top: 0.9rem;
  font-size: 0.68rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #8b7355;
  font-weight: 600;
}

.premium-eyebrow-dark {
  color: rgba(255,255,255,0.62);
}

.premium-divider {
  margin-top: 1.5rem;
  height: 1px;
  background: linear-gradient(90deg, rgba(15,23,42,0.12), rgba(15,23,42,0.03));
}

.premium-divider-dark {
  background: linear-gradient(90deg, rgba(255,255,255,0.16), rgba(255,255,255,0.04));
}

.feature-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  border-radius: 16px;
  padding: 0.8rem 0.95rem;
  font-size: 0.92rem;
  letter-spacing: 0.01em;
  transition: background 0.3s ease, border-color 0.3s ease, transform 0.3s ease;
}

.feature-item:hover {
  transform: translateY(-2px);
}

.feature-item-light {
  background: rgba(255,255,255,0.78);
  border: 1px solid rgba(15,23,42,0.06);
  color: #334155;
}

.feature-item-dark {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.86);
}

.feature-icon {
  width: 8px;
  height: 8px;
  border-radius: 9999px;
  background: linear-gradient(135deg, #d4af37, #f3df9b);
  box-shadow: 0 0 0 5px rgba(212, 175, 55, 0.12);
  flex-shrink: 0;
}

.tab-button {
  min-height: 64px;
}

input:not([type="radio"]):not([type="checkbox"]):not([type="range"]), select, textarea {
  background: rgba(255,255,255,0.6);
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: 10px;
  padding: 12px 14px;
  transition: all 0.25s ease;
}

input:not([type="radio"]):not([type="checkbox"]):not([type="range"]):focus, select:focus, textarea:focus {
  outline: none;
  border-color: #0f766e;
  box-shadow: 0 0 0 3px rgba(15,118,110,0.15);
  background: white;
}

input:not([type="radio"]):not([type="checkbox"]):not([type="range"]):hover {
  transform: translateY(-1px);
}

select:hover {
  transform: translateY(-1px);
}

.form-container {
  background: radial-gradient(circle at top right, rgba(15,118,110,0.05), transparent 40%);
}

.quote-flip-section {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 2.5rem 1rem;
  background-image: 
    radial-gradient(circle at top left, rgba(255, 179, 0, 0.16), transparent 16%),
    radial-gradient(circle at bottom right, rgba(10, 75, 57, 0.12), transparent 18%),
    linear-gradient(180deg, rgba(10, 75, 57, 0.249), rgba(10, 75, 57, 0.238)), /* Adjusted opacity to see image */
    url('../assets/images/backdrop.jpg'); 
  background-attachment: fixed; /* This keeps it from moving */
  background-size: cover;       /* Ensures it fills the screen */
  background-position: center;  /* Keeps the focus centered */
  overflow: hidden;
}

.quote-flip-stage,
.quote-flip-form {
  width: 100%;
  display: grid;
  place-items: center;
}

.quote-flip-form {
  gap: 1rem;
}

.quote-flip-card,
.quote-success {
  width: min(90%, 500px);
  max-width: 500px;
}

.quote-flip-card {
  height: 600px;
  max-height: 80vh;
  min-height: 520px;
  perspective: 1600px;
}

.quote-flip-card__inner {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform 0.6s ease;
}

.quote-flip-card.is-flipped .quote-flip-card__inner {
  transform: rotateY(180deg);
}

.quote-card-face {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1.35rem;
  border-radius: 28px;
  border: 1px solid rgba(10, 75, 57, 0.1);
  background:
    radial-gradient(circle at top right, rgba(255, 179, 0, 0.18), transparent 30%),
    linear-gradient(180deg, rgba(255,255,255,0.98), rgba(248,250,252,0.96));
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.14);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  overflow: hidden;
}

.quote-card-face--back {
  transform: rotateY(180deg);
}

.quote-card-face__header {
  padding-bottom: 0.35rem;
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}

.quote-card-face__eyebrow,
.quote-success__eyebrow {
  display: inline-flex;
  align-items: center;
  padding: 0.45rem 0.8rem;
  border-radius: 999px;
  background: rgba(10, 75, 57, 0.08);
  color: var(--secondary-color);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.quote-card-face__title,
.quote-success__title {
  margin-top: 0.95rem;
  color: var(--secondary-color);
  font-size: clamp(1.7rem, 3vw, 2.2rem);
  line-height: 1.08;
}

.quote-card-face__copy,
.quote-success__copy {
  margin-top: 0.65rem;
  color: #5b6472;
  font-size: 1rem;
  line-height: 1.65;
}

.quote-card-face__body {
  flex: 1;
  overflow-y: auto;
  padding-right: 0.25rem;
}

.quote-card-face__body::-webkit-scrollbar {
  width: 6px;
}

.quote-card-face__body::-webkit-scrollbar-thumb {
  background: rgba(10, 75, 57, 0.2);
  border-radius: 999px;
}

.quote-field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.95rem;
}

.quote-field,
.quote-field--full {
  min-width: 0;
}

.quote-field--full {
  grid-column: 1 / -1;
}

.form-label {
  display: block;
  font-size: 1rem;
  font-weight: 700;
  color: #374151;
  letter-spacing: 0.01em;
}

.form-input {
  display: block;
  width: 100%;
  min-height: 52px;
  padding: 0.9rem 1rem;
  border-radius: 16px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: rgba(255, 255, 255, 0.95);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.9), 0 10px 25px rgba(15, 23, 42, 0.04);
  font-size: 1rem;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

input:not([type="radio"]):not([type="checkbox"]):not([type="range"]),
select,
textarea {
  background: rgba(255,255,255,0.95);
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: 16px;
  padding: 0.9rem 1rem;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

input:not([type="radio"]):not([type="checkbox"]):not([type="range"]):focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: #0f766e;
  box-shadow: 0 0 0 3px rgba(15,118,110,0.15);
  background: white;
}

input:not([type="radio"]):not([type="checkbox"]):not([type="range"]):hover,
select:hover,
textarea:hover {
  transform: translateY(-1px);
}

textarea.form-input {
  min-height: 112px;
  resize: vertical;
}

fieldset.quote-field {
  margin: 0;
  padding: 0;
  border: none;
}

.form-radio-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
}

.form-radio-card {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-height: 68px;
  padding: 1rem;
  border-radius: 18px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: rgba(255, 255, 255, 0.92);
  color: #334155;
  cursor: pointer;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.form-radio-card:hover {
  transform: translateY(-2px);
  border-color: rgba(10, 75, 57, 0.2);
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.08);
}

.form-radio-card:has(.form-radio-input:checked) {
  border-color: rgba(10, 75, 57, 0.45);
  background: linear-gradient(180deg, rgba(255, 179, 0, 0.12), rgba(255,255,255,0.98));
  box-shadow: 0 16px 36px rgba(10, 75, 57, 0.1);
}

.form-radio-input {
  width: 1.1rem;
  height: 1.1rem;
  margin: 0;
  accent-color: var(--secondary-color);
  flex-shrink: 0;
}

.quote-card-face__actions {
  display: grid;
  gap: 0.8rem;
  margin-top: auto;
}

.quote-card-face__actions--split {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.quote-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 54px;
  width: 100%;
  padding: 0.95rem 1.1rem;
  border-radius: 16px;
  font-size: 1rem;
  font-weight: 700;
  text-align: center;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease, color 0.25s ease;
}

.quote-action:hover {
  transform: translateY(-1px);
}

.quote-action--primary {
  background: var(--accent-color);
  color: var(--secondary-color);
  box-shadow: 0 18px 30px rgba(255, 179, 0, 0.24);
}

.quote-action--ghost {
  border: 1px solid rgba(10, 75, 57, 0.14);
  background: rgba(255,255,255,0.72);
  color: var(--secondary-color);
}

.form-status {
  margin-top: 0.4rem;
  padding: 0.95rem 1rem;
  border-radius: 16px;
  border: 1px solid transparent;
  text-align: center;
  font-size: 0.98rem;
  font-weight: 700;
  line-height: 1.5;
}

.form-status-error {
  background: rgba(220, 38, 38, 0.08);
  border-color: rgba(220, 38, 38, 0.16);
  color: #991b1b;
}

.quote-success {
  padding: 2rem 1.5rem;
  border-radius: 28px;
  border: 1px solid rgba(10, 75, 57, 0.1);
  background:
    radial-gradient(circle at top right, rgba(255, 179, 0, 0.18), transparent 32%),
    linear-gradient(180deg, rgba(255,255,255,0.98), rgba(248,250,252,0.96));
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.14);
  text-align: center;
}

.quote-success__button {
  margin-top: 1.25rem;
}

@media screen and (max-width: 768px) {
  .quote-flip-card,
  .quote-success {
    width: 95%;
  }

  .quote-flip-card {
    max-height: 80vh;
  }

  .quote-card-face {
    padding: 1.1rem;
    border-radius: 24px;
  }

  .quote-field-grid,
  .form-radio-grid,
  .quote-card-face__actions--split {
    grid-template-columns: 1fr;
  }

  .floating-calculator-btn {
    bottom: 18px;
    right: 18px;
    width: 60px;
    height: 60px;
  }
}

/* ================================
   MOBILE FORM RESCUE PATCH
   Paste at the VERY END of your CSS
================================ */

@media (max-width: 768px) {
  /* overall section */
  .quote-flip-section {
    min-height: auto;
    padding: 1rem 0.75rem;
    overflow: visible;
  }

  .quote-flip-stage {
    width: 100%;
    min-height: auto;
    display: block;
  }

  /* form + card sizing */
  .quote-flip-form {
    width: 100%;
    display: block;
  }

  .quote-flip-card,
  .quote-success {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    margin: 0 auto;
  }

  .quote-flip-card {
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    perspective: none;
  }

  .quote-flip-card__inner {
    height: auto !important;
    transform: none !important;
    display: block;
  }

  /* make both sides behave like normal stacked panels on mobile */
  .quote-card-face,
  .quote-card-face--back {
    position: relative !important;
    inset: auto !important;
    transform: none !important;
    backface-visibility: visible !important;
    -webkit-backface-visibility: visible !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    overflow: visible !important;
    border-radius: 22px;
    padding: 1rem;
  }

  .quote-card-face--back {
    display: none;
    margin-top: 1rem;
  }

  /* when flipped, show back and hide front */
  .quote-flip-card.is-flipped .quote-card-face:first-child {
    display: none;
  }

  .quote-flip-card.is-flipped .quote-card-face--back {
    display: flex;
  }

  .quote-card-face__header {
    padding-bottom: 0.5rem;
  }

  .quote-card-face__title,
  .quote-success__title {
    font-size: 1.5rem;
    line-height: 1.15;
  }

  .quote-card-face__copy,
  .quote-success__copy {
    font-size: 0.95rem;
    line-height: 1.55;
  }

  .quote-card-face__body {
    overflow: visible !important;
    padding-right: 0;
  }

  /* one-column layout for all fields */
  .quote-field-grid,
  .form-radio-grid,
  .quote-card-face__actions--split {
    grid-template-columns: 1fr !important;
  }

  .quote-field,
  .quote-field--full,
  fieldset.quote-field {
    width: 100%;
    min-width: 0;
  }

  /* inputs */
  .form-label {
    font-size: 0.95rem;
    margin-bottom: 0.35rem;
  }

  .form-input,
  input:not([type="radio"]):not([type="checkbox"]):not([type="range"]),
  select,
  textarea {
    width: 100% !important;
    min-width: 0;
    font-size: 16px !important; /* prevents iPhone zoom */
    line-height: 1.4;
    padding: 0.85rem 0.95rem;
    border-radius: 14px;
  }

  textarea.form-input,
  textarea {
    min-height: 96px;
  }

  /* radio cards */
  .form-radio-card {
    min-height: 58px;
    padding: 0.85rem 0.95rem;
    border-radius: 16px;
  }

  /* buttons */
  .quote-card-face__actions {
    margin-top: 1rem;
    gap: 0.75rem;
  }

  .quote-action,
  .quote-action--primary,
  .quote-action--ghost {
    width: 100%;
    min-height: 52px;
    font-size: 1rem;
    border-radius: 14px;
    padding: 0.9rem 1rem;
  }

  /* success box */
  .quote-success {
    padding: 1.25rem 1rem;
    border-radius: 22px;
  }
}

@media (max-width: 480px) {
  .quote-flip-section {
    padding: 0.75rem 0.5rem;
  }

  .quote-card-face,
  .quote-card-face--back,
  .quote-success {
    padding: 0.9rem;
    border-radius: 18px;
  }

  .quote-card-face__title,
  .quote-success__title {
    font-size: 1.3rem;
  }

  .quote-card-face__eyebrow,
  .quote-success__eyebrow {
    font-size: 0.68rem;
    letter-spacing: 0.1em;
  }
}

/* Mobile roof simulation performance rescue */
@media (max-width: 768px) {
  .roof-visualization-bg {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    filter: none !important;
    background: linear-gradient(180deg, rgba(8,31,26,0.97), rgba(10,38,32,0.97)) !important;
    box-shadow: 0 6px 14px rgba(0,0,0,0.10) !important;
  }

  .roof-container,
  .roof-wrapper,
  .roof-grid,
  .roof-shadow {
    transform: none !important;
    filter: none !important;
    will-change: auto !important;
    animation: none !important;
  }

  .roof-shadow {
    display: none !important;
  }

  .roof-tooltip {
    display: none !important;
  }

  .roof-grid {
    width: 100% !important;
    max-width: 260px !important;
    height: 120px !important;
    border-width: 2px !important;
    box-shadow: none !important;
  }

  .roof-grid .roof-tile,
  .roof-grid .tile,
  .roof-grid [class*="tile"] {
    box-shadow: none !important;
    filter: none !important;
    transition: none !important;
  }
}

@media screen and (max-width: 767px) {
  .roof-desktop-only {
    display: none !important;
    visibility: hidden !important;
    height: 0 !important;
    overflow: hidden !important;
    margin: 0 !important;
    padding: 0 !important;
  }
}

/* Hide mobile button by default */
.mobile-download-btn {
  display: none;
}

/* Show ONLY on mobile + tablet */
@media (max-width: 1024px) {
  .mobile-download-btn {
    display: block;
    margin-top: 1rem;
  }
}

/* Hide nav button on mobile (optional but recommended) */
@media (max-width: 768px) {
  .downloadButton {
    display: none !important;
  }
}

.mobile-download-btn button {
  box-shadow: 0 12px 30px rgba(255, 179, 0, 0.25);
}

.mobile-download-btn button:active {
  transform: scale(0.98);
}

.call-btn:hover {
  transform: translateY(-1px);
}

.call-btn:active {
  transform: scale(0.98);
}

/* Desktop form restore patch */
@media (min-width: 769px) {
  .quote-flip-section {
    min-height: 100vh !important;
    display: grid !important;
    place-items: center !important;
    padding: 2.5rem 1rem !important;
    overflow: hidden !important;
  }

  .quote-flip-stage,
  .quote-flip-form {
    width: 100% !important;
    display: grid !important;
    place-items: center !important;
  }

  .quote-flip-card,
  .quote-success {
    width: min(90%, 500px) !important;
    max-width: 500px !important;
  }

  .quote-flip-card {
    height: 600px !important;
    max-height: 80vh !important;
    min-height: 520px !important;
    perspective: 1600px !important;
  }

  .quote-flip-card__inner {
    position: relative !important;
    width: 100% !important;
    height: 100% !important;
    transform-style: preserve-3d !important;
    transition: transform 0.6s ease !important;
  }

  .quote-card-face {
    position: absolute !important;
    inset: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 1rem !important;
    overflow: hidden !important;
    backface-visibility: hidden !important;
    -webkit-backface-visibility: hidden !important;
  }

  .quote-card-face--back {
    transform: rotateY(180deg) !important;
  }

  .quote-card-face__body {
    flex: 1 !important;
    overflow-y: auto !important;
    padding-right: 0.25rem !important;
  }
}

