/* Hearth & Key — fictional east-Toronto real-estate demo. Self-contained; shares nothing with trade-pages.css. */

@font-face {
  font-family: 'Caveat';
  src: url('../fonts/caveat-latin.woff2') format('woff2');
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --paper: #f6f0e2;
  --paper-deep: #efe5cf;
  --map-paper: #f3ecd9;
  --ink: #372d1f;
  --ink-soft: #5d5240;
  --brick: #b0452b;
  --brick-deep: #8a3520;
  --green: #33584c;
  --lake: #cfdeda;
  --lake-line: #7fa8a2;
  --mustard: #e3a83c;
  --street: #b7a687;
  --frame: #fffdf6;
  --tape: rgba(226, 213, 178, 0.9);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body.hk {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: 'DM Sans', sans-serif;
  font-size: 17px;
  line-height: 1.6;
  overflow-x: hidden;
}

.hk img { max-width: 100%; height: auto; display: block; }

.hk ::selection { background: var(--mustard); color: var(--ink); }

.hk :focus-visible {
  outline: 3px solid var(--green);
  outline-offset: 3px;
  border-radius: 4px;
}

.hk .wrap { width: min(1180px, 92vw); margin-inline: auto; }

.hand { font-family: 'Caveat', cursive; font-weight: 600; }

/* ---------- header ---------- */

.hk-head {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 0.9rem 4vw;
  border-bottom: 2px solid var(--ink);
  background: var(--paper);
  position: sticky;
  top: 0;
  z-index: 40;
}

.hk-brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: var(--ink);
}

.hk-brand svg { flex: 0 0 auto; }

.hk-brand .wordmark {
  font-family: 'Fraunces', serif;
  font-weight: 600;
  font-size: 1.35rem;
  letter-spacing: 0.01em;
}

.hk-brand .wordmark small {
  display: block;
  font-family: 'Caveat', cursive;
  font-size: 0.95rem;
  color: var(--brick);
  margin-top: -0.35rem;
}

.hk-nav { display: flex; gap: 1.4rem; margin-left: auto; flex-wrap: wrap; }

.hk-nav a {
  color: var(--ink);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  padding: 0.2rem 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='6'%3E%3Cpath d='M1 4 C 12 1, 24 5, 36 3 S 55 4, 59 2' fill='none' stroke='%23b0452b' stroke-width='2.4' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: 0 100%;
  background-size: 0 6px;
  transition: background-size 0.25s ease;
}

.hk-nav a:hover { background-size: 100% 6px; }

.hk-tagbtn {
  font-family: 'DM Sans', sans-serif;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--frame);
  background: var(--brick);
  border: none;
  border-radius: 999px;
  padding: 0.6rem 1.3rem;
  text-decoration: none;
  transform: rotate(-1.5deg);
  box-shadow: 3px 3px 0 var(--ink);
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  white-space: nowrap;
}

.hk-tagbtn:hover { transform: rotate(0deg) translate(-1px, -1px); box-shadow: 5px 5px 0 var(--ink); }
.hk-tagbtn:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }

/* ---------- hero ---------- */

.hk-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  align-items: center;
  /* v7: fills a laptop screen under the 84px header, so the stat cards never peek in cut off */
  min-height: min(calc(100svh - 84px), 640px);
  gap: clamp(1.5rem, 4vw, 4rem);
  padding: clamp(2rem, 5vh, 4.5rem) 4vw clamp(2.5rem, 6vh, 5rem);
}

.hk-hero-kicker {
  font-family: 'Caveat', cursive;
  font-weight: 600;
  font-size: clamp(1.3rem, 2vw, 1.6rem);
  color: var(--brick);
  margin: 0 0 0.4rem;
  transform: rotate(-1deg);
}

.hk-hero h1 {
  font-family: 'Fraunces', serif;
  font-weight: 560;
  font-size: clamp(2.5rem, 5.4vw, 4.4rem);
  line-height: 1.04;
  letter-spacing: -0.015em;
  margin: 0 0 1.1rem;
}

