/* East Coast Energy: site styles
   Brand colours and fonts follow the ECE brand colour guide (Marketing/Branding).
   Change the values in :root and the whole site follows. */

/* ---------- Brand fonts (self-hosted, SIL Open Font License; see /fonts/README.txt) ---------- */
@font-face { font-family: "Montserrat"; font-style: normal; font-weight: 400; font-display: swap; src: url("/fonts/montserrat-400.woff2") format("woff2"); }
@font-face { font-family: "Montserrat"; font-style: normal; font-weight: 600; font-display: swap; src: url("/fonts/montserrat-600.woff2") format("woff2"); }
@font-face { font-family: "Montserrat"; font-style: normal; font-weight: 700; font-display: swap; src: url("/fonts/montserrat-700.woff2") format("woff2"); }
@font-face { font-family: "Gelasio"; font-style: normal; font-weight: 700; font-display: swap; src: url("/fonts/gelasio-700.woff2") format("woff2"); }

:root {
  /* Brand colours */
  --orange: #ef8443;      /* Colour 01: highlights and icons */
  --burnt: #b25210;       /* Colour 02: buttons and links */
  --rust: #964509;        /* Colour 03: headings, "EAST COAST" in the logo */
  --green: #477900;       /* Colour 04: "ENERGY" in the logo, ticks, accents */

  /* Supporting neutrals (warm, to sit with the brand colours) */
  --dark: #2b1d12;        /* deep brown: dark bands */
  --darker: #20150c;      /* footer */
  --cream: #faf6ef;       /* warm off-white section background */
  --orange-soft: #fdeee3; /* light orange panels and icon badges */
  --green-soft: #eef4e4;  /* light green panels */
  --ink: #2a2420;         /* body text */
  --muted: #6a5f57;       /* secondary text */
  --line: #e8dfd4;        /* borders */
  --white: #ffffff;
  --ok: #477900;
  --error: #b42318;

  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 1px 2px rgba(43, 29, 18, 0.06), 0 8px 24px rgba(43, 29, 18, 0.08);
  --container: 1120px;
  --gutter: 20px;

  --font: "Montserrat", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --font-heading: "Gelasio", Georgia, "Times New Roman", serif;
}

/* ---------- Base ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--white);
}

img, svg { display: block; max-width: 100%; }

a { color: var(--burnt); text-underline-offset: 2px; }
a:hover { color: var(--rust); }

h1, h2, h3, h4 {
  line-height: 1.2;
  margin: 0 0 0.5em;
}
h1, h2 { font-family: var(--font-heading); font-weight: 700; color: var(--rust); letter-spacing: -0.005em; }
h1 { font-size: clamp(2rem, 4.5vw, 3rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.15rem); }
h3, h4 { font-family: var(--font); font-weight: 700; color: var(--dark); }
h3 { font-size: 1.1rem; }

p { margin: 0 0 1em; }
ul { margin: 0 0 1em; padding-left: 1.2em; }

:focus-visible { outline: 3px solid var(--orange); outline-offset: 2px; }

.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--dark); color: var(--white); padding: 8px 14px; z-index: 100;
}
.skip-link:focus { left: 8px; top: 8px; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter); }

.section { padding: 72px 0; }
.section-tight-top { padding-top: 24px; }
.section-sand { background: var(--cream); }
.section-head { max-width: 680px; margin-bottom: 36px; }
.section-head p { color: var(--muted); font-size: 1.05rem; }
.center { text-align: center; margin-left: auto; margin-right: auto; }

.eyebrow {
  display: inline-block;
  font-size: 0.78rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--green); margin-bottom: 10px;
}

/* Placeholder marker: anything still waiting on real details.
   `npm run check` lists every one of these before launch. */
