/*
Theme Name: CasaFlex 2026
Theme URI: https://www.casaflex.us
Author: CasaFlex
Description: Brand-aligned WordPress theme for CasaFlex.
Version: 1.0.0
Text Domain: casaflex
*/

:root {
  --navy: #1b3d6f;
  --amber: #f5a623;
  --sky: #2d86c4;
  --pearl: #f4f7fb;
  --ink: #1a2332;
  --slate: #4a5e70;
  --muted: #8899ab;
  --white: #ffffff;
  --line: #dce5ef;
  --shadow: 0 18px 45px rgba(27, 61, 111, 0.13);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--pearl);
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.7;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}

.site-shell {
  min-height: 100vh;
  background:
    linear-gradient(180deg, rgba(244, 247, 251, 0) 0%, var(--pearl) 56%),
    var(--pearl);
}

.container {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  z-index: 20;
  top: 0;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid rgba(220, 229, 239, 0.9);
  backdrop-filter: blur(14px);
}

.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 76px;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  min-width: 178px;
}

.brand-mark {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
}

.brand-word {
  display: grid;
  gap: 0;
}

.brand-name {
  color: var(--navy);
  font-family: "Montserrat", sans-serif;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1;
}

.brand-name span {
  color: var(--amber);
}

.brand-tagline {
  color: var(--amber);
  font-family: "Montserrat", sans-serif;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.16em;
  line-height: 1.6;
  white-space: nowrap;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.main-nav a {
  border-radius: 999px;
  color: var(--slate);
  font-size: 14px;
  font-weight: 700;
  padding: 10px 13px;
}

.main-nav a:hover,
.main-nav a:focus {
  background: var(--pearl);
  color: var(--navy);
}

.language-switcher {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--white);
  padding: 3px;
}

.main-nav .language-switcher-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  min-height: 30px;
  border-radius: 999px;
  color: var(--slate);
  font-family: "Montserrat", sans-serif;
  font-size: 12px;
  font-weight: 800;
  padding: 6px 9px;
}

.main-nav .language-switcher-link.is-active {
  background: var(--navy);
  color: var(--white);
}

.button,
.wp-block-button__link,
button,
input[type="submit"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  border: 0;
  border-radius: 8px;
  background: var(--amber);
  color: var(--ink);
  cursor: pointer;
  font-family: "Montserrat", sans-serif;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.1;
  padding: 14px 18px;
  text-transform: uppercase;
  transition: transform 150ms ease, box-shadow 150ms ease, background 150ms ease;
}

.button:hover,
.wp-block-button__link:hover,
button:hover,
input[type="submit"]:hover {
  background: #ffb743;
  box-shadow: 0 12px 26px rgba(245, 166, 35, 0.26);
  transform: translateY(-1px);
}

.button.secondary {
  background: var(--white);
  color: var(--navy);
  box-shadow: inset 0 0 0 1px var(--line);
}

.hero {
  position: relative;
  min-height: clamp(610px, 82vh, 820px);
  isolation: isolate;
  overflow: hidden;
  background: var(--navy);
}

.hero::before {
  position: absolute;
  inset: 0;
  z-index: -3;
  background-image: url("assets/casaflex-hero.png");
  background-position: center right;
  background-size: cover;
  content: "";
}

.hero::after {
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    linear-gradient(90deg, rgba(27, 61, 111, 0.96) 0%, rgba(27, 61, 111, 0.84) 38%, rgba(27, 61, 111, 0.24) 72%, rgba(27, 61, 111, 0.08) 100%);
  content: "";
}

.hero-inner {
  display: flex;
  align-items: center;
  min-height: clamp(610px, 82vh, 820px);
  padding: 72px 0 96px;
}

.hero-copy {
  width: min(610px, 100%);
  color: var(--white);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 18px;
  color: #ffe2aa;
  font-family: "Montserrat", sans-serif;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.eyebrow::before {
  display: block;
  width: 28px;
  height: 3px;
  border-radius: 999px;
  background: var(--amber);
  content: "";
}

h1,
h2,
h3,
h4,
.page-title {
  margin: 0;
  color: var(--ink);
  font-family: "Montserrat", sans-serif;
  letter-spacing: 0;
  line-height: 1.08;
}

h1 {
  color: var(--white);
  font-size: clamp(44px, 6vw, 78px);
  font-weight: 800;
  max-width: 760px;
}

h2,
.page-title {
  color: var(--navy);
  font-size: clamp(30px, 4vw, 48px);
  font-weight: 800;
}

h3 {
  color: var(--navy);
  font-size: 22px;
  font-weight: 800;
}

.hero-lede {
  max-width: 570px;
  margin: 22px 0 0;
  color: rgba(255, 255, 255, 0.88);
  font-size: clamp(18px, 2vw, 21px);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

.hero-proof {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  max-width: 610px;
  margin-top: 42px;
}

.proof-item {
  min-height: 96px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.1);
  padding: 14px;
}

.proof-item strong {
  display: block;
  color: var(--amber);
  font-family: "Montserrat", sans-serif;
  font-size: 22px;
  font-weight: 800;
}

.proof-item span {
  color: rgba(255, 255, 255, 0.82);
  font-size: 13px;
  line-height: 1.35;
}

.section {
  padding: 86px 0;
}

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

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 28px;
  margin-bottom: 34px;
}

