:root {
  /* Auteuil palette: white, deep blue, terracotta, brass, silver. Variable names kept from the original layout. */
  --charcoal: #ffffff;          /* page background */
  --charcoal-2: #f3f6fa;        /* panels, cards */
  --navy: #14253a;
  --blue: #2c5282;
  --silver: #2f3d4f;            /* body text */
  --silver-dim: #5b6877;        /* secondary text */
  --brass: #b88a3e;
  --brass-bright: #8a6420;      /* brass used as text: darkened for contrast on white */
  --terracotta: #c2603d;
  --terracotta-bright: #b4532f;
  --cream: #14253a;             /* headings */
  --line: rgba(20, 37, 58, 0.14);
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  display: flex; flex-direction: column;
  background: var(--charcoal);
  color: var(--silver);
  font: 16px/1.5 -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.site-header {
  flex: none; position: relative; text-align: center;
  padding: 6px 16px 8px;
  border-bottom: 1px solid var(--brass);
}
.logo { display: block; margin: 0 auto; width: min(170px, 44vw); height: auto; }
.tagline {
  margin: 0; font-size: clamp(0.6rem, 1.6vw, 0.72rem); font-weight: 600;
  letter-spacing: 0.4em; text-transform: uppercase;
  background: linear-gradient(180deg, #f2f3f4, var(--silver) 60%, var(--silver-dim));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

main { position: relative; flex: 1 1 auto; min-height: 320px; }
.map { position: absolute; inset: 0; background: var(--charcoal-2); }
.map-status {
  position: absolute; left: 12px; bottom: 12px; font-size: 12px; color: var(--silver-dim);
  background: rgba(255,255,255,0.92); padding: 4px 10px; border: 1px solid var(--line);
}
.map-status:empty { display: none; }

/* Project card shown in the map info window */
.project-card { width: 280px; max-width: 100%; color: #1b1c1e; font: 14px/1.45 -apple-system, "Segoe UI", Roboto, sans-serif; }
.project-card h3 { margin: 0 0 2px; font-size: 16px; }
.project-card .meta { margin: 0 0 8px; color: #6b6f74; font-size: 12px; letter-spacing: 0.04em; text-transform: uppercase; }
.project-card .summary { margin: 8px 0 0; }
.project-card .photos { display: flex; gap: 6px; overflow-x: auto; scroll-snap-type: x mandatory; margin-bottom: 8px; }
.project-card .photos img { flex: none; width: 100%; height: 170px; object-fit: cover; scroll-snap-align: start; border-radius: 2px; }

/* Keep the Google info window from clipping the card on small screens */
.gm-style .gm-style-iw-c { padding: 14px !important; border-radius: 2px !important; }

/* ---- Work authorization form ---- */
body.page-form { display: block; height: auto; min-height: 100%; }
.page-form .site-header .tagline { margin-top: 4px; }
.form-wrap { max-width: 820px; margin: 0 auto; padding: 28px 16px 64px; }
.form-title { margin: 0 0 6px; font-size: 1.8rem; color: var(--cream); }
.form-lede, .muted { color: var(--silver-dim); margin: 0 0 20px; }
fieldset { margin: 0 0 20px; padding: 18px 18px 8px; border: 1px solid var(--line); border-top: 3px solid var(--brass); background: var(--charcoal-2); }
legend { padding: 0 8px; color: var(--brass-bright); font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; font-size: 0.8rem; }
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 16px; margin-bottom: 14px; }
.span2 { grid-column: 1 / -1; }
label { display: block; font-size: 0.85rem; color: var(--silver); }
label.block { margin-bottom: 14px; }
input[type=text], input[type=tel], input[type=email], select, textarea {
  display: block; width: 100%; margin-top: 5px; padding: 10px 11px; font: inherit; color: var(--cream);
  background: var(--charcoal); border: 1px solid #b9c3cf; border-radius: 2px;
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--brass); outline-offset: 0; border-color: var(--brass); }
[hidden] { display: none !important; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.acks { list-style: none; margin: 0 0 8px; padding: 0; }
.acks li { margin-bottom: 10px; }
label.check { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 14px; line-height: 1.45; }
label.check input { flex: none; margin-top: 3px; accent-color: var(--brass); width: 18px; height: 18px; }
.error { min-height: 1.4em; color: #b4332f; margin: 0 0 8px; }
button.btn { cursor: pointer; width: 100%; padding: 14px; font-size: 14px; }
button.btn:disabled { opacity: 0.6; cursor: wait; }
.done { text-align: center; padding: 48px 0; }
@media (max-width: 640px) { .grid { grid-template-columns: 1fr; } .span2 { grid-column: auto; } }

/* ---- Header button + work authorization card ---- */
.header-action {
  position: absolute; right: 16px; top: 50%; transform: translateY(-50%);
  padding: 9px 16px; font-size: 12px; cursor: pointer; font-family: inherit;
}
.modal { position: fixed; inset: 0; z-index: 50; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(20,37,58,0.6); }
.modal[hidden] { display: none; }
.modal-card {
  position: relative; display: flex; flex-direction: column;
  width: min(860px, 100%); height: min(900px, 100%);
  background: var(--charcoal); border: 1px solid var(--brass); border-top-width: 3px;
  box-shadow: 0 20px 60px rgba(20,37,58,0.35);
}
.modal-bar { flex: none; display: flex; align-items: center; justify-content: space-between; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.modal-bar h2 { margin: 0; font-size: 0.8rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--brass-bright); }
.modal-close { background: none; border: 1px solid #b9c3cf; color: var(--silver); width: 32px; height: 32px; font-size: 20px; line-height: 1; cursor: pointer; border-radius: 2px; }
.modal-close:hover { border-color: var(--brass); color: var(--brass-bright); }
.modal-frame { flex: 1 1 auto; width: 100%; border: 0; background: var(--charcoal); }

/* Form page when shown inside the card */
body.embed .site-header, body.embed .form-title, body.embed .form-lede { display: none; }
body.embed .form-wrap { padding-top: 16px; }

@media (max-width: 640px) {
  .header-action { padding: 7px 10px; font-size: 10px; }
  .logo { width: min(130px, 36vw); }
}

/* ---- Header buttons + pricing card ---- */
.header-actions { position: absolute; right: 16px; top: 50%; transform: translateY(-50%); display: flex; gap: 8px; }
.header-actions .btn { width: auto; padding: 9px 16px; font-size: 12px; }
@media (max-width: 640px) {
  .header-actions { position: static; transform: none; justify-content: center; margin: 8px 0 2px; }
  .header-actions .btn { padding: 7px 10px; font-size: 10px; }
}
.pricing { flex: 1 1 auto; overflow-y: auto; padding: 8px 16px 24px; }
.pricing-download { display: block; margin: 12px 0 4px; text-align: center; }
.pricing-section { margin: 20px 0 10px; font-size: 0.8rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--brass-bright); }
.price-card { margin-bottom: 12px; padding: 12px 14px 10px; border: 1px solid var(--line); border-top: 3px solid var(--brass); background: var(--charcoal-2); }
.price-card h4 { margin: 0 0 8px; font-size: 1rem; color: var(--cream); }
.price-lines { display: grid; grid-template-columns: 1fr auto; gap: 4px 16px; margin: 0; }
.price-lines dt { color: var(--silver); }
.price-lines dd { margin: 0; text-align: right; color: var(--brass-bright); font-weight: 600; white-space: nowrap; }
.price-note { margin: 8px 0 0; font-size: 0.85rem; color: var(--silver-dim); }

/* ---- Buttons ---- */
.btn {
  display: inline-block; padding: 12px 26px; border-radius: 2px; border: 1px solid var(--brass);
  background: linear-gradient(180deg, var(--brass-bright), var(--brass));
  color: #1b1c1e; font-family: inherit; font-weight: 700; letter-spacing: 0.06em;
  text-transform: uppercase; font-size: 13px; text-decoration: none; cursor: pointer;
}
.btn:hover { filter: brightness(1.08); }

/* The form's full-width submit style must not stretch the header button */
button.btn.header-action { width: auto; padding: 9px 16px; font-size: 12px; }
@media (max-width: 640px) { button.btn.header-action { padding: 7px 10px; font-size: 10px; } }

/* Header spacing: logo, then tagline directly beneath without overlap */
.site-header { padding: 6px 16px 8px; }
.logo { margin: 0 auto 2px; width: min(240px, 56vw); }
.tagline { padding-top: 2px; }
@media (max-width: 640px) {
  .logo { width: 190px; }
  button.btn.header-action { position: static; transform: none; display: block; margin: 8px auto 2px; }
}

.pair { display: grid; grid-template-columns: 70px 1fr; gap: 10px; }

/* ---- App mode: install bar, offline queue, standalone ---- */
.install-bar, .queue { display: flex; align-items: center; gap: 12px; margin: 0 0 16px; padding: 10px 14px; border: 1px solid var(--brass); background: var(--charcoal-2); font-size: 0.9rem; }
.install-bar span, .queue span { flex: 1; }
.install-x { background: none; border: 0; color: var(--silver-dim); font-size: 22px; line-height: 1; cursor: pointer; }
.link-btn { background: none; border: 0; padding: 4px 6px; color: var(--brass-bright); font: inherit; font-weight: 700; cursor: pointer; text-decoration: underline; }
.queue { border-color: var(--silver-dim); }
.done .btn { margin-top: 12px; }
body.app .site-header { padding-top: calc(6px + env(safe-area-inset-top)); }
body.app .form-wrap { padding-bottom: calc(64px + env(safe-area-inset-bottom)); }
@media (display-mode: standalone) { .install-bar { display: none; } }

/* Phones: fieldsets and grid children must be allowed to shrink or the form overflows the screen */
fieldset { min-width: 0; }
.grid > *, .pair > * { min-width: 0; }
.form-wrap { overflow-x: hidden; }

/* ---- Install page ---- */
.install-wrap { max-width: 460px; margin: 0 auto; padding: calc(24px + env(safe-area-inset-top)) 20px 48px; text-align: center; }
.install-logo { width: min(300px, 78vw); height: auto; display: block; margin: 0 auto 4px; }
.install-title { margin: 22px 0 8px; font-size: 1.6rem; color: var(--cream); }
.install-lede { margin: 0 0 24px; color: var(--silver-dim); }
.btn.big, a.btn.big { display: block; width: 100%; padding: 18px 16px; font-size: 16px; }
button.btn.big { width: 100%; }
.install-note { margin: 10px 0 0; font-size: 0.85rem; color: var(--silver-dim); }
.install-ok { color: var(--brass-bright); font-weight: 700; margin: 0 0 16px; }
.steps { text-align: left; margin: 22px 0 8px; padding: 16px 16px 16px 38px; background: var(--charcoal-2); border: 1px solid var(--brass); }
.steps li { margin-bottom: 10px; line-height: 1.5; }
.steps li:last-child { margin-bottom: 0; }
.share-icon { vertical-align: -5px; color: var(--brass-bright); }
.where { color: var(--silver-dim); }
.install-warn { margin: 22px 0 12px; padding: 14px; text-align: left; border: 1px solid #b86e3e; background: var(--charcoal-2); }
.install-warn p { margin: 0; }
button.btn-ghost { background: transparent; color: var(--silver); border-color: var(--silver-dim); width: 100%; }
.qr { display: block; margin: 36px auto 0; background: #fff; padding: 8px; width: 160px; height: 160px; }

/* Centering: letter-spacing adds trailing space after the last glyph, which pulls centered text left.
   Matching left padding cancels it so the tagline sits exactly under the logo. */
.tagline { padding-left: 0.4em; }
.install-page .tagline { text-align: center; }

/* Install banner: keep the button its natural size so the message gets the room */
button.btn.btn-small { width: auto; padding: 8px 16px; font-size: 12px; flex: none; }
.install-bar span { min-width: 0; }


/* ---- Header extras ---- */
.logo-link { display: block; }
.site-header { border-bottom: 2px solid var(--terracotta); box-shadow: 0 1px 0 var(--brass); }
.header-crumb { margin: 2px 0 0; font-size: 0.7rem; letter-spacing: 0.3em; text-transform: uppercase; color: var(--brass-bright); }
a.btn-ghost-link { background: transparent; color: var(--silver); border-color: var(--silver-dim); }
a.btn-ghost-link:hover { color: var(--cream); border-color: var(--cream); filter: none; }
.header-actions a.btn { width: auto; padding: 9px 16px; font-size: 12px; }
@media (max-width: 640px) { .header-actions a.btn { padding: 7px 10px; font-size: 10px; } }

/* ---- Home and audience pages ---- */
body.page-home { display: block; height: auto; min-height: 100%; }
.page-home main { flex: none; min-height: 0; }
.hero { max-width: 1040px; margin: 0 auto; padding: 56px 20px 48px; text-align: center; }
.hero-compact { max-width: 720px; padding-bottom: 72px; }
.eyebrow { margin: 0 0 14px; font-size: 0.8rem; font-weight: 700; letter-spacing: 0.32em; text-transform: uppercase; color: var(--terracotta-bright); }
.hero-title { margin: 0 auto 14px; max-width: 18ch; font: 400 clamp(2rem, 5.4vw, 3.4rem)/1.12 var(--serif); color: var(--cream); }
.hero-sub { margin: 0 auto 36px; max-width: 52ch; color: var(--silver); font-size: 1.05rem; }
.audiences { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; text-align: left; }
.audience {
  position: relative; display: flex; flex-direction: column; gap: 8px; min-height: 170px; padding: 22px 20px 18px;
  color: var(--silver); text-decoration: none; background: var(--charcoal-2);
  border: 1px solid var(--line); border-top: 3px solid var(--terracotta);
  transition: transform 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}
.audience:hover, .audience:focus-visible { transform: translateY(-3px); border-color: var(--brass); background: #223c5c; outline: none; }
.audience-name { font: 400 1.35rem/1.2 var(--serif); color: var(--cream); }
.audience-blurb { font-size: 0.9rem; color: var(--silver-dim); }
.audience-go { margin-top: auto; color: var(--brass-bright); font-size: 1.3rem; transition: transform 0.15s ease; }
.audience:hover .audience-go { transform: translateX(4px); }
@media (max-width: 900px) { .audiences { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .audiences { grid-template-columns: 1fr; } .audience { min-height: 0; } .hero { padding-top: 40px; } }

.who { margin: 0; padding: 56px 20px 64px; background: var(--charcoal-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.who > * { max-width: 760px; margin-left: auto; margin-right: auto; }
.who > .who-grid { max-width: 1120px; }
.section-title { margin: 0 auto 18px; font: 400 1.9rem/1.2 var(--serif); color: var(--cream); }
.section-title::after { content: ""; display: block; width: 56px; height: 3px; margin-top: 12px; background: linear-gradient(90deg, var(--terracotta), var(--brass)); }
.who p { margin: 0 auto 14px; font-size: 1.05rem; line-height: 1.7; color: var(--silver); }

.points { max-width: 52ch; margin: 0 auto 36px; padding: 0; list-style: none; text-align: left; }
.points li { margin-bottom: 12px; padding-left: 22px; position: relative; color: var(--silver); }
.points li::before { content: ""; position: absolute; left: 0; top: 0.62em; width: 9px; height: 9px; background: var(--terracotta); transform: rotate(45deg); }
.back { margin: 0; }

.site-footer { display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; max-width: 1040px; margin: 0 auto; padding: 20px; font-size: 0.8rem; color: var(--silver-dim); }
.footer-tag { letter-spacing: 0.2em; text-transform: uppercase; }

/* Breathing room above the logo; wider headline so it sets in two lines */
.site-header { padding-top: 16px; }
body.app .site-header { padding-top: calc(16px + env(safe-area-inset-top)); }
.hero-title { max-width: 22ch; }

/* ---- Light theme refinements ---- */
.site-header { background: #fff; border-bottom: 3px solid var(--terracotta); box-shadow: none; }
.tagline { background: none; color: var(--blue); -webkit-background-clip: initial; background-clip: initial; font-weight: 700; }
.header-crumb { color: var(--terracotta-bright); }

.btn { background: var(--navy); border-color: var(--navy); color: #fff; }
.btn:hover { background: var(--terracotta); border-color: var(--terracotta); filter: none; }
a.btn-ghost-link, button.btn-ghost { background: #fff; color: var(--navy); border-color: var(--navy); }
a.btn-ghost-link:hover, button.btn-ghost:hover { background: var(--navy); color: #fff; border-color: var(--navy); }

fieldset, .price-card { border-top-color: var(--terracotta); }
legend, .pricing-section, .modal-bar h2 { color: var(--blue); }
.price-lines dd { color: var(--navy); }
input[type=text], input[type=tel], input[type=email], select, textarea { background: #fff; color: var(--navy); }
input:focus, select:focus, textarea:focus { outline-color: var(--blue); border-color: var(--blue); }
label.check input { accent-color: var(--terracotta); }
.install-bar, .queue, .steps { border-color: var(--blue); }
.link-btn, .share-icon, .install-ok { color: var(--blue); }
.modal-close:hover { border-color: var(--terracotta); color: var(--terracotta); }

.hero { background: #fff; }
.eyebrow { color: var(--terracotta); }
.hero-title { color: var(--navy); }
.audience { background: #fff; border-color: var(--line); border-top-color: var(--terracotta); box-shadow: 0 1px 2px rgba(20,37,58,0.06); }
.audience:hover, .audience:focus-visible { background: #fff; border-color: var(--blue); border-top-color: var(--terracotta); box-shadow: 0 10px 24px rgba(20,37,58,0.14); }
.audience-go { color: var(--blue); }
.audience:hover .audience-go { color: var(--terracotta); }
.who { background: var(--charcoal-2); }
.points li::before { background: var(--terracotta); }

.site-footer-wrap { background: var(--navy); }
.site-footer { color: #c9d3de; }
.footer-tag { color: #fff; }
.hero-title { text-wrap: balance; }

/* ---- Business-to-business home layout ---- */
.logo { width: min(300px, 66vw); }
.b2b-hero { max-width: 1120px; margin: 0 auto; padding: 56px 20px 56px; display: grid; grid-template-columns: 1.1fr 1fr; gap: 56px; align-items: center; }
.b2b-hero-copy { text-align: left; }
.b2b-hero .hero-title { margin: 0 0 18px; max-width: 16ch; text-align: left; }
.b2b-hero .hero-sub { margin: 0; max-width: 46ch; }
.selector { border: 1px solid var(--line); border-top: 3px solid var(--terracotta); background: #fff; box-shadow: 0 12px 32px rgba(20,37,58,0.10); }
.selector-label { margin: 0; padding: 16px 22px; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.24em; text-transform: uppercase; color: var(--blue); background: var(--charcoal-2); border-bottom: 1px solid var(--line); }
.selector-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 22px; text-decoration: none; border-bottom: 1px solid var(--line); transition: background 0.15s ease; }
.selector-row:last-child { border-bottom: 0; }
.selector-row:hover, .selector-row:focus-visible { background: var(--charcoal-2); outline: none; }
.selector-text { display: flex; flex-direction: column; gap: 3px; }
.selector-row:hover .audience-go { color: var(--terracotta); transform: translateX(4px); }
.selector-row .audience-go { margin: 0; color: var(--blue); transition: transform 0.15s ease; }

.how { max-width: 1120px; margin: 0 auto; padding: 24px 20px 64px; }
.how .section-title { max-width: none; }
.how-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; margin-top: 28px; }
.how-item { padding-top: 14px; border-top: 2px solid var(--blue); }
.how-item h3 { margin: 0 0 8px; font-size: 1rem; color: var(--navy); }
.how-item p { margin: 0; font-size: 0.93rem; line-height: 1.6; color: var(--silver-dim); }

.who-grid { max-width: 1120px; margin: 0 auto; display: grid; grid-template-columns: 1fr 2fr; gap: 56px; }
.who > .who-grid { max-width: 1120px; }
.who-grid .section-title { margin: 0; }
.who-grid p { max-width: none; }

@media (max-width: 900px) {
  .b2b-hero { grid-template-columns: 1fr; gap: 32px; padding-top: 36px; }
  .how-grid { grid-template-columns: repeat(2, 1fr); }
  .who-grid { grid-template-columns: 1fr; gap: 20px; }
}
@media (max-width: 520px) { .how-grid { grid-template-columns: 1fr; } .logo { width: 220px; } }
.who { padding-left: 0; padding-right: 0; } .who-grid { padding: 0 20px; }

/* ---- Contact band + footer links ---- */
.contact { background: var(--navy); color: #fff; padding: 52px 0; }
.contact-inner { max-width: 1120px; margin: 0 auto; padding: 0 20px; display: flex; flex-wrap: wrap; gap: 24px 48px; align-items: center; justify-content: space-between; }
.contact .section-title { color: #fff; margin: 0 0 10px; }
.contact p { margin: 0; color: #c9d3de; max-width: 46ch; }
.contact-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.contact .btn { background: var(--terracotta); border-color: var(--terracotta); color: #fff; }
.contact .btn:hover { background: #fff; border-color: #fff; color: var(--navy); }
.contact a.btn-ghost-link { background: transparent; color: #fff; border-color: #fff; text-transform: none; letter-spacing: 0.02em; }
.contact a.btn-ghost-link:hover { background: #fff; color: var(--navy); }
.site-footer a { color: #fff; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.site-footer-wrap { border-top: 1px solid rgba(255,255,255,0.14); }

/* ---- Lead form (inside the contact band) ---- */
.contact-inner { align-items: flex-start; }
.contact-copy { flex: 1 1 280px; }
.contact-direct { margin-top: 22px !important; line-height: 1.9; }
.contact-direct a { color: #fff; font-size: 1.15rem; text-decoration: none; border-bottom: 1px solid var(--terracotta); }
.lead-form, .lead-done { flex: 1.4 1 420px; background: #fff; color: var(--navy); padding: 26px; border-top: 3px solid var(--terracotta); }
.lead-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 16px; margin-bottom: 14px; }
.lead-grid > label { min-width: 0; }
.lead-span { grid-column: 1 / -1; }
.lead-form label { font-size: 0.85rem; color: var(--silver); }
.lead-form .lead-error { min-height: 1.4em; margin: 0 0 8px; color: #b4332f; font-size: 0.9rem; }
.lead-form button.btn { width: 100%; padding: 14px; background: var(--navy); border-color: var(--navy); color: #fff; }
.lead-form button.btn:hover { background: var(--terracotta); border-color: var(--terracotta); }
.lead-done h3 { margin: 0 0 8px; color: var(--navy); font: 400 1.5rem var(--serif); }
.lead-done p { color: var(--silver); max-width: none; }
@media (max-width: 560px) { .lead-grid { grid-template-columns: 1fr; } .lead-span { grid-column: auto; } .lead-form, .lead-done { padding: 20px; } }
