/* ==================================================================
   Schoolhouse Flats — 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: the 1908 Adams Street schoolhouse. Blackboard slate (the portico
   and window sashes), limestone / chalk paper (the lintels and trim) and a
   restrained brick accent taken from the facade. Type is Fraunces, a warm
   old-style serif with a schoolbook feel, with Work Sans for the interface.
   Motifs: the central pediment (ornaments, gable-topped photo frames), the
   "1908." datestone tablet, running-bond brick texture, and a framed
   chalkboard as the signature section.
   ================================================================== */
:root {
  --paper: #F6F2EB;          /* limestone / chalk */
  --paper-2: #EEE7DC;
  --paper-3: #DDD2C2;
  --ink: #252B30;            /* blackboard slate */
  --ink-2: #3B4248;
  --ink-soft: #646A6E;
  --river: #36444B;          /* portico slate */
  --river-deep: #232C31;     /* deep slate */
  --sage-soft: #E9D4C6;
  --brass: #A9583A;          /* brick: rules, frames, small accents */
  --brass-text: #8A4329;     /* brick, dark enough for text on paper */
  --sage-bar: #EFE8DC;       /* panels, drawer, header */
  --line: rgba(37, 43, 48, .16);
  --line-light: rgba(246, 242, 235, .22);

  --brick: #A9583A;
  --brick-hi: #B9674A;
  --chalk: #F3ECDF;          /* chalk white for buttons on slate */
  --chalk-text: #E8C9B3;     /* warm chalk accent on slate (eyebrows etc.) */
  --oak: #9C7A55;            /* blackboard frame */

  --serif: "Fraunces", "Iowan Old Style", Georgia, serif;
  --period: "Fraunces", Georgia, serif;
  --sans: "Work Sans", "Helvetica Neue", "Segoe UI", system-ui, sans-serif;
}

/* ---------- Type ---------- */
/* Pin Fraunces to a modest optical size everywhere: sturdy strokes even at
   display sizes (no hairlines). Work Sans has no opsz axis, so it ignores this. */
body { font-optical-sizing: none; font-variation-settings: "opsz" 36; }
.title { letter-spacing: .01em; line-height: 1; font-weight: 500; }
h1, h2, h3, .display { font-weight: 500; }
.title--xl { font-size: clamp(44px, 6.6vw, 96px); }
.title--lg { font-size: clamp(34px, 4.8vw, 70px); }
.page-banner .title { font-size: clamp(50px, 9vw, 128px); }
.intro-title { font-size: clamp(24px, 4.6vw, 62px); }
.collage--text .c-copy .title--xl { font-size: clamp(46px, 6vw, 88px); }
.on-dark h1 em, .on-dark h2 em, .on-dark h3 em, .on-dark .eyebrow, .site-footer h3 { color: var(--chalk-text); }
.dropcap::first-letter { font-weight: 500; color: var(--brass-text); }
.lede, .copy-period { font-style: italic; }
.stat .num { font-family: var(--serif); font-weight: 500; }
.stat .lbl { font-family: var(--sans); font-style: normal; font-size: 12px; letter-spacing: .2em; text-transform: uppercase; }

/* Eyebrows: small caps label set between two short brick rules */
.eyebrow { font-family: var(--sans); font-style: normal; font-variant: normal; font-size: 12px; font-weight: 600; letter-spacing: .24em; text-transform: uppercase; }
.eyebrow::before, .eyebrow::after { width: 24px; height: 2px; }

/* ---------- Header / menu / pills ---------- */
.site-header.is-solid, body.page-light .site-header { background: rgba(239, 232, 220, .97); }
.hbtn--apply:hover .arr { background: var(--brick); color: var(--paper); }
.menu-nav a { font-family: var(--serif); font-weight: 500; }
.menu-nav a:hover, .menu-nav a[aria-current="page"] { color: var(--brass-text); }
.pill svg { color: var(--brick); }
.pill--dark svg { color: var(--chalk-text); }
.scroll-cue { color: var(--chalk-text); }

/* ---------- CTAs: slate label + brick arrow block (chalk label on dark) ---------- */
.cta .t { background: var(--river-deep); color: var(--paper); font-weight: 500; }
.cta:hover .t { background: var(--river); }
.cta .a { background: var(--brick); color: var(--paper); }
.on-dark .cta .t, .band .cta .t, .hero--school .cta .t, .site-footer .cta .t { background: var(--chalk); color: var(--ink); }
.on-dark .cta:hover .t, .band .cta:hover .t, .hero--school .cta:hover .t, .site-footer .cta:hover .t { background: #FFFFFF; }
.cta--dark .t { background: var(--brick); color: var(--paper); }
.cta--dark:hover .t { background: var(--brick-hi); }
.cta--dark .a { background: var(--river-deep); color: var(--paper); }
.menu-aside .cta .t { background: var(--river-deep); color: var(--paper); }

.av-chips button[aria-pressed="true"], .av-view button[aria-pressed="true"], .seg button[aria-pressed="true"], .chip[aria-pressed="true"] { background: var(--river-deep); border-color: var(--river-deep); color: var(--paper); }
.carousel-btn { background: rgba(35, 44, 49, .5); color: var(--chalk); }
.carousel-btn:hover { background: rgba(35, 44, 49, .85); }
.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, 88, 58, .3); }
:focus-visible { outline-color: var(--brick); }