.hk-hero-sub {
  font-size: clamp(1.02rem, 1.4vw, 1.2rem);
  color: var(--ink-soft);
  max-width: 34rem;
  margin: 0 0 1.6rem;
}

.hk-hero-actions { display: flex; align-items: center; gap: 1.4rem; flex-wrap: wrap; }

.hk-hero-actions .big { font-size: 1.05rem; padding: 0.8rem 1.7rem; }

.hk-textlink {
  color: var(--green);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-style: wavy;
  text-decoration-color: var(--lake-line);
  text-underline-offset: 5px;
}

.hk-hero-fig { position: relative; margin: 0; justify-self: end; max-width: 520px; }

.hk-hero-fig img {
  width: 100%;
  aspect-ratio: 5 / 4;
  object-fit: cover;
  border-radius: 260px 260px 18px 18px;
  border: 7px solid var(--frame);
  box-shadow: 10px 12px 0 rgba(55, 45, 31, 0.16);
  transform: rotate(1.2deg);
}

.hk-rider {
  position: absolute;
  left: -6%;
  bottom: 9%;
  background: var(--frame);
  border: 2px solid var(--ink);
  padding: 0.45rem 1rem 0.35rem;
  transform: rotate(-5deg);
  box-shadow: 4px 5px 0 rgba(55, 45, 31, 0.2);
  text-align: center;
  line-height: 1.15;
}

.hk-rider::before {
  content: "";
  position: absolute;
  top: -13px;
  left: 50%;
  width: 74px;
  height: 20px;
  margin-left: -37px;
  background: var(--tape);
  transform: rotate(2deg);
  border-left: 1px dashed rgba(55, 45, 31, 0.25);
  border-right: 1px dashed rgba(55, 45, 31, 0.25);
}

.hk-rider .hand { display: block; font-size: 1.5rem; color: var(--brick-deep); }
.hk-rider small { font-size: 0.72rem; font-weight: 600; letter-spacing: 0.04em; color: var(--ink-soft); }

/* ---------- sign-rider strip ---------- */

.hk-strip {
  background: var(--paper-deep);
  border-block: 2px solid var(--ink);
  padding: 2rem 4vw;
}

.hk-strip .wrap {
  display: flex;
  justify-content: center;
  gap: clamp(1rem, 3vw, 3rem);
  flex-wrap: wrap;
}

.hk-sign {
  background: var(--frame);
  border: 2px solid var(--ink);
  padding: 0.7rem 1.4rem 0.55rem;
  box-shadow: 4px 4px 0 rgba(55, 45, 31, 0.18);
  text-align: center;
  min-width: 220px;
}

.hk-sign:nth-child(1) { transform: rotate(-2deg); }
.hk-sign:nth-child(2) { transform: rotate(1.4deg) translateY(6px); }
.hk-sign:nth-child(3) { transform: rotate(-0.8deg); }

.hk-sign .hand { font-size: 1.45rem; color: var(--brick-deep); display: block; }
.hk-sign span:last-child { font-size: 0.8rem; font-weight: 600; color: var(--ink-soft); }

/* ---------- section headings ---------- */

.hk-section { padding: clamp(3rem, 7vh, 5.5rem) 4vw; }

.hk-section-head { max-width: 44rem; margin-bottom: 2.2rem; }

.hk-section-head .hand { font-size: 1.5rem; color: var(--green); margin: 0 0 0.2rem; transform: rotate(-1deg); }

.hk-section-head h2 {
  font-family: 'Fraunces', serif;
  font-weight: 560;
  font-size: clamp(1.9rem, 3.6vw, 2.9rem);
  line-height: 1.1;
  margin: 0 0 0.7rem;
}

.hk-section-head p { color: var(--ink-soft); margin: 0; }

/* ---------- sold map ---------- */

.hk-sold { background: var(--paper); }

.hk-sold-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  gap: clamp(1.5rem, 3.5vw, 3.5rem);
  align-items: start;
}

.hk-mapwrap {
  position: relative;
  background: var(--map-paper);
  border: 2px solid var(--ink);
  border-radius: 14px;
  box-shadow: 8px 9px 0 rgba(55, 45, 31, 0.14);
}

