/* HoustonHomeShine.com — layout.css
   Page scaffolding: header, navigation, hero, sections, footer, floating CTA, popup. */

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  font-size: var(--fs-base);
  line-height: var(--lh-body);
  color: var(--c-text);
  background-color: var(--c-cream);
  overflow-x: hidden;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: clamp(1.1rem, 3.4vw, 2.5rem);
}

.container--narrow {
  max-width: var(--container-narrow);
}

/* ---------- Skip link ---------- */
.skip-link {
  position: absolute;
  left: 1rem;
  top: -100%;
  z-index: 300;
  padding: 0.8rem 1.25rem;
  background: var(--c-cream);
  color: var(--c-emerald);
  border-radius: var(--radius);
  font-weight: 700;
  transition: top var(--dur) var(--ease);
}

.skip-link:focus {
  top: 1rem;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 150;
  background: var(--c-emerald);
  color: var(--c-text-on-dark);
  border-bottom: 1px solid rgba(247, 243, 233, 0.14);
  box-shadow: 0 2px 18px rgba(16, 58, 42, 0.16);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: var(--sp-5);
  min-height: var(--header-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  font-weight: 700;
  font-size: 1.16rem;
  letter-spacing: -0.015em;
  color: var(--c-text-on-dark);
  flex-shrink: 0;
}

.brand__mark {
  display: grid;
  place-items: center;
  width: 2.3rem;
  height: 2.3rem;
  border-radius: 50%;
  background: var(--c-sage);
  color: var(--c-emerald);
  font-size: 1rem;
  box-shadow: inset 0 0 0 1px rgba(23, 77, 56, 0.1);
}

.brand__name {
  font-family: var(--font-display);
  font-weight: 700;
}

.brand__tld {
  color: var(--c-sage-deep);
  font-family: var(--font-sans);
  font-size: 0.72em;
  font-weight: 600;
}

/* ---------- Primary navigation ---------- */
.primary-nav {
  margin-left: auto;
}

.nav-list {
  display: flex;
  align-items: center;
  gap: 0.15rem;
}

.nav-item {
  position: relative;
}

.nav-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  padding: 0.65rem 0.85rem;
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--c-text-on-dark);
  border-radius: var(--radius-sm);
  white-space: nowrap;
  transition: color var(--dur) var(--ease), background var(--dur) var(--ease);
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 0.85rem;
  right: 0.85rem;
  bottom: 0.25rem;
  height: 2px;
  border-radius: 2px;
  background: var(--c-gold);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--dur) var(--ease);
}

.nav-link:hover,
.nav-link:focus-visible {
  color: #fff;
  background: rgba(247, 243, 233, 0.09);
}

.nav-link:hover::after,
.nav-link:focus-visible::after,
.nav-link[aria-current="page"]::after {
  transform: scaleX(1);
}

.nav-link[aria-current="page"] {
  color: #fff;
}

.header-cta {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  flex-shrink: 0;
}

/* ---------- Mobile nav toggle ---------- */
.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(247, 243, 233, 0.4);
  background: transparent;
  color: var(--c-cream);
  cursor: pointer;
}

.nav-toggle__bars,
.nav-toggle__bars::before,
.nav-toggle__bars::after {
  display: block;
  width: 1.25rem;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
  transition: transform var(--dur) var(--ease), opacity var(--dur) var(--ease);
}

.nav-toggle__bars {
  position: relative;
}

.nav-toggle__bars::before,
.nav-toggle__bars::after {
  content: "";
  position: absolute;
  left: 0;
}

.nav-toggle__bars::before {
  top: -6px;
}