.section-head p {
  max-width: 520px;
  margin: 0;
  color: var(--slate);
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(360px, 1.05fr);
  gap: 44px;
  align-items: center;
}

.option-grid,
.steps-grid,
.property-grid,
.post-grid {
  display: grid;
  gap: 18px;
}

.option-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.steps-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.property-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.post-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.panel,
.option-card,
.step-card,
.property-card,
.post-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: 0 6px 22px rgba(27, 61, 111, 0.06);
}

.option-card,
.step-card,
.post-card {
  padding: 24px;
}

.option-card p,
.step-card p,
.post-card p {
  margin: 12px 0 0;
  color: var(--slate);
}

.icon-box {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  margin-bottom: 18px;
  border-radius: var(--radius);
  background: rgba(245, 166, 35, 0.18);
  color: var(--navy);
  font-family: "Montserrat", sans-serif;
  font-weight: 800;
}

.advisor-panel {
  position: relative;
  overflow: hidden;
  padding: 28px;
}

.advisor-panel::before {
  display: block;
  width: 100%;
  height: 8px;
  margin: -28px -28px 24px;
  background: linear-gradient(90deg, var(--amber), var(--sky));
  content: "";
}

.advisor-panel ul {
  display: grid;
  gap: 12px;
  margin: 22px 0 0;
  padding: 0;
  list-style: none;
}

.advisor-panel li {
  display: flex;
  gap: 10px;
  color: var(--slate);
}

.advisor-panel li::before {
  color: var(--amber);
  content: "✓";
  font-weight: 800;
}

.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  margin-bottom: 18px;
  border-radius: 50%;
  background: var(--navy);
  color: var(--white);
  font-family: "Montserrat", sans-serif;
  font-weight: 800;
}

.property-card {
  overflow: hidden;
}

