/* ==========================================================================
   johnnyhomes.com — shared styles
   Rebuild of the Sitejet original. Type: Lora (display) + Montserrat (UI/body).
   Brand taupe #8d7f72 for large/decorative use; #6e6153 where AA text contrast
   is required (buttons, links, small accent text).
   ========================================================================== */

:root {
  --ink: #4a4a4a;          /* body text — 8.9:1 on white */
  --ink-soft: #6b6b6b;     /* muted meta — 5.7:1 on white */
  --taupe: #8d7f72;        /* decorative / large headings only */
  --taupe-dark: #6e6153;   /* buttons, links, small accent — >4.5:1 both ways */
  --taupe-tint: #f2efec;
  --line: #e4e0db;
  --bg: #ffffff;
  --bg-alt: #f7f7f7;
  --maxw: 1200px;
  --radius: 4px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Montserrat", "Noto Sans TC", -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 1rem;              /* 16px — matches original */
  line-height: 1.7;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
figure { margin: 0; }

a { color: var(--taupe-dark); }

h1, h2, h3, h4, h5 { margin: 0; font-weight: 500; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

section { padding: 72px 0; }

/* --- Section heading (h2) — Montserrat, tracked, centered ------------------ */
.section-head { text-align: center; margin-bottom: 40px; }
.section-title {
  font-family: "Montserrat", "Noto Sans TC", sans-serif;
  font-size: 1.75rem;          /* 28px */
  font-weight: 500;
  letter-spacing: 0.12em;
  color: var(--ink);
  text-wrap: balance;
}
.section-title::after {
  content: "";
  display: block;
  width: 56px;
  height: 2px;
  background: var(--taupe);
  margin: 18px auto 0;
}

/* --- Buttons -------------------------------------------------------------- */
.btn {
  display: inline-block;
  font-family: "Montserrat", "Noto Sans TC", sans-serif;
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 14px 34px;
  border-radius: var(--radius);
  border: 1px solid var(--taupe-dark);
  background: var(--taupe-dark);
  color: #fff;
  cursor: pointer;
  transition: background .18s, color .18s;
  min-height: 44px;
  line-height: 1.2;
}
.btn:hover { background: #5b5044; }
.btn--ghost { background: transparent; color: var(--taupe-dark); }
.btn--ghost:hover { background: var(--taupe-dark); color: #fff; }
.center { text-align: center; }

/* ==========================================================================
   Header
   ========================================================================== */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.96);
  backdrop-filter: saturate(180%) blur(6px);
  border-bottom: 1px solid var(--line);
}
/* Header runs edge-to-edge (nav has a lot of items) while page content stays contained */
.site-header .wrap { max-width: none; padding-left: 26px; padding-right: 26px; }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 66px; }
.brand { font-family: "Lora", "Noto Sans TC", serif; font-size: 1.25rem; font-weight: 600; color: var(--ink); text-decoration: none; letter-spacing: .04em; white-space: nowrap; }
.nav { display: flex; align-items: center; gap: 2px; }
.nav a {
  font-size: 0.8125rem; font-weight: 500; letter-spacing: 0.04em; text-transform: uppercase;
  color: var(--ink); text-decoration: none; padding: 10px 10px; border-radius: var(--radius);
  display: inline-flex; align-items: center; min-height: 44px; white-space: nowrap;
}
.nav a:hover, .nav a[aria-current="page"] { color: var(--taupe-dark); }
.nav .lang { color: var(--taupe-dark); font-weight: 600; }
.wa-btn {
  display: inline-flex; align-items: center; gap: 8px;
  background: #0a7a4a; color: #fff; text-decoration: none;   /* WhatsApp green, AA (5.4:1) */
  font-size: 0.8125rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
  padding: 11px 20px; border-radius: 999px; min-height: 44px; white-space: nowrap;
  box-shadow: 0 2px 8px rgba(10,122,74,.28);
  transition: background .18s, box-shadow .18s, transform .18s;
}
.wa-btn svg { width: 18px; height: 18px; }
.wa-btn:hover { background: #086b40; box-shadow: 0 6px 16px rgba(10,122,74,.4); transform: translateY(-1px); }
.nav-toggle { display: none; }

/* ==========================================================================
   Hero
   ========================================================================== */
.hero { position: relative; color: #fff; overflow: hidden; padding: 0; }
.hero::before {
  content: ""; position: absolute; inset: 0;
  background: url("../assets/img/hero-skyline.webp") center/cover no-repeat;
  z-index: 0;
}
.hero::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(35,32,29,.72) 0%, rgba(35,32,29,.45) 45%, rgba(35,32,29,.15) 100%);
  z-index: 1;
}
.hero-inner {
  position: relative; z-index: 2;
  display: grid; grid-template-columns: 1.1fr 0.9fr; align-items: end; gap: 24px;
  min-height: 580px; padding-top: 72px;   /* no bottom padding → figure sits flush */
}
.hero-copy { padding-bottom: 64px; }
.hero-name { font-family: "Lora", "Noto Sans TC", serif; font-size: clamp(2.75rem, 6vw, 4rem); font-weight: 500; line-height: 1.05; }
.hero-tag {
  font-family: "Lora", "Noto Sans TC", serif; font-size: clamp(1.2rem, 2.4vw, 1.55rem); font-weight: 500;
  font-style: italic; margin-top: 14px; color: #fbf7f1; text-wrap: balance; max-width: 24ch;
  text-shadow: 0 1px 10px rgba(0,0,0,.5);
}
.hero-rule { width: 64px; height: 2px; background: var(--taupe); border: 0; margin: 24px 0; }
.hero-phone { font-size: 1.5rem; font-weight: 600; letter-spacing: .04em; color: #fff; text-decoration: none; }
.hero-phone:hover { color: #f2ede7; }
.hero-social { display: flex; gap: 16px; margin: 26px 0; flex-wrap: wrap; }
.hero-social a, .hero-social span { width: 76px; height: 76px; display: inline-flex; }
.hero-social img { width: 76px; height: 76px; }
.hero-email { display: inline-block; color: #f2ede7; text-decoration: none; font-weight: 500; border-bottom: 1px solid rgba(255,255,255,.4); padding-bottom: 2px; }
.hero-email:hover { color: #fff; }
.hero-figure { align-self: end; display: flex; align-items: flex-end; justify-content: center; height: 100%; }
.hero-figure img { display: block; margin: 0 auto -1px; max-height: 508px; width: auto; filter: drop-shadow(0 10px 26px rgba(0,0,0,.4)); }

/* ==========================================================================
   Page hero (interior pages)
   ========================================================================== */
.page-hero { position: relative; color: #fff; text-align: center; overflow: hidden; }
.page-hero::before {
  content: ""; position: absolute; inset: 0;
  background: var(--ph-img, url("../assets/img/hero-skyline.webp")) center/cover no-repeat;
  z-index: 0;
}
.page-hero::after { content: ""; position: absolute; inset: 0; background: rgba(35,32,29,.6); z-index: 1; }
.page-hero .wrap { position: relative; z-index: 2; padding-top: 84px; padding-bottom: 84px; }
.page-hero h1 { font-family: "Lora", "Noto Sans TC", serif; font-size: clamp(2.25rem, 5vw, 3.25rem); font-weight: 500; }
.page-hero p { margin: 14px auto 0; max-width: 46ch; color: #fbf7f1; font-size: 1.125rem; font-weight: 500; text-wrap: balance; text-shadow: 0 1px 10px rgba(0,0,0,.5); }
.crumbs { font-size: 0.8125rem; letter-spacing: .06em; text-transform: uppercase; margin-top: 16px; color: #e6ded4; }
.crumbs a { color: #fff; text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }

/* Interior widget section wrapper */
.widget-frame { width: 100%; border: 0; display: block; background: var(--bg-alt); border-radius: var(--radius); }
.lead-copy { max-width: 760px; margin: 0 auto 40px; text-align: center; text-wrap: pretty; }

/* About strengths */
.strengths { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 0; }
.strength { background: #fff; border: 1px solid var(--line); border-radius: 6px; padding: 26px; }
.strength .num { font-family: "Lora", "Noto Sans TC", serif; font-size: 1.75rem; color: var(--taupe); line-height: 1; }
.strength h3 { font-family: "Lora", "Noto Sans TC", serif; font-size: 1.25rem; font-weight: 500; margin: 10px 0 10px; color: var(--ink); }
.strength p { margin: 0; font-size: 0.9375rem; }
.about-lead { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 48px; align-items: stretch; margin-bottom: 56px; }
/* Photo fills the full height of its column (matches the taller intro text) */
.about-lead img { border-radius: 6px; box-shadow: 0 10px 30px rgba(0,0,0,.10); width: 100%; height: 100%; object-fit: cover; object-position: center 20%; min-height: 380px; }
/* Closing block: prose (left) beside the second photo (right); prose left edge
   stays aligned with the intro photo and the strength cards */
.about-close { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: stretch; margin-top: 56px; }
.about-close .prose { margin: 0; max-width: none; }
/* Photo fills the full height of its column so it doesn't leave empty space */
.about-2nd { border-radius: 6px; box-shadow: 0 10px 30px rgba(0,0,0,.10); width: 100%; height: 100%; object-fit: cover; object-position: center 30%; min-height: 380px; }
.prose { max-width: 860px; margin: 56px 0 0; }
.prose p { margin: 0 0 18px; text-wrap: pretty; }

@media (max-width: 900px) {
  .strengths { grid-template-columns: 1fr; }
  .about-lead { grid-template-columns: 1fr; gap: 24px; }
  .about-close { grid-template-columns: 1fr; gap: 28px; }
  .about-close img { order: -1; }
  .about-lead img, .about-2nd { height: auto; min-height: 0; }
}

/* ==========================================================================
   Featured Listings
   ========================================================================== */
.listings-frame { width: 100%; border: 0; display: block; background: var(--bg-alt); border-radius: var(--radius); }

/* ==========================================================================
   About
   ========================================================================== */
.about { background: var(--bg-alt); }
.about-grid { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 48px; align-items: center; }
.about-title {
  font-family: "Lora", "Noto Sans TC", serif; font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 500;
  color: var(--taupe); margin-bottom: 24px; text-wrap: balance;
}
.about-figure img { border-radius: var(--radius); width: 100%; object-fit: cover; box-shadow: 0 10px 30px rgba(0,0,0,.08); }
.about-body p { margin: 0 0 18px; text-wrap: pretty; }
.about-body strong { color: var(--ink); font-weight: 600; }

/* ==========================================================================
   Community grid
   ========================================================================== */
.community { background: var(--bg); }
.community-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.comm-card {
  position: relative; display: block; text-decoration: none; color: #fff;
  border-radius: var(--radius); overflow: hidden; aspect-ratio: 16 / 10; box-shadow: 0 6px 18px rgba(0,0,0,.10);
}
.comm-card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.comm-card::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(0,0,0,.55) 0%, rgba(0,0,0,.05) 55%); }
.comm-card:hover img { transform: scale(1.06); }
.comm-name {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 2;
  font-family: "Lora", "Noto Sans TC", serif; font-size: 1.375rem; font-weight: 500; text-align: center;
  padding: 18px 12px; text-shadow: 0 1px 6px rgba(0,0,0,.5);
}

/* ==========================================================================
   Contact
   ========================================================================== */
.contact { background: #7a6d60; color: #fff; }  /* darkened taupe → white body text ≥4.5:1 AA */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; }
.contact-title { font-family: "Lora", "Noto Sans TC", serif; font-size: clamp(1.75rem, 3.4vw, 2.25rem); font-weight: 500; margin-bottom: 24px; text-wrap: balance; }
.contact-info p { margin: 0 0 14px; display: flex; gap: 12px; align-items: flex-start; }
.contact-info a { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.contact-ico { flex: 0 0 20px; opacity: .9; }
.contact-social { display: flex; gap: 12px; margin-top: 24px; }
.contact-social a { width: 40px; height: 40px; display: inline-flex; background: rgba(255,255,255,.15); border-radius: 50%; align-items: center; justify-content: center; }
.contact-social img { width: 22px; height: 22px; }
.contact-qr-label { margin: 28px 0 12px; font-size: 0.8125rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: #fff; }
.contact-qr { display: flex; gap: 14px; flex-wrap: wrap; }
.contact-qr img { width: 84px; height: 84px; background: #fff; padding: 4px; border-radius: 4px; }

/* Form */
.contact-form { background: #fff; border-radius: 6px; padding: 28px; box-shadow: 0 12px 34px rgba(0,0,0,.18); }
.contact-form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.contact-form label { display: block; font-size: 0.8125rem; font-weight: 600; letter-spacing: .04em; color: var(--ink); margin: 0 0 6px; }
.field { margin-bottom: 16px; }
.contact-form input, .contact-form textarea {
  width: 100%; font: inherit; font-size: 1rem; color: var(--ink);
  padding: 12px 14px; border: 1px solid #cfc9c2; border-radius: var(--radius); background: #fff;
}
.contact-form input:focus, .contact-form textarea:focus { outline: 2px solid var(--taupe-dark); outline-offset: 1px; border-color: var(--taupe-dark); }
.contact-form textarea { min-height: 120px; resize: vertical; }
.contact-form .btn { width: 100%; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-status { margin-top: 14px; font-size: 0.9375rem; font-weight: 600; min-height: 1.2em; }
.form-status.ok { color: #1f7a44; }
.form-status.err { color: #b3261e; }

/* ==========================================================================
   Brokerage bar + Footer
   ========================================================================== */
.broker { background: var(--bg-alt); padding: 40px 0; border-top: 1px solid var(--line); }
.broker-inner { display: flex; align-items: center; justify-content: center; gap: 24px; flex-wrap: wrap; text-align: center; }
.broker img { height: 54px; width: auto; }
.broker-info { font-size: 0.875rem; color: var(--ink-soft); line-height: 1.6; }

.site-footer { background: #3a352f; color: #d8d2ca; padding: 40px 0; }
.footer-inner { display: flex; flex-direction: column; align-items: center; gap: 18px; text-align: center; }
.footer-social { display: flex; gap: 16px; }
.footer-social a { width: 40px; height: 40px; display: inline-flex; align-items: center; justify-content: center; background: rgba(255,255,255,.10); border-radius: 50%; }
.footer-social img { width: 20px; height: 20px; }
.footer-copy { font-size: 0.8125rem; color: #b7b0a7; }

/* ==========================================================================
   Responsive
   ========================================================================== */
/* Collapse the full nav to a menu button before the single-line links can overflow.
   The 8-item nav + WhatsApp button need ~1180px on one line, so switch below that. */
@media (max-width: 1200px) {
  .nav { display: none; }
  .nav.open {
    display: flex; flex-direction: column; align-items: stretch;
    position: absolute; top: 66px; left: 0; right: 0;
    background: #fff; border-bottom: 1px solid var(--line); padding: 8px 16px 16px;
    box-shadow: 0 12px 24px rgba(0,0,0,.08);
  }
  .nav.open a { padding: 12px 8px; border-bottom: 1px solid var(--line); }
  .nav-toggle {
    display: inline-flex; align-items: center; justify-content: center;
    width: 44px; height: 44px; border: 1px solid var(--line); border-radius: var(--radius);
    background: #fff; cursor: pointer;
  }
  .nav-toggle span, .nav-toggle span::before, .nav-toggle span::after {
    content: ""; display: block; width: 20px; height: 2px; background: var(--ink); position: relative;
  }
  .nav-toggle span::before { position: absolute; top: -6px; }
  .nav-toggle span::after { position: absolute; top: 6px; }
  .header-inner { position: relative; }
}

@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; min-height: auto; }
  .hero-figure { display: none; }
  .hero-copy { padding: 48px 0; }
  .about-grid, .contact-grid { grid-template-columns: 1fr; gap: 28px; }
  .community-grid { grid-template-columns: repeat(2, 1fr); }
  section { padding: 56px 0; }
}
@media (max-width: 560px) {
  .community-grid { grid-template-columns: 1fr; }
  .contact-form .row { grid-template-columns: 1fr; }
  .wa-btn .wa-full { display: none; }
}
