/* ==================================================================
   the KT Media Building (213–217 S Union St, Middletown PA) — property identity.
   Loaded after styles.css. The shared framework (styles.css, main.js,
   availability.js, map.js) stays identical to 315 N 2nd St; everything
   that makes this site look like *this* building lives here.

   Theme: a Victorian main-street block. Cast-iron umber (the storefront
   panels and doors), the building's cream trim, and its brick red kept as a
   small accent (the awnings). Type: Fraunces (a soft, sturdy old-style serif,
   pinned to a low optical size so nothing goes hairline) + Archivo, whose
   wide cut gives the eyebrows a painted-shop-sign feel. Motifs: scalloped
   awning valances, pilaster lozenges, running-bond brick texture. Signature:
   the facade drawing in the home hero, which draws itself in.
   ================================================================== */
:root {
  --paper: #F6EFE2;
  --paper-2: #EEE4CF;
  --paper-3: #DFD1B5;
  --ink: #2B2421;
  --ink-2: #463B35;
  --ink-soft: #6C5F57;
  --river: #4A3B34;          /* warm umber (hover on dark buttons) */
  --river-deep: #2B2421;     /* cast-iron umber: dark sections, footer */
  --sage: #CDB98A;
  --sage-soft: #EADBB0;
  --brass: #B48E4C;          /* gilded trim line */
  --brass-text: #974536;     /* brick, for small text accents */
  --sage-bar: #F2E7CA;       /* the building's cream trim, paled */
  --line: rgba(43, 36, 33, .16);
  --line-light: rgba(246, 239, 226, .2);

  --brick: #A94B3E;          /* awning / brick accent — use sparingly */
  --trim: #E6D09A;           /* cream trim: buttons, accents on dark */
  --trim-hi: #EFDDB0;

  --serif: "Fraunces", "Iowan Old Style", Georgia, serif;
  --period: "Fraunces", Georgia, serif;
  --sans: "Archivo", "Helvetica Neue", "Segoe UI", system-ui, sans-serif;
}

/* ---------- Type ---------- */
/* Low optical size + a little softness: sturdy strokes at every size. */
h1, h2, h3, .title, .display, .lede, .copy-period, .eyebrow, .stat .num, .stat .lbl, .tl-year,
.contact-list .v, .pop strong, .pop-walk, .page-banner .sub, .dropcap::first-letter, .carousel-caption,
.unit-type dd, .range output, .av-empty td, p.av-empty, .av-card-plan .plan-soon, .facade-labels span, .hero-name {
  font-variation-settings: "opsz" 30, "SOFT" 40, "WONK" 0;
}
h1, h2, h3, .title { font-weight: 480; }
.title { letter-spacing: .015em; line-height: 1; }
.title--xl { font-size: clamp(46px, 7vw, 100px); }
.title--lg { font-size: clamp(36px, 5vw, 74px); }
.intro-title { font-size: clamp(26px, 5vw, 68px); }
.collage--text .c-copy .title--xl { font-size: clamp(48px, 6.4vw, 96px); }
.page-banner .title { font-size: clamp(34px, 9.4vw, 136px); }
h1 em, h2 em, h3 em { color: var(--brass-text); font-weight: 420; }
.on-dark h1 em, .on-dark h2 em, .on-dark h3 em { color: var(--trim); }
.copy-lg { font-size: clamp(18px, 1.6vw, 22px); }
body { font-stretch: 100%; }

/* Eyebrows: wide, painted-sign capitals with pilaster lozenges either side */
.eyebrow {
  font-family: var(--sans); font-style: normal; font-variant: normal; font-stretch: 125%;
  font-size: 11.5px; font-weight: 600; letter-spacing: .24em; text-transform: uppercase; color: var(--brass-text);
}
.eyebrow::before, .eyebrow::after {
  width: 6px; height: 12px; background: currentColor; opacity: .85;
  clip-path: polygon(30% 0, 70% 0, 100% 22%, 100% 78%, 70% 100%, 30% 100%, 0 78%, 0 22%);
}
.on-dark .eyebrow, .page-hero .eyebrow, .hero .eyebrow { color: var(--trim); }

.lede, .copy-period { font-weight: 400; }
.dropcap::first-letter { font-weight: 500; color: var(--brick); }