.property-visual {
  position: relative;
  min-height: 170px;
  background:
    linear-gradient(135deg, rgba(27, 61, 111, 0.88), rgba(45, 134, 196, 0.72)),
    linear-gradient(45deg, #d8e5f1, #ffffff);
}

.property-visual::before {
  position: absolute;
  right: 22px;
  bottom: 18px;
  width: 104px;
  height: 70px;
  border-radius: 6px 6px 0 0;
  background: rgba(255, 255, 255, 0.88);
  clip-path: polygon(0 38%, 50% 0, 100% 38%, 100% 100%, 0 100%);
  content: "";
}

.property-visual::after {
  position: absolute;
  right: 62px;
  bottom: 18px;
  width: 22px;
  height: 36px;
  border-radius: 4px 4px 0 0;
  background: var(--amber);
  content: "";
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  border-radius: 999px;
  background: rgba(245, 166, 35, 0.16);
  color: var(--navy);
  font-family: "Montserrat", sans-serif;
  font-size: 12px;
  font-weight: 800;
  padding: 5px 10px;
  text-transform: uppercase;
}

.property-badge {
  position: absolute;
  top: 14px;
  left: 14px;
  background: var(--amber);
  color: var(--ink);
}

.property-body {
  padding: 22px;
}

.property-body p {
  margin: 8px 0 18px;
  color: var(--slate);
}

.price-line {
  display: flex;
  align-items: baseline;
  gap: 4px;
  color: var(--navy);
  font-family: "Montserrat", sans-serif;
}

.price-line strong {
  font-size: 30px;
  font-weight: 800;
}

.price-line span {
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.cta-band {
  background: var(--navy);
  color: var(--white);
}

.cta-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}

.cta-wrap h2 {
  color: var(--white);
}

.cta-wrap p {
  max-width: 610px;
  margin: 14px 0 0;
  color: rgba(255, 255, 255, 0.82);
}

.page-hero {
  padding: 78px 0 48px;
  background: var(--white);
  border-bottom: 1px solid var(--line);
}

.page-hero .page-title {
  max-width: 760px;
}

.page-hero p {
  max-width: 680px;
  margin: 18px 0 0;
  color: var(--slate);
  font-size: 18px;
}

.content-wrap {
  padding: 56px 0 86px;
}

.entry-content {
  max-width: 780px;
  color: var(--slate);
}

.entry-content a {
  color: var(--sky);
  font-weight: 700;
}

.post-card h2 {
  font-size: 24px;
}

.post-meta {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
}

.site-footer {
  background: var(--ink);
  color: rgba(255, 255, 255, 0.78);
  padding: 60px 40px 30px;
}

.site-footer-grid {
  display: grid;
  grid-template-columns: 1.35fr 0.8fr 0.8fr 2.05fr;
  gap: 44px;
  align-items: start;
  max-width: 1100px;
  margin: 0 auto;
  padding-bottom: 42px;
}

.site-footer .brand {
  align-items: flex-start;
}

.site-footer .brand-name {
  color: var(--white);
}

.site-footer .brand-tagline {
  color: var(--amber);
  white-space: nowrap;
}

.site-footer-brand p {
  max-width: 290px;
  margin: 20px 0 0;
  color: rgba(255, 255, 255, 0.42);
  font-size: 13px;
  line-height: 1.8;
}

.site-footer-brand .footer-built {
  margin-top: 16px;
  color: rgba(255, 255, 255, 0.3);
  font-family: "Montserrat", sans-serif;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.14em;
  line-height: 1.5;
  text-transform: uppercase;
}

.footer-about-link {
  display: inline-block;
  margin-top: 12px;
  color: rgba(255, 255, 255, 0.45);
  font-family: "Montserrat", sans-serif;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.footer-about-link:hover {
  color: var(--amber);
}

.site-footer-col {
  display: flex;
  flex-direction: column;
  gap: 14px;
  color: rgba(255, 255, 255, 0.5);
  font-style: normal;
}

.site-footer-col h4 {
  margin: 0 0 6px;
  color: rgba(255, 255, 255, 0.32);
  font-family: "Montserrat", sans-serif;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.site-footer-col a,
.site-footer-col span {
  color: rgba(255, 255, 255, 0.5);
  font-size: 13.5px;
  line-height: 1.55;
}

.site-footer-col a:hover {
  color: var(--amber);
}

.site-footer-contact-row {
  display: grid;
  grid-template-columns: minmax(130px, 0.78fr) minmax(240px, 1.22fr);
  gap: 16px;
  align-items: start;
}

.site-footer-contact-info {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.footer-form-wrap {
  width: 100%;
  margin-top: 0;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  overflow: hidden;
}

.footer-form-frame {
  display: block;
  width: 100%;
  min-height: 430px;
  border: 0;
  border-radius: 8px;
  overflow: hidden;
}

.footer-form-frame[data-es] {
  display: none;
}

body.lang-es .footer-form-frame[data-en] {
  display: none;
}

body.lang-es .footer-form-frame[data-es] {
  display: block;
}

.site-footer-legal {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  max-width: 1100px;
  margin: 0 auto;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.site-footer-legal p,
.site-footer-legal a {
  margin: 0;
  color: rgba(255, 255, 255, 0.25);
  font-family: "Montserrat", sans-serif;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.site-footer-legal nav {
  display: flex;
  align-items: center;
  gap: 16px;
}

.site-footer-legal a:hover {
  color: var(--amber);
}

.legacy-footer-links {
  display: none;
}

@media (max-width: 860px) {
  .nav-wrap,
  .section-head,
  .cta-wrap {
    align-items: flex-start;
    flex-direction: column;
  }

  .main-nav {
    width: 100%;
    overflow-x: auto;
    padding-bottom: 10px;
  }

  .hero {
    min-height: auto;
  }

  .hero::before {
    background-position: 60% center;
  }

  .hero::after {
    background: linear-gradient(90deg, rgba(27, 61, 111, 0.97) 0%, rgba(27, 61, 111, 0.9) 68%, rgba(27, 61, 111, 0.58) 100%);
  }

  .hero-inner {
    min-height: 680px;
  }

  .hero-proof,
  .option-grid,
  .steps-grid,
  .property-grid,
  .post-grid,
  .split {
    grid-template-columns: 1fr;
  }

  .site-footer {
    padding: 40px 24px 30px;
  }

  .site-footer-grid {
    grid-template-columns: 1fr;
    gap: 30px;
    padding-bottom: 34px;
  }

  .site-footer-brand p {
    max-width: none;
  }

  .site-footer-legal {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }

  .site-footer-contact-row {
    grid-template-columns: 1fr;
  }

  .footer-form-frame {
    min-height: 420px;
  }
}

@media (max-width: 560px) {
  .container {
    width: min(100% - 28px, 1120px);
  }

  .site-header {
    position: static;
  }

  .main-nav a {
    padding: 9px 10px;
    white-space: nowrap;
  }

  .hero-inner {
    min-height: 620px;
    padding: 54px 0 72px;
  }

  h1 {
    font-size: 42px;
  }

  .hero-proof {
    margin-top: 30px;
  }

  .section {
    padding: 62px 0;
  }
}
