/*
Theme Name: Elam Street
Author: Elam Street Apartments
Description: One-page apartment property theme for Elam Street Apartments in New Britain, CT. Every homepage section, photo, menu, color, and contact-form setting is editable in Appearance → Customize. Includes a built-in inquiry form that emails you and saves every message under Dashboard → Inquiries.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: elam-street
*/

/* ---------- Tokens (colors are overridden from the Customizer) ---------- */
:root {
	--accent: #9A4532;
	--accent-dark: #7E3626;
	--accent-light: #D9A48F;
	--ink: #1A1A1A;
	--text: #3A3A3A;
	--muted: #5E5E5E;
	--line: #D9D9D9;
	--line-soft: #E6E6E6;
	--placeholder: #E8E8E8;
	--font-head: 'Jost', 'Futura', 'Century Gothic', sans-serif;
	--font-body: 'DM Sans', system-ui, -apple-system, sans-serif;
	--header-h: 104px;
	--header-h-scrolled: 76px;
	--header-h-mobile: 68px;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: #fff; color: var(--ink); font-family: var(--font-body); font-size: 16px; line-height: 1.5; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
img { display: block; max-width: 100%; height: auto; }
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { color: var(--ink); }
button { font: inherit; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.skip-link:focus { clip: auto; width: auto; height: auto; margin: 0; padding: 12px 18px; left: 12px; top: 12px; z-index: 200; background: #fff; color: var(--ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------- Layout ---------- */
.container { max-width: 1200px; margin: 0 auto; padding: 0 clamp(20px, 5vw, 80px); }
.container--wide { max-width: 1240px; padding: 0 clamp(20px, 4vw, 56px); }
.container--bleed { max-width: 1320px; padding: 0 clamp(8px, 2vw, 24px); }
.container--narrow { max-width: 880px; padding: 0 clamp(20px, 5vw, 40px); }
.section { padding: clamp(72px, 10vw, 128px) 0; }
.section--rule { border-top: 1px solid var(--line-soft); }
.section--dark { background: var(--ink); color: #fff; }
.section-head { max-width: 720px; margin: 0 auto 56px; text-align: center; }
.split { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 400px), 1fr)); gap: clamp(40px, 6vw, 88px); align-items: start; }

/* ---------- Type ---------- */
.eyebrow { margin: 0 0 20px; font-family: var(--font-head); font-size: 14px; letter-spacing: .24em; text-transform: uppercase; }
.h2 { margin: 0 0 20px; font-family: var(--font-head); font-weight: 300; font-size: clamp(34px, 4vw, 50px); line-height: 1.1; text-wrap: balance; }
.lead { font-size: 17px; line-height: 1.7; color: var(--text); text-wrap: pretty; }
.lead p { margin: 0 0 1em; }
.lead p:last-child { margin-bottom: 0; }
.section--dark .lead { color: #C8C8C8; }
.label { margin: 0 0 12px; font-family: var(--font-head); font-size: 12px; letter-spacing: .2em; color: var(--muted); text-transform: uppercase; }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 50px; padding: 0 28px; border: 1px solid transparent; background: none; font-family: var(--font-head); font-size: 14px; font-weight: 500; letter-spacing: .18em; text-transform: uppercase; text-decoration: none; white-space: nowrap; cursor: pointer; transition: background-color .15s ease, color .15s ease, border-color .15s ease; }
.btn:active { opacity: .85; }
.btn--light { background: #fff; border-color: #fff; color: var(--ink); }
.btn--light:hover { background: transparent; color: #fff; }
.btn--ghost-light { border-color: #fff; color: #fff; }
.btn--ghost-light:hover { background: #fff; color: var(--ink); }
.btn--accent { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn--accent:hover { background: var(--accent-dark); border-color: var(--accent-dark); color: #fff; }
.btn--ghost { border-color: var(--ink); color: var(--ink); }
.btn--ghost:hover { background: var(--ink); color: #fff; }
.btn--sm { min-height: 44px; padding: 0 20px; font-size: 13px; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- Header ---------- */
.site-header { position: fixed; top: 0; left: 0; right: 0; z-index: 50; transition: background-color .3s ease; }
.admin-bar .site-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .site-header { top: 46px; } }
.site-header.is-solid, .has-solid-header .site-header { background: var(--ink); }
.header-inner { max-width: 1320px; margin: 0 auto; padding: 0 clamp(20px, 4vw, 56px); }
.header-bar { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 32px; height: var(--header-h); border-bottom: 1px solid rgba(255, 255, 255, .55); transition: height .3s ease, border-color .3s ease; }
.site-header.is-solid .header-bar, .has-solid-header .header-bar { border-bottom-color: transparent; }
.site-header.is-scrolled .header-bar { height: var(--header-h-scrolled); }
.nav-list { list-style: none; margin: 0; padding: 0; display: flex; justify-content: space-around; gap: 16px; }
.nav-list a, .mobile-nav a { font-family: var(--font-head); font-size: 14px; letter-spacing: .18em; text-transform: uppercase; color: #fff; text-decoration: none; white-space: nowrap; }
.nav-list a { display: inline-block; padding: 8px 0; border-bottom: 1px solid transparent; transition: border-color .15s ease; }
.nav-list a:hover { border-bottom-color: #fff; color: #fff; }
.brand { display: flex; flex-direction: column; align-items: center; text-decoration: none; color: #fff; }
.brand:hover { color: #fff; }
.brand__name { font-family: var(--font-head); font-size: 24px; letter-spacing: .2em; line-height: 1; white-space: nowrap; text-transform: uppercase; }
.brand .custom-logo { max-height: 56px; width: auto; }
.menu-toggle { display: none; }
.mobile-nav { display: none; }
@media (max-width: 1023px) {
	.header-bar, .site-header.is-scrolled .header-bar { grid-template-columns: minmax(0, 1fr) auto; height: var(--header-h-mobile); gap: 16px; }
	.nav-left, .nav-right { display: none; }
	.brand { align-items: flex-start; }
	.brand__name { font-size: 19px; letter-spacing: .18em; }
	.brand .custom-logo { max-height: 44px; }
	.menu-toggle { display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px; background: transparent; border: 1px solid rgba(255, 255, 255, .7); color: #fff; font-family: var(--font-head); font-size: 13px; letter-spacing: .18em; cursor: pointer; }
	.mobile-nav.is-open { display: block; background: var(--ink); padding: 8px 20px 24px; max-height: calc(100vh - var(--header-h-mobile)); overflow-y: auto; }
	.mobile-nav ul { list-style: none; margin: 0; padding: 0; }
	.mobile-nav a { display: block; padding: 15px 0; border-bottom: 1px solid rgba(255, 255, 255, .12); font-size: 15px; }
}

/* ---------- Hero ---------- */
.hero { position: relative; height: 100vh; height: 100svh; min-height: 480px; background: var(--ink); overflow: hidden; }
@media (max-width: 1023px) { .hero { height: 82vh; height: 82svh; } }
.hero__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 40%; }
.hero__overlay { position: absolute; inset: 0; background: #121212; opacity: var(--overlay, .42); }
.hero__content { position: relative; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 96px 24px 72px; color: #fff; }
.hero__title { margin: 0 0 16px; font-family: var(--font-head); font-weight: 300; font-size: clamp(40px, 6.4vw, 84px); line-height: 1.04; text-wrap: balance; text-shadow: 0 1px 18px rgba(0, 0, 0, .25); }
.hero__text { margin: 0 0 36px; max-width: 620px; font-size: clamp(17px, 1.6vw, 21px); line-height: 1.5; text-shadow: 0 1px 12px rgba(0, 0, 0, .3); }
.hero .btn-row { justify-content: center; }
.scroll-cue { position: absolute; left: 50%; bottom: 28px; transform: translateX(-50%); width: 24px; height: 38px; border: 1.5px solid rgba(255, 255, 255, .85); border-radius: 12px; display: flex; justify-content: center; padding-top: 8px; }
.scroll-cue span { width: 3px; height: 7px; border-radius: 2px; background: #fff; }

/* ---------- Photos (shared) ---------- */
.photo { display: block; position: relative; overflow: hidden; background: var(--placeholder); cursor: zoom-in; }
.photo img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.photo:hover img { transform: scale(1.02); }

/* ---------- Intro ---------- */
.intro { padding-bottom: clamp(40px, 6vw, 72px); }
.intro__head { max-width: 780px; margin: 0 auto; padding: 0 24px; text-align: center; }
.intro__head .h2 { margin-bottom: 28px; font-size: clamp(34px, 4.4vw, 54px); }
.intro__head .lead { max-width: 640px; margin: 0 auto; font-size: 18px; }
.intro-photos { margin-top: clamp(48px, 7vw, 88px); display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 8px; }
.intro-photos .photo { aspect-ratio: 4 / 5; }

/* ---------- Apartments ---------- */
.apt-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 32px 48px; padding-bottom: 40px; border-bottom: 1px solid var(--ink); }
.apt-head .h2 { margin: 0; font-size: clamp(36px, 4.6vw, 58px); line-height: 1.05; }
.stats { margin: 0; display: flex; }
.stat { padding: 0 clamp(20px, 3vw, 40px); }
.stat:first-child { padding-left: 0; }
.stat:last-child { padding-right: 0; }
.stat + .stat { border-left: 1px solid var(--line); }
.stat dt { margin-bottom: 6px; font-family: var(--font-head); font-size: 12px; letter-spacing: .2em; color: var(--muted); text-transform: uppercase; }
.stat dd { margin: 0; font-family: var(--font-head); font-weight: 300; font-size: clamp(36px, 4vw, 52px); line-height: 1; }
.mosaic { margin-top: 40px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-rows: clamp(170px, 19vw, 270px); gap: 8px; }
.mosaic .photo img { position: absolute; inset: 0; }
.mosaic .photo:first-child { grid-column: span 2; grid-row: span 2; }
@media (max-width: 819px) {
	.mosaic { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: clamp(130px, 34vw, 220px); }
	.mosaic .photo:first-child { grid-row: span 1; }
}
.apt-body { margin-top: clamp(48px, 6vw, 80px); display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); gap: clamp(40px, 6vw, 88px); align-items: start; }
.apt-body .lead { margin: 0 0 32px; font-size: 18px; }
.rooms { margin: 0 0 36px; border-top: 1px solid var(--line); }
.rooms div { display: flex; justify-content: space-between; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 16px; }
.rooms dt { color: var(--text); }
.rooms dd { margin: 0; font-family: var(--font-head); letter-spacing: .04em; text-align: right; }
.apt-note { margin: 0 0 20px; font-size: 16px; line-height: 1.6; color: var(--text); }
.plan { margin: 0; }
.plan a { display: block; padding: clamp(12px, 2vw, 24px); border: 1px solid var(--line); background: #fff; cursor: zoom-in; transition: border-color .15s ease; }
.plan a:hover { border-color: var(--ink); }
.plan img { width: 100%; height: auto; }
.plan figcaption { display: flex; justify-content: space-between; gap: 16px; margin-top: 12px; font-family: var(--font-head); font-size: 12px; letter-spacing: .16em; color: var(--muted); text-transform: uppercase; }

/* ---------- Photo band ---------- */
.band { position: relative; height: clamp(380px, 62vh, 640px); background: var(--ink); overflow: hidden; }
.band img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 45%; }
.band__overlay { position: absolute; inset: 0; background: rgba(18, 18, 18, .38); }
.band__inner { position: relative; height: 100%; display: flex; align-items: center; justify-content: center; padding: 0 24px; text-align: center; }
.band__text { margin: 0; max-width: 820px; font-family: var(--font-head); font-weight: 300; font-size: clamp(28px, 3.8vw, 48px); line-height: 1.2; color: #fff; text-wrap: balance; text-shadow: 0 1px 16px rgba(0, 0, 0, .3); }

/* ---------- Amenities ---------- */
.amen-photo { position: relative; aspect-ratio: 4 / 3; margin-top: 36px; background: var(--placeholder); }
.amen-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.amen-list { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.amen-list li { padding: 20px 0; border-bottom: 1px solid var(--line); }
.amen-list h3 { margin: 0 0 6px; font-family: var(--font-head); font-size: 19px; font-weight: 400; }
.amen-list p { margin: 0; font-size: 15px; line-height: 1.6; color: var(--text); }

/* ---------- Gallery ---------- */
.gallery { padding-bottom: clamp(40px, 5vw, 64px); }
.gallery .section-head { margin-bottom: 40px; }
.filters { display: inline-flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 8px; }
.filter { min-height: 40px; padding: 0 18px; border: 1px solid rgba(26, 26, 26, .3); background: transparent; color: var(--ink); font-family: var(--font-head); font-size: 13px; letter-spacing: .16em; text-transform: uppercase; cursor: pointer; transition: all .15s ease; }
.filter[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); gap: 8px; }
.gallery-grid .photo { aspect-ratio: 3 / 2; }
.gallery-grid .photo[hidden] { display: none; }

/* ---------- Neighborhood ---------- */
.map { position: relative; aspect-ratio: 4 / 3; min-height: 300px; background: #2A2A2A; }
.map iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; filter: grayscale(.6); }
.map-meta { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px; padding: 20px 0; border-bottom: 1px solid rgba(255, 255, 255, .16); }
.map-meta p { margin: 0; font-size: 16px; }
.link-line { font-family: var(--font-head); font-size: 13px; letter-spacing: .18em; text-transform: uppercase; color: #fff; text-decoration: none; border-bottom: 1px solid var(--accent-light); padding-bottom: 3px; white-space: nowrap; }
.link-line:hover { color: var(--accent-light); }
.nearby-group { display: grid; grid-template-columns: minmax(0, 140px) minmax(0, 1fr); gap: 16px; padding: 18px 0; border-top: 1px solid rgba(255, 255, 255, .16); }
.nearby-group h3 { margin: 0; padding-top: 3px; font-family: var(--font-head); font-weight: 400; font-size: 12px; letter-spacing: .18em; color: #B8B8B8; text-transform: uppercase; }
.nearby-group ul { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 8px; }
.nearby-group li { font-size: 15px; line-height: 1.5; }

/* ---------- Contact ---------- */
.contact .section-head { margin-bottom: 48px; }
.contact-info { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 32px; margin-top: 24px; font-size: 16px; }
.contact-info a { color: var(--ink); }
.inquiry-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 20px; }
.field { display: flex; flex-direction: column; gap: 8px; }
.field--full { grid-column: 1 / -1; }
.field label { font-family: var(--font-head); font-size: 12px; letter-spacing: .18em; color: var(--text); text-transform: uppercase; }
.field input, .field select, .field textarea,
.contact-form-wrap input[type="text"], .contact-form-wrap input[type="email"], .contact-form-wrap input[type="tel"], .contact-form-wrap select, .contact-form-wrap textarea {
	width: 100%; min-height: 52px; padding: 0 14px; border: 1px solid rgba(26, 26, 26, .3); border-radius: 0; background: #fff; font-family: var(--font-body); font-size: 16px; color: var(--ink); outline: none; -webkit-appearance: none; appearance: none;
}
.field select, .contact-form-wrap select { padding-right: 40px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%231A1A1A' stroke-width='1.5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 16px center; }
.field textarea, .contact-form-wrap textarea { min-height: 140px; padding: 14px; line-height: 1.5; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus, .contact-form-wrap :is(input, select, textarea):focus { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.contact-form-wrap input[type="submit"], .contact-form-wrap button[type="submit"] { min-height: 54px; padding: 0 40px; border: 1px solid var(--accent); border-radius: 0; background: var(--accent); color: #fff; font-family: var(--font-head); font-size: 14px; font-weight: 500; letter-spacing: .18em; text-transform: uppercase; cursor: pointer; }
.contact-form-wrap input[type="submit"]:hover, .contact-form-wrap button[type="submit"]:hover { background: var(--accent-dark); border-color: var(--accent-dark); }
.form-actions { grid-column: 1 / -1; display: flex; flex-direction: column; align-items: center; gap: 14px; padding-top: 8px; }
.form-actions .btn { min-height: 54px; padding: 0 40px; }
.form-fineprint { margin: 0; font-size: 13px; color: var(--muted); text-align: center; }
.hp-field { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }
.form-notice { margin: 0 0 28px; padding: 16px 20px; border: 1px solid var(--accent); color: var(--accent); font-size: 15px; }
.form-success { text-align: center; border-top: 1px solid var(--ink); padding-top: 32px; }
.form-success p { margin: 0 0 24px; font-family: var(--font-head); font-weight: 300; font-size: clamp(24px, 3vw, 30px); line-height: 1.3; }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: #fff; padding: 64px 0 28px; }
.footer-inner { display: flex; flex-direction: column; align-items: center; gap: 28px; text-align: center; }
.footer-brand { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.footer-brand__name { font-family: var(--font-head); font-size: 20px; letter-spacing: .2em; text-transform: uppercase; }
.footer-brand__addr { font-size: 14px; color: #C8C8C8; }
.footer-nav ul, .footer-contact { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 12px 28px; }
.footer-nav a { font-family: var(--font-head); font-size: 13px; letter-spacing: .18em; text-transform: uppercase; color: #fff; text-decoration: none; }
.footer-contact a { color: #fff; text-decoration: none; font-size: 14px; }
.footer-nav a:hover, .footer-contact a:hover { color: var(--accent-light); }
.footer-bottom { width: 100%; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; padding-top: 24px; border-top: 1px solid rgba(255, 255, 255, .14); font-size: 13px; color: #A6A6A6; }

/* ---------- Lightbox ---------- */
.lightbox { position: fixed; inset: 0; z-index: 1000; display: none; flex-direction: column; background: rgba(16, 16, 16, .96); color: #fff; }
.lightbox.is-open { display: flex; }
.lightbox__bar { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 16px clamp(16px, 3vw, 32px); font-family: var(--font-head); font-size: 13px; letter-spacing: .16em; }
.lightbox__stage { flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; padding: 0 clamp(12px, 5vw, 80px); }
.lightbox__stage img { max-width: 100%; max-height: 100%; object-fit: contain; }
.lightbox.is-plan .lightbox__stage img { background: #fff; }
.lightbox__foot { display: flex; justify-content: center; align-items: center; gap: 16px; padding: 16px; font-size: 14px; color: #C8C8C8; text-align: center; }
.lb-btn { min-height: 44px; min-width: 96px; padding: 0 16px; background: transparent; border: 1px solid rgba(255, 255, 255, .4); color: #fff; font-family: var(--font-head); font-size: 13px; letter-spacing: .16em; cursor: pointer; }
.lb-btn:hover { border-color: #fff; }
.lightbox.is-single .lb-nav { display: none; }

/* ---------- Scroll reveal (only when JS runs) ---------- */
.js .reveal { opacity: 0; transform: translateY(16px); transition: opacity .6s ease-out, transform .6s ease-out; }
.js .reveal.is-visible, .is-customizer .reveal { opacity: 1; transform: none; }

/* ---------- Inner pages ---------- */
.page-main { padding: calc(var(--header-h) + clamp(40px, 6vw, 80px)) 0 clamp(72px, 10vw, 128px); }
@media (max-width: 1023px) { .page-main { padding-top: calc(var(--header-h-mobile) + 40px); } }
.entry + .entry { margin-top: 64px; padding-top: 64px; border-top: 1px solid var(--line-soft); }
.entry-title { margin: 0 0 28px; font-family: var(--font-head); font-weight: 300; font-size: clamp(34px, 4.4vw, 54px); line-height: 1.1; }
.entry-title a { color: inherit; text-decoration: none; }
.entry-content { font-size: 17px; line-height: 1.7; color: var(--text); }
.entry-content h2, .entry-content h3 { font-family: var(--font-head); font-weight: 400; color: var(--ink); }
.nav-links { display: flex; justify-content: space-between; gap: 16px; margin-top: 48px; }

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	*, *::before, *::after { transition: none !important; }
	.js .reveal { opacity: 1; transform: none; }
}
