/* ==========================================================================
   Cristian Gonzalez / eXp Realty
   Shared design system for searchthevillageshomes.com and homesinmiddletonfl.com
   Edit here only. Never hardcode a color, font, or spacing value in a page.
   ========================================================================== */

:root {
  /* Brand */
  --forest:        #1B3A2D;
  --forest-deep:   #12271E;
  --forest-soft:   #2A5442;
  --gold:          #C9A84C;
  --gold-bright:   #DFC170;
  --gold-deep:     #9E8230;

  /* Neutrals */
  --ink:           #16211C;
  --body:          #3C4A44;
  --muted:         #6B7A73;
  --line:          #DFE5E1;
  --line-soft:     #EDF1EF;
  --paper:         #FFFFFF;
  --paper-warm:    #F7F8F6;
  --paper-sink:    #EFF2F0;

  /* Signal */
  --good:          #2F6E4E;
  --warn:          #8A6A1F;

  /* Type */
  --display: "Playfair Display", Georgia, "Times New Roman", serif;
  --text:    "Barlow", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;

  /* Scale */
  --step--1: clamp(.82rem, .80rem + .10vw, .88rem);
  --step-0:  clamp(1rem, .97rem + .16vw, 1.09rem);
  --step-1:  clamp(1.19rem, 1.12rem + .34vw, 1.42rem);
  --step-2:  clamp(1.42rem, 1.29rem + .64vw, 1.85rem);
  --step-3:  clamp(1.69rem, 1.47rem + 1.08vw, 2.40rem);
  --step-4:  clamp(2.01rem, 1.66rem + 1.74vw, 3.13rem);
  --step-5:  clamp(2.40rem, 1.85rem + 2.72vw, 4.07rem);

  /* Space */
  --s1: .25rem;  --s2: .5rem;   --s3: .75rem;  --s4: 1rem;
  --s5: 1.5rem;  --s6: 2rem;    --s7: 3rem;    --s8: 4rem;   --s9: 6rem;

  --gutter: 1rem;
  --measure: 68ch;
  --wrap: 1140px;
  --wrap-narrow: 760px;

  --radius: 4px;
  --radius-lg: 8px;
  --shadow: 0 1px 2px rgba(22,33,28,.06), 0 8px 24px rgba(22,33,28,.06);
  --shadow-lg: 0 2px 4px rgba(22,33,28,.06), 0 18px 48px rgba(22,33,28,.10);
}

@media (min-width: 40rem) { :root { --gutter: 2rem; } }

/* --------------------------------------------------------------- reset */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

body {
  font-family: var(--text);
  font-size: var(--step-0);
  line-height: 1.65;
  color: var(--body);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, svg, video { display: block; max-width: 100%; height: auto; }
a { color: var(--forest-soft); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--forest); }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; border-radius: 2px; }

/* --------------------------------------------------------------- type */
h1, h2, h3, h4 {
  font-family: var(--display);
  color: var(--ink);
  line-height: 1.15;
  font-weight: 600;
  letter-spacing: -.01em;
  text-wrap: balance;
}
h1 { font-size: var(--step-5); }
h2 { font-size: var(--step-3); }
h3 { font-size: var(--step-2); }
h4 { font-size: var(--step-1); }

p, li { max-width: var(--measure); text-wrap: pretty; }

.eyebrow {
  font-family: var(--text);
  font-size: var(--step--1);
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--gold-deep);
  margin-bottom: var(--s3);
}
.lede { font-size: var(--step-1); color: var(--body); }

/* The AEO extraction block. One per question heading. 40-60 words. */
.answer {
  font-size: var(--step-1);
  line-height: 1.55;
  color: var(--ink);
  border-left: 3px solid var(--gold);
  padding: var(--s3) 0 var(--s3) var(--s5);
  margin: var(--s4) 0 var(--s5);
  max-width: var(--measure);
}

