/* J&M Property Management - "Coastal Editorial". Every value traces to DESIGN.md. */

@font-face { font-family: "Noto Serif Display"; font-style: normal; font-weight: 300; font-display: swap;
  src: url("/assets/fonts/noto-serif-display-300.960dbacc75.woff2") format("woff2"); }
@font-face { font-family: "Noto Serif Display"; font-style: italic; font-weight: 300; font-display: swap;
  src: url("/assets/fonts/noto-serif-display-300-italic.cb23a8ec68.woff2") format("woff2"); }
@font-face { font-family: "Mulish"; font-style: normal; font-weight: 400 800; font-display: swap;
  src: url("/assets/fonts/mulish-var.8d1d33d6be.woff2") format("woff2"); }

:root {
  --navy: #1f3a5f;
  --ink: #16263b;
  --sky: #2b8fd6;            /* focus ring, accents, never small text on light */
  --sky-text: #1d6fb0;       /* small labels/links on light grounds (5.2:1 on white) */
  --sky-on-navy: #9fd0f2;
  --paper: #f6f7f9;
  --white: #ffffff;
  --muted: #3f4d60;
  --hair: #dde3ea;
  --field: #cdd5df;
  --error: #b42318;
  --serif: "Noto Serif Display", Georgia, "Times New Roman", serif;
  --sans: "Mulish", "Segoe UI", Arial, sans-serif;
  --gutter: clamp(20px, 5vw, 72px);
  --ease: cubic-bezier(.2, .7, .2, 1);
  --header-h: 86px;
  --tabbar-h: 0px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 12px); }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 17px/1.65 var(--sans); }
img { max-width: 100%; height: auto; display: block; }
picture { display: block; }
a { color: inherit; }
p { margin: 0 0 1em; }
ul { margin: 0; padding: 0; list-style: none; }
h1, h2, h3 { margin: 0; font-weight: 300; }

.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

:focus-visible { outline: 3px solid var(--sky); outline-offset: 3px; border-radius: 2px; }
.on-dark :focus-visible, .hero :focus-visible, .owners :focus-visible { outline-color: var(--white); }
main:focus { outline: none; }

.skip-link { position: absolute; left: 12px; top: -100px; z-index: 100; background: var(--navy); color: var(--white);
  padding: 12px 18px; font-weight: 700; text-decoration: none; }
.skip-link:focus { top: 12px; }

/* ---------- type ---------- */
.eyebrow { display: block; font: 700 13px/1.4 var(--sans); letter-spacing: .22em; text-transform: uppercase; color: var(--sky-text); }
.serif { font-family: var(--serif); font-weight: 300; }
.display { font: 300 clamp(44px, 6.2vw, 78px)/1.03 var(--serif); letter-spacing: -.01em; }
.h2 { font: 300 clamp(32px, 3.6vw, 48px)/1.12 var(--serif); }
.h3 { font: 300 clamp(28px, 2.8vw, 38px)/1.15 var(--serif); }
em { font-style: italic; }
.lead { font-size: 18px; line-height: 1.7; color: var(--muted); }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 52px; padding: 14px 26px;
  font: 700 15px/1.2 var(--sans); letter-spacing: .01em; text-decoration: none; border-radius: 2px; border: 1px solid transparent;
  cursor: pointer; transition: background-color .25s var(--ease), color .25s var(--ease), transform .12s; }
