@import url('https://fonts.googleapis.com/css2?family=Raleway:wght@600;700;800&family=Source+Sans+3:wght@400;500;600&display=swap');

/* ===== Design tokens (from original Airo build) ===== */
:root {
  --background: #ffffff;
  --foreground: #0a0a0a;
  --card: #ffffff;
  --primary: #003b7a;          /* hsl(215 100% 24%) */
  --primary-foreground: #ffffff;
  --secondary: #00246b;        /* hsl(220 100% 19%) */
  --muted: #eef3f8;            /* hsl(210 36% 96%) */
  --muted-foreground: #4b5563;
  --accent: #c31432;           /* hsl(350 85% 42%) */
  --accent-foreground: #ffffff;
  --border: #cfdcea;
  --radius: 0.5rem;
  --font-sans: "Source Sans 3", -apple-system, BlinkMacSystemFont, sans-serif;
  --font-heading: "Raleway", -apple-system, BlinkMacSystemFont, sans-serif;
  --shadow-sm: 0 1px 3px 0 rgba(0,0,0,.10), 0 1px 2px -1px rgba(0,0,0,.10);
  --shadow-md: 0 1px 3px 0 rgba(0,0,0,.10), 0 2px 4px -1px rgba(0,0,0,.10);
  --shadow-lg: 0 1px 3px 0 rgba(0,0,0,.10), 0 4px 6px -1px rgba(0,0,0,.10);
  --shadow-xl: 0 8px 24px 0 rgba(0,0,0,.18);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--foreground);
  background: var(--background);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4, h5, h6 { font-family: var(--font-heading); margin: 0; }
p { margin: 0; }
a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; }
ul { list-style: none; margin: 0; padding: 0; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 1.25rem; }