.nav-toggle__bars::after {
  top: 6px;
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bars {
  background: transparent;
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bars::before {
  transform: translateY(6px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bars::after {
  transform: translateY(-6px) rotate(-45deg);
}

/* ---------- Homepage hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  padding-block: clamp(3.5rem, 7vw, 6.5rem);
  background:
    radial-gradient(42rem 30rem at 88% 8%, rgba(220, 233, 217, 0.95), transparent 64%),
    radial-gradient(30rem 24rem at 4% 96%, rgba(239, 232, 216, 0.85), transparent 70%),
    var(--c-cream);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(23, 77, 56, 0.055) 1px, transparent 1px);
  background-size: 22px 22px;
  pointer-events: none;
  opacity: 0.55;
}

.hero__inner {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.04fr) minmax(0, 0.96fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}

.hero__content {
  max-width: 42rem;
}

.hero__eyebrow,
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.38rem 0.85rem;
  border-radius: var(--radius-pill);
  background: var(--c-sage);
  color: var(--c-emerald);
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.hero__title {
  margin-top: 1.15rem;
  font-family: var(--font-display);
  font-size: var(--fs-hero);
  line-height: var(--lh-tight);
  letter-spacing: -0.025em;
  color: var(--c-emerald);
  text-wrap: balance;
}

.hero__lead {
  margin-top: 1.25rem;
  max-width: 38rem;
  font-size: var(--fs-md);
  color: var(--c-text-muted);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-top: 2rem;
}

.hero__note {
  margin-top: 1.1rem;
  font-size: var(--fs-sm);
  color: var(--c-text-faint);
}

.hero__media {
  position: relative;
}

.hero__media img {
  width: 100%;
  aspect-ratio: 16 / 11;
  object-fit: cover;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  border: 1px solid rgba(23, 77, 56, 0.12);
}

.hero__badge {
  position: absolute;
  left: -0.75rem;
  bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.9rem 1.1rem;
  border-radius: var(--radius-lg);
  background: var(--c-white);
  box-shadow: var(--shadow);
  border: 1px solid var(--c-border);
  max-width: 18rem;
}

.hero__badge strong {
  display: block;
  color: var(--c-emerald);
  font-size: var(--fs-sm);
}

.hero__badge span {
  display: block;
  font-size: var(--fs-xs);
  color: var(--c-text-muted);
}

.hero__badge-icon {
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--c-sage);
  color: var(--c-emerald);
}

/* ---------- Inner page hero ---------- */
.page-hero {
  position: relative;
  padding-block: clamp(2.6rem, 5vw, 4.5rem);
  background:
    radial-gradient(34rem 22rem at 92% 0%, rgba(220, 233, 217, 0.9), transparent 70%),
    var(--c-cream);
  border-bottom: 1px solid var(--c-border);
}

.page-hero h1 {
  font-family: var(--font-display);
  font-size: var(--fs-2xl);
  line-height: var(--lh-tight);
  letter-spacing: -0.02em;
  color: var(--c-emerald);
  max-width: 52rem;
  text-wrap: balance;
}

.page-hero p {
  margin-top: 1rem;
  max-width: 46rem;
  color: var(--c-text-muted);
  font-size: var(--fs-md);
}

.page-hero--emerald {
  background:
    radial-gradient(34rem 22rem at 92% 0%, rgba(47, 112, 87, 0.55), transparent 70%),
    var(--c-emerald);
  border-bottom: 0;
}

.page-hero--emerald h1,
.page-hero--emerald p {
  color: var(--c-cream);
}

.page-hero--emerald p {
  color: var(--c-text-on-dark-muted);
}

/* ---------- Sections ---------- */
.section {
  padding-block: clamp(3rem, 6vw, 5.5rem);
  background: var(--c-cream);
}

.section--tight {
  padding-block: clamp(2.25rem, 4vw, 3.5rem);
}

.section--white {
  background: var(--c-white);
}

.section--sage {
  background: var(--c-sage);
}

.section--cream-deep {
  background: var(--c-cream-deep);
}

.section--emerald {
  background: var(--c-emerald);
  color: var(--c-text-on-dark);
}

.section--emerald h2,
.section--emerald h3 {
  color: var(--c-cream);
}

.section--emerald p {
  color: var(--c-text-on-dark-muted);
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--sp-5);
  flex-wrap: wrap;
  margin-bottom: clamp(1.75rem, 3vw, 2.75rem);
}

.section-head__copy {
  max-width: 44rem;
}

.section-title {
  font-family: var(--font-display);
  font-size: var(--fs-xl);
  line-height: 1.18;
  letter-spacing: -0.018em;
  color: var(--c-emerald);
  text-wrap: balance;
}

.section--emerald .section-title {
  color: var(--c-cream);
}

.section-lead {
  margin-top: 0.75rem;
  color: var(--c-text-muted);
  font-size: var(--fs-md);
}

.section--emerald .section-lead {
  color: var(--c-text-on-dark-muted);
}

.section-link {
  font-weight: 700;
  color: var(--c-emerald);
  white-space: nowrap;
}

.section-link:hover {
  color: var(--c-emerald-soft);
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--c-emerald-dark);
  color: var(--c-text-on-dark);
  padding-block: clamp(3rem, 5vw, 4.5rem) 1.5rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.55fr 1.15fr 1fr 1.2fr;
  gap: clamp(2rem, 4vw, 3.5rem);
}

.brand--footer {
  margin-bottom: 1rem;
}

.footer-brand p {
  color: var(--c-text-on-dark-muted);
  font-size: var(--fs-sm);
  max-width: 30rem;
}

.footer-disclaimer {
  margin-top: 1rem;
  font-size: var(--fs-xs) !important;
  color: rgba(247, 243, 233, 0.58) !important;
  line-height: 1.6;
}

.footer-title {
  font-family: var(--font-sans);
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--c-sage-deep);
  margin-bottom: 1rem;
}

.footer-links {
  display: grid;
  gap: 0.55rem;
}

.footer-links a {
  color: var(--c-text-on-dark-muted);
  font-size: var(--fs-sm);
}

.footer-links a:hover {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.footer-contact {
  display: grid;
  gap: 0.8rem;
  font-size: var(--fs-sm);
  color: var(--c-text-on-dark-muted);
}

.footer-contact a {
  color: var(--c-cream);
  font-weight: 600;
  overflow-wrap: anywhere;
}

.footer-contact a:hover {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.footer-label {
  display: block;
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--c-sage-deep);
  margin-bottom: 0.15rem;
}

.footer-note-small {
  margin-top: 1rem;
  font-size: var(--fs-xs);
  color: rgba(247, 243, 233, 0.55);
}

.footer-note {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: clamp(2rem, 4vw, 3rem);
  padding-top: 1.5rem;
  border-top: 1px solid rgba(247, 243, 233, 0.16);
  font-size: var(--fs-xs);
  color: rgba(247, 243, 233, 0.62);
}

/* ---------- Floating call-to-action ---------- */
.floating-cta {
  position: fixed;
  right: clamp(0.9rem, 2vw, 1.6rem);
  bottom: clamp(0.9rem, 2vw, 1.6rem);
  z-index: 120;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.5rem;
}

.floating-cta__quote,
.floating-cta__shine {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 2.9rem;
  padding: 0.65rem 1.1rem;
  border-radius: var(--radius-pill);
  font-size: var(--fs-sm);
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  box-shadow: 0 12px 28px rgba(16, 58, 42, 0.24);
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease),
    background var(--dur) var(--ease);
}

.floating-cta__quote {
  background: var(--c-emerald);
  color: var(--c-cream);
  border: 1px solid rgba(247, 243, 233, 0.22);
}

.floating-cta__shine {
  background: var(--c-white);
  color: var(--c-emerald);
  border: 1px solid var(--c-sage-deep);
  font-size: var(--fs-xs);
  letter-spacing: 0.07em;
  min-height: 2.35rem;
  padding: 0.45rem 0.95rem;
}

.floating-cta__quote:hover,
.floating-cta__shine:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 34px rgba(16, 58, 42, 0.3);
}

