/* =========================================================================
   Key West Nest — site styles
   Interior Designer • Realtor • Key West Florida Homes

   Built on the purchased template's class system (container-luxe, btn-primary,
   card-luxury, eyebrow, etc.). All brand colors live in the variables below —
   change a hex value here and it updates across every page.
   Colors were sampled from the Key West Nest banner artwork.
   ========================================================================= */

:root {
  /* ---- Core brand palette (sampled from banner) ---- */
  --primary: #3A8A82;          /* Teal — throw pillows. Brand color for accents & large type */
  --primary-strong: #2E7A73;   /* Deeper teal — buttons, links, small text (WCAG AA on white/cream) */
  --secondary: #1C2B4B;        /* Navy — banner tagline text. Headings, nav, footer */
  --accent: #D4A24C;           /* Sunny gold — tagline rules. Highlights on dark backgrounds */
  --accent-text: #8A5A12;      /* Gold darkened for text on light backgrounds (AA) */
  --rattan: #D9A066;           /* Woven rattan lamp & basket — warm neutral */
  --palm: #6E9A63;             /* Palm-leaf green — supporting accent */
  --bloom: #D8467A;            /* Bougainvillea — tiny pops only */
  --sky: #8CCFE2;              /* Ocean/sky through the window */

  /* ---- Surfaces & text ---- */
  --background: #FBF6F1;       /* Shiplap cream — page background */
  --surface: #FFFFFF;          /* Cards */
  --sand: #F3E7DC;             /* Muted section background (linen sofa) */
  --text: #24304A;             /* Body text (navy-charcoal) */
  --muted: #5B6473;            /* Secondary text (AA on cream) */
  --border: #E6D9CB;

  /* ---- Legacy template variable names, mapped to the new palette ---- */
  --foreground: var(--text);
  --primary-foreground: #FFFFFF;
  --muted-foreground: var(--muted);

  /* ---- Gradients & shadows ---- */
  --gradient-warm: linear-gradient(135deg, #F3E7DC 0%, #FBF6F1 100%);
  --gradient-primary: linear-gradient(135deg, #2E7A73 0%, #3A8A82 100%);
  --gradient-sea: linear-gradient(135deg, #E4F2EF 0%, #FBF6F1 60%, #FBEFDF 100%);
  --gradient-footer: linear-gradient(180deg, #1C2B4B 0%, #121D35 100%);
  --shadow-soft: 0 10px 40px -12px rgba(28, 43, 75, 0.18);
  --shadow-luxe: 0 25px 60px -20px rgba(28, 43, 75, 0.25);
  --shadow-lift: 0 30px 80px -25px rgba(28, 43, 75, 0.35);
}

/* ---------- Base ---------- */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { overflow-x: hidden; width: 100%; }

body {
  margin: 0;
  background: var(--background);
  color: var(--text);
  font-family: "Poppins", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  line-height: 1.6;
}

h1, h2, h3, h4, h5, h6, .font-display {
  font-family: "Playfair Display", Georgia, "Times New Roman", serif;
  letter-spacing: -0.02em;
  color: var(--secondary);
  margin: 0;
}

/* Script accent font — echoes the hand-lettered "Key West Nest" logo */
.font-script { font-family: "Great Vibes", "Brush Script MT", cursive; letter-spacing: 0; font-weight: 400; }

a { color: var(--primary-strong); }

/* Visible keyboard focus everywhere */
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

/* Skip link for keyboard / screen-reader users */
.skip-link {
  position: absolute; left: 1rem; top: -4rem; z-index: 200;
  background: var(--secondary); color: #fff; padding: .75rem 1.25rem; border-radius: 9999px;
  text-decoration: none; transition: top .2s;
}
.skip-link:focus { top: 1rem; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

/* ---------- Layout ---------- */
.container-luxe { max-width: 80rem; margin-left: auto; margin-right: auto; padding-left: 1rem; padding-right: 1rem; }
@media (min-width: 640px) { .container-luxe { padding-left: 1.5rem; padding-right: 1.5rem; } }
@media (min-width: 1024px) { .container-luxe { padding-left: 2rem; padding-right: 2rem; } }

.section-padding { padding-top: 4.5rem; padding-bottom: 4.5rem; }
@media (min-width: 768px) { .section-padding { padding-top: 7rem; padding-bottom: 7rem; } }

/* ---------- Buttons ---------- */
.btn-primary, .btn-outline, .btn-gold {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .875rem 1.75rem; border-radius: 9999px; font-weight: 500; font-size: .875rem;
  letter-spacing: .025em; text-decoration: none; cursor: pointer;
  transition: all .5s cubic-bezier(.22, 1, .36, 1);
}
.btn-primary { background: var(--gradient-primary); color: #fff; border: none; box-shadow: var(--shadow-soft); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: var(--shadow-luxe); }

.btn-outline { border: 1.5px solid var(--secondary); color: var(--secondary); background: rgba(255,255,255,.6); }
.btn-outline:hover { background: var(--secondary); color: #fff; }

.btn-gold { background: var(--accent); color: var(--secondary); border: none; box-shadow: var(--shadow-soft); }
.btn-gold:hover { transform: translateY(-2px); background: #E0B35F; }

/* ---------- Cards ---------- */
.card-luxury {
  background: var(--surface); border-radius: 1rem; overflow: hidden;
  transition: all .5s cubic-bezier(.22, 1, .36, 1); box-shadow: var(--shadow-soft);
}
.card-luxury:hover { transform: translateY(-6px); box-shadow: var(--shadow-lift); }

/* ---------- Navbar ---------- */
.glass-navbar {
  background: rgba(251, 246, 241, .88);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid rgba(230, 217, 203, .7);
}
.nav-link { color: var(--secondary); font-size: .875rem; text-decoration: none; position: relative; padding: .25rem 0; }
.nav-link::after {
  content: ""; position: absolute; left: 0; bottom: -2px; height: 2px; width: 0;
  background: var(--accent); transition: width .35s ease;
}
.nav-link:hover::after, .nav-link.is-active::after { width: 100%; }
.nav-link.is-active { color: var(--primary-strong); font-weight: 600; }

/* Wordmark (text logo in banner colors) */
.wordmark { display: inline-flex; align-items: center; gap: .6rem; text-decoration: none; }
.wordmark-text { font-family: "Great Vibes", cursive; font-size: 2rem; line-height: 1; color: var(--secondary); }
.wordmark-sub { display: block; font-family: "Poppins", sans-serif; font-size: .58rem; letter-spacing: .28em; text-transform: uppercase; color: var(--primary-strong); margin-top: .15rem; }

/* ---------- Typography helpers ---------- */
.eyebrow { text-transform: uppercase; letter-spacing: .3em; font-size: .75rem; font-weight: 600; color: var(--primary-strong); }
.eyebrow-rule { display: inline-flex; align-items: center; gap: .75rem; }
.eyebrow-rule::before, .eyebrow-rule::after { content: ""; width: 2rem; height: 2px; background: var(--accent); }
.text-display { font-family: "Playfair Display", serif; font-weight: 500; line-height: 1.08; }

/* Utility color classes (names kept from the template) */
.bg-gradient-warm { background: var(--gradient-warm); }
.bg-gradient-primary { background: var(--gradient-primary); }
.bg-gradient-sea { background: var(--gradient-sea); }
.text-primary-c { color: var(--primary-strong); }
.text-secondary-c { color: var(--secondary); }
.text-gold-c { color: var(--accent-text); }
.text-muted-c { color: var(--muted); }
.bg-muted-c, .bg-accent-c { background: var(--sand); }
.bg-navy-c { background: var(--secondary); }
.border-c { border-color: var(--border); }

/* ---------- Placeholders: facts the owner must supply ---------- */
.ph {
  background: #FFF3C4; color: #6B4A00; border: 1px dashed #C99A2E;
  padding: 0 .35em; border-radius: .3em; font-weight: 500;
  -webkit-box-decoration-break: clone; box-decoration-break: clone;
}
.sample-badge {
  position: absolute; top: .75rem; left: .75rem; z-index: 2;
  background: rgba(28, 43, 75, .88); color: #fff; font-size: .65rem; letter-spacing: .18em;
  text-transform: uppercase; padding: .35rem .7rem; border-radius: 9999px;
}
.sample-note { font-size: .75rem; color: var(--muted); font-style: italic; }

/* ---------- Hero (home) ---------- */
.hero-kwn { position: relative; overflow: hidden; background: var(--background); }
.hero-kwn__media { position: relative; width: 100%; overflow: hidden; }
.hero-kwn__media img {
  display: block; width: 100%; height: auto;
  will-change: transform; transform: translate3d(0, 0, 0);
}
/* Panel with headline + CTAs overlapping the bottom of the banner */
.hero-kwn__panel {
  position: relative; z-index: 2; margin: -2.5rem auto 0; max-width: 56rem;
  background: rgba(255, 255, 255, .94); backdrop-filter: blur(10px);
  border-radius: 1.5rem; box-shadow: var(--shadow-luxe);
  padding: 1.75rem 1.25rem; text-align: center; border-top: 4px solid var(--accent);
}
@media (min-width: 768px) { .hero-kwn__panel { margin-top: -5rem; padding: 2.5rem 3rem; } }
.hero-kwn__title { font-family: "Great Vibes", cursive; font-weight: 400; font-size: clamp(2.75rem, 7vw, 4.75rem); line-height: 1; color: var(--secondary); letter-spacing: 0; }
.hero-kwn__tag { margin-top: .75rem; text-transform: uppercase; letter-spacing: .22em; font-size: clamp(.68rem, 1.6vw, .85rem); font-weight: 600; color: var(--secondary); }
.hero-kwn__tag .dot { color: var(--accent); margin: 0 .5em; }

/* Inner page hero banner */
.my-story { display: flow-root; }
.my-story__portrait { float: left; width: 36%; max-width: 26rem; margin: 0 2.5rem 1.5rem 0; }
.my-story__portrait img { display: block; width: 100%; height: auto; border-radius: 1.5rem; box-shadow: var(--shadow-luxe); }
.my-story__role { margin-top: .75rem; color: var(--primary-strong); font-weight: 500; }
@media (max-width: 639px) {
  .my-story__portrait { float: none; width: 100%; max-width: 22rem; margin: 0 auto 2rem; }
}

.page-hero { position: relative; overflow: hidden; }
.page-hero img.page-hero__bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.page-hero__veil { position: absolute; inset: 0; background: linear-gradient(100deg, rgba(251,246,241,.96) 0%, rgba(251,246,241,.86) 45%, rgba(251,246,241,.25) 100%); }

/* ---------- Key West lifestyle band (photo background) ---------- */
.lifestyle-band { position: relative; overflow: hidden; display: flex; flex-direction: column; min-height: calc(52vw + 120px); background: #0A84F0; padding-top: 1.25rem; padding-bottom: 2rem; }
.lifestyle-band__bg { position: absolute; left: 0; right: 0; bottom: -6.75vw; top: auto; width: 100%; height: auto; -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 12%); mask-image: linear-gradient(180deg, transparent 0, #000 8%); }
@media (max-width: 767px) { .lifestyle-band__bg { top: 0; height: 100%; object-fit: cover; -webkit-mask-image: none; mask-image: none; } }
.lifestyle-band > .container-luxe, .lifestyle-band__copy { position: relative; z-index: 1; }
.lifestyle-band__copy { padding: 0 1.25rem; margin-bottom: auto; }
.lifestyle-band__copy .eyebrow, .lifestyle-band__copy h2, .lifestyle-band__copy p:not(.eyebrow) { color: #000; font-style: normal; }
.lifestyle-band__copy h2 { font-family: "Playfair Display", Georgia, serif; font-weight: 500; font-size: 2.25rem; letter-spacing: -0.02em; }
@media (min-width: 768px) { .lifestyle-band__copy h2 { font-size: 3rem; } }
.lifestyle-band__copy p:not(.eyebrow) { font-weight: 400; font-size: clamp(1rem, 1.35vw, 1.3rem); line-height: 1.7; max-width: 72rem; margin-left: auto; margin-right: auto; }
@media (min-width: 768px) {
  .lifestyle-band__copy { padding: 0 2rem; }
}

/* ---------- Animations ---------- */
@keyframes fade-up { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: none; } }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes scale-in { from { opacity: 0; transform: scale(.95); } to { opacity: 1; transform: none; } }
.animate-fade-up { animation: fade-up .9s cubic-bezier(.22, 1, .36, 1) both; }
.animate-fade-in { animation: fade-in 1.4s ease-out both; }
.animate-scale-in { animation: scale-in .8s cubic-bezier(.22, 1, .36, 1) both; }
.delay-100 { animation-delay: .1s; } .delay-200 { animation-delay: .2s; } .delay-300 { animation-delay: .3s; }

/* ---------- Portfolio filter & masonry ---------- */
.masonry { column-count: 1; column-gap: 1rem; }
@media (min-width: 640px) { .masonry { column-count: 2; } }
@media (min-width: 1024px) { .masonry { column-count: 3; } }
.masonry > * { break-inside: avoid; margin-bottom: 1rem; }
.filter-btn {
  border: 1.5px solid var(--border); background: #fff; color: var(--secondary);
  padding: .55rem 1.25rem; border-radius: 9999px; font-size: .85rem; cursor: pointer; transition: all .3s;
}
.filter-btn:hover { border-color: var(--primary); }
.filter-btn[aria-pressed="true"] { background: var(--secondary); color: #fff; border-color: var(--secondary); }
.portfolio-item.is-hidden { display: none; }
.portfolio-item button { display: block; width: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; text-align: left; }

/* ---------- Lightbox (kept from template) ---------- */
.lightbox-overlay { opacity: 0; pointer-events: none; transition: opacity .3s ease; }
.lightbox-overlay.active { opacity: 1; pointer-events: auto; }
.lightbox-image { transform: scale(.95); transition: transform .3s ease; }
.lightbox-overlay.active .lightbox-image { transform: scale(1); }
body.lightbox-open { overflow: hidden; }

/* ---------- Forms ---------- */
.field label { display: block; font-size: .8rem; font-weight: 500; color: var(--secondary); margin-bottom: .35rem; }
.field input, .field select, .field textarea {
  width: 100%; background: #fff; border: 1.5px solid var(--border); border-radius: .75rem;
  padding: .8rem 1rem; font: inherit; font-size: .9rem; color: var(--text); transition: border-color .25s, box-shadow .25s;
}
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 4px rgba(58, 138, 130, .15); }
.hp-field { position: absolute; left: -9999px; }
.form-status { font-size: .9rem; border-radius: .75rem; padding: .85rem 1rem; display: none; }
.form-status.is-ok { display: block; background: #E4F2EF; color: #1F5A55; }
.form-status.is-err { display: block; background: #FDE8EE; color: #8A1E44; }

/* Tab toggle (buyer / seller) */
.tab-btn { padding: .6rem 1.4rem; border-radius: 9999px; font-size: .875rem; font-weight: 500; color: var(--secondary); background: transparent; border: 0; cursor: pointer; }
.tab-btn[aria-selected="true"] { background: var(--secondary); color: #fff; }

/* Decorative wave above footer (echoes the flyer) */
.wave-divider { display: block; width: 100%; height: 60px; }

/* Prose (blog article) */
.prose-kwn p { margin: 0 0 1.25rem; color: var(--text); line-height: 1.85; }
.prose-kwn h2 { font-size: 1.6rem; margin: 2.5rem 0 1rem; }
.prose-kwn ul { margin: 0 0 1.25rem 1.25rem; list-style: disc; }
.prose-kwn li { margin-bottom: .5rem; }

/* Respect reduced-motion preferences */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .hero-kwn__media img { transform: none !important; }
}

/* On phones, slide side-entering sections up instead of sideways (prevents horizontal scroll) */
@media (max-width: 767px) {
  html [data-aos="fade-left"]:not(.aos-animate),
  html [data-aos="fade-right"]:not(.aos-animate) { transform: translate3d(0, 30px, 0); }
}