.hk-mapwrap > svg { display: block; width: 100%; height: auto; }

.hk-pin {
  position: absolute;
  width: clamp(52px, 6.5vw, 72px);
  transform: translate(-50%, -96%);
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  z-index: 5;
}

.hk-pin svg { display: block; width: 100%; height: auto; overflow: visible; }

.hk-pin .tag { fill: var(--brick); transition: fill 0.15s ease; }
.hk-pin .tagtext { fill: var(--frame); font: 700 10.5px 'DM Sans', sans-serif; letter-spacing: 0.12em; }
.hk-pin .string { stroke: var(--ink); stroke-width: 1.6; fill: none; }
.hk-pin .dot { fill: var(--ink); }

.hk-pin:hover .tag, .hk-pin:focus-visible .tag { fill: var(--brick-deep); }
.hk-pin[aria-pressed="true"] .tag { fill: var(--green); }

@media (prefers-reduced-motion: no-preference) {
  .hk-pin { transition: transform 0.18s ease; }
  .hk-pin:hover { transform: translate(-50%, -96%) rotate(-3deg); }
}

.hk-salepanel { position: relative; min-height: 380px; }

.hk-sale {
  background: var(--frame);
  border: 2px solid var(--ink);
  padding: 1.6rem 1.7rem 1.4rem;
  box-shadow: 7px 8px 0 rgba(55, 45, 31, 0.15);
  position: relative;
}

.hk-sale[hidden] { display: none; }

.hk-sale .stamp {
  position: absolute;
  top: -16px;
  right: 18px;
  font-family: 'Caveat', cursive;
  font-weight: 700;
  font-size: 1.6rem;
  color: var(--brick);
  border: 3px solid var(--brick);
  border-radius: 6px;
  padding: 0 0.7rem;
  transform: rotate(6deg);
  background: var(--frame);
}

.hk-sale h3 {
  font-family: 'Fraunces', serif;
  font-weight: 600;
  font-size: 1.55rem;
  margin: 0 0 0.15rem;
}

.hk-sale .hood { font-weight: 700; color: var(--green); font-size: 0.9rem; margin: 0 0 0.9rem; }

.hk-sale dl {
  margin: 0 0 1rem;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.25rem 1rem;
  font-size: 0.95rem;
}

.hk-sale dt { color: var(--ink-soft); }
.hk-sale dd { margin: 0; font-weight: 600; text-align: right; }

.hk-sale blockquote {
  margin: 0;
  padding-top: 0.9rem;
  border-top: 1.5px dashed var(--street);
  font-family: 'Libre Baskerville', serif;
  font-style: italic;
  font-size: 0.98rem;
  line-height: 1.55;
}

.hk-sale cite {
  display: block;
  font-family: 'Caveat', cursive;
  font-style: normal;
  font-size: 1.25rem;
  color: var(--brick-deep);
  margin-top: 0.4rem;
}

.hk-panelnote { font-family: 'Caveat', cursive; font-size: 1.25rem; color: var(--ink-soft); margin: 1rem 0 0 0.4rem; transform: rotate(-1deg); }

.hk-sold-photo {
  margin-top: 2rem;
  max-width: 340px;
  transform: rotate(1.6deg);
  background: var(--frame);
  padding: 10px 10px 34px;
  border: 1px solid rgba(55, 45, 31, 0.25);
  box-shadow: 5px 6px 0 rgba(55, 45, 31, 0.14);
}

.hk-sold-photo img { aspect-ratio: 4 / 3.4; object-fit: cover; }

.hk-sold-photo figcaption { font-family: 'Caveat', cursive; font-size: 1.15rem; color: var(--ink-soft); text-align: center; margin-top: 0.5rem; }

/* ---------- neighbourhood notes ---------- */

.hk-notes { background: var(--green); color: var(--paper); border-block: 2px solid var(--ink); }

.hk-notes .hk-section-head h2 { color: var(--paper); }
.hk-notes .hk-section-head .hand { color: var(--mustard); }
.hk-notes .hk-section-head p { color: #d5e0d8; }

.hk-notes-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1.2rem, 2.5vw, 2.2rem);
}

