/* Clearview Plumbing & Heating — CM Studio connector feature-test site.
   Standalone styling; nothing here is part of the connector. */
* { box-sizing: border-box; }

:root {
  --ink: #1d2733;
  --muted: #5d6b7c;
  --brand: #0d5c63;
  --brand-dark: #094348;
  --paper: #f5f7f8;
  --card: #ffffff;
  --line: #dde4e8;
  --accent: #e8f2f0;
}

body {
  margin: 0;
  font: 16px/1.6 "Segoe UI", system-ui, -apple-system, sans-serif;
  color: var(--ink);
  background: var(--paper);
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.5rem;
  background: var(--card);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
}
.logo { display: flex; align-items: center; gap: .6rem; text-decoration: none; color: inherit; }
.logo-mark {
  display: inline-grid;
  place-items: center;
  width: 2.1rem; height: 2.1rem;
  border-radius: 50%;
  background: var(--brand);
  color: #fff;
  font-weight: 700;
}
.site-header nav { display: flex; gap: 1.2rem; }
.site-header nav a { text-decoration: none; color: var(--brand-dark); font-weight: 600; }
.site-header nav a:hover { text-decoration: underline; }

main { max-width: 46rem; margin: 0 auto; padding: 1.5rem 1.25rem 3rem; }

.hero {
  background: linear-gradient(160deg, var(--brand) 0%, var(--brand-dark) 100%);
  color: #fff;
  border-radius: 14px;
  padding: 2.2rem 1.8rem;
  margin-bottom: 1.5rem;
}
.eyebrow { text-transform: uppercase; letter-spacing: .08em; font-size: .8rem; opacity: .85; margin: 0; }
.hero h1 { margin: .3rem 0 .6rem; font-size: 1.9rem; line-height: 1.25; }
.lede { margin: 0 0 1rem; max-width: 38ch; opacity: .95; }
.open-badge {
  display: inline-block;
  background: rgba(255,255,255,.15);
  border: 1px solid rgba(255,255,255,.35);
  border-radius: 999px;
  padding: .25rem .9rem;
  font-weight: 600;
  font-size: .9rem;
  margin: 0 0 1.1rem;
}
.hero-cta { display: flex; gap: .8rem; flex-wrap: wrap; margin: 0; }

.button {
  display: inline-block;
  background: #fff;
  color: var(--brand-dark);
  font-weight: 700;
  padding: .65rem 1.3rem;
  border-radius: 9px;
  text-decoration: none;
}
.button-outline {
  background: transparent;
  color: #fff;
  border: 2px solid rgba(255,255,255,.8);
}
.button:hover { filter: brightness(1.05); }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1.6rem 1.5rem;
  margin-bottom: 1.5rem;
}
.card h2 { margin: 0 0 .8rem; font-size: 1.25rem; }
.card h3 { margin: 1.4rem 0 .5rem; font-size: 1.02rem; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }

.hours-table ul { list-style: none; margin: 0; padding: 0; }
.hours-table li {
  display: flex;
  justify-content: space-between;
  padding: .45rem 0;
  border-bottom: 1px dashed var(--line);
}
.hours-table li span:first-child { font-weight: 600; }

.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
  gap: 1rem;
  margin-bottom: .5rem;
}
.contact-value { color: var(--brand-dark); font-weight: 600; text-decoration: none; }
p.contact-value { color: var(--ink); }

.enquiry-form { display: grid; gap: .8rem; max-width: 34rem; }
.enquiry-form label { display: grid; gap: .3rem; font-weight: 600; font-size: .9rem; }
.enquiry-form input, .enquiry-form textarea {
  font: inherit;
  padding: .55rem .7rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfd;
}
.enquiry-form button {
  justify-self: start;
  background: var(--brand);
  color: #fff;
  font: inherit;
  font-weight: 700;
  border: 0;
  border-radius: 9px;
  padding: .65rem 1.4rem;
  cursor: pointer;
}
.enquiry-form button:disabled { opacity: .6; cursor: wait; }
[data-cm-note] { font-weight: 600; }
[data-cm-note].cm-ok { color: var(--brand-dark); }
[data-cm-note].cm-err { color: #b3261e; }

.badge {
  display: inline-block;
  font-size: .7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  background: var(--accent);
  color: var(--brand-dark);
  border-radius: 999px;
  padding: .15rem .6rem;
  vertical-align: middle;
}

.debug { background: #fbfcfd; }
.debug-buttons { display: flex; gap: .6rem; }
.debug button {
  font: inherit;
  font-size: .85rem;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: .4rem .8rem;
  cursor: pointer;
}
#cm-data {
  background: var(--ink);
  color: #d7e4ee;
  padding: 1rem;
  border-radius: 8px;
  overflow-x: auto;
  font-size: .78rem;
}
.log { list-style: none; margin: 1rem 0 0; padding: 0; font-size: .85rem; font-family: Consolas, monospace; }
.log li { padding: .25rem 0; border-bottom: 1px dashed var(--line); color: var(--muted); }

.manual-note.ok { color: var(--brand-dark); font-weight: 600; }
.manual-note.err { color: #b3261e; font-weight: 600; }

.site-footer {
  border-top: 1px solid var(--line);
  text-align: center;
  padding: 1.5rem 1rem 2.5rem;
  font-size: .9rem;
}
.site-footer a { color: var(--brand-dark); }

@media (max-width: 560px) {
  .site-header { flex-direction: column; align-items: flex-start; }
  .hero { padding: 1.6rem 1.2rem; }
  .hero h1 { font-size: 1.5rem; }
}
