/* GJC Painting LLC: main stylesheet */

:root {
  /* REPLACEABLE IMAGES
     Every photo on this site is an <img> tag listed in assets/manifest.json.
     To swap a photo, replace the file in assets/ and keep the same name.
     If you add a CSS background image later, declare it here, e.g.
     --img-example: url("assets/example.jpg");
     END REPLACEABLE IMAGES */

  /* Colour */
  --ink: #16233b;
  --ink-2: #203252;
  --ink-soft: #c8d2e5;
  --paper: #faf7f2;
  --sand: #f2ece2;
  --line: #e2d8c8;
  --field: #8c8375;
  --text: #1b2230;
  --muted: #535c6c;
  --accent: #b8471f;
  --accent-hover: #983a17;
  --accent-soft: #f7e6da;
  --ochre: #e9b44c;
  --white: #fff;
  --success: #1f6b43;

  /* Type */
  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --step--1: 0.875rem;
  --step-0: 1.0625rem;
  --step-1: 1.25rem;
  --step-2: clamp(1.375rem, 1.2rem + 0.8vw, 1.75rem);
  --step-3: clamp(1.875rem, 1.45rem + 1.8vw, 2.75rem);
  --step-4: clamp(2.25rem, 1.55rem + 3.2vw, 3.875rem);

  /* Space & shape */
  --space-1: 0.5rem;
  --space-2: 0.75rem;
  --space-3: 1rem;
  --space-4: 1.5rem;
  --space-5: 2rem;
  --space-6: 3rem;
  --space-7: clamp(3.5rem, 2.5rem + 4vw, 6rem);
  --radius: 14px;
  --radius-sm: 8px;
  --shadow: 0 1px 2px rgba(22, 35, 59, 0.06), 0 14px 34px -14px rgba(22, 35, 59, 0.22);
  --container: 72rem;
  --header-h: 4.25rem;
}

/* ---------- Base ---------- */

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

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

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: var(--step-0);
  line-height: 1.6;
}

img { display: block; max-width: 100%; height: auto; }

h1, h2, h3 {
  margin: 0;
  font-family: var(--font-serif);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

h1 { font-size: var(--step-4); }
h2 { font-size: var(--step-3); }
h3 { font-size: var(--step-2); }

p { margin: 0; }

a { color: var(--accent); text-underline-offset: 0.18em; }
a:hover { color: var(--accent-hover); }

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}
.on-dark :focus-visible { outline-color: var(--ochre); }

[id] { scroll-margin-top: calc(var(--header-h) + 1rem); }

.container {
  width: min(100% - 2.5rem, var(--container));
  margin-inline: auto;
}

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

.skip-link {
  position: absolute;
  left: 1rem; top: -4rem;
  z-index: 100;
  padding: 0.75rem 1rem;
  background: var(--ink);
  color: var(--white);
  border-radius: var(--radius-sm);
  font-weight: 600;
  text-decoration: none;
}
.skip-link:focus { top: 1rem; color: var(--white); }

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  min-height: 3rem;
  padding: 0.8rem 1.5rem;
  border: 2px solid transparent;
  border-radius: 999px;
  font: inherit;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}
.btn svg { width: 1.15em; height: 1.15em; flex: none; }

.btn-primary {
  background: var(--accent);
  color: var(--white);
  box-shadow: 0 8px 20px -10px rgba(184, 71, 31, 0.8);
}
.btn-primary:hover { background: var(--accent-hover); color: var(--white); transform: translateY(-1px); }

.btn-outline {
  border-color: currentColor;
  color: var(--ink);
  background: transparent;
}
.btn-outline:hover { background: var(--ink); border-color: var(--ink); color: var(--white); }

.on-dark .btn-outline { color: var(--white); border-color: rgba(255, 255, 255, 0.55); }
.on-dark .btn-outline:hover { background: var(--white); border-color: var(--white); color: var(--ink); }

