/* ============================================================
   Franks Painting — light blue and white, hand-marked type,
   full-bleed photography, grain overlay, hyper-still.
   ============================================================ */

:root {
  --bg:        #f7fafc;
  --bg-deep:   #e8f1f7;
  --surface:   #ffffff;
  --ink:       #12283a;
  --ink-soft:  #4a6478;
  --rule:      #c3d8e6;
  --a:         #2f7fb5;  /* mid blue */
  --b:         #1f6a9c;  /* label blue — darkened for contrast on tinted panels */
  --c:         #1b5e8c;  /* deep blue */
  --grain-opacity: 0.05;
  --grain-blend: multiply;
  --shadow: 0 1px 0 rgba(18, 40, 58, 0.08);
  --measure: 62ch;
}

html[data-theme="dark"] {
  --bg:        #0d1a24;
  --bg-deep:   #0a141c;
  --surface:   #14252f;
  --ink:       #eaf3f9;
  --ink-soft:  #a8c2d4;
  --rule:      #2b4457;
  --a:         #6fb6e0;
  --b:         #9ed2f0;
  --c:         #8ecdf2;
  --grain-opacity: 0.07;
  --grain-blend: screen;
  --shadow: 0 1px 0 rgba(0, 0, 0, 0.4);
}

/* ---------- reset / base ---------- */

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: "Karla", system-ui, -apple-system, sans-serif;
  font-size: clamp(1rem, 0.95rem + 0.25vw, 1.075rem);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* grain overlay — the whole page sits under a film of noise */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: var(--grain-opacity);
  mix-blend-mode: var(--grain-blend);
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/><feColorMatrix type='saturate' values='0'/></filter><rect width='220' height='220' filter='url(%23n)'/></svg>");
  background-size: 220px 220px;
}

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

a { color: var(--c); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--a); }

h1, h2, h3 {
  font-family: "Fraunces", Georgia, serif;
  font-weight: 900;
  line-height: 1.04;
  letter-spacing: -0.015em;
  margin: 0 0 0.5em;
  text-wrap: balance;
}

h1 { font-size: clamp(2.4rem, 1.4rem + 5.2vw, 5.2rem); }
h2 { font-size: clamp(1.85rem, 1.2rem + 2.8vw, 3.4rem); }
h3 { font-size: clamp(1.15rem, 1rem + 0.7vw, 1.45rem); font-weight: 600; letter-spacing: -0.005em; }

p { margin: 0 0 1.1em; max-width: var(--measure); text-wrap: pretty; }

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

/* ---------- hand-drawn scribble mark ---------- */

mark.scribble {
  background: none;
  color: inherit;
  position: relative;
  white-space: nowrap;
  padding-bottom: 0.06em;
}

mark.scribble::after {
  content: "";
  position: absolute;
  left: -0.06em;
  right: -0.06em;
  bottom: -0.12em;
  height: 0.42em;
  background-repeat: no-repeat;
  background-size: 100% 100%;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 24' preserveAspectRatio='none'><path d='M3 15c22-7 44-9 66-6 20 2.6 38 8 58 6 22-2 44-9 70-11' fill='none' stroke='%231b5e8c' stroke-width='4' stroke-linecap='round'/></svg>");
}

html[data-theme="dark"] mark.scribble::after {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 24' preserveAspectRatio='none'><path d='M3 15c22-7 44-9 66-6 20 2.6 38 8 58 6 22-2 44-9 70-11' fill='none' stroke='%238ecdf2' stroke-width='4' stroke-linecap='round'/></svg>");
}

/* ---------- shared bits ---------- */

.eyebrow {
  font-family: "Karla", sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--b);
  margin: 0 0 0.9em;
}

html[data-theme="dark"] .eyebrow { color: var(--b); }

.btn {
  display: inline-block;
  font-family: "Karla", sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  padding: 0.85rem 1.5rem;
  min-height: 44px;
  background: var(--ink);
  color: var(--bg);
  border: 2px solid var(--ink);
  border-radius: 2px;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 160ms ease, color 160ms ease, border-color 160ms ease;
}