.todo {
  background: #fff3c4;
  outline: 1px dashed #c97f00;
  border-radius: 3px;
  padding: 0 4px;
  color: #6b4b00;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 22px; border-radius: 999px; border: 2px solid transparent;
  font: inherit; font-weight: 700; font-size: 0.98rem; line-height: 1.2;
  text-decoration: none; cursor: pointer; transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.btn-primary { background: var(--burnt); color: var(--white); }
.btn-primary:hover { background: var(--rust); color: var(--white); }
.btn-outline { border-color: currentColor; color: var(--rust); background: transparent; }
.btn-outline:hover { background: var(--rust); color: var(--white); border-color: var(--rust); }
.btn-light { border-color: rgba(255,255,255,0.7); color: var(--white); }
.btn-light:hover { background: var(--white); color: var(--dark); border-color: var(--white); }
.btn[disabled] { opacity: 0.6; cursor: wait; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: saturate(1.4) blur(6px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 72px; }

.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.brand-mark { height: 48px; width: auto; flex: none; }
.brand-name {
  font-family: var(--font-heading); font-weight: 700; text-transform: uppercase;
  font-size: 1.08rem; letter-spacing: 0.07em; line-height: 1.1; white-space: nowrap;
}
.brand-name .w1 { color: var(--rust); }
.brand-name .w2 { color: var(--green); }
.brand-name small {
  display: block; margin-top: 3px;
  font-family: var(--font); font-weight: 600; font-size: 0.66rem; letter-spacing: 0.12em; color: var(--muted);
}

.nav { display: flex; align-items: center; gap: 4px; }
.nav a {
  color: var(--ink); text-decoration: none; font-weight: 600; font-size: 0.95rem;
  padding: 8px 12px; border-radius: var(--radius-sm);
}
.nav a:hover { background: var(--cream); color: var(--rust); }
.nav a[aria-current="page"] { color: var(--rust); box-shadow: inset 0 -3px 0 var(--orange); border-radius: 0; }
.nav .btn { margin-left: 8px; padding: 10px 18px; color: var(--white); }
.nav .btn:hover { background: var(--rust); color: var(--white); }
.nav .btn[aria-current="page"] { box-shadow: none; border-radius: 999px; }

.nav-toggle {
  display: none; align-items: center; justify-content: center;
  width: 44px; height: 44px; border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--white); color: var(--rust); cursor: pointer;
}
.nav-toggle svg { width: 22px; height: 22px; }

@media (max-width: 860px) {
  .js .nav-toggle { display: inline-flex; }
  .js .nav {
    display: none;
    position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--white); border-bottom: 1px solid var(--line);
    padding: 8px var(--gutter) 16px; box-shadow: var(--shadow);
  }
  .js .nav.is-open { display: flex; }
  .js .nav a { padding: 12px 8px; border-bottom: 1px solid var(--line); border-radius: 0; }
  .js .nav a[aria-current="page"] { box-shadow: inset 4px 0 0 var(--orange); padding-left: 14px; }
  .js .nav .btn { margin: 12px 0 0; border-bottom: 0; border-radius: 999px; }
  .js .nav .btn[aria-current="page"] { box-shadow: none; padding-left: 18px; }
  /* Without JavaScript the links simply wrap under the logo */
  html:not(.js) .header-inner { flex-wrap: wrap; padding: 10px 0; }
  html:not(.js) .nav { flex-wrap: wrap; }
}
@media (max-width: 400px) {
  .brand-mark { height: 40px; }
  .brand-name { font-size: 0.95rem; letter-spacing: 0.05em; }
}

/* ---------- Hero ---------- */
.hero {
  background:
    radial-gradient(circle at 85% 20%, rgba(239, 132, 67, 0.14), transparent 45%),
    linear-gradient(180deg, var(--cream), var(--white));
  padding: 64px 0 56px;
}
.hero-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 48px; align-items: center; }
.hero .lead { font-size: 1.12rem; color: var(--muted); max-width: 560px; }
.hero .btn-row { margin: 28px 0 24px; }
.hero-art { justify-self: center; width: 100%; max-width: 460px; }
.hero-art img { width: 100%; height: auto; }