.btn:active { transform: scale(.98); }
.btn-navy { background: var(--navy); color: var(--white); }
.btn-navy:hover { background: var(--ink); }
.btn-white { background: var(--white); color: var(--navy); }
.btn-white:hover { background: #e9eef4; }
.btn-ghost { color: var(--white); border-color: rgba(255, 255, 255, .75); }
.btn-ghost:hover { background: rgba(255, 255, 255, .12); }
.btn-row { display: flex; flex-wrap: wrap; gap: 14px; }

.text-link { color: var(--sky-text); font-weight: 700; text-decoration: underline; text-underline-offset: 4px; }
.text-link:hover { color: var(--navy); }

/* ---------- header ---------- */
.site-header { position: sticky; top: 0; z-index: 40; display: flex; align-items: center; justify-content: space-between;
  gap: 24px; height: var(--header-h); padding: 0 var(--gutter); background: var(--white); box-shadow: 0 1px 0 rgba(22, 38, 59, .08); }
.brand { display: block; flex: none; }
.brand img { height: 58px; width: auto; }
.main-nav ul { display: flex; align-items: center; gap: 34px; }
.main-nav a { display: inline-block; padding: 10px 0; font: 600 15px/1.2 var(--sans); text-decoration: none; color: var(--ink);
  border-bottom: 2px solid transparent; }
.main-nav a:hover, .main-nav a[aria-current="page"] { border-bottom-color: var(--sky); }
.main-nav a.pill { padding: 12px 20px; border: 1px solid var(--navy); border-radius: 2px; }
.main-nav a.pill:hover { background: var(--navy); color: var(--white); }
.menu-btn { display: none; width: 48px; height: 48px; border: 0; background: transparent; cursor: pointer; padding: 0;
  align-items: center; justify-content: center; border-radius: 4px; }
.menu-icon, .menu-icon::before, .menu-icon::after { display: block; width: 24px; height: 2px; background: var(--ink); }
.menu-icon { position: relative; }
.menu-icon::before, .menu-icon::after { content: ""; position: absolute; left: 0; }
.menu-icon::before { top: -8px; }
.menu-icon::after { top: 8px; }

/* ---------- menu sheet (phone) ---------- */
.sheet { padding: 0; border: 0; margin: 0; width: 100%; max-width: 100%; height: auto; max-height: none;
  inset: auto 0 0 0; top: max(56px, env(safe-area-inset-top)); background: var(--white); color: var(--ink);
  border-radius: 22px 22px 0 0; }
.sheet::backdrop { background: rgba(14, 30, 50, .5); }
.sheet[open] { animation: sheet-up .45s var(--ease) both; }
@keyframes sheet-up { from { transform: translateY(30%); opacity: .3; } to { transform: none; opacity: 1; } }
.sheet-inner { height: 100%; overflow-y: auto; padding: 12px 22px calc(28px + env(safe-area-inset-bottom)); }
.sheet-grab { width: 40px; height: 5px; border-radius: 3px; background: #cfd6df; margin: 0 auto 12px; }
.sheet-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.sheet-top img { height: 40px; width: auto; }
.sheet-close { width: 48px; height: 48px; border: 0; border-radius: 50%; background: #eef2f6; color: var(--ink);
  font: 400 28px/1 var(--sans); cursor: pointer; }
.sheet-main a { display: flex; align-items: center; justify-content: space-between; min-height: 64px; border-bottom: 1px solid #e6ebf0;
  text-decoration: none; font: 300 27px/1.15 var(--serif); color: var(--ink); }
.sheet-main a[aria-current="page"] { color: var(--sky-text); }
.sheet-tag { font: 700 12px/1 var(--sans); color: var(--sky-text); letter-spacing: .14em; text-transform: uppercase; }
.sheet-sub { margin-top: 14px; }
.sheet-sub a { display: flex; align-items: center; min-height: 48px; border-bottom: 1px solid #f0f3f6; text-decoration: none;
  font-weight: 600; color: var(--muted); }
.sheet-contact { margin: 18px 0 0; color: var(--muted); }
.sheet-contact a { display: inline-block; padding: 6px 0; }

/* ---------- home hero ---------- */
.hero { position: relative; min-height: min(760px, calc(100svh - var(--header-h))); display: flex; align-items: flex-end;
  overflow: hidden; color: var(--white); background: var(--navy); }
.hero picture, .hero img { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero img { object-fit: cover; object-position: 40% center; animation: settle 22s ease-out both; }
@keyframes settle { from { transform: scale(1.12); } to { transform: scale(1); } }
.hero::after { content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(14, 30, 50, .82) 0%, rgba(14, 30, 50, .55) 45%, rgba(14, 30, 50, .08) 75%); }
.hero-copy { position: relative; z-index: 1; max-width: 680px; padding: 120px var(--gutter) 96px; }
.hero .eyebrow { color: var(--white); }
.hero h1 { margin: 16px 0 22px; }
.hero p { font-size: 19px; line-height: 1.6; color: #e8eef5; max-width: 540px; margin-bottom: 30px; }

/* ---------- inner page hero ---------- */
.page-hero { position: relative; color: var(--white); background: var(--navy); overflow: hidden; }
.page-hero picture, .page-hero img { position: absolute; inset: 0; width: 100%; height: 100%; }
.page-hero img { object-fit: cover; }
.page-hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(14, 30, 50, .85), rgba(14, 30, 50, .45)); }
.page-hero-copy { position: relative; z-index: 1; padding: 110px var(--gutter) 80px; max-width: 820px; }
.page-hero .eyebrow { color: var(--white); }
.page-hero h1 { margin-top: 14px; }
.page-hero p { margin: 18px 0 0; font-size: 19px; color: #e8eef5; max-width: 620px; }
.page-head { padding: 90px var(--gutter) 40px; max-width: 900px; }
.page-head h1 { margin-top: 14px; }
.page-head p { margin-top: 18px; }

/* ---------- sections ---------- */
.section { padding: 100px var(--gutter); }
.intro { display: grid; grid-template-columns: 1.1fr 1fr; gap: 80px; align-items: end; }
.intro p { margin: 0; color: var(--muted); font-size: 18px; line-height: 1.75; }

.row { display: grid; grid-template-columns: 1.25fr 1fr; min-height: 500px; background: var(--white); }
.row.flip { grid-template-columns: 1fr 1.25fr; }
.row.flip .row-pic { order: 2; }
.row-pic { overflow: hidden; min-height: 320px; position: relative; }
.row-pic picture, .row-pic img { position: absolute; inset: 0; width: 100%; height: 100%; }
.row-pic img { object-fit: cover; transition: transform 1.2s var(--ease); }
.row:hover .row-pic img { transform: scale(1.04); }
.row-text { padding: 72px var(--gutter); display: flex; flex-direction: column; justify-content: center; }
.row-text h2 { margin: 12px 0 16px; }
.row-text p { color: var(--muted); }
.ticks { border-top: 1px solid var(--hair); margin: 6px 0 22px; }
.ticks li { padding: 13px 0; border-bottom: 1px solid var(--hair); font-weight: 600; }

.owners { background: var(--navy); color: var(--white); display: grid; grid-template-columns: 1.3fr 1fr; gap: 60px; align-items: center; }
.owners h2 em { color: var(--sky-on-navy); }
.owners p { color: #cfdbe8; font-size: 18px; line-height: 1.75; }
.owners .eyebrow { color: var(--sky-on-navy); }

.ways { display: grid; grid-template-columns: repeat(3, 1fr); background: var(--white); border-top: 1px solid var(--hair); }
.ways a { display: block; padding: 44px var(--gutter) 48px; text-decoration: none; border-right: 1px solid var(--hair);
  transition: background-color .3s var(--ease); }
.ways a:last-child { border-right: 0; }
.ways a:hover { background: #f1f5f9; }
.ways .eyebrow { margin-bottom: 10px; }
.ways strong { display: block; font: 300 30px/1.15 var(--serif); }
.ways span.go { display: inline-block; margin-top: 14px; font-weight: 700; color: var(--sky-text); text-decoration: underline;
  text-underline-offset: 4px; }

/* services page */
.svc { display: grid; grid-template-columns: 320px 1fr; gap: 60px; padding: 56px 0; border-top: 1px solid var(--hair); }
.svc:first-of-type { border-top: 0; }
.svc h2 { font: 300 34px/1.15 var(--serif); }
.svc p { color: var(--muted); max-width: 640px; }
.svc ul { margin-top: 8px; }
.svc li { padding: 8px 0 8px 22px; position: relative; color: var(--ink); }
.svc li::before { content: ""; position: absolute; left: 0; top: 19px; width: 10px; height: 1.5px; background: var(--sky); }

.promises { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; border-top: 1px solid var(--hair); margin-bottom: 70px; }
.promises div { padding: 30px 30px 30px 0; }
.promises h2 { font: 300 26px/1.2 var(--serif); margin-bottom: 8px; }
.promises p { color: var(--muted); margin: 0; }

/* contact */
.contact-grid { display: grid; grid-template-columns: 1fr 1.3fr; gap: 80px; align-items: start; }
.contact-list { border-top: 1px solid var(--hair); }
.contact-list div { padding: 22px 0; border-bottom: 1px solid var(--hair); }
.contact-list dt { font: 700 13px/1.4 var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.contact-list dd { margin: 6px 0 0; font: 300 26px/1.3 var(--serif); }
.contact-list dd a { text-decoration: none; }
.contact-list dd a:hover { text-decoration: underline; }
.note { background: var(--white); border-left: 3px solid var(--sky); padding: 18px 20px; margin-top: 28px; color: var(--muted); }

/* ---------- forms ---------- */
.form-card { background: var(--white); padding: 44px clamp(22px, 4vw, 48px); border: 1px solid var(--hair); }
.form-card h2 { margin-bottom: 8px; }
.form-card > p { color: var(--muted); }
.fields { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; margin-top: 18px; }
.field { margin-bottom: 18px; grid-column: span 2; }
.field.half { grid-column: span 1; }
.field label { display: block; font: 700 15px/1.3 var(--sans); margin-bottom: 7px; color: var(--ink); }
.req { font-weight: 400; color: var(--muted); }
.field input, .field select, .field textarea { width: 100%; min-height: 52px; padding: 12px 14px; font: 400 17px/1.4 var(--sans);
  color: var(--ink); background: var(--white); border: 1px solid var(--field); border-radius: 3px; }
.field textarea { min-height: 140px; resize: vertical; }
.field select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--ink) 50%),
  linear-gradient(135deg, var(--ink) 50%, transparent 50%); background-position: calc(100% - 22px) 52%, calc(100% - 16px) 52%;
  background-size: 6px 6px; background-repeat: no-repeat; padding-right: 44px; }
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible { outline-offset: 0; border-color: var(--sky); }
.field [aria-invalid="true"] { border: 2px solid var(--error); }
.field-error { margin: 7px 0 0; color: var(--error); font-weight: 700; font-size: 15px; }
.hint { margin: 6px 0 0; font-size: 15px; color: var(--muted); }
.error-summary { border: 2px solid var(--error); background: #fff5f4; padding: 18px 20px; margin: 10px 0 22px; }
.error-summary h3 { font: 700 18px/1.3 var(--sans); margin-bottom: 8px; color: var(--error); }
.error-summary li { margin: 4px 0; }
.error-summary a { color: var(--error); font-weight: 700; }
.consent { display: grid; grid-template-columns: 30px 1fr; gap: 12px; align-items: start; padding: 16px; margin: 4px 0 6px;
  border: 1px solid var(--field); border-radius: 3px; grid-column: span 2; }
.consent input { width: 26px; height: 26px; margin: 2px 0 0; accent-color: var(--navy); cursor: pointer; }
.consent label { font: 400 14.5px/1.55 var(--sans); color: var(--muted); cursor: pointer; }
.consent label a { color: var(--navy); font-weight: 700; }
.consent-note { grid-column: span 2; margin: 0 0 18px; font-size: 15px; color: var(--muted); }
.form-actions { margin-top: 8px; grid-column: span 2; }
.form-actions .btn { width: 100%; }
.form-actions p { margin: 12px 0 0; font-size: 15px; color: var(--muted); }
.form-success { background: #eef6fb; border-left: 3px solid var(--sky); padding: 26px 24px; }
.form-success h3 { font: 300 30px/1.2 var(--serif); margin-bottom: 8px; }
.form-success p { margin: 0; color: var(--muted); }
.hp { position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }
.btn[disabled] { opacity: .7; cursor: progress; }

/* ---------- legal pages ---------- */
.prose { max-width: 760px; padding: 0 var(--gutter) 100px; }
.prose h2 { font: 300 30px/1.2 var(--serif); margin: 48px 0 12px; }
.prose h3 { font: 700 18px/1.3 var(--sans); margin: 28px 0 8px; }
.prose p, .prose li { color: #2b394c; }
.prose ul { list-style: disc; padding-left: 22px; margin: 0 0 1em; }
.prose li { margin: 6px 0; }
.prose a { color: var(--sky-text); font-weight: 600; }
.prose .effective { color: var(--muted); font-weight: 600; }
.prose blockquote { margin: 18px 0; padding: 16px 20px; background: var(--white); border-left: 3px solid var(--navy); }

/* ---------- simple message pages ---------- */
.message-page { padding: 120px var(--gutter); max-width: 820px; }
.message-page h1 { margin: 14px 0 18px; }
.message-page p { color: var(--muted); font-size: 18px; }

/* ---------- footer ---------- */
.site-footer { background: var(--white); border-top: 1px solid var(--hair); padding: 60px var(--gutter) 30px; }
.footer-top { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 50px; }
.footer-brand img { height: 64px; width: auto; margin-bottom: 18px; }
.footer-brand p { color: var(--muted); margin: 0 0 12px; }
.footer-contact a { display: inline-block; padding: 4px 0; color: var(--ink); }
.footer-nav h2 { font: 700 13px/1.4 var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--muted); margin-bottom: 12px; }
.footer-nav a { display: inline-block; padding: 7px 0; color: var(--ink); text-decoration: none; font-weight: 600; }
.footer-nav a:hover { text-decoration: underline; }
.footer-legal { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 14px;
  margin-top: 46px; padding-top: 22px; border-top: 1px solid var(--hair); font-size: 15px; color: var(--muted); }
.footer-legal p { margin: 0; }
.footer-legal ul { display: flex; gap: 26px; }
.footer-legal a { display: inline-block; padding: 6px 0; color: var(--ink); }

/* ---------- phone tab bar ---------- */
.tabbar { display: none; }

/* ---------- reveal on scroll (only when JS is running and motion is allowed) ---------- */
.will-reveal { opacity: 0; transform: translateY(18px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.will-reveal.is-in { opacity: 1; transform: none; }

/* ---------- phone / small screens ---------- */
@media (max-width: 820px) {
  :root { --header-h: 66px; --tabbar-h: 78px; }
  body { font-size: 16.5px; padding-bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom)); }
  .site-header { padding: 0 12px 0 18px; }
  .brand img { height: 42px; }
  .main-nav { display: none; }
  .js .menu-btn { display: inline-flex; }
  html:not(.js) .main-nav { display: block; }
  html:not(.js) .site-header { height: auto; flex-wrap: wrap; padding: 10px 18px; }
  html:not(.js) .main-nav ul { flex-wrap: wrap; gap: 4px 18px; }

  .hero { min-height: calc(100svh - var(--header-h) - var(--tabbar-h)); }
  .hero::after { background: linear-gradient(180deg, rgba(14, 30, 50, .05) 18%, rgba(14, 30, 50, .6) 48%, rgba(14, 30, 50, .92) 80%); }
  .hero-copy { padding: 140px 22px 30px; }
  .hero p { font-size: 16.5px; }
  .hero .btn-row .btn { width: 100%; }
  .hero .btn-ghost { display: none; }

  .section { padding: 60px 22px; }
  .intro, .owners, .contact-grid { grid-template-columns: 1fr; gap: 26px; }
  .row, .row.flip { grid-template-columns: 1fr; min-height: 0; }
  .row.flip .row-pic { order: 0; }
  .row-pic { min-height: 0; aspect-ratio: 3 / 2; }
  .row-text { padding: 30px 22px 34px; }
  .ways { grid-template-columns: 1fr; }
  .ways a { border-right: 0; border-bottom: 1px solid var(--hair); padding: 26px 22px; }
  .svc { grid-template-columns: 1fr; gap: 10px; padding: 36px 0; }
  .promises { grid-template-columns: 1fr; }
  .promises div { padding: 20px 0; border-bottom: 1px solid var(--hair); }
  .page-hero-copy { padding: 70px 22px 50px; }
  .page-head { padding: 54px 22px 26px; }
  .message-page { padding: 70px 22px; }
  .prose { padding: 0 22px 70px; }
  .form-card { padding: 28px 18px; }
  .fields { grid-template-columns: 1fr; }
  .field, .field.half, .consent, .consent-note, .form-actions { grid-column: span 1; }
  .owners .btn { width: 100%; }
  .footer-top { grid-template-columns: 1fr; gap: 28px; }
  .footer-legal { flex-direction: column; align-items: flex-start; }

  .tabbar { position: fixed; z-index: 45; left: 0; right: 0; bottom: 0; display: grid; grid-template-columns: 1fr 1.15fr 1fr;
    gap: 6px; padding: 8px 10px calc(8px + env(safe-area-inset-bottom)); min-height: var(--tabbar-h);
    background: rgba(255, 255, 255, .97); border-top: 1px solid var(--hair); }
  .tabbar a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-height: 56px;
    border-radius: 10px; text-decoration: none; color: var(--ink); font: 700 12px/1.1 var(--sans); }
  .tabbar a:active { background: #eef2f6; }
  .tabbar a[aria-current="page"] { color: var(--sky-text); }
  .tabbar svg { width: 24px; height: 24px; fill: none; stroke: var(--navy); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
  .tabbar a.tab-primary { background: var(--navy); color: var(--white); }
  .tabbar a.tab-primary svg { stroke: var(--white); }
}

@media (max-width: 380px) {
  .display { font-size: 40px; }
  .sheet-main a { font-size: 24px; }
}

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

@media print {
  .site-header, .tabbar, .sheet, .skip-link { display: none !important; }
  body { padding: 0; background: #fff; }
}