.btn:hover { background: var(--c); border-color: var(--c); color: #ffffff; }

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--ink);
}

.btn-ghost:hover { background: var(--ink); color: var(--bg); border-color: var(--ink); }

/* ---------- top bar ---------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 1rem 1.5rem;
  flex-wrap: wrap;
  padding: 0.7rem clamp(1rem, 4vw, 2.5rem);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--rule);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  text-decoration: none;
  color: var(--ink);
  margin-right: auto;
}

.brand-mark { display: block; width: 30px; height: 30px; color: var(--c); }
.brand-mark svg { width: 100%; height: 100%; display: block; }

.brand-text {
  font-family: "Fraunces", Georgia, serif;
  font-weight: 900;
  font-size: 1.12rem;
  letter-spacing: -0.01em;
}

.nav { display: flex; flex-wrap: wrap; gap: 0.35rem 1.15rem; }

.nav a {
  color: var(--ink);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 500;
  padding: 0.55rem 0.15rem;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  border-bottom: 2px solid transparent;
  transition: border-color 160ms ease, color 160ms ease;
}

.nav a:hover { color: var(--c); border-bottom-color: var(--c); }

.theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 44px;
  padding: 0.5rem 0.85rem;
  background: transparent;
  border: 1px solid var(--rule);
  border-radius: 2px;
  color: var(--ink);
  font-family: "Karla", sans-serif;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: border-color 160ms ease, color 160ms ease;
}

.theme-toggle:hover { border-color: var(--ink); }

.theme-toggle-icon {
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: var(--a);
  box-shadow: inset -4px -3px 0 0 var(--bg);
}

html[data-theme="dark"] .theme-toggle-icon {
  background: var(--a);
  box-shadow: none;
}

/* ---------- hero ---------- */

.hero { padding-bottom: clamp(2.5rem, 6vw, 5rem); }

.hero-media img {
  width: 100%;
  height: clamp(320px, 58vh, 640px);
  object-fit: cover;
  filter: saturate(0.86) contrast(1.03);
}

.hero-copy {
  max-width: 1180px;
  margin: 0 auto;
  padding: clamp(2rem, 5vw, 3.5rem) clamp(1.25rem, 5vw, 3rem) 0;
}

.hero-copy h1 { margin-bottom: 0.7em; }

.lede {
  font-size: clamp(1.05rem, 1rem + 0.5vw, 1.3rem);
  color: var(--ink-soft);
  max-width: 54ch;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 1.8rem 0 2.4rem;
}

.hero-facts,
.contact-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem 2.75rem;
  margin: 0;
  padding-top: 1.5rem;
  border-top: 1px solid var(--rule);
}

.hero-facts dt,
.contact-facts dt {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--b);
  margin-bottom: 0.2rem;
}

.hero-facts dd,
.contact-facts dd { margin: 0; font-size: 0.98rem; }

/* ---------- section shell ---------- */

section { padding: clamp(3rem, 8vw, 6rem) 0; }

.section-head {
  max-width: 1180px;
  margin: 0 auto clamp(2rem, 4vw, 3rem);
  padding: 0 clamp(1.25rem, 5vw, 3rem);
}

.section-intro { color: var(--ink-soft); max-width: 58ch; }

/* ---------- full-bleed gallery ---------- */

.gallery {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: clamp(0.75rem, 2vw, 1.5rem);
  padding: 0 clamp(1.25rem, 5vw, 3rem);
}

.gallery-item { margin: 0; grid-column: 1 / -1; }

.gallery-item img {
  width: 100%;
  object-fit: cover;
  filter: saturate(0.86) contrast(1.03);
  aspect-ratio: 16 / 10;
}

.gallery-item.half img { aspect-ratio: 1 / 1; }

.gallery-item figcaption {
  margin-top: 0.7rem;
  font-size: 0.92rem;
  color: var(--ink-soft);
  max-width: 62ch;
}