/* ---------- Header / menu / pills ---------- */
.site-header.is-solid, body.page-light .site-header { background: rgba(242, 231, 202, .97); }
.hbtn { font-stretch: 112%; }
.hbtn--apply:hover .arr { background: var(--brick); }
.menu-nav a { font-family: var(--serif); font-variation-settings: "opsz" 30, "SOFT" 40, "WONK" 0; font-weight: 450; }
.menu-logo { width: 220px; }
.menu-logo .awn { fill: var(--brick); stroke: var(--ink); }
.pill svg { color: var(--brick); }
.pill--dark svg { color: var(--trim); }
.site-footer h3 { color: var(--trim); }
.menu-nav a::before, .scroll-cue, .steps li::before { color: var(--trim); }

/* ---------- CTAs: cream trim with an iron arrow block ---------- */
.cta .t { background: var(--trim); color: var(--ink); font-stretch: 108%; font-weight: 600; font-size: clamp(15px, 1.4vw, 19px); letter-spacing: .06em; }
.cta:hover .t { background: var(--trim-hi); }
.cta .a { background: var(--river-deep); color: var(--trim); }
.on-dark .cta .a, .hero .cta .a, .band .cta .a { background: var(--brick); color: var(--paper); }
.cta--dark .t { background: var(--river-deep); color: var(--paper); }
.cta--dark .a { background: var(--brick); color: var(--paper); }
.cta--dark:hover .t { background: var(--river); }
.av-chips button[aria-pressed="true"], .av-view button[aria-pressed="true"], .seg button[aria-pressed="true"] { background: var(--trim); border-color: var(--trim); color: var(--ink); }
.carousel-btn { background: rgba(43, 36, 33, .45); color: var(--trim); }
.carousel-btn:hover { background: rgba(43, 36, 33, .8); }
.carousel-dots button[aria-current="true"]::after { background: var(--brick); }
.field input:focus, .field select:focus, .field textarea:focus { box-shadow: 0 0 0 3px rgba(169, 75, 62, .25); }
:focus-visible { outline-color: var(--brick); }
::selection { background: var(--sage-soft); }