.hk-note {
  background: var(--map-paper);
  color: var(--ink);
  padding: 1.5rem 1.5rem 1.2rem;
  border-radius: 3px;
  box-shadow: 5px 7px 0 rgba(20, 30, 25, 0.35);
  position: relative;
}

.hk-note:nth-child(1) { transform: rotate(-1.6deg); }
.hk-note:nth-child(2) { transform: rotate(1.1deg) translateY(10px); }
.hk-note:nth-child(3) { transform: rotate(-0.7deg); }

.hk-note::before {
  content: "";
  position: absolute;
  top: -12px;
  left: 50%;
  width: 86px;
  height: 22px;
  margin-left: -43px;
  background: var(--tape);
  transform: rotate(-2deg);
}

.hk-note h3 { font-family: 'Caveat', cursive; font-weight: 700; font-size: 1.65rem; margin: 0 0 0.3rem; color: var(--brick-deep); }

.hk-note p { font-family: 'Caveat', cursive; font-weight: 500; font-size: 1.28rem; line-height: 1.35; margin: 0 0 1rem; }

.hk-note figure { margin: 0; background: var(--frame); padding: 8px 8px 6px; transform: rotate(1.4deg); box-shadow: 2px 3px 0 rgba(55, 45, 31, 0.18); }

.hk-note figure img { aspect-ratio: 16 / 10; object-fit: cover; width: 100%; }

.hk-note figcaption { font-family: 'Caveat', cursive; font-size: 1.05rem; color: var(--ink-soft); text-align: center; padding-top: 0.35rem; }

/* ---------- about ---------- */

.hk-about-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: clamp(1.5rem, 4vw, 4rem);
  align-items: center;
}

.hk-about-fig { margin: 0; position: relative; max-width: 420px; }

.hk-about-fig img {
  border-radius: 14px;
  border: 6px solid var(--frame);
  box-shadow: 8px 10px 0 rgba(55, 45, 31, 0.15);
  transform: rotate(-1.4deg);
  aspect-ratio: 4 / 5;
  object-fit: cover;
}

.hk-about-fig figcaption {
  position: absolute;
  bottom: -14px;
  left: 12px;
  background: var(--frame);
  border: 2px solid var(--ink);
  font-family: 'Caveat', cursive;
  font-weight: 600;
  font-size: 1.3rem;
  color: var(--brick-deep);
  padding: 0.15rem 0.9rem;
  transform: rotate(-3deg);
  box-shadow: 3px 3px 0 rgba(55, 45, 31, 0.2);
}

.hk-about h2 { font-family: 'Fraunces', serif; font-weight: 560; font-size: clamp(1.9rem, 3.4vw, 2.7rem); line-height: 1.12; margin: 0 0 1rem; }

.hk-about p { color: var(--ink-soft); margin: 0 0 1rem; }
.hk-about p strong { color: var(--ink); }

.hk-about ul { margin: 0 0 1.2rem; padding-left: 1.2rem; color: var(--ink-soft); }
.hk-about li { margin-bottom: 0.35rem; }
.hk-about li::marker { color: var(--brick); }

.hk-quote {
  border-left: 5px solid var(--mustard);
  margin: 1.4rem 0 0;
  padding: 0.4rem 0 0.4rem 1.2rem;
  font-family: 'Libre Baskerville', serif;
  font-style: italic;
  font-size: 1.02rem;
  color: var(--ink);
}

.hk-quote cite { display: block; font-family: 'Caveat', cursive; font-style: normal; font-size: 1.25rem; color: var(--brick-deep); margin-top: 0.35rem; }

/* ---------- contact ---------- */

.hk-contact { background: var(--paper-deep); border-top: 2px solid var(--ink); }

.hk-contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  gap: clamp(1.5rem, 4vw, 4rem);
  align-items: start;
}

.hk-contact-aside h2 { font-family: 'Fraunces', serif; font-weight: 560; font-size: clamp(1.9rem, 3.4vw, 2.7rem); line-height: 1.12; margin: 0 0 1rem; }

