/* Jonathan Chan - GTA Realtor | jchanlistings.ca */
:root {
  --navy: #0e2240;
  --navy-deep: #0a1930;
  --navy-light: #16325c;
  --gold: #c8a24e;
  --gold-light: #e3c57c;
  --gold-dark: #a8842f;
  --white: #ffffff;
  --offwhite: #f7f5ef;
  --grey: #5b6472;
  --grey-light: #e9e6dc;
  --text: #1f2a3a;
  --radius: 12px;
  --shadow: 0 10px 30px rgba(10, 25, 48, 0.12);
  --maxw: 1140px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei",
    "Noto Sans SC", -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--text);
  background: var(--offwhite);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }

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

/* ---------- Header / Nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(14, 34, 64, 0.96);
  backdrop-filter: blur(8px);
  border-bottom: 2px solid var(--gold);
}
.nav-inner {
  max-width: var(--maxw); margin: 0 auto; padding: 0 20px;
  display: flex; align-items: center; justify-content: space-between;
  height: 66px;
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--white); }
.brand-mark {
  width: 38px; height: 38px; border-radius: 8px;
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  color: var(--navy-deep); font-weight: 800; font-size: 20px;
  display: flex; align-items: center; justify-content: center;
}
.brand-name { font-size: 18px; font-weight: 700; letter-spacing: 1px; }
.brand-sub { font-size: 11px; color: var(--gold-light); letter-spacing: 2px; }
.nav-links { display: flex; gap: 6px; list-style: none; }
.nav-links a {
  color: #dfe6f2; font-size: 15px; padding: 8px 14px; border-radius: 8px;
  transition: background 0.2s, color 0.2s;
}
.nav-links a:hover { background: rgba(200, 162, 78, 0.18); color: var(--gold-light); }
.nav-phone {
  color: var(--navy-deep); background: var(--gold);
  font-weight: 700; padding: 8px 16px; border-radius: 999px; font-size: 14px;
  white-space: nowrap; transition: background 0.2s;
}
.nav-phone:hover { background: var(--gold-light); }
.nav-toggle {
  display: none; background: none; border: none; cursor: pointer;
  flex-direction: column; gap: 5px; padding: 8px;
}
.nav-toggle span { width: 24px; height: 2px; background: var(--white); display: block; }

/* ---------- Hero ---------- */
.hero {
  background:
    radial-gradient(1200px 500px at 80% -10%, rgba(200,162,78,0.25), transparent 60%),
    radial-gradient(900px 500px at 10% 110%, rgba(22,50,92,0.9), transparent 60%),
    linear-gradient(160deg, var(--navy-deep) 0%, var(--navy) 55%, var(--navy-light) 100%);
  color: var(--white);
  padding: 96px 0 110px;
  position: relative; overflow: hidden;
}
.hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: radial-gradient(rgba(255,255,255,0.05) 1px, transparent 1px);
  background-size: 26px 26px;
}
.hero-inner { position: relative; z-index: 1; text-align: center; max-width: 820px; margin: 0 auto; }
.hero-tag {
  display: inline-block; font-size: 13px; letter-spacing: 3px;
  color: var(--gold-light); border: 1px solid rgba(200,162,78,0.5);
  padding: 6px 18px; border-radius: 999px; margin-bottom: 22px;
}
.hero h1 { font-size: clamp(34px, 6vw, 56px); font-weight: 800; line-height: 1.3; margin-bottom: 14px; }
.hero h1 .hl { color: var(--gold-light); }
.hero-sub { font-size: clamp(17px, 2.6vw, 22px); color: #cfd8e8; margin-bottom: 30px; }
.hero-ctas { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.btn {
  display: inline-block; font-size: 16px; font-weight: 700;
  padding: 13px 34px; border-radius: 999px; cursor: pointer; border: none;
  transition: transform 0.15s, box-shadow 0.2s, background 0.2s;
}
.btn-gold { background: linear-gradient(135deg, var(--gold-light), var(--gold)); color: var(--navy-deep); box-shadow: 0 8px 24px rgba(200,162,78,0.35); }
.btn-gold:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(200,162,78,0.45); }
.btn-outline { background: transparent; color: var(--white); border: 1.5px solid rgba(255,255,255,0.5); }
.btn-outline:hover { border-color: var(--gold-light); color: var(--gold-light); }
.hero-stats {
  display: flex; justify-content: center; gap: 44px; margin-top: 52px; flex-wrap: wrap;
}
.hero-stat { text-align: center; }
.hero-stat .num { font-size: 26px; font-weight: 800; color: var(--gold-light); }
.hero-stat .lbl { font-size: 13px; color: #aeb9cf; }

/* ---------- Sections ---------- */
.section { padding: 72px 0; }
.section.alt { background: var(--white); }
.section-head { text-align: center; margin-bottom: 44px; }
.section-kicker { color: var(--gold-dark); font-size: 13px; letter-spacing: 4px; font-weight: 700; }
.section-title { font-size: clamp(26px, 4vw, 36px); font-weight: 800; color: var(--navy); margin: 8px 0 10px; }
.section-desc { color: var(--grey); max-width: 640px; margin: 0 auto; font-size: 15px; }

/* ---------- Listing cards ---------- */
.grid { display: grid; gap: 26px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.card {
  background: var(--white); border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow); border: 1px solid var(--grey-light);
  transition: transform 0.2s, box-shadow 0.25s;
  display: flex; flex-direction: column;
}
.card:hover { transform: translateY(-5px); box-shadow: 0 18px 40px rgba(10,25,48,0.18); }
.card-img { height: 190px; position: relative; display: flex; align-items: flex-end; }
.card-img.g1 { background: linear-gradient(135deg, #274b7a, #0e2240); }
.card-img.g2 { background: linear-gradient(135deg, #8a6d2f, #3d2f10); }
.card-img.g3 { background: linear-gradient(135deg, #3f6b5a, #122b23); }
.card-img.g4 { background: linear-gradient(135deg, #6b4a3f, #2b1a12); }
.card-img.g5 { background: linear-gradient(135deg, #4a5a7a, #1a2340); }
.card-img.g6 { background: linear-gradient(135deg, #5a5a5a, #232323); }
.card-img::before {
  content: "⌂"; position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-size: 64px; color: rgba(255,255,255,0.22);
}
.card-badge {
  position: relative; z-index: 1; margin: 12px; align-self: flex-start;
  background: rgba(10,25,48,0.75); color: var(--gold-light);
  font-size: 12px; font-weight: 700; padding: 4px 12px; border-radius: 999px; letter-spacing: 1px;
}
.card-body { padding: 20px 22px 24px; display: flex; flex-direction: column; flex: 1; }
.card-price { font-size: 24px; font-weight: 800; color: var(--navy); }
.card-price small { font-size: 13px; font-weight: 400; color: var(--grey); }
.card-addr { font-size: 15px; font-weight: 600; margin: 4px 0 8px; }
.card-meta { font-size: 13px; color: var(--grey); margin-bottom: 16px; }
.card-meta .demo { color: var(--gold-dark); font-size: 12px; }
.card-btn {
  margin-top: auto; text-align: center; font-size: 14px; font-weight: 700;
  color: var(--navy); border: 1.5px solid var(--navy); border-radius: 999px; padding: 9px 0;
  transition: background 0.2s, color 0.2s;
}
.card-btn:hover { background: var(--navy); color: var(--white); }

/* ---------- Calculators ---------- */
.calc-wrap {
  background: var(--white); border-radius: 16px; box-shadow: var(--shadow);
  border: 1px solid var(--grey-light); overflow: hidden; max-width: 880px; margin: 0 auto;
}
.tabs { display: flex; background: var(--navy); }
.tab {
  flex: 1; padding: 16px 8px; background: none; border: none; cursor: pointer;
  color: #b9c4d8; font-size: 15px; font-weight: 700; font-family: inherit;
  border-bottom: 3px solid transparent; transition: all 0.2s;
}
.tab:hover { color: var(--white); }
.tab.active { color: var(--gold-light); border-bottom-color: var(--gold); background: rgba(200,162,78,0.08); }
.calc-panel { display: none; padding: 32px 34px; }
.calc-panel.active { display: block; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 22px; margin-bottom: 24px; }
.field label { display: block; font-size: 13px; font-weight: 700; color: var(--navy); margin-bottom: 6px; }
.field input, .field select {
  width: 100%; padding: 11px 14px; font-size: 15px; font-family: inherit;
  border: 1.5px solid var(--grey-light); border-radius: 8px; background: #fcfbf8;
  transition: border-color 0.2s;
}
.field input:focus, .field select:focus { outline: none; border-color: var(--gold); }
.field .hint { font-size: 12px; color: var(--grey); margin-top: 4px; }
.calc-btn { width: 100%; margin-bottom: 8px; }
.results {
  background: linear-gradient(160deg, var(--navy) 0%, var(--navy-light) 100%);
  border-radius: 12px; padding: 24px 26px; color: var(--white);
  display: none; margin-top: 6px;
}
.results.show { display: block; }
.results h4 { color: var(--gold-light); font-size: 15px; letter-spacing: 2px; margin-bottom: 14px; }
.result-row {
  display: flex; justify-content: space-between; align-items: baseline;
  padding: 9px 0; border-bottom: 1px solid rgba(255,255,255,0.12); font-size: 15px;
}
.result-row:last-child { border-bottom: none; }
.result-row .val { font-weight: 800; font-size: 18px; color: var(--gold-light); }
.result-row.total .val { font-size: 22px; }
.disclaimer { font-size: 12px; color: #93a0b8; margin-top: 14px; line-height: 1.6; }

/* ---------- News ---------- */
.news-card .card-img { height: 150px; }
.news-card .card-img::before { content: "📰"; font-size: 48px; }
.news-source { font-size: 12px; color: var(--gold-dark); font-weight: 700; letter-spacing: 1px; }
.news-date { font-size: 12px; color: var(--grey); }
.news-title { font-size: 16px; font-weight: 700; line-height: 1.6; margin: 8px 0 14px; color: var(--navy); }
.news-meta { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }

/* ---------- Article ---------- */
.article-feature {
  display: grid; grid-template-columns: 1fr 1.2fr; gap: 0;
  background: var(--white); border-radius: 16px; overflow: hidden;
  box-shadow: var(--shadow); border: 1px solid var(--grey-light); max-width: 960px; margin: 0 auto;
}
.article-img {
  min-height: 300px; background: linear-gradient(135deg, #5a5a5a, #232323);
  display: flex; align-items: center; justify-content: center;
  font-size: 72px; color: rgba(255,255,255,0.25);
}
.article-body { padding: 36px 40px; display: flex; flex-direction: column; justify-content: center; }
.article-body .news-source { margin-bottom: 6px; }
.article-body h3 { font-size: 24px; color: var(--navy); font-weight: 800; margin-bottom: 12px; line-height: 1.5; }
.article-body p { color: var(--grey); font-size: 15px; margin-bottom: 20px; }

/* ---------- Contact ---------- */
.contact-section {
  background: linear-gradient(160deg, var(--navy-deep), var(--navy) 60%, var(--navy-light));
  color: var(--white);
}
.contact-section .section-title { color: var(--white); }
.contact-section .section-desc { color: #b9c4d8; }
.contact-grid {
  display: grid; grid-template-columns: 1fr 1.2fr; gap: 40px; max-width: 960px; margin: 0 auto;
  align-items: start;
}
.contact-info { text-align: left; }
.contact-info h3 { color: var(--gold-light); font-size: 18px; margin-bottom: 14px; letter-spacing: 2px; }
.big-phone {
  display: inline-block; font-size: clamp(30px, 5vw, 42px); font-weight: 800;
  color: var(--white); margin: 6px 0 18px; letter-spacing: 1px;
  border-bottom: 3px solid var(--gold); padding-bottom: 6px;
  transition: color 0.2s;
}
.big-phone:hover { color: var(--gold-light); }
.contact-line { color: #cfd8e8; font-size: 15px; margin-bottom: 10px; }
.contact-line a { color: var(--gold-light); }
.contact-form { background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.14); border-radius: 14px; padding: 28px; }
.contact-form .field label { color: var(--gold-light); }
.contact-form .field input, .contact-form .field textarea {
  width: 100%; padding: 11px 14px; font-size: 15px; font-family: inherit;
  border: 1.5px solid rgba(255,255,255,0.2); border-radius: 8px;
  background: rgba(255,255,255,0.08); color: var(--white);
}
.contact-form .field input::placeholder, .contact-form .field textarea::placeholder { color: #8b96ad; }
.contact-form .field input:focus, .contact-form .field textarea:focus { outline: none; border-color: var(--gold); }
.contact-form textarea { min-height: 110px; resize: vertical; }
.contact-form .form-grid { grid-template-columns: 1fr 1fr; }
.contact-form .field.full { grid-column: 1 / -1; }
.form-note { font-size: 12px; color: #8b96ad; margin-top: 10px; }
.form-success {
  display: none; background: rgba(200,162,78,0.15); border: 1px solid var(--gold);
  color: var(--gold-light); border-radius: 10px; padding: 16px; margin-top: 16px;
  font-size: 15px; font-weight: 600; text-align: center;
}
.form-success.show { display: block; }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy-deep); color: #8b96ad; padding: 28px 0; text-align: center; font-size: 13px; }
.site-footer .gold { color: var(--gold-light); }

/* ---------- Back to top ---------- */
.to-top {
  position: fixed; right: 22px; bottom: 22px; width: 46px; height: 46px; border-radius: 50%;
  background: var(--gold); color: var(--navy-deep); border: none; cursor: pointer;
  font-size: 20px; font-weight: 800; box-shadow: 0 8px 20px rgba(0,0,0,0.25);
  display: none; z-index: 90;
}
.to-top.show { display: block; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .article-feature { grid-template-columns: 1fr; }
  .article-img { min-height: 200px; }
  .contact-grid { grid-template-columns: 1fr; }
  .nav-links {
    display: none; position: absolute; top: 66px; left: 0; right: 0;
    background: var(--navy-deep); flex-direction: column; padding: 12px 20px 18px;
    border-bottom: 2px solid var(--gold);
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 12px 10px; border-bottom: 1px solid rgba(255,255,255,0.08); }
  .nav-toggle { display: flex; }
  .nav-phone { display: none; }
}
@media (max-width: 600px) {
  .grid-3 { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .contact-form .form-grid { grid-template-columns: 1fr; }
  .section { padding: 52px 0; }
  .hero { padding: 70px 0 80px; }
  .calc-panel { padding: 24px 20px; }
  .tabs { flex-wrap: wrap; }
  .tab { font-size: 13px; padding: 13px 6px; }
  .hero-stats { gap: 26px; }
}