/* ---------- Motifs ---------- */
/* Ornament: rule · pilaster lozenge · rule */
.ornament { color: var(--brass); }
.ornament svg { visibility: hidden; }
.ornament { background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 54 16' fill='none' stroke='%23A94B3E' stroke-width='1.1'%3E%3Cpath d='M24 1.5h6l2.5 3v7l-2.5 3h-6l-2.5-3v-7z'/%3E%3Cpath d='M25.6 4.5h2.8l1 1.2v4.6l-1 1.2h-2.8l-1-1.2V5.7z' fill='%23A94B3E' stroke='none'/%3E%3Ccircle cx='14' cy='8' r='1.3' fill='%23B48E4C' stroke='none'/%3E%3Ccircle cx='40' cy='8' r='1.3' fill='%23B48E4C' stroke='none'/%3E%3C/svg%3E") center / 54px 16px no-repeat; }
.on-dark .ornament, .page-banner .ornament { color: var(--trim); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 54 16' fill='none' stroke='%23E6D09A' stroke-width='1.1'%3E%3Cpath d='M24 1.5h6l2.5 3v7l-2.5 3h-6l-2.5-3v-7z'/%3E%3Cpath d='M25.6 4.5h2.8l1 1.2v4.6l-1 1.2h-2.8l-1-1.2V5.7z' fill='%23E6D09A' stroke='none'/%3E%3Ccircle cx='14' cy='8' r='1.3' fill='%23E6D09A' stroke='none'/%3E%3Ccircle cx='40' cy='8' r='1.3' fill='%23E6D09A' stroke='none'/%3E%3C/svg%3E"); }

/* Running-bond brick texture (very faint) for alt sections */
.section--alt { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='18' viewBox='0 0 48 18' fill='none' stroke='%23A94B3E' stroke-opacity='.09' stroke-width='1'%3E%3Cpath d='M0 .5h48M0 9.5h48M.5 0v9M24.5 9v9'/%3E%3C/svg%3E"); background-size: 48px 18px; }

/* Scalloped awning valance: a brick band with a scalloped hem */
.awning-hem, .page-banner::after, .hero--drawn::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -14px; height: 22px; opacity: 1; z-index: 2; pointer-events: none;
  background:
    linear-gradient(var(--brick), var(--brick)) 0 0 / 100% 9px no-repeat,
    radial-gradient(circle at 11px 0, var(--brick) 10.5px, transparent 11px) 0 8px / 22px 12px repeat-x;
}
.page-banner { background: var(--river-deep); padding-bottom: clamp(56px, 7vw, 104px); }
.page-banner + section, .hero--drawn + section { padding-top: calc(clamp(56px, 7vw, 96px) + 14px); }
.page-banner .sub { font-style: italic; }

/* Picture frame: thin gilt line inset in cream trim */
.dbl-frame::after { border-color: rgba(246, 239, 226, .75); outline-color: rgba(246, 239, 226, .4); }
.trim-frame { position: relative; padding: 12px; background: var(--sage-bar); box-shadow: 0 18px 44px rgba(43, 36, 33, .12); }
.trim-frame::before { content: ""; position: absolute; inset: 5px; border: 1px solid var(--brass); pointer-events: none; z-index: 1; }
.trim-frame .figure { background: var(--paper-3); }
.trim-frame figcaption { margin-top: 10px; font: italic 15px/1.4 var(--serif); font-variation-settings: "opsz" 14, "WONK" 0; color: var(--ink-soft); text-align: center; }

/* Panels (interest list) — cream trim with a brick corner */
.panel { background: var(--sage-bar); outline-color: var(--brass); }
.panel::before, .panel::after { border-color: var(--brick); }
.wave-section::before {
  opacity: 1;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='18' viewBox='0 0 48 18' fill='none' stroke='%23E6D09A' stroke-opacity='.08' stroke-width='1'%3E%3Cpath d='M0 .5h48M0 9.5h48M.5 0v9M24.5 9v9'/%3E%3C/svg%3E");
  background-size: 48px 18px;
}

/* Stats */
.stat .num { font-family: var(--serif); font-weight: 450; }
.stat .lbl { font-family: var(--serif); font-style: italic; font-size: 17px; }

/* Timeline */
.tl-item::before { border-color: var(--brick); }
.tl-item.is-key::before { background: var(--brick); }
.tl-year { color: var(--brass-text); font-weight: 450; }

/* Notices / features / places */
.notice { border-left-color: var(--brick); }
.notice svg, .feature svg { color: var(--brick); }
.on-dark .feature svg { color: var(--trim); }
.place .walk { color: var(--brass-text); }
.pin { border-color: var(--trim); }
.leaflet-marker-icon:hover .pin, .leaflet-marker-icon:focus .pin { background: var(--trim); }
.pin-logo { border-color: var(--brass); }
.pin-logo::after { border-color: var(--brass); }
.pin-logo .awn, .facade-art .awn { fill: var(--brick); fill-opacity: .78; }
.nbhd-map, .nbhd-map .leaflet-popup-content-wrapper, .nbhd-map .leaflet-popup-tip { outline-color: var(--brass); border-color: var(--brass); }

/* Availability */
.av-panel { background: var(--sage-bar); }
.av-card-plan .plan-ph { color: var(--brick); opacity: .7; }

/* ---------- Home hero: iron ground + self-drawing facade ---------- */
.hero--drawn { display: block; min-height: 100svh; background: var(--river-deep); color: var(--paper); overflow: visible; }
.hero--drawn::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='18' viewBox='0 0 48 18' fill='none' stroke='%23E6D09A' stroke-opacity='.06' stroke-width='1'%3E%3Cpath d='M0 .5h48M0 9.5h48M.5 0v9M24.5 9v9'/%3E%3C/svg%3E");
  background-size: 48px 18px;
  -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 40%, #000 100%); mask-image: linear-gradient(180deg, transparent 0, #000 40%, #000 100%);
}
.hero-split { position: relative; display: grid; gap: var(--s5); align-items: center; min-height: 100svh; padding-top: 112px; padding-bottom: calc(var(--s6) + 14px); }
@media (min-width: 960px) { .hero-split { grid-template-columns: 5fr 7fr; gap: clamp(40px, 5vw, 88px); } }
.hero-copy { max-width: 520px; }
.hero-name { margin: 0; font-family: var(--serif); font-weight: 460; line-height: .9; letter-spacing: -.01em; max-width: none; font-size: clamp(72px, 10vw, 150px); }
.hero-name span { display: block; }
.hero-name span + span { font-style: italic; font-weight: 400; color: var(--trim); padding-left: .42em; }
.hero-accent { margin: var(--s4) 0 0; font: italic 400 clamp(20px, 2vw, 28px)/1.35 var(--serif); font-variation-settings: "opsz" 24, "SOFT" 60, "WONK" 0; color: rgba(246, 239, 226, .92); max-width: 26ch; }
.hero-note { display: flex; align-items: center; gap: 12px; margin: var(--s5) 0 0; font: 600 11.5px/1.4 var(--sans); font-stretch: 125%; letter-spacing: .24em; text-transform: uppercase; color: rgba(246, 239, 226, .72); }
.hero-note::before { content: ""; flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--brick); box-shadow: 0 0 0 0 rgba(169, 75, 62, .6); animation: pulse 2.4s infinite; }
.hero-ctas { margin-top: var(--s5); }
.hero-art { position: relative; color: var(--trim); width: 100%; max-width: 780px; justify-self: center; }
.hero-art svg { width: 100%; height: auto; display: block; overflow: visible; }
.hero-art .awn { fill: var(--brick); stroke: var(--trim); }
.hero-art.is-drawing .bldg-lines { stroke-dasharray: 1; stroke-dashoffset: 1; animation: drawIn 3s cubic-bezier(.45, .05, .3, 1) .2s forwards; }
.hero-art.is-drawing .awn { opacity: 0; animation: awnIn .8s var(--ease-out) 2.6s forwards; }
@keyframes drawIn { to { stroke-dashoffset: 0; } }
@keyframes awnIn { to { opacity: 1; } }
.hero-art .street-sign {
  position: absolute; right: 2%; top: -6px; display: inline-flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 8px 14px; border: 1px solid rgba(230, 208, 154, .55); color: var(--trim);
  font: 600 10.5px/1.2 var(--sans); font-stretch: 125%; letter-spacing: .26em; text-transform: uppercase;
}
.hero-art .street-sign b { font: italic 400 18px/1.1 var(--serif); letter-spacing: .02em; text-transform: none; font-variation-settings: "opsz" 18, "WONK" 0; }
@media (max-width: 959px) {
  .hero-split { padding-top: 104px; gap: var(--s5); align-content: center; }
  .hero-art { max-width: 560px; order: 2; }
  .hero-art .street-sign { display: none; }
}
@media (max-width: 520px) { .hero-name { font-size: clamp(64px, 19vw, 92px); } }
@media (prefers-reduced-motion: reduce) {
  .hero-art.is-drawing .bldg-lines, .hero-art.is-drawing .awn { animation: none; stroke-dashoffset: 0; opacity: 1; }
}