.floating-cta__quote:focus-visible,
.floating-cta__shine:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring), 0 12px 28px rgba(16, 58, 42, 0.24);
}

/* ---------- Promotional popup ---------- */
.promo-popup {
  position: fixed;
  inset: 0;
  z-index: 400;
  display: none;
  place-items: center;
  padding: 1.25rem;
}

.promo-popup[aria-hidden="false"] {
  display: grid;
}

.promo-popup__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(16, 58, 42, 0.55);
  backdrop-filter: blur(3px);
}

.promo-popup__card {
  position: relative;
  width: min(32rem, 100%);
  padding: clamp(1.75rem, 4vw, 2.5rem);
  border-radius: var(--radius-xl);
  background:
    radial-gradient(18rem 12rem at 100% 0%, rgba(220, 233, 217, 0.95), transparent 70%),
    var(--c-white);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--c-border);
  text-align: center;
  animation: popup-in 260ms var(--ease) both;
}

@keyframes popup-in {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.promo-popup__close {
  position: absolute;
  top: 0.9rem;
  right: 0.9rem;
  width: 2.4rem;
  height: 2.4rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid var(--c-border);
  background: var(--c-white);
  color: var(--c-emerald);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
}

.promo-popup__close:hover {
  background: var(--c-sage);
}

.promo-popup__eyebrow {
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--c-emerald-soft);
}

.promo-popup__title {
  margin-top: 0.6rem;
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 1.2rem + 2vw, 2.35rem);
  line-height: 1.15;
  color: var(--c-emerald);
}

.promo-popup__subtitle {
  margin-top: 0.45rem;
  font-family: var(--font-display);
  font-size: var(--fs-lg);
  color: var(--c-emerald);
}

.promo-popup__text {
  margin: 1rem auto 1.5rem;
  max-width: 24rem;
  font-size: var(--fs-sm);
  color: var(--c-text-muted);
}

.promo-popup__later {
  display: block;
  margin: 0.85rem auto 0;
  padding: 0.35rem;
  border: 0;
  background: none;
  color: var(--c-text-faint);
  font-size: var(--fs-sm);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

body.popup-open {
  overflow: hidden;
}

/* ---------- Misc ---------- */
.mt-0 { margin-top: 0 !important; }
.mt-4 { margin-top: var(--sp-4); }
.mt-5 { margin-top: var(--sp-5); }
.mt-6 { margin-top: var(--sp-6); }
.mb-0 { margin-bottom: 0 !important; }
.text-center { text-align: center; }
.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

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