/* ---------- Motifs ---------- */
/* Ornament: the schoolhouse pediment with its datestone, between two rules */
.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='%23A9583A' stroke-width='1.2' stroke-linejoin='round'%3E%3Cpath d='M12 14.5L27 2l15 12.5z'/%3E%3Crect x='23.5' y='8.6' width='7' height='3' fill='%23A9583A' stroke='none'/%3E%3Ccircle cx='5' cy='12.5' r='1.3' fill='%23A9583A' stroke='none'/%3E%3Ccircle cx='49' cy='12.5' r='1.3' fill='%23A9583A' stroke='none'/%3E%3C/svg%3E") center / 54px 16px no-repeat; }
.page-banner .ornament, .on-dark .ornament { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 54 16' fill='none' stroke='%23E8C9B3' stroke-width='1.2' stroke-linejoin='round'%3E%3Cpath d='M12 14.5L27 2l15 12.5z'/%3E%3Crect x='23.5' y='8.6' width='7' height='3' fill='%23E8C9B3' stroke='none'/%3E%3Ccircle cx='5' cy='12.5' r='1.3' fill='%23E8C9B3' stroke='none'/%3E%3Ccircle cx='49' cy='12.5' r='1.3' fill='%23E8C9B3' stroke='none'/%3E%3C/svg%3E"); color: var(--chalk-text); }

/* Alt sections: faint running-bond brickwork */
.section--alt { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='24' viewBox='0 0 48 24' fill='none' stroke='%23A9583A' stroke-opacity='.09'%3E%3Cpath d='M0 .5h48M0 12.5h48M.5 0v12M24.5 12v12'/%3E%3C/svg%3E"); background-size: 48px 24px; }

/* Datestone tablet ("1908."), as set in the pediment */
.datestone { display: flex; width: fit-content; align-items: center; justify-content: center; min-width: 7.2em; padding: .32em .9em .26em; margin: 0 auto var(--s4);
  font: 500 clamp(22px, 2.4vw, 30px)/1 var(--serif); letter-spacing: .12em; font-variant-numeric: lining-nums; color: #F1E6DA;
  background: linear-gradient(180deg, #6E4E40, #5C4034); border-radius: 2px;
  box-shadow: inset 0 0 0 4px #5C4034, inset 0 0 0 5px rgba(241, 230, 218, .35), 0 0 0 6px var(--brick), 0 0 0 7px rgba(37, 43, 48, .12); }
.on-dark .datestone { box-shadow: inset 0 0 0 4px #5C4034, inset 0 0 0 5px rgba(241, 230, 218, .35), 0 0 0 6px var(--brick), 0 0 0 7px rgba(246, 242, 235, .14); }

/* Gable-topped frame (the pediment over the entry) */
.gable-frame { position: relative; padding: 14px; }
.gable-frame::before { content: ""; position: absolute; inset: 0; pointer-events: none;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100' preserveAspectRatio='none'%3E%3Cpath d='M.5 15.5L50 .5l49.5 15V99.5H.5z' fill='none' stroke='%23A9583A' stroke-width='1' vector-effect='non-scaling-stroke'/%3E%3C/svg%3E") 0 0 / 100% 100% no-repeat; }
.gable-frame .figure { clip-path: polygon(0 14%, 50% 0, 100% 14%, 100% 100%, 0 100%); }

/* ---------- Home hero: slate panel + schoolhouse photo ---------- */
.hero--school { display: grid; align-items: stretch; min-height: 100svh; background: var(--river-deep); color: var(--paper); }
.hero--school .hs-photo { position: relative; overflow: hidden; min-height: 56svh; background: var(--river); }
.hero--school .hs-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 42%; transform: scale(1.05); animation: heroSettle 2.4s var(--ease-out) forwards; }
.hero--school .hs-photo::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(20, 26, 30, .5) 0%, rgba(20, 26, 30, 0) 26%); pointer-events: none; }
.hero--school .hs-copy { position: relative; display: flex; flex-direction: column; justify-content: center; padding: var(--s6) var(--gutter) var(--s7); }
.hero--school .hs-copy::before { content: ""; position: absolute; inset: 0; opacity: .6; pointer-events: none; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='24' viewBox='0 0 48 24' fill='none' stroke='%23E8C9B3' stroke-opacity='.06'%3E%3Cpath d='M0 .5h48M0 12.5h48M.5 0v12M24.5 12v12'/%3E%3C/svg%3E") 0 0 / 48px 24px; }
.hs-copy > * { position: relative; }
.hs-name { font-family: var(--serif); font-weight: 500; margin: 0; line-height: .9; letter-spacing: -.015em; font-size: clamp(46px, 13.5vw, 84px); }
.hs-name span { display: block; }
.hs-name span + span { color: var(--chalk-text); font-style: italic; font-weight: 400; }
.hs-sub { margin: var(--s4) 0 0; max-width: 24ch; font: italic 400 clamp(21px, 2vw, 28px)/1.3 var(--serif); color: rgba(246, 242, 235, .9); }
.hs-status { display: flex; align-items: center; gap: 14px; margin: var(--s5) 0 0; font: 500 12px/1.4 var(--sans); letter-spacing: .24em; text-transform: uppercase; color: rgba(246, 242, 235, .75); }
.hs-status::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: #8FBF8A; box-shadow: 0 0 0 4px rgba(143, 191, 138, .18); }
.hero--school .cta { margin-top: var(--s5); align-self: flex-start; }
@media (min-width: 900px) {
  .hero--school { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
  .hero--school .hs-photo { min-height: 100svh; }
  .hs-name { font-size: clamp(56px, 5vw, 92px); }
  .hero--school .hs-photo::after { background: linear-gradient(180deg, rgba(20, 26, 30, .55) 0%, rgba(20, 26, 30, 0) 22%), linear-gradient(270deg, rgba(35, 44, 49, .35), rgba(35, 44, 49, 0) 18%); }
  .hero--school .hs-copy { padding: 128px clamp(32px, 4.5vw, 80px) 72px; border-left: 3px solid var(--brick); }
}
@media (max-width: 899px) {
  .hero--school .hs-photo { border-bottom: 3px solid var(--brick); }
  .hs-status { letter-spacing: .14em; gap: 10px; }
  .hero--school .hs-photo img { object-position: 50% 45%; }
}

/* ---------- Inner-page heroes: title on slate, photo under a pediment ---------- */
.page-hero { background: var(--river-deep); }
.page-hero::before { content: ""; position: absolute; inset: 0; opacity: .6; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='24' viewBox='0 0 48 24' fill='none' stroke='%23E8C9B3' stroke-opacity='.06'%3E%3Cpath d='M0 .5h48M0 12.5h48M.5 0v12M24.5 12v12'/%3E%3C/svg%3E") 0 0 / 48px 24px; }
.page-hero .hero-media::after { background: none; }
.page-hero .hero-content { text-align: left; }
.page-hero .hero-content .eyebrow { color: var(--chalk-text) !important; }
.page-hero h1 { margin: 0 !important; }
.page-hero .hero-media { clip-path: polygon(0 15%, 50% 0, 100% 15%, 100% 100%, 0 100%); }
.page-hero .hero-media img { object-position: 50% 50%; }
@media (min-width: 900px) {
  .page-hero { min-height: 76svh; align-items: center; }
  .page-hero .hero-media { inset: 120px max(var(--gutter), calc((100vw - var(--wrap)) / 2 + var(--gutter))) 0 auto; width: min(44vw, 640px); border-bottom: 0; }
  .page-hero .hero-media::before { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 6px; background: var(--brick); z-index: 1; }
  .page-hero .hero-content { padding-top: 150px; }
  .page-hero .hero-content > * { max-width: 46%; }
  .page-hero h1 { font-size: clamp(44px, 5.4vw, 88px); max-width: 11ch; }
}
@media (max-width: 899px) {
  .page-hero { flex-direction: column; align-items: stretch; min-height: 0; padding-top: 96px; }
  .page-hero .hero-media { position: relative; inset: auto; height: 44svh; margin: 0 var(--gutter); }
  .page-hero .hero-content { padding-top: var(--s5); }
}

/* ---------- Banners (availability / contact): slate with a soldier-course hem ---------- */
.page-banner { background: var(--river-deep); }
.page-banner::before { content: ""; position: absolute; inset: 0; opacity: .6; pointer-events: none; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='24' viewBox='0 0 48 24' fill='none' stroke='%23E8C9B3' stroke-opacity='.06'%3E%3Cpath d='M0 .5h48M0 12.5h48M.5 0v12M24.5 12v12'/%3E%3C/svg%3E") 0 0 / 48px 24px; }
.page-banner > * { position: relative; }
.page-banner::after { opacity: 1; height: 14px; background: repeating-linear-gradient(90deg, var(--brick) 0 13px, var(--river-deep) 13px 15px); border-top: 2px solid var(--paper-3); }

/* ---------- Wave sections become brick-and-slate; panels stay limestone ---------- */
.wave-section { background: var(--river); }
.wave-section::before { opacity: 1; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='24' viewBox='0 0 48 24' fill='none' stroke='%23F6F2EB' stroke-opacity='.07'%3E%3Cpath d='M0 .5h48M0 12.5h48M.5 0v12M24.5 12v12'/%3E%3C/svg%3E") 0 0 / 48px 24px; }
.panel { background: var(--sage-bar); }
.panel::before, .panel::after { border-color: var(--brass); }

/* ---------- Bands ---------- */
.band .hero-media::after { background: rgba(28, 34, 38, .5); }

/* ---------- Availability ---------- */
.av-panel { background: var(--sage-bar); }
.av-card-plan .plan-ph { color: var(--river); }
.av-leased { text-align: center; color: var(--ink-soft); font-size: 15px; margin: var(--s3) 0 0; }

/* ---------- Map ---------- */
.pin { border-color: var(--brick); }
.leaflet-marker-icon:hover .pin, .leaflet-marker-icon:focus .pin { background: var(--brick); color: var(--paper); }
.pin-logo { border-color: var(--brick); }
.pin-logo::after { border-color: var(--brick); }
.nbhd-map .leaflet-control-attribution { background: rgba(246, 242, 235, .85); }
.place .walk { white-space: nowrap; }

/* ---------- Footer ---------- */
.site-footer { background: var(--river-deep); }

/* ---------- Photo credits (small print under sections that use Wikimedia photos) ---------- */
.photo-credit { margin-top: var(--s3); font-size: 12px; color: var(--ink-soft); }
.photo-credit a { color: inherit; }
.on-dark .photo-credit { color: rgba(246, 242, 235, .6); }

/* ==================================================================
   Signature section — "Save your seat": a framed slate chalkboard with
   an oak frame and chalk ledge, on the brick-and-slate wave section.
   Markup: <section class="wave-section sig--board"><div class="wrap">
   <div class="panel board">…</div></div></section>
   ================================================================== */
.sig--board { background: var(--paper-2); }
.sig--board::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='24' viewBox='0 0 48 24' fill='none' stroke='%23A9583A' stroke-opacity='.10'%3E%3Cpath d='M0 .5h48M0 12.5h48M.5 0v12M24.5 12v12'/%3E%3C/svg%3E"); }
.board { position: relative; color: var(--chalk); outline: 0;
  background:
    radial-gradient(120% 70% at 18% 10%, rgba(255, 255, 255, .07), transparent 60%),
    radial-gradient(90% 60% at 85% 85%, rgba(255, 255, 255, .05), transparent 60%),
    linear-gradient(180deg, #2E3A37, #26302E);
  border: 14px solid var(--oak);
  border-image: linear-gradient(135deg, #B08C64, #8A6A47 45%, #A3815B) 1;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .35), inset 0 2px 30px rgba(0, 0, 0, .35), 0 24px 50px rgba(37, 43, 48, .22);
  margin-bottom: 22px; }
.board::before, .board::after { border: 0; width: auto; height: auto; }
.board::before { display: none; }
/* chalk ledge with a stick of chalk */
.board::after { content: ""; left: -28px; right: -28px; bottom: -36px; top: auto; height: 14px; border-radius: 2px;
  background:
    linear-gradient(90deg, transparent 72%, #F3ECDF 72% 76.5%, transparent 76.5%) 0 2px / 100% 6px no-repeat,
    linear-gradient(180deg, #A3815B, #7E6041);
  box-shadow: 0 6px 12px rgba(37, 43, 48, .25); }
.board .title { color: var(--chalk); font-style: italic; font-weight: 400; text-transform: none; letter-spacing: 0; }
.board > .copy-lg { color: rgba(243, 236, 223, .88); }
.board .eyebrow { color: var(--chalk-text); display: flex; justify-content: center; }
.board .cta .t { background: var(--chalk); color: var(--ink); }
.board .cta:hover .t { background: #FFFFFF; }
.board .cta .a { background: var(--brick); color: var(--paper); }
.board .board-note { margin: var(--s4) 0 0; text-align: center; font: italic 400 17px/1.4 var(--serif); color: rgba(243, 236, 223, .7); }
@media (max-width: 600px) { .board { border-width: 10px; } .board::after { left: -16px; right: -16px; bottom: -30px; } }

/* Fade only (no slide) for the gable frames, so the clipped edge never moves */
.gable-frame.reveal { transform: none; }

/* Long email address: let it wrap on phones instead of widening the page */
.contact-grid > * { min-width: 0; }
.contact-list .v { overflow-wrap: anywhere; }