/* --------------------------------------------------------------- layout */
.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.wrap-narrow { max-width: var(--wrap-narrow); }
.section { padding-block: var(--s8); }
.section--tight { padding-block: var(--s7); }
.section--sink { background: var(--paper-warm); }
.section--dark { background: var(--forest); color: #D6E0DA; }
.section--dark h2, .section--dark h3 { color: #fff; }
.section--dark .eyebrow { color: var(--gold-bright); }
.section--dark a { color: var(--gold-bright); }

.stack > * + * { margin-top: var(--s4); }
.stack-lg > * + * { margin-top: var(--s6); }

.grid { display: grid; gap: var(--s5); }
/* Grid and flex items default to min-width:auto, so a child wider than the track
   (a table, which carries min-width: 480px) stretches the track instead of
   scrolling inside .table-scroll, pushing the page past the viewport at 375px.
   Keep this in sync with the Villages site's stylesheet. */
.grid > * { min-width: 0; }
.grid .field { align-self: start; }
@media (min-width: 48rem) {
  .grid-2 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .split   { grid-template-columns: 1.15fr .85fr; gap: var(--s7); align-items: start; }
}
@media (min-width: 64rem) { .grid-4 { grid-template-columns: repeat(4, 1fr); } }

/* --------------------------------------------------------------- header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.96);
  backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid var(--line);
}
.site-header__inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--s4); min-height: 68px;
}
.brand { display: flex; align-items: center; gap: var(--s3); text-decoration: none; }
.brand__mark {
  width: 34px; height: 34px; flex: none; border-radius: 3px;
  background: var(--forest); color: var(--gold);
  display: grid; place-items: center;
  font-family: var(--display); font-weight: 700; font-size: .95rem; letter-spacing: .02em;
}
.brand__text { display: flex; flex-direction: column; line-height: 1.1; }
.brand__name { font-family: var(--display); font-weight: 600; color: var(--ink); font-size: 1.02rem; }
.brand__sub { font-size: .68rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }

.nav { display: none; align-items: center; gap: var(--s4); }
.nav a {
  font-size: .94rem; font-weight: 500; color: var(--body);
  text-decoration: none; padding-block: var(--s2);
  border-bottom: 2px solid transparent;
  white-space: nowrap;
}
.nav a:hover, .nav a[aria-current="page"] { color: var(--forest); border-bottom-color: var(--gold); }

.nav-toggle {
  display: inline-flex; align-items: center; gap: var(--s2);
  background: none; border: 1px solid var(--line); border-radius: var(--radius);
  padding: var(--s2) var(--s3); font: inherit; font-size: .9rem; color: var(--forest);
  cursor: pointer;
}

/* Desktop breakpoint must come after both base rules so it wins on source order.
   70rem, not 62rem: six nav items need roughly 1100px before the labels stop wrapping.
   Below this the mobile Menu button takes over. */
@media (min-width: 70rem) {
  .nav { display: flex; }
  .nav-toggle { display: none; }
}
.nav-mobile { display: none; border-top: 1px solid var(--line); background: var(--paper); }
.nav-mobile[data-open="true"] { display: block; }
.nav-mobile a {
  display: block; padding: var(--s3) 0; border-bottom: 1px solid var(--line-soft);
  color: var(--body); text-decoration: none; font-weight: 500;
}
@media (min-width: 70rem) { .nav-mobile { display: none !important; } }

/* --------------------------------------------------------------- buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s2);
  font-family: var(--text); font-size: .97rem; font-weight: 600; line-height: 1;
  padding: .85rem 1.5rem; border-radius: var(--radius);
  border: 1px solid transparent; cursor: pointer; text-decoration: none;
  transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}
.btn--primary { background: var(--forest); color: #fff; }
.btn--primary:hover { background: var(--forest-deep); color: #fff; }
.btn--gold { background: var(--gold); color: var(--forest-deep); }
.btn--gold:hover { background: var(--gold-bright); color: var(--forest-deep); }
.btn--ghost { background: transparent; color: var(--forest); border-color: var(--forest); }
.btn--ghost:hover { background: var(--forest); color: #fff; }
.btn--wide { width: 100%; }
.btn-row { display: flex; flex-wrap: wrap; gap: var(--s3); }

/* --------------------------------------------------------------- hero */
.hero { background: var(--forest); color: #D6E0DA; padding-block: var(--s9) var(--s8); }
.hero h1 { color: #fff; }
.hero .eyebrow { color: var(--gold-bright); }
.hero .lede { color: #C3D0C9; max-width: 54ch; }
.hero__stats {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--s5);
  margin-top: var(--s7); padding-top: var(--s6);
  border-top: 1px solid rgba(214,224,218,.22);
}
@media (min-width: 48rem) { .hero__stats { grid-template-columns: repeat(4, 1fr); } }

/* --------------------------------------------------------------- stat */
.stat__value {
  font-family: var(--display); font-size: var(--step-3); font-weight: 600;
  color: var(--gold-bright); line-height: 1;
}
.section--dark .stat__label, .hero .stat__label { color: #A9BAB2; }
.stat__label {
  font-size: var(--step--1); letter-spacing: .06em; text-transform: uppercase;
  color: var(--muted); margin-top: var(--s2);
}
.stat--light .stat__value { color: var(--forest); }

/* --------------------------------------------------------------- card */
.card {
  background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--radius-lg); padding: var(--s5);
}
.card--link { text-decoration: none; color: inherit; display: block; transition: border-color .15s ease, box-shadow .15s ease; }
.card--link:hover { border-color: var(--gold); box-shadow: var(--shadow); color: inherit; }
.card h3 { font-size: var(--step-1); margin-bottom: var(--s2); }
.card p { font-size: .95rem; color: var(--body); }
.card__meta { font-size: var(--step--1); color: var(--muted); letter-spacing: .04em; text-transform: uppercase; margin-bottom: var(--s2); }

/* --------------------------------------------------------------- table */
.table-scroll { overflow-x: auto; margin-block: var(--s5); -webkit-overflow-scrolling: touch; }
table { border-collapse: collapse; width: 100%; font-size: .95rem; min-width: 480px; }
caption {
  text-align: left; font-size: var(--step--1); color: var(--muted);
  padding-bottom: var(--s3); caption-side: top;
}
th, td { text-align: left; padding: var(--s3) var(--s4); border-bottom: 1px solid var(--line); vertical-align: top; }
thead th {
  font-size: var(--step--1); letter-spacing: .06em; text-transform: uppercase;
  color: var(--forest); border-bottom: 2px solid var(--forest); font-weight: 600;
}
tbody tr:nth-child(even) { background: var(--paper-warm); }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
tbody th .sub { display: block; font-weight: 400; font-size: var(--step--1); color: var(--muted); margin-top: 2px; }

/* --------------------------------------------------------------- sourcing */
.sourced {
  font-size: var(--step--1); color: var(--muted);
  padding-top: var(--s3); border-top: 1px solid var(--line-soft);
  margin-top: var(--s4); max-width: var(--measure);
}
.sourced strong { color: var(--body); font-weight: 600; }

.callout {
  border: 1px solid var(--line); border-left: 3px solid var(--gold);
  background: var(--paper-warm); border-radius: var(--radius);
  padding: var(--s4) var(--s5); margin-block: var(--s5);
}
.callout h3 { font-size: var(--step-1); margin-bottom: var(--s2); }
.callout p { font-size: .95rem; }

/* --------------------------------------------------------------- forms */
.form { display: grid; gap: var(--s4); }
.field { display: grid; gap: var(--s2); }
.field label { font-size: .9rem; font-weight: 600; color: var(--ink); }
.field .hint { font-size: var(--step--1); color: var(--muted); }
input[type="text"], input[type="email"], input[type="tel"], input[type="number"],
select, textarea {
  font: inherit; font-size: 1rem; width: 100%;
  padding: .7rem .85rem; color: var(--ink); background: var(--paper);
  border: 1px solid var(--line); border-radius: var(--radius);
}
input:focus, select:focus, textarea:focus { border-color: var(--forest); }
textarea { min-height: 7rem; resize: vertical; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.form-note { font-size: var(--step--1); color: var(--muted); max-width: var(--measure); }

.form-card {
  background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--radius-lg); padding: var(--s6); box-shadow: var(--shadow);
}
.section--dark .form-card { color: var(--body); }

/* --------------------------------------------------------------- calculator */
.calc { display: grid; gap: var(--s6); }
@media (min-width: 56rem) { .calc { grid-template-columns: 1fr 1fr; gap: var(--s7); } }
.calc__out { background: var(--forest); color: #D6E0DA; border-radius: var(--radius-lg); padding: var(--s6); align-self: start; }
.calc__out h3 { color: #fff; }
.calc__total {
  font-family: var(--display); font-size: var(--step-4); color: var(--gold-bright);
  line-height: 1; margin-block: var(--s3) var(--s1);
}
.calc__line {
  display: flex; justify-content: space-between; gap: var(--s4);
  padding-block: var(--s3); border-bottom: 1px solid rgba(214,224,218,.18);
  font-size: .95rem;
}
.calc__line span:last-child { font-variant-numeric: tabular-nums; color: #fff; font-weight: 600; }
.calc__line--sum { border-bottom: none; border-top: 2px solid var(--gold); margin-top: var(--s2); font-weight: 600; }

/* --------------------------------------------------------------- quiz */
.quiz__step { display: none; }
.quiz__step[data-active="true"] { display: block; }
.quiz__progress { height: 4px; background: var(--line); border-radius: 99px; overflow: hidden; margin-bottom: var(--s6); }
.quiz__bar { height: 100%; background: var(--gold); width: 0%; transition: width .25s ease; }
.opts { display: grid; gap: var(--s3); }
.opt {
  display: flex; gap: var(--s3); align-items: flex-start;
  border: 1px solid var(--line); border-radius: var(--radius); padding: var(--s4);
  cursor: pointer; background: var(--paper); text-align: left; font: inherit;
  transition: border-color .15s ease, background-color .15s ease;
}
.opt:hover { border-color: var(--gold); background: var(--paper-warm); }
.opt[aria-pressed="true"] { border-color: var(--forest); background: var(--paper-warm); }
.opt strong { display: block; color: var(--ink); font-family: var(--display); font-size: 1.05rem; }
.opt span { font-size: .9rem; color: var(--muted); }

/* --------------------------------------------------------------- misc */
.pill {
  display: inline-block; font-size: var(--step--1); font-weight: 600;
  letter-spacing: .06em; text-transform: uppercase;
  padding: .2rem .6rem; border-radius: 99px;
  background: var(--paper-sink); color: var(--forest); border: 1px solid var(--line);
}
.pill--gold { background: rgba(201,168,76,.14); border-color: rgba(201,168,76,.4); color: var(--gold-deep); }

.breadcrumb { font-size: var(--step--1); color: var(--muted); padding-block: var(--s4); }
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--forest); }

.toc { background: var(--paper-warm); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: var(--s5); }
.toc h2 { font-size: var(--step-1); margin-bottom: var(--s3); }
.toc ol { margin: 0; padding-left: 1.2rem; }
.toc li { margin-block: var(--s2); font-size: .95rem; }

.prose > * + * { margin-top: var(--s4); }
.prose h2 { margin-top: var(--s7); }
.prose h3 { margin-top: var(--s6); }
.prose ul, .prose ol { padding-left: 1.3rem; }
.prose li + li { margin-top: var(--s2); }

.village-list { columns: 1; column-gap: var(--s6); list-style: none; padding: 0; }
@media (min-width: 40rem) { .village-list { columns: 2; } }
@media (min-width: 64rem) { .village-list { columns: 3; } }
.village-list li { break-inside: avoid; padding-block: var(--s2); border-bottom: 1px solid var(--line-soft); }
.village-list a { text-decoration: none; font-weight: 500; }
.village-list .meta { display: block; font-size: var(--step--1); color: var(--muted); }

/* --------------------------------------------------------------- footer */
.site-footer { background: var(--forest-deep); color: #A9BAB2; padding-block: var(--s8) var(--s6); font-size: .93rem; }
.site-footer h3 { color: #fff; font-size: var(--step-1); margin-bottom: var(--s3); }
.site-footer a { color: #C3D0C9; text-decoration: none; }
.site-footer a:hover { color: var(--gold-bright); text-decoration: underline; }
.site-footer ul { list-style: none; padding: 0; }
.site-footer li { padding-block: var(--s1); }
.footer-grid { display: grid; gap: var(--s6); }
@media (min-width: 48rem) { .footer-grid { grid-template-columns: 1.4fr 1fr 1fr; gap: var(--s7); } }
.legal {
  margin-top: var(--s7); padding-top: var(--s5);
  border-top: 1px solid rgba(169,186,178,.2);
  font-size: .8rem; line-height: 1.6; color: #8A9A93;
}
.legal p { max-width: 90ch; }
.legal p + p { margin-top: var(--s3); }
.legal strong { color: #C3D0C9; }

.skip {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--gold); color: var(--forest-deep); padding: var(--s3) var(--s4); font-weight: 600;
}
.skip:focus { left: var(--gutter); top: var(--s2); }

@media print {
  .site-header, .site-footer, .btn, form { display: none !important; }
  body { color: #000; }
}