.cap-title { color: var(--ink); font-weight: 700; }

@media (min-width: 760px) {
  .gallery-item.half { grid-column: span 6; }
}

/* ---------- services ---------- */

.cards {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 clamp(1.25rem, 5vw, 3rem);
  display: grid;
  grid-template-columns: 1fr;
  gap: 1px;
  background: var(--rule);
  border: 1px solid var(--rule);
}

@media (min-width: 700px) { .cards { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1040px) { .cards { grid-template-columns: repeat(3, 1fr); } }

.card {
  background: var(--surface);
  padding: clamp(1.4rem, 3vw, 2rem);
}

.card h3 { margin-bottom: 0.55em; color: var(--ink); }
.card p { margin: 0; font-size: 0.96rem; color: var(--ink-soft); max-width: none; }

/* ---------- process ---------- */

.process { background: var(--bg-deep); }

.steps {
  list-style: none;
  counter-reset: none;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 clamp(1.25rem, 5vw, 3rem);
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(1.5rem, 3vw, 2.5rem);
}

@media (min-width: 700px) { .steps { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1040px) { .steps { grid-template-columns: repeat(3, 1fr); } }

.steps li { border-top: 2px solid var(--ink); padding-top: 0.9rem; }

.step-num {
  display: block;
  font-family: "Fraunces", Georgia, serif;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--c);
  margin-bottom: 0.5rem;
}

.steps h3 { margin-bottom: 0.4em; }
.steps p { margin: 0; font-size: 0.95rem; color: var(--ink-soft); max-width: none; }

/* ---------- about ---------- */

.about {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(1.75rem, 4vw, 3rem);
  max-width: 1180px;
  margin: 0 auto;
  padding-left: clamp(1.25rem, 5vw, 3rem);
  padding-right: clamp(1.25rem, 5vw, 3rem);
}

@media (min-width: 860px) {
  .about { grid-template-columns: 5fr 6fr; align-items: start; }
}

.about-media img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  filter: saturate(0.86) contrast(1.03);
}

.about-copy p { color: var(--ink-soft); }
.about-copy p:first-of-type { color: var(--ink); }

.about-list {
  list-style: none;
  margin: 1.6rem 0;
  padding: 0;
  display: grid;
  gap: 0.5rem;
}

.about-list li {
  padding-left: 1.6rem;
  position: relative;
  font-size: 0.96rem;
}

.about-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 0.85rem;
  height: 2px;
  background: var(--c);
}

.about-note {
  font-size: 0.95rem;
  font-style: italic;
  color: var(--ink-soft);
  border-left: 3px solid var(--a);
  padding-left: 1rem;
}

/* ---------- faq ---------- */

.faq { background: var(--bg-deep); }

.faq-list {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 clamp(1.25rem, 5vw, 3rem);
}

.faq-list details {
  border-bottom: 1px solid var(--rule);
}

.faq-list details:first-child { border-top: 1px solid var(--rule); }

.faq-list summary {
  cursor: pointer;
  padding: 1.15rem 2rem 1.15rem 0;
  font-family: "Fraunces", Georgia, serif;
  font-size: clamp(1.02rem, 0.98rem + 0.3vw, 1.2rem);
  font-weight: 600;
  list-style: none;
  position: relative;
  min-height: 44px;
  transition: color 160ms ease;
}

.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary:hover { color: var(--c); }

.faq-list summary::after {
  content: "+";
  position: absolute;
  right: 0.15rem;
  top: 50%;
  transform: translateY(-50%);
  font-family: "Karla", sans-serif;
  font-size: 1.3rem;
  font-weight: 400;
  color: var(--c);
}

.faq-list details[open] summary::after { content: "–"; }

.faq-list details p {
  margin: 0 0 1.3rem;
  color: var(--ink-soft);
  font-size: 0.97rem;
  max-width: 68ch;
}

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