/* ---------- Signature: the Union Street elevation ---------- */
.elevation { position: relative; max-width: 1100px; margin: 0 auto; padding: clamp(28px, 4vw, 56px) clamp(16px, 4vw, 64px) clamp(20px, 3vw, 40px); background: var(--white); border: 1px solid var(--line); }
.elevation::before { content: ""; position: absolute; inset: 8px; border: 1px solid rgba(180, 142, 76, .45); pointer-events: none; }
.facade-art { color: var(--ink); }
.facade-labels span { font-style: italic; color: var(--ink-2); }
.facade-labels span::before { content: ""; display: block; width: 1px; height: 12px; margin: -14px auto 4px; background: var(--brass); }
.elevation-note { margin: var(--s4) 0 0; text-align: center; font-size: 14px; color: var(--ink-soft); }
@media (max-width: 640px) { .facade-labels span { font-size: 12px; } .facade-labels span::before { display: none; } }

/* Small photo credits at the foot of a page */
.photo-credits { padding: var(--s4) 0 0; font-size: 12px; line-height: 1.6; color: var(--ink-soft); }
.photo-credits a { color: inherit; }
.photo-credits .wrap { border-top: 1px solid var(--line); padding-top: var(--s3); padding-bottom: var(--s4); }

/* History map print */
.map-print { position: relative; }
.map-print .figure { aspect-ratio: 1 / 1; }
.map-print .figure img { object-position: 50% 50%; }

/* Warm (iron, not slate) shading over photos */
.hero-media::after { background: linear-gradient(180deg, rgba(43,36,33,.55) 0%, rgba(43,36,33,.12) 32%, rgba(43,36,33,.32) 58%, rgba(43,36,33,.88) 100%); }
.band .hero-media::after { background: rgba(43,36,33,.46); }
.figure figcaption { background: linear-gradient(transparent, rgba(43,36,33,.7)); }

/* Availability table: longer words here ("Storefront", "Coming soon"), so a size down */
.av-table td { font-size: clamp(17px, 1.65vw, 24px); }
@media (min-width: 761px) { .av-panel { overflow-x: auto; } }

/* Phones */
@media (max-width: 560px) {
  .facade-labels { display: none; }
  .cta .t { padding: 0 18px; font-size: 14px; letter-spacing: .04em; }
  .cta .a { width: 50px; }
}