.btn-lg { min-height: 3.5rem; padding: 0.95rem 1.9rem; font-size: 1.125rem; }
.btn-block { width: 100%; }

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(250, 247, 242, 0.96);
  border-bottom: 1px solid var(--line);
  backdrop-filter: saturate(1.4) blur(8px);
}

.header-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2) var(--space-4);
  min-height: var(--header-h);
  padding-block: 0.5rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  margin-right: auto;
  color: var(--ink);
  text-decoration: none;
}
.brand:hover { color: var(--ink); }
.brand-mark { width: 2.5rem; height: 2.5rem; flex: none; }
.brand-text { display: grid; line-height: 1.15; }
.brand-name { font-family: var(--font-serif); font-size: 1.3rem; font-weight: 700; letter-spacing: -0.01em; }
.brand-tag { font-size: 0.78rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }

.site-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.site-nav a {
  display: inline-block;
  padding: 0.4rem 0;
  color: var(--text);
  font-weight: 600;
  text-decoration: none;
  border-bottom: 2px solid transparent;
}
.site-nav a:hover { color: var(--accent); border-bottom-color: currentColor; }
.site-nav a[aria-current="page"] { color: var(--accent); border-bottom-color: currentColor; }

.header-actions { display: none; align-items: center; gap: var(--space-3); }

.header-phone {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--ink);
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}
.header-phone svg { width: 1.1rem; height: 1.1rem; color: var(--accent); }
.header-phone:hover { color: var(--accent); }

.nav-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 2.75rem;
  padding: 0.5rem 0.9rem;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  background: var(--white);
  color: var(--ink);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
.nav-toggle-bars { position: relative; width: 1.1rem; height: 2px; background: currentColor; }
.nav-toggle-bars::before, .nav-toggle-bars::after {
  content: ""; position: absolute; left: 0; width: 100%; height: 2px; background: currentColor;
  transition: transform 0.2s ease;
}
.nav-toggle-bars::before { top: -6px; }
.nav-toggle-bars::after { top: 6px; }
.nav-open .nav-toggle-bars { background: transparent; }
.nav-open .nav-toggle-bars::before { transform: translateY(6px) rotate(45deg); }
.nav-open .nav-toggle-bars::after { transform: translateY(-6px) rotate(-45deg); }

/* Without JS the nav is always visible; with JS it collapses on small screens */
.site-nav { flex-basis: 100%; }
.js .site-nav { display: none; }
.js.nav-open .site-nav { display: block; padding: 0.25rem 0 0.75rem; }
.js.nav-open .site-nav ul { flex-direction: column; gap: 0; }
.js.nav-open .site-nav a { display: block; padding: 0.8rem 0; border-bottom: 1px solid var(--line); }

@media (min-width: 56rem) {
  .nav-toggle { display: none; }
  .site-nav, .js .site-nav { display: block; flex-basis: auto; }
  .header-actions { display: flex; }
}

/* Mobile call / quote bar */
.mobile-bar {
  position: fixed;
  inset: auto 0 0 0;
  z-index: 45;
  display: grid;
  grid-template-columns: 1fr 1.35fr;
  gap: 0.6rem;
  padding: 0.6rem 1rem calc(0.6rem + env(safe-area-inset-bottom));
  background: rgba(250, 247, 242, 0.97);
  border-top: 1px solid var(--line);
  box-shadow: 0 -8px 24px -16px rgba(22, 35, 59, 0.35);
}
.mobile-bar .btn { min-height: 3rem; padding-inline: 0.75rem; }
body { padding-bottom: 4.5rem; }

@media (min-width: 56rem) {
  .mobile-bar { display: none; }
  body { padding-bottom: 0; }
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  overflow: hidden;
  background: var(--ink);
  color: var(--white);
}
.hero::after {
  /* soft paint-swatch glow, purely decorative */
  content: "";
  position: absolute;
  right: -12rem; top: -10rem;
  width: 34rem; height: 34rem;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(233, 180, 76, 0.16), transparent);
  pointer-events: none;
}