.contact {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(2rem, 5vw, 3.5rem);
  max-width: 1180px;
  margin: 0 auto;
  padding-left: clamp(1.25rem, 5vw, 3rem);
  padding-right: clamp(1.25rem, 5vw, 3rem);
}

@media (min-width: 900px) {
  .contact { grid-template-columns: 5fr 6fr; align-items: start; }
}

.contact-copy p { color: var(--ink-soft); }
.contact-facts { flex-direction: column; gap: 1.1rem; }

.contact-form {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.1rem;
  background: var(--surface);
  border: 1px solid var(--rule);
  padding: clamp(1.4rem, 3vw, 2.2rem);
}

@media (min-width: 620px) {
  .contact-form { grid-template-columns: 1fr 1fr; }
  .field-wide { grid-column: 1 / -1; }
}

.field { display: flex; flex-direction: column; gap: 0.4rem; }

.field label {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--b);
}

.optional { text-transform: none; letter-spacing: 0; font-weight: 400; color: var(--ink-soft); }

.field input,
.field select,
.field textarea {
  font-family: "Karla", sans-serif;
  font-size: 1rem;
  color: var(--ink);
  background: var(--bg);
  border: 1px solid var(--rule);
  border-radius: 2px;
  padding: 0.7rem 0.8rem;
  min-height: 44px;
  width: 100%;
}

.field textarea { resize: vertical; min-height: 120px; }

.field input:focus-visible,
.field select:focus-visible,
.field textarea:focus-visible {
  outline: 3px solid var(--c);
  outline-offset: 1px;
  border-color: var(--c);
}

.form-status {
  margin: 0.9rem 0 0;
  font-size: 0.95rem;
  color: var(--b);
  max-width: none;
}

.form-status.is-error { color: var(--c); }

/* ---------- footer ---------- */

.site-footer {
  background: var(--ink);
  color: var(--bg);
  padding: clamp(2.5rem, 6vw, 4rem) clamp(1.25rem, 5vw, 3rem) clamp(4rem, 8vw, 5rem);
}

html[data-theme="dark"] .site-footer { background: var(--bg-deep); color: var(--ink); }

.footer-inner { max-width: 1180px; margin: 0 auto; }

.footer-brand {
  font-family: "Fraunces", Georgia, serif;
  font-weight: 900;
  font-size: clamp(1.5rem, 1.2rem + 1.4vw, 2.2rem);
  margin: 0 0 0.3em;
  max-width: none;
}

.footer-line { color: inherit; opacity: 0.85; margin-bottom: 1.4rem; }

.footer-meta { font-size: 0.92rem; opacity: 0.85; margin: 0; max-width: none; }

.site-footer a { color: inherit; }
.site-footer a:hover { color: var(--a); }

.attribution {
  position: static;
  margin: 2.2rem 0 0;
  font-size: 0.78rem;
  opacity: 1;
  color: inherit;
  filter: opacity(0.72);
}

.attribution a { color: inherit; text-decoration: underline; }

/* ---------- page header (inner pages) ---------- */

.page-head {
  max-width: 1180px;
  margin: 0 auto;
  padding: clamp(2.5rem, 6vw, 4.5rem) clamp(1.25rem, 5vw, 3rem) 0;
}

.page-head h1 { margin-bottom: 0.55em; }

/* ---------- pricing ---------- */

.pricing-note {
  max-width: 1180px;
  margin: 0 auto clamp(2rem, 4vw, 3rem);
  padding: 0 clamp(1.25rem, 5vw, 3rem);
}

.pricing-note p {
  border-left: 3px solid var(--a);
  padding-left: 1rem;
  color: var(--ink-soft);
  font-size: 0.97rem;
}

.rate-table {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 clamp(1.25rem, 5vw, 3rem);
  border-collapse: collapse;
  width: 100%;
  display: block;
  overflow-x: auto;
}

.rate-table table { width: 100%; border-collapse: collapse; min-width: 520px; }