.checks { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.checks li { display: flex; gap: 10px; align-items: flex-start; }
.checks svg { width: 22px; height: 22px; flex: none; color: var(--green); margin-top: 2px; }

@media (max-width: 860px) {
  .hero { padding: 40px 0; }
  .hero-grid { grid-template-columns: 1fr; gap: 32px; }
  .hero-art { max-width: 320px; }
}

/* ---------- Trust strip ---------- */
.trust { background: var(--dark); color: var(--white); padding: 22px 0; }
.trust-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.trust-list li { display: flex; align-items: center; gap: 12px; font-weight: 600; font-size: 0.95rem; line-height: 1.35; }
.trust-list svg { width: 28px; height: 28px; flex: none; color: var(--orange); }
@media (max-width: 860px) { .trust-list { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .trust-list { grid-template-columns: 1fr; } }

/* ---------- Cards ---------- */
.cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.cards-3 { grid-template-columns: repeat(3, 1fr); }
.card {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px 24px; box-shadow: var(--shadow);
  display: flex; flex-direction: column;
}
.card p { color: var(--muted); }
.card .more { margin-top: auto; font-weight: 700; text-decoration: none; }
.card .more::after { content: " →"; }
.icon-badge {
  width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center;
  background: var(--orange-soft); color: var(--burnt); margin-bottom: 16px;
}
.icon-badge svg { width: 28px; height: 28px; }
@media (max-width: 960px) { .cards, .cards-3 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .cards, .cards-3 { grid-template-columns: 1fr; } }

.note {
  margin-top: 28px; padding: 16px 20px; border-radius: var(--radius);
  background: var(--green-soft); border-left: 4px solid var(--green); color: var(--ink);
}
.note p:last-child { margin-bottom: 0; }

/* ---------- Steps ---------- */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; counter-reset: step; }
.steps li { position: relative; padding: 24px 22px; background: var(--white); border-radius: var(--radius); border: 1px solid var(--line); }
.steps li::before {
  counter-increment: step; content: counter(step);
  display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%;
  background: var(--green); color: var(--white); font-weight: 700; margin-bottom: 14px;
}
.steps p { color: var(--muted); margin: 0; }
@media (max-width: 960px) { .steps { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .steps { grid-template-columns: 1fr; } }

/* ---------- Split / feature rows ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; gap: 28px; } }

.area-tags { display: flex; flex-wrap: wrap; gap: 10px; list-style: none; padding: 0; margin: 0 0 20px; }
.area-tags li {
  background: var(--white); border: 1px solid var(--line); border-radius: 999px;
  padding: 8px 16px; font-weight: 700; color: var(--rust);
}

/* ---------- CTA band ---------- */
.cta-band { background: var(--dark); color: var(--white); padding: 56px 0; }
.cta-band h2 { color: var(--white); }
.cta-band p { color: #e6d6c6; max-width: 620px; }
.cta-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }

/* ---------- Page header (inner pages) ---------- */
.page-head { background: linear-gradient(180deg, var(--cream), var(--white)); padding: 56px 0 32px; }
.page-head .lead { font-size: 1.1rem; color: var(--muted); max-width: 680px; }

/* ---------- Service detail ---------- */
.service { padding: 56px 0; border-top: 1px solid var(--line); scroll-margin-top: 84px; }
.service:first-of-type { border-top: 0; }
.service-grid { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 48px; }
.service-grid h2 { display: flex; align-items: center; gap: 14px; }
.service-grid h2 .icon-badge { margin: 0; }
.service-intro { color: var(--muted); font-size: 1.05rem; }
.service-box { background: var(--cream); border-radius: var(--radius); padding: 24px 26px; }
.service-box h3 { font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); }
.service-box .checks { gap: 10px; }
@media (max-width: 860px) { .service-grid { grid-template-columns: 1fr; gap: 20px; } }

.jump-links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.jump-links a {
  text-decoration: none; font-weight: 600; color: var(--rust);
  border: 1px solid var(--line); background: var(--white); border-radius: 999px; padding: 8px 16px;
}
.jump-links a:hover { border-color: var(--rust); }

/* ---------- FAQ ---------- */
.faq { max-width: 780px; }
.faq details { border-bottom: 1px solid var(--line); padding: 4px 0; }
.faq summary {
  cursor: pointer; list-style: none; padding: 16px 36px 16px 0; position: relative;
  font-weight: 700; color: var(--dark); font-size: 1.02rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; position: absolute; right: 4px; top: 12px; font-size: 1.5rem; color: var(--burnt); font-weight: 400;
}
.faq details[open] summary::after { content: "–"; }
.faq details p { color: var(--muted); margin: 0 0 16px; }

/* ---------- About ---------- */
.values { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.values .card { box-shadow: none; }
@media (max-width: 860px) { .values { grid-template-columns: 1fr; } }

.creds { list-style: none; padding: 0; margin: 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); }
.creds li { display: flex; justify-content: space-between; gap: 16px; padding: 14px 20px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.creds li:first-child { border-top: 0; }
.creds strong { color: var(--dark); }
.card .creds { border: 0; border-radius: 0; background: transparent; }
.card .creds li { padding: 12px 0; }

/* ---------- Contact / form ---------- */
.contact-grid { display: grid; grid-template-columns: 1.4fr 0.8fr; gap: 40px; align-items: start; }
@media (max-width: 900px) { .contact-grid { grid-template-columns: 1fr; } }

.form-card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow); }
@media (max-width: 480px) { .form-card { padding: 20px 16px; } }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form-grid .full { grid-column: 1 / -1; }
@media (max-width: 600px) { .form-grid { grid-template-columns: 1fr; } }