.hero-inner {
  position: relative;
  z-index: 1;
  display: grid;
  gap: var(--space-6);
  padding-block: clamp(2.5rem, 1.5rem + 4vw, 5.5rem) clamp(3rem, 2rem + 4vw, 6rem);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: var(--space-3);
  font-size: var(--step--1);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
}
.eyebrow::before { content: ""; width: 1.75rem; height: 3px; border-radius: 3px; background: currentColor; }
.on-dark .eyebrow { color: var(--ochre); }

.hero h1 { max-width: 16ch; }

.hl {
  background: linear-gradient(transparent 64%, rgba(233, 180, 76, 0.55) 64%, rgba(233, 180, 76, 0.55) 92%, transparent 92%);
  padding-inline: 0.05em;
}

.hero-lead {
  max-width: 36rem;
  margin-top: var(--space-4);
  font-size: var(--step-1);
  line-height: 1.55;
  color: var(--ink-soft);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-top: var(--space-5);
}

.hero-note {
  margin-top: var(--space-4);
  font-size: var(--step--1);
  color: var(--ink-soft);
}
.hero-note a { color: var(--white); font-weight: 600; }
.hero-note a:hover { color: var(--ochre); }

.hero-media {
  position: relative;
  justify-self: center;
  width: min(100%, 30rem);
  margin: 0 1.25rem 1.25rem 0;
}
.hero-media::before {
  content: "";
  position: absolute;
  inset: 1.25rem -1.25rem -1.25rem 1.25rem;
  border-radius: var(--radius);
  background: var(--ochre);
}
.hero-media img {
  position: relative;
  width: 100%;
  height: auto;
  border-radius: var(--radius);
  box-shadow: 0 24px 48px -20px rgba(0, 0, 0, 0.55);
}

@media (min-width: 56rem) {
  .hero-inner {
    grid-template-columns: 1.15fr 0.85fr;
    align-items: center;
    gap: var(--space-6) clamp(2rem, 5vw, 5rem);
  }
  .hero-media { justify-self: end; }
}

/* ---------- Page hero (inner pages) ---------- */

.page-hero { background: var(--ink); color: var(--white); }
.page-hero .container { padding-block: clamp(2.5rem, 1.5rem + 3vw, 4.5rem); }
.page-hero h1 { max-width: 20ch; }
.page-hero p { max-width: 40rem; margin-top: var(--space-3); font-size: var(--step-1); color: var(--ink-soft); }

/* ---------- Facts strip ---------- */

.facts { background: var(--sand); border-bottom: 1px solid var(--line); }
.facts-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-4) var(--space-5);
  margin: 0;
  padding-block: var(--space-5);
}
.facts-list div { display: grid; gap: 0.2rem; align-content: start; }
.facts-list dt {
  order: 2;
  font-size: var(--step--1);
  color: var(--muted);
}
.facts-list dd {
  order: 1;
  margin: 0;
  font-family: var(--font-serif);
  font-size: var(--step-1);
  font-weight: 700;
  line-height: 1.25;
  color: var(--ink);
}
@media (min-width: 56rem) {
  .facts-list { grid-template-columns: repeat(4, 1fr); }
  .facts-list div + div { border-left: 1px solid var(--line); padding-left: var(--space-5); }
}

/* ---------- Sections ---------- */

.section { padding-block: var(--space-7); }
.section-alt { background: var(--sand); }

.section-head { max-width: 42rem; margin-bottom: var(--space-6); }
.section-head p { margin-top: var(--space-3); font-size: var(--step-1); color: var(--muted); }

/* Services */
.service-grid {
  display: grid;
  gap: var(--space-5);
}
@media (min-width: 40rem) {
  .service-grid { grid-template-columns: repeat(2, 1fr); }
}

.service-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.service-card:hover { transform: translateY(-3px); box-shadow: 0 1px 2px rgba(22, 35, 59, 0.06), 0 22px 40px -16px rgba(22, 35, 59, 0.3); }
.service-card img { width: 100%; height: auto; aspect-ratio: 3 / 2; background: var(--sand); }