.rate-table th,
.rate-table td {
  text-align: left;
  padding: 0.95rem 1rem 0.95rem 0;
  border-bottom: 1px solid var(--rule);
  vertical-align: top;
  font-size: 0.97rem;
}

.rate-table th {
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--b);
  border-bottom: 2px solid var(--ink);
}

.rate-table td:last-child,
.rate-table th:last-child { text-align: right; padding-right: 0; white-space: nowrap; }

.rate-table .rate-name { font-weight: 700; color: var(--ink); }
.rate-table .rate-detail { display: block; color: var(--ink-soft); font-size: 0.9rem; margin-top: 0.2rem; }

.price {
  font-family: "Fraunces", Georgia, serif;
  font-weight: 600;
  color: var(--c);
  white-space: nowrap;
}

.price-placeholder {
  font-family: "Karla", sans-serif;
  font-weight: 700;
  font-size: 0.86rem;
  color: var(--ink-soft);
  border-bottom: 2px dotted var(--a);
  padding-bottom: 1px;
}

.pricing-blocks {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 clamp(1.25rem, 5vw, 3rem);
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(1.5rem, 3vw, 2.5rem);
}

@media (min-width: 780px) { .pricing-blocks { grid-template-columns: repeat(2, 1fr); } }

.pricing-block {
  background: var(--surface);
  border: 1px solid var(--rule);
  padding: clamp(1.4rem, 3vw, 2rem);
}

.pricing-block h3 { margin-bottom: 0.6em; }
.pricing-block p { color: var(--ink-soft); font-size: 0.96rem; max-width: none; }
.pricing-block p:last-child { margin-bottom: 0; }

.pricing-block ul {
  margin: 0 0 1.1rem;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.45rem;
}

.pricing-block li {
  position: relative;
  padding-left: 1.5rem;
  font-size: 0.95rem;
  color: var(--ink-soft);
}

.pricing-block li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 0.8rem;
  height: 2px;
  background: var(--a);
}

/* ---------- paint calculator ---------- */

.calc {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 clamp(1.25rem, 5vw, 3rem);
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(1.75rem, 4vw, 3rem);
}

@media (min-width: 900px) {
  .calc { grid-template-columns: 6fr 5fr; align-items: start; }
}

.calc-form {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.1rem;
  background: var(--surface);
  border: 1px solid var(--rule);
  padding: clamp(1.4rem, 3vw, 2.2rem);
}

@media (min-width: 620px) {
  .calc-form { grid-template-columns: 1fr 1fr; }
  .calc-form .field-wide { grid-column: 1 / -1; }
}

.calc-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

.calc-results {
  border: 1px solid var(--rule);
  background: var(--bg-deep);
  padding: clamp(1.4rem, 3vw, 2.2rem);
}

.calc-results h3 { margin-bottom: 0.7em; }

.calc-empty { color: var(--ink-soft); font-size: 0.96rem; margin: 0; max-width: none; }

.calc-out {
  list-style: none;
  margin: 0 0 1.2rem;
  padding: 0;
  display: grid;
  gap: 0.85rem;
}

.calc-out li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  border-bottom: 1px solid var(--rule);
  padding-bottom: 0.7rem;
}

.calc-out .calc-label {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--b);
}

.calc-out .calc-value {
  font-family: "Fraunces", Georgia, serif;
  font-size: clamp(1.25rem, 1.1rem + 0.7vw, 1.7rem);
  font-weight: 600;
  color: var(--ink);
  text-align: right;
}

.calc-out .calc-value small {
  display: block;
  font-family: "Karla", sans-serif;
  font-size: 0.82rem;
  font-weight: 400;
  color: var(--ink-soft);
  letter-spacing: 0;
}

.calc-note { font-size: 0.9rem; color: var(--ink-soft); margin: 0 0 1.2rem; max-width: none; }

.calc-error {
  margin: 0;
  font-size: 0.95rem;
  color: var(--c);
  font-weight: 700;
}

/* ---------- motion: hyper-stillness ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