.hk-contact-aside p { color: var(--ink-soft); margin: 0 0 1rem; }

.hk-contact-aside .hand { font-size: 1.5rem; color: var(--brick-deep); transform: rotate(-1.5deg); display: inline-block; }

.hk-form {
  background: var(--frame);
  border: 2px solid var(--ink);
  border-radius: 14px;
  padding: 1.8rem;
  box-shadow: 8px 9px 0 rgba(55, 45, 31, 0.15);
}

.hk-form .fine { font-size: 0.85rem; color: var(--ink-soft); margin: 0 0 1.2rem; padding-bottom: 0.9rem; border-bottom: 1.5px dashed var(--street); }

.hk-field { margin-bottom: 1.1rem; }

.hk-field label { display: block; font-weight: 700; font-size: 0.88rem; margin-bottom: 0.35rem; }

.hk-field input, .hk-field select, .hk-field textarea {
  width: 100%;
  font: inherit;
  color: var(--ink);
  background: var(--paper);
  border: 2px solid var(--ink);
  border-radius: 10px;
  padding: 0.65rem 0.8rem;
}

.hk-field textarea { min-height: 110px; resize: vertical; }

.hk-field input:focus, .hk-field select:focus, .hk-field textarea:focus {
  outline: 3px solid var(--lake-line);
  outline-offset: 1px;
}

.hk-form .hk-tagbtn { width: 100%; transform: none; font-size: 1rem; padding: 0.85rem; }

.hk-confirm {
  display: none;
  margin-top: 1.1rem;
  background: var(--green);
  color: var(--paper);
  border: 2px solid var(--ink);
  border-radius: 10px;
  padding: 0.9rem 1.1rem;
  font-size: 0.95rem;
}

.hk-confirm.show { display: block; }
.hk-confirm .hand { font-size: 1.4rem; color: var(--mustard); display: block; }

/* ---------- footer ---------- */

.hk-foot {
  background: #2c2419;
  color: #e8dfca;
  padding: 2.4rem 4vw;
}

.hk-foot .wrap { display: flex; flex-wrap: wrap; gap: 1rem 2.5rem; align-items: baseline; justify-content: space-between; }

.hk-foot strong { font-family: 'Fraunces', serif; font-size: 1.2rem; }

.hk-foot p { margin: 0; font-size: 0.88rem; color: #c4b898; max-width: 46rem; }

.hk-foot a { color: var(--mustard); font-weight: 600; text-decoration: underline; text-underline-offset: 4px; }

/* ---------- responsive ---------- */

@media (max-width: 1020px) {
  .hk-hero { grid-template-columns: 1fr; gap: 2.4rem; }
  .hk-hero-fig { justify-self: center; max-width: 560px; }
  .hk-sold-grid { grid-template-columns: 1fr; }
  .hk-salepanel { min-height: 0; }
  .hk-notes-grid { grid-template-columns: 1fr 1fr; }
  .hk-contact-grid, .hk-about-grid { grid-template-columns: 1fr; }
  .hk-about-fig { justify-self: center; }
}

@media (max-width: 640px) {
  body.hk { font-size: 16px; }
  .hk-head { flex-wrap: wrap; gap: 0.6rem 1rem; }
  .hk-nav { margin-left: 0; gap: 1rem; }
  .hk-nav a { font-size: 0.88rem; }
  .hk-head .hk-tagbtn { padding: 0.45rem 1rem; font-size: 0.85rem; }
  .hk-hero h1 { font-size: clamp(2.2rem, 11vw, 3rem); }
  .hk-notes-grid { grid-template-columns: 1fr; }
  .hk-note:nth-child(2) { transform: rotate(1.1deg); }
  .hk-rider { left: 2%; bottom: 4%; }
  .hk-rider .hand { font-size: 1.25rem; }
  .hk-form { padding: 1.2rem; }
  .hk-sale dl { grid-template-columns: 1fr; }
  .hk-sale dd { text-align: left; margin-bottom: 0.3rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hk * { transition: none !important; animation: none !important; }
}
@import url("demo-motion.css?v=v1");