.service-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: var(--space-2);
  padding: var(--space-4) var(--space-4) var(--space-5);
  border-top: 4px solid var(--ochre);
}
.service-body h3 { color: var(--ink); }
.service-body p { color: var(--muted); }

.card-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: auto;
  padding-top: var(--space-3);
  font-weight: 700;
  text-decoration: none;
}
.card-link span { transition: transform 0.2s ease; }
.card-link:hover span { transform: translateX(4px); }

/* About */
.about {
  display: grid;
  gap: var(--space-6);
  align-items: center;
}
@media (min-width: 56rem) {
  .about { grid-template-columns: 1fr 1fr; gap: clamp(2.5rem, 6vw, 5.5rem); }
}
.about-media img { width: 100%; height: auto; border-radius: var(--radius); box-shadow: var(--shadow); }
.about-copy > * + * { margin-top: var(--space-4); }
.about-copy p { color: var(--muted); }

.pull-quote {
  margin: var(--space-5) 0 0;
  padding: var(--space-4) var(--space-4) var(--space-4) var(--space-5);
  border-left: 4px solid var(--accent);
  background: var(--white);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}
.pull-quote p {
  font-family: var(--font-serif);
  font-size: var(--step-1);
  line-height: 1.5;
  color: var(--ink);
}
.pull-quote footer { margin-top: var(--space-2); font-size: var(--step--1); font-weight: 600; color: var(--muted); }

.values {
  display: grid;
  gap: var(--space-3);
  margin: var(--space-5) 0 0;
  padding: 0;
  list-style: none;
}
.values li { display: grid; grid-template-columns: auto 1fr; gap: 0.2rem 0.85rem; }
.values svg { grid-row: span 2; width: 1.6rem; height: 1.6rem; margin-top: 0.1rem; color: var(--accent); }
.values strong { color: var(--ink); }
.values span { color: var(--muted); }

/* Steps */
.steps {
  display: grid;
  gap: var(--space-4);
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}
@media (min-width: 48rem) { .steps { grid-template-columns: repeat(3, 1fr); } }
.steps li {
  counter-increment: step;
  position: relative;
  padding: var(--space-5) var(--space-4) var(--space-4);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.steps li::before {
  content: counter(step);
  display: grid;
  place-items: center;
  width: 2.5rem; height: 2.5rem;
  margin-bottom: var(--space-3);
  border-radius: 50%;
  background: var(--ink);
  color: var(--ochre);
  font-family: var(--font-serif);
  font-size: 1.2rem;
  font-weight: 700;
}
.steps h3 { font-size: var(--step-1); color: var(--ink); }
.steps p { margin-top: var(--space-1); color: var(--muted); }

/* CTA band */
.cta-band { background: var(--ink); color: var(--white); }
.cta-band .container {
  display: grid;
  gap: var(--space-4);
  align-items: center;
  padding-block: var(--space-6);
}
.cta-band h2 { font-size: var(--step-3); }
.cta-band p { margin-top: var(--space-2); color: var(--ink-soft); }
.cta-band .hero-actions { margin-top: 0; }
@media (min-width: 56rem) {
  .cta-band .container { grid-template-columns: 1fr auto; }
}

/* ---------- Quote / contact ---------- */

.quote {
  display: grid;
  gap: var(--space-6);
}
@media (min-width: 56rem) {
  .quote { grid-template-columns: 0.85fr 1.15fr; gap: clamp(2.5rem, 5vw, 4.5rem); align-items: start; }
}

.quote-intro > * + * { margin-top: var(--space-4); }
.quote-intro > p { color: var(--muted); font-size: var(--step-1); }

.contact-list {
  display: grid;
  gap: var(--space-3);
  margin: var(--space-5) 0 0;
  padding: 0;
  list-style: none;
}
.contact-list a, .contact-list .contact-item {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: var(--space-3) var(--space-4);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--ink);
  text-decoration: none;
  overflow-wrap: anywhere;
}
.contact-list a:hover { border-color: var(--accent); color: var(--accent); }
.contact-list svg { width: 1.4rem; height: 1.4rem; flex: none; color: var(--accent); }
.contact-list small { display: block; font-size: var(--step--1); color: var(--muted); }
.contact-list strong { display: block; font-size: 1.075rem; }