/* ===== Buttons ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .9rem 1.75rem; border-radius: var(--radius);
  font-weight: 700; font-size: 1rem; transition: all .2s ease; border: none;
  white-space: nowrap;
}
.btn-accent { background: var(--accent); color: #fff; box-shadow: var(--shadow-lg); }
.btn-accent:hover { background: #a91029; transform: translateY(-2px); }
.btn-navy { background: #0b3279; color: #fff; border: 1px solid rgba(255,255,255,.3); }
.btn-navy:hover { background: #0e3e93; }
.btn-primary { background: var(--primary); color: #fff; padding: .8rem 1.5rem; font-size: .9rem; }
.btn-primary:hover { background: #002d61; }
.btn-outline-light { background: rgba(255,255,255,.15); color: #fff; border: 1px solid rgba(255,255,255,.3); backdrop-filter: blur(4px); padding: .9rem 1.75rem; }
.btn-outline-light:hover { background: rgba(255,255,255,.25); }
.btn-sm { padding: .6rem 1.1rem; font-size: .85rem; }

/* ===== Header ===== */
.topbar { background: var(--primary); color: #fff; font-size: .78rem; padding: .4rem 0; }
.topbar .container { display: flex; justify-content: space-between; align-items: center; }
.topbar img { height: 44px; background: #fff; border-radius: 4px; padding: 4px 10px; }
.topbar a { display: flex; align-items: center; gap: .5rem; font-weight: 700; font-size: 1.1rem; letter-spacing: .02em; }
.topbar a:hover { color: var(--accent); }

.site-header { position: sticky; top: 0; z-index: 50; background: #fff; border-bottom: 1px solid var(--border); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; height: 5rem; }
.brand { display: flex; align-items: center; gap: .75rem; min-width: 0; }
.brand img { height: 56px; width: 56px; border-radius: 999px; object-fit: cover; box-shadow: 0 4px 12px rgba(0,0,0,.35); }
.brand-name { font-family: var(--font-heading); font-weight: 700; font-size: 1.4rem; color: var(--primary); line-height: 1.1; }
.brand-tag { font-size: .68rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: #990033; }

.main-nav { display: none; align-items: center; gap: .25rem; }
.main-nav a { padding: .5rem .75rem; border-radius: .375rem; font-weight: 700; font-size: 1rem; color: #C8102E; }
.main-nav a:hover, .main-nav a.active { background: rgba(0,59,122,.08); }

.header-actions { display: flex; align-items: center; gap: .75rem; }
.header-actions .btn-accent { display: none; padding: .6rem 1.1rem; font-size: .9rem; }
.menu-toggle { display: inline-flex; background: none; border: none; padding: .5rem; border-radius: .375rem; }
.menu-toggle:hover { background: var(--muted); }
.menu-toggle svg { width: 22px; height: 22px; }

.mobile-nav { display: none; flex-direction: column; gap: .25rem; border-top: 1px solid var(--border); padding: 1rem 0 1.5rem; }
.mobile-nav.open { display: flex; }
.mobile-nav a { padding: .65rem .75rem; border-radius: .375rem; font-weight: 600; font-size: .95rem; color: #C8102E; }
.mobile-nav a:hover { background: rgba(0,59,122,.08); }
.mobile-nav .btn-accent { margin-top: .5rem; text-align: center; }

@media (min-width: 768px) {
  .topbar { display: block; }
  .header-actions .btn-accent { display: inline-flex; }
}
@media (min-width: 1024px) {
  .main-nav { display: flex; }
  .menu-toggle { display: none; }
  .mobile-nav { display: none !important; }
}
@media (max-width: 767px) { .topbar { display: none; } }

/* ===== Hero ===== */
.hero {
  position: relative; min-height: 82vh; display: flex; flex-direction: column; justify-content: flex-end;
  background: linear-gradient(160deg, #002d61 0%, #003b7a 45%, #04244f 100%);
  overflow: hidden;
}
.hero::before {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(ellipse at 15% 20%, rgba(195,20,50,.25), transparent 55%),
    radial-gradient(ellipse at 85% 75%, rgba(255,255,255,.08), transparent 50%);
}
.hero-inner { position: relative; z-index: 2; padding: 6rem 0 4rem; }
.hero h1 { font-size: clamp(2.5rem, 6vw, 4.5rem); font-weight: 800; color: #fff; line-height: 1.1; margin-bottom: 1.5rem; max-width: 44rem; }
.hero p.lead { font-size: clamp(1.05rem, 2vw, 1.25rem); color: rgba(255,255,255,.85); max-width: 40rem; margin-bottom: 2.5rem; line-height: 1.6; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 1rem; margin-bottom: 3rem; }
.hero-stats { display: flex; flex-wrap: wrap; gap: 2.5rem; }
.hero-stats .stat-value { font-family: var(--font-heading); font-size: clamp(1.75rem, 3vw, 2.25rem); font-weight: 800; color: var(--accent); }
.hero-stats .stat-label { font-size: .85rem; color: rgba(255,255,255,.75); margin-top: .1rem; }

/* ===== Sections ===== */
.section { padding: 5rem 0; }
.section-muted { background: var(--muted); }
.eyebrow { color: var(--accent); font-weight: 700; font-size: .85rem; text-transform: uppercase; letter-spacing: .12em; margin-bottom: .5rem; }
.section-head { max-width: 40rem; margin-bottom: 3rem; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head h2 { font-size: clamp(1.75rem, 3.5vw, 2.5rem); font-weight: 800; color: var(--foreground); margin-bottom: .75rem; }
.section-head p { color: var(--muted-foreground); line-height: 1.6; }

/* ===== Listings ===== */
.listing-grid { display: grid; grid-template-columns: 1fr; gap: 1.5rem; align-items: start; }
.listing-card { background: var(--card); border: 1px solid var(--border); border-radius: .9rem; overflow: hidden; box-shadow: var(--shadow-sm); transition: box-shadow .25s, transform .25s; }
.listing-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-4px); }
.listing-photo { position: relative; height: 13rem; background: linear-gradient(135deg, #7996b8, #24466f); }
.listing-photo.large { height: 20rem; }
.listing-badge { position: absolute; top: .75rem; left: .75rem; background: var(--accent); color: #fff; font-size: .72rem; font-weight: 700; padding: .3rem .7rem; border-radius: 999px; }
.listing-body { padding: 1.1rem 1.25rem 1.35rem; }
.listing-price { font-family: var(--font-heading); font-weight: 800; color: var(--primary); font-size: 1.3rem; margin-bottom: .15rem; }
.listing-large .listing-price { font-size: 1.6rem; }
.listing-address { font-weight: 600; font-size: .95rem; margin-bottom: .15rem; }
.listing-city { display: flex; align-items: center; gap: .3rem; font-size: .82rem; color: var(--muted-foreground); margin-bottom: .85rem; }
.listing-meta { display: flex; gap: 1.1rem; font-size: .82rem; color: var(--muted-foreground); }
.listing-meta span { display: flex; align-items: center; gap: .3rem; }
.listing-stack { display: flex; flex-direction: column; gap: 1.5rem; }
.view-all { text-align: center; margin-top: 2.5rem; }
.view-all a { display: inline-flex; align-items: center; gap: .4rem; font-weight: 700; color: var(--primary); }
.view-all a:hover { color: var(--accent); }

@media (min-width: 768px) { .listing-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .listing-grid { grid-template-columns: 2fr 1fr; } }

/* ===== Buy / Sell ===== */
.split-grid { display: grid; grid-template-columns: 1fr; gap: 2rem; }
@media (min-width: 768px) { .split-grid { grid-template-columns: 1fr 1fr; } }
.split-card { border-radius: 1.1rem; padding: 2.25rem; box-shadow: var(--shadow-sm); }
.split-card.light { background: var(--card); border: 1px solid var(--border); }
.split-card.dark { background: var(--primary); }
.split-card h2 { font-size: clamp(1.4rem, 2.5vw, 1.9rem); font-weight: 800; margin: .5rem 0 1rem; }
.split-card.light h2 { color: var(--foreground); }
.split-card.dark h2 { color: #fff; }
.split-card p.body { color: var(--muted-foreground); line-height: 1.65; margin-bottom: 2rem; }
.split-card.dark p.body { color: rgba(255,255,255,.8); }

/* ===== Communities ===== */
.community-grid { display: grid; grid-template-columns: 1fr; gap: 1.25rem; }
@media (min-width: 640px) { .community-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1024px) { .community-grid { grid-template-columns: repeat(3, 1fr); } }
.community-card {
  position: relative; display: block; border-radius: .9rem; overflow: hidden; height: 13rem;
  box-shadow: var(--shadow-sm); transition: box-shadow .25s;
  background-size: cover; background-position: center;
}
.community-card:hover { box-shadow: var(--shadow-lg); }
.community-card::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,59,122,.85), rgba(0,59,122,.25) 55%, transparent); }
.community-card .cc-text { position: absolute; left: 0; right: 0; bottom: 0; padding: 1.15rem; z-index: 2; }
.community-card .cc-name { color: #fff; font-weight: 800; font-size: 1.1rem; font-family: var(--font-heading); margin-bottom: .2rem; }
.community-card .cc-desc { color: rgba(255,255,255,.82); font-size: .78rem; line-height: 1.4; }
.cc-bangor { background: linear-gradient(135deg, #35506f, #12233a); }
.cc-barharbor { background: linear-gradient(135deg, #2b5f66, #0f2a2f); }
.cc-portland { background: linear-gradient(135deg, #3f5f8a, #16273f); }
.cc-midcoast { background: linear-gradient(135deg, #29607a, #0f2530); }
.cc-western { background: linear-gradient(135deg, #3c6b4f, #12281d); }
.cc-downeast { background: linear-gradient(135deg, #1f4f72, #0a1f30); }

/* ===== About ===== */
.about-grid { display: grid; grid-template-columns: 1fr; gap: 3rem; align-items: center; }
@media (min-width: 1024px) { .about-grid { grid-template-columns: 1fr 1fr; } }
.about-photo-wrap { position: relative; max-width: 26rem; margin: 0 auto; }
.about-photo { aspect-ratio: 4/5; border-radius: 1.25rem; overflow: hidden; box-shadow: var(--shadow-xl); background: linear-gradient(160deg, #4a6a91, #14243b); display: flex; align-items: center; justify-content: center; color: rgba(255,255,255,.65); font-size: .85rem; text-align: center; padding: 1rem; }
.about-badge { position: absolute; bottom: -1.25rem; right: -1.25rem; background: var(--accent); color: #fff; border-radius: .9rem; padding: 1.1rem; box-shadow: var(--shadow-lg); max-width: 11rem; display: none; }
.about-badge .num { font-family: var(--font-heading); font-size: 1.8rem; font-weight: 800; }
.about-badge .txt { font-size: .75rem; margin-top: .2rem; color: rgba(255,255,255,.85); }
@media (min-width: 1024px) { .about-badge { display: block; } }
.about h2 { font-size: clamp(1.75rem, 3.5vw, 2.4rem); font-weight: 800; margin-bottom: 1.1rem; }
.about p.body { color: var(--muted-foreground); line-height: 1.7; margin-bottom: 1rem; }
.about p.affil { font-size: .88rem; font-weight: 600; color: var(--muted-foreground); margin-bottom: 2rem; }

/* ===== Testimonials ===== */
.testimonial-grid { display: grid; grid-template-columns: 1fr; gap: 2rem; }
@media (min-width: 768px) { .testimonial-grid { grid-template-columns: repeat(3, 1fr); } }
.testimonial-card { background: var(--card); border: 1px solid var(--border); border-radius: 1.1rem; padding: 2rem; box-shadow: var(--shadow-sm); }
.testimonial-card .quote-mark { font-family: var(--font-heading); font-size: 3.5rem; color: rgba(195,20,50,.25); line-height: 1; margin-bottom: .5rem; }
.testimonial-card .quote-text { font-size: .92rem; color: rgba(10,10,10,.85); line-height: 1.65; margin-bottom: 1.5rem; }
.testimonial-card .t-foot { border-top: 1px solid var(--border); padding-top: 1rem; }
.testimonial-card .t-name { font-weight: 700; font-size: .92rem; }
.testimonial-card .t-loc { display: flex; align-items: center; gap: .3rem; font-size: .78rem; color: var(--muted-foreground); margin-top: .2rem; }

/* ===== CTA band ===== */
.cta-band { position: relative; padding: 6rem 0; background: linear-gradient(120deg, #002d61 0%, #003b7a 60%, #6b1421 130%); overflow: hidden; }
.cta-band::before { content: ""; position: absolute; inset: 0; background: radial-gradient(ellipse at 80% 20%, rgba(195,20,50,.3), transparent 55%); }
.cta-band-inner { position: relative; z-index: 2; max-width: 38rem; }
.cta-band h2 { font-size: clamp(2rem, 4vw, 3rem); font-weight: 800; color: #fff; margin-bottom: 1.1rem; }
.cta-band p { color: rgba(255,255,255,.85); font-size: 1.1rem; line-height: 1.6; margin-bottom: 2.5rem; }
.cta-band .hero-ctas { margin-bottom: 0; }

/* ===== Simple page hero (interior pages) ===== */
.page-hero { background: linear-gradient(160deg, #002d61, #003b7a); padding: 4.5rem 0 3.5rem; }
.page-hero h1 { color: #fff; font-size: clamp(2rem, 4.5vw, 3rem); font-weight: 800; margin-bottom: .75rem; }
.page-hero p { color: rgba(255,255,255,.82); max-width: 40rem; line-height: 1.6; }

/* ===== Simple content blocks ===== */
.prose { max-width: 42rem; }
.prose p { margin-bottom: 1.1rem; color: var(--muted-foreground); line-height: 1.7; }
.card-simple { background: var(--card); border: 1px solid var(--border); border-radius: 1rem; padding: 2rem; box-shadow: var(--shadow-sm); }

.icon-list { display: grid; grid-template-columns: 1fr; gap: 1.5rem; margin-top: 2rem; }
@media (min-width: 768px) { .icon-list { grid-template-columns: repeat(2, 1fr); } }
.icon-item { display: flex; gap: 1rem; }
.icon-item .num { width: 2.5rem; height: 2.5rem; flex-shrink: 0; border-radius: 999px; background: var(--primary); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 800; font-family: var(--font-heading); }
.icon-item h3 { font-size: 1.05rem; font-weight: 700; margin-bottom: .3rem; }
.icon-item p { font-size: .9rem; color: var(--muted-foreground); line-height: 1.55; }

/* ===== Blog ===== */
.blog-grid { display: grid; grid-template-columns: 1fr; gap: 2rem; }
@media (min-width: 768px) { .blog-grid { grid-template-columns: repeat(2, 1fr); } }
.blog-card { background: var(--card); border: 1px solid var(--border); border-radius: .9rem; overflow: hidden; box-shadow: var(--shadow-sm); transition: box-shadow .25s, transform .25s; }
.blog-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-3px); }
.blog-card img { height: 13rem; width: 100%; object-fit: cover; }
.blog-card .bc-body { padding: 1.25rem 1.4rem 1.5rem; }
.blog-card .bc-cat { color: var(--accent); font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; margin-bottom: .5rem; }
.blog-card h3 { font-size: 1.1rem; font-weight: 700; line-height: 1.35; margin-bottom: .6rem; }
.blog-card p { font-size: .85rem; color: var(--muted-foreground); line-height: 1.55; }

/* ===== Contact form ===== */
.contact-grid { display: grid; grid-template-columns: 1fr; gap: 3rem; }
@media (min-width: 1024px) { .contact-grid { grid-template-columns: 1fr 1fr; } }
.form-field { margin-bottom: 1.25rem; }
.form-field label { display: block; font-size: .85rem; font-weight: 600; margin-bottom: .4rem; }
.form-field input, .form-field textarea {
  width: 100%; border: 1px solid var(--border); border-radius: .5rem; padding: .7rem .9rem;
  font-family: inherit; font-size: .95rem; background: #fff;
}
.form-field input:focus, .form-field textarea:focus { outline: 2px solid var(--primary); outline-offset: 1px; }
.contact-info-item { display: flex; gap: 1rem; margin-bottom: 1.5rem; }
.contact-info-item .ci-icon { width: 2.75rem; height: 2.75rem; flex-shrink: 0; border-radius: .6rem; background: var(--muted); display: flex; align-items: center; justify-content: center; color: var(--primary); }
.contact-info-item h3 { font-size: .95rem; font-weight: 700; margin-bottom: .2rem; }
.contact-info-item p, .contact-info-item a { font-size: .9rem; color: var(--muted-foreground); }

/* ===== Footer ===== */
.site-footer { background: var(--primary); color: rgba(255,255,255,.85); }
.footer-main { padding: 3.5rem 0; display: grid; grid-template-columns: 1fr; gap: 2.5rem; }
@media (min-width: 768px) { .footer-main { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1024px) { .footer-main { grid-template-columns: 1.2fr 1fr 1fr 1fr; } }
.footer-brand-name { font-family: var(--font-heading); font-size: 1.4rem; font-weight: 800; color: #fff; margin-bottom: .2rem; }
.footer-brand-tag { font-size: .72rem; text-transform: uppercase; letter-spacing: .1em; color: rgba(255,255,255,.6); margin-bottom: 1rem; }
.footer-desc { font-size: .88rem; line-height: 1.6; color: rgba(255,255,255,.8); margin-bottom: 1.5rem; }
.social-row { display: flex; gap: .75rem; }
.social-row a { width: 2.2rem; height: 2.2rem; border-radius: .5rem; background: rgba(255,255,255,.1); display: flex; align-items: center; justify-content: center; }
.social-row a:hover { background: var(--accent); }
.footer-col h3 { font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: rgba(255,255,255,.55); margin-bottom: 1.1rem; }
.footer-col li { margin-bottom: .55rem; }
.footer-col a:hover { color: var(--accent); }
.footer-legal { font-size: .74rem; color: rgba(255,255,255,.45); line-height: 1.6; margin-top: 1.5rem; padding-top: 1.25rem; border-top: 1px solid rgba(255,255,255,.15); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.15); padding: 1.1rem 0; }
.footer-bottom .container { display: flex; flex-direction: column; gap: .75rem; align-items: center; text-align: center; font-size: .74rem; color: rgba(255,255,255,.5); }
.footer-bottom nav { display: flex; gap: 1.25rem; }
.footer-bottom a:hover { color: #fff; }
@media (min-width: 768px) { .footer-bottom .container { flex-direction: row; justify-content: space-between; text-align: left; } }

.svg-icon { width: 1em; height: 1em; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; vertical-align: -0.15em; }