.field label, .field legend { display: block; font-weight: 700; color: var(--dark); margin-bottom: 6px; font-size: 0.95rem; }
.field .hint { font-weight: 400; color: var(--muted); font-size: 0.88rem; }
.field input[type="text"],
.field input[type="email"],
.field input[type="tel"],
.field select,
.field textarea {
  width: 100%; font: inherit; font-size: 16px; color: var(--ink);
  padding: 12px 14px; border: 1px solid #cdbfb1; border-radius: var(--radius-sm); background: var(--white);
}
.field textarea { min-height: 120px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 3px solid rgba(239, 132, 67, 0.45); border-color: var(--burnt); }
fieldset.field { border: 0; padding: 0; margin: 0; min-width: 0; }

.choice-grid { display: flex; flex-wrap: wrap; gap: 10px; }
.choice {
  display: inline-flex; align-items: center; gap: 8px; cursor: pointer;
  border: 1px solid #cdbfb1; border-radius: 999px; padding: 9px 16px; font-weight: 600; background: var(--white);
}
.choice:has(input:checked) { border-color: var(--burnt); background: var(--orange-soft); }
.choice input { width: 18px; height: 18px; accent-color: var(--burnt); margin: 0; }

.req { color: var(--error); }
.hp-field { position: absolute !important; left: -10000px !important; width: 1px; height: 1px; overflow: hidden; }

.form-footer { margin-top: 22px; display: flex; flex-direction: column; gap: 16px; align-items: flex-start; }
.privacy-note { font-size: 0.88rem; color: var(--muted); margin: 0; }

.form-status { display: none; border-radius: var(--radius-sm); padding: 14px 16px; font-weight: 600; }
.form-status.is-error { display: block; background: #fdecea; color: var(--error); }
.form-status.is-ok { display: block; background: var(--green-soft); color: var(--ok); }

.form-success { text-align: center; padding: 24px 8px; }
.form-success svg { width: 56px; height: 56px; color: var(--ok); margin: 0 auto 12px; }

.contact-aside { display: grid; gap: 20px; }
.contact-aside .card { box-shadow: none; }
.contact-line { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 14px; }
.contact-line:last-child { margin-bottom: 0; }
.contact-line svg { width: 22px; height: 22px; flex: none; color: var(--burnt); margin-top: 3px; }
.contact-line strong { display: block; color: var(--dark); }

/* ---------- Footer ---------- */
.site-footer { background: var(--darker); color: #d6c7b8; padding: 56px 0 24px; font-size: 0.93rem; }
.site-footer a { color: #f3e7da; text-decoration: none; }
.site-footer a:hover { color: var(--orange); text-decoration: underline; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px; }
.footer-grid h4 { color: var(--white); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 14px; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.site-footer .brand { margin-bottom: 14px; }
.site-footer .brand-name .w1,
.site-footer .brand-name .w2 { color: var(--white); }
.site-footer .brand-name small { color: #b9a796; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.1); margin-top: 40px; padding-top: 20px; display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; font-size: 0.82rem; }
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .footer-grid { grid-template-columns: 1fr; } }

/* ---------- Simple message pages (thanks / 404) ---------- */
.message-page { padding: 96px 0; text-align: center; }
.message-page .lead { color: var(--muted); font-size: 1.08rem; max-width: 560px; margin: 0 auto 28px; }
.message-page .btn-row { justify-content: center; }
.message-page svg.big { width: 72px; height: 72px; margin: 0 auto 20px; color: var(--ok); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