.next-steps { margin: var(--space-5) 0 0; padding-left: 1.25rem; color: var(--muted); }
.next-steps li + li { margin-top: 0.35rem; }
.next-steps li::marker { color: var(--accent); font-weight: 700; }

.form-card {
  padding: clamp(1.25rem, 0.8rem + 2vw, 2.5rem);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.form-card h3 { color: var(--ink); }
.form-card > p { margin-top: var(--space-1); color: var(--muted); }

.form-grid {
  display: grid;
  gap: var(--space-4) var(--space-3);
  margin-top: var(--space-5);
}
@media (min-width: 36rem) {
  .form-grid { grid-template-columns: 1fr 1fr; }
  .field-full { grid-column: 1 / -1; }
}

.field label {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--ink);
}
.field .req { font-weight: 500; color: var(--muted); }

.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 3rem;
  padding: 0.7rem 0.9rem;
  border: 1.5px solid var(--field);
  border-radius: var(--radius-sm);
  background: var(--white);
  color: var(--text);
  font: inherit;
  font-size: 1rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.field select {
  appearance: none;
  padding-right: 2.5rem;
  background-image: linear-gradient(45deg, transparent 50%, var(--ink) 50%), linear-gradient(135deg, var(--ink) 50%, transparent 50%);
  background-position: calc(100% - 1.25rem) 55%, calc(100% - 0.9rem) 55%;
  background-size: 0.35rem 0.35rem;
  background-repeat: no-repeat;
}
.field textarea { min-height: 8.5rem; resize: vertical; }
.field input:hover, .field select:hover, .field textarea:hover { border-color: var(--ink); }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(184, 71, 31, 0.22);
}
.field input:user-invalid, .field textarea:user-invalid { border-color: #b3261e; }

.hp-field { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.form-footer { display: grid; gap: var(--space-3); margin-top: var(--space-4); }
.form-footer .cf-turnstile { min-height: 65px; }
.form-privacy { font-size: var(--step--1); color: var(--muted); }

.form-status { font-weight: 600; }
.form-status:empty { display: none; }
.form-status {
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--sand);
}
.form-status[data-state="success"] { border-color: #b7dcc6; background: #eaf6ef; color: var(--success); }
.form-status[data-state="error"] { border-color: #efc4b3; background: var(--accent-soft); color: #7a2e12; }
.form-status a { color: inherit; }

/* ---------- Footer ---------- */

.site-footer { background: var(--ink); color: var(--ink-soft); font-size: 0.975rem; }
.site-footer a { color: var(--white); text-decoration: none; }
.site-footer a:hover { color: var(--ochre); text-decoration: underline; }

.footer-grid {
  display: grid;
  gap: var(--space-5);
  padding-block: var(--space-6) var(--space-5);
}
@media (min-width: 48rem) { .footer-grid { grid-template-columns: 1.4fr 1fr 1fr; } }

.footer-brand .brand { color: var(--white); }
.footer-brand .brand-tag { color: var(--ink-soft); }
.footer-brand p { max-width: 24rem; margin-top: var(--space-3); }

.footer-title {
  margin-bottom: var(--space-2);
  font-family: var(--font-sans);
  font-size: var(--step--1);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ochre);
}
.footer-list { display: grid; gap: 0.45rem; margin: 0; padding: 0; list-style: none; }

.footer-fine {
  display: grid;
  gap: 0.35rem;
  padding-block: var(--space-4);
  border-top: 1px solid rgba(200, 210, 229, 0.18);
  font-size: var(--step--1);
  color: #aab5ca;
}
.footer-fine a { color: #d7deec; text-decoration: underline; text-decoration-color: rgba(215, 222, 236, 0.4); }
