/* =====================================================
   RPK Constructions — "Lime & Slate"
   Irish vernacular building: limewash, slate, oxide iron —
   read through a builder's site docket: stamped codes,
   rounded job photos, a yard record kept properly.
   ===================================================== */

:root {
  /* Surfaces — limewashed paper + slate */
  --paper:      #EDE6D8;
  --paper-2:    #E4DBCA;
  --paper-3:    #F4EFE5;
  --slate:      #232823;
  --slate-2:    #2E3730;

  /* Brand accents */
  --moss:       #3C4A3A;
  --moss-dim:   #55654F;
  --moss-soft:  rgba(60, 74, 58, 0.10);
  --oxide:      #8F4021;
  --oxide-dim:  #6E3119;
  --oxide-soft: rgba(143, 65, 33, 0.10);
  --oxide-bright: #DB8565; /* oxide, lifted for accessible text on slate (footer/callout headings) */
  --lime:       #C9BFA6;

  /* Text */
  --ink:        #232823;
  --ink-dim:    #4B534A;
  --ink-muted:  #5F6658;
  --on-slate:   #E9E2D3;
  --on-slate-dim: #A7AC9C;

  /* Borders */
  --rule:       rgba(35, 40, 35, 0.16);
  --rule-soft:  rgba(35, 40, 35, 0.09);
  --rule-slate: rgba(233, 226, 211, 0.14);

  /* Type */
  --font-body:    'Newsreader', Georgia, 'Times New Roman', serif;
  --font-display: 'Archivo', system-ui, -apple-system, Segoe UI, sans-serif;
  --font-mono:    'Spline Sans Mono', ui-monospace, 'SF Mono', Menlo, monospace;

  /* Motion */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --dur-quick: 220ms;
  --dur-base: 460ms;

  /* Radius */
  --r-sm:   10px;
  --r-md:   18px;
  --r-lg:   28px;
  --r-pill: 999px;

  /* Shadow — warm, slate-tinted, never pure black */
  --shadow-sm: 0 2px 10px rgba(35, 24, 15, 0.07);
  --shadow-md: 0 12px 28px rgba(35, 24, 15, 0.12);
  --shadow-lg: 0 26px 60px rgba(35, 24, 15, 0.18);
  --shadow-oxide: 0 14px 32px rgba(143, 65, 33, 0.28);

  /* Layout */
  --nav-height: 74px;
  --max-content: 1200px;
  --gutter: clamp(1.25rem, 4vw, 3rem);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 1.02rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
::selection { background: var(--oxide); color: var(--paper); }

/* ============ Atoms ============ */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--oxide);
  display: inline-flex; align-items: center; gap: 0.6rem;
}
.eyebrow::before { content: ""; width: 26px; height: 1px; background: var(--oxide); }

/* Stamp — the site-docket motif: a builder's timber stamp, dashed & rotated */
.stamp-chip {
  display: inline-flex; align-items: center; gap: 0.4rem;
  font-family: var(--font-mono); font-size: 0.68rem; font-weight: 500;
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--oxide);
  border: 1.5px dashed var(--oxide); border-radius: var(--r-pill);
  padding: 0.4rem 0.85rem; background: var(--paper-3);
  transform: rotate(-3deg);
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--ink);
}
h1 em, h2 em, h3 em {
  font-style: italic;
  font-family: var(--font-body);
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--oxide);
}

/* ============ Scroll progress + reveal ============ */
.scroll-progress {
  position: fixed; top: 0; left: 0; height: 3px; width: 100%;
  background: var(--oxide); z-index: 200; transform: scaleX(0); transform-origin: left;
  transition: transform 60ms linear;
}
[data-reveal], [data-stagger] > * {
  opacity: 0; transform: translateY(22px);
  transition: opacity var(--dur-base) var(--ease), transform var(--dur-base) var(--ease);
}
[data-reveal="left"]  { transform: translateX(-28px); }
[data-reveal="right"] { transform: translateX(28px); }
[data-reveal].is-visible, [data-stagger].is-visible > * { opacity: 1; transform: none; }
[data-stagger].is-visible > *:nth-child(2) { transition-delay: 80ms; }
[data-stagger].is-visible > *:nth-child(3) { transition-delay: 160ms; }
[data-stagger].is-visible > *:nth-child(4) { transition-delay: 240ms; }
[data-stagger].is-visible > *:nth-child(5) { transition-delay: 320ms; }
[data-stagger].is-visible > *:nth-child(6) { transition-delay: 400ms; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  [data-reveal], [data-stagger] > * { opacity: 1; transform: none; }
}

/* ============ Header ============ */
header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(237, 230, 216, 0.88); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--rule); transition: transform var(--dur-base) var(--ease);
}
header.hidden { transform: translateY(-100%); }
.nav {
  max-width: var(--max-content); margin: 0 auto; height: var(--nav-height);
  padding: 0 var(--gutter); display: flex; align-items: center; justify-content: space-between;
}
.brand { display: flex; align-items: center; gap: 0.7rem; }
.brand-logo { width: 34px; height: 34px; object-fit: contain; border-radius: 50%; box-shadow: var(--shadow-sm); }
.brand-mark {
  font-family: var(--font-display); font-weight: 800; font-size: 1.05rem;
  letter-spacing: -0.02em; color: var(--ink); line-height: 1;
}
.brand-mark em { color: var(--oxide); font-style: normal; }
.brand-mark.big { font-size: 1.5rem; }
header nav { display: flex; align-items: center; gap: 1.7rem; }
header nav a {
  font-family: var(--font-mono); font-size: 0.78rem; letter-spacing: 0.04em;
  color: var(--ink-dim); text-transform: uppercase; transition: color var(--dur-quick) var(--ease);
}
header nav a:hover { color: var(--oxide); }
.cta-btn {
  background: var(--slate) !important; color: var(--on-slate) !important;
  padding: 0.7rem 1.3rem !important; border-radius: var(--r-pill) !important;
  transition: background var(--dur-quick) var(--ease), transform var(--dur-quick) var(--ease), box-shadow var(--dur-quick) var(--ease) !important;
}
.cta-btn:hover { background: var(--oxide) !important; color: var(--paper) !important; transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.nav-toggle { display: none; flex-direction: column; gap: 5px; padding: 6px; }
.nav-toggle span { width: 24px; height: 2px; background: var(--ink); transition: var(--dur-quick); border-radius: 2px; }
.nav-toggle.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.is-open span:nth-child(2) { opacity: 0; }
.nav-toggle.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ============ Section scaffold ============ */
section {
  padding: clamp(2.75rem, 5vw, 4.25rem) var(--gutter);
  max-width: var(--max-content); margin: 0 auto; position: relative;
}
section + section { border-top: 1px solid var(--rule); }
.section-head {
  display: flex; justify-content: space-between; align-items: flex-end;
  gap: 2rem; margin-bottom: clamp(1.75rem, 3.5vw, 2.5rem);
}
.section-head h2 { font-size: clamp(2.2rem, 5.5vw, 3.6rem); margin: 0.6rem 0 0.7rem; line-height: 0.98; }
.section-head .sub { max-width: 46ch; color: var(--ink-dim); font-size: 1.05rem; }
.ghost-link {
  font-family: var(--font-mono); font-size: 0.76rem; text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--ink-dim); display: inline-flex; align-items: center; gap: 0.5rem; white-space: nowrap;
  padding-bottom: 4px; border-bottom: 1px solid var(--rule);
  transition: color var(--dur-quick) var(--ease), border-color var(--dur-quick);
}
.ghost-link:hover { color: var(--oxide); border-color: var(--oxide); }
.ghost-link svg { transition: transform var(--dur-quick) var(--ease); }
.ghost-link:hover svg { transform: translateX(4px); }

/* ============ Hero ============ */
.hero { padding-top: clamp(2.5rem, 6vw, 4.5rem); }
.hero-grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: clamp(2rem, 6vw, 5rem); align-items: center; }
.hero-copy .eyebrow { margin-bottom: 1.4rem; }
.hero-copy h1 { font-size: clamp(2.8rem, 8vw, 5.2rem); margin-bottom: 1.4rem; }
.lede { font-size: 1.18rem; color: var(--ink-dim); max-width: 42ch; margin-bottom: 2rem; }
.actions { display: flex; flex-wrap: wrap; gap: 0.9rem; margin-bottom: 2.6rem; }
.primary {
  display: inline-flex; align-items: center; gap: 0.6rem; background: var(--oxide); color: var(--paper);
  font-family: var(--font-mono); font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.08em;
  padding: 1rem 1.6rem; border-radius: var(--r-pill); box-shadow: var(--shadow-oxide);
  transition: background var(--dur-quick) var(--ease), transform var(--dur-quick), box-shadow var(--dur-quick) var(--ease);
}
.primary:hover { background: var(--oxide-dim); transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.outline {
  display: inline-flex; align-items: center; border: 1.5px solid var(--slate); color: var(--slate);
  font-family: var(--font-mono); font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.08em;
  padding: 1rem 1.6rem; border-radius: var(--r-pill);
  transition: background var(--dur-quick) var(--ease), color var(--dur-quick), transform var(--dur-quick), box-shadow var(--dur-quick) var(--ease);
}
.outline:hover { background: var(--slate); color: var(--paper); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.trust-row {
  list-style: none; display: flex; flex-wrap: wrap; gap: 0.8rem;
}
.trust-row li {
  display: flex; align-items: center; gap: 0.6rem; font-family: var(--font-mono);
  font-size: 0.74rem; letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink-dim);
  background: var(--paper-3); border: 1px solid var(--rule); border-radius: var(--r-pill);
  padding: 0.65rem 1.1rem;
}
.trust-row svg { color: var(--moss); flex-shrink: 0; }

.hero-media { position: relative; padding: 0 clamp(0.5rem, 3vw, 1.5rem) clamp(2rem, 6vw, 3.5rem) 0; }
.hero-frame {
  position: relative; overflow: hidden; border-radius: var(--r-lg); background: var(--slate);
  aspect-ratio: 4 / 5; box-shadow: var(--shadow-lg);
}
.hero-frame img { width: 100%; height: 100%; object-fit: cover; transform: translateY(var(--hero-parallax, 0)) scale(1.06); filter: saturate(0.94) contrast(1.02); }
.badge {
  position: absolute; left: 1.4rem; bottom: 1.4rem; background: var(--paper); color: var(--ink);
  padding: 0.9rem 1.3rem; display: flex; align-items: center; gap: 0.7rem;
  border-radius: var(--r-md); box-shadow: var(--shadow-md);
}
.badge-num { font-family: var(--font-display); font-weight: 800; font-size: 2.4rem; line-height: 1; color: var(--oxide); }
.badge-num i { font-style: normal; font-size: 1.2rem; vertical-align: super; }
.badge-label { font-family: var(--font-mono); font-size: 0.66rem; line-height: 1.3; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-dim); }

.hero-accent-frame {
  position: absolute; right: -0.5rem; bottom: -1.5rem; width: 46%; max-width: 230px;
  aspect-ratio: 1 / 1; border-radius: var(--r-md); overflow: hidden;
  border: 6px solid var(--paper); box-shadow: var(--shadow-lg); transform: rotate(4deg);
  transition: transform var(--dur-base) var(--ease);
}
.hero-media:hover .hero-accent-frame { transform: rotate(0deg) scale(1.03); }
.hero-accent-frame img { width: 100%; height: 100%; object-fit: cover; filter: saturate(0.94) contrast(1.02); }
.hero-corner {
  position: absolute; top: -0.75rem; right: clamp(0.5rem, 3vw, 1.5rem); z-index: 2;
}

.marquee { margin-top: clamp(2rem, 4vw, 3rem); border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); overflow: hidden; padding: 1.1rem 0; }
.marquee-track { display: flex; gap: 1.6rem; white-space: nowrap; width: max-content; animation: marquee 30s linear infinite; }
.marquee-track span { font-family: var(--font-display); font-weight: 800; font-size: 1.1rem; text-transform: uppercase; letter-spacing: 0.02em; color: var(--ink-muted); }
.marquee-track span:nth-child(even) { color: var(--oxide); }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ============ Services ============ */
.services-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.1rem; }
.service-card {
  position: relative; padding: clamp(1.8rem, 3vw, 2.6rem); background: var(--paper-3);
  border-radius: var(--r-md); box-shadow: var(--shadow-sm);
  transition: box-shadow var(--dur-base) var(--ease), transform var(--dur-base) var(--ease);
}
.service-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-6px); }
.service-num { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.1em; color: var(--ink-muted); position: absolute; top: 1.6rem; right: 1.8rem; }
.service-icon {
  color: var(--oxide); margin-bottom: 1.3rem; width: 52px; height: 52px; display: flex; align-items: center; justify-content: center;
  background: var(--oxide-soft); border-radius: var(--r-sm);
}
.service-card h3 { font-size: 1.5rem; margin-bottom: 0.7rem; }
.service-card p { color: var(--ink-dim); margin-bottom: 1.2rem; }
.service-tag { font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.04em; text-transform: uppercase; color: var(--moss); }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); margin-top: clamp(1.75rem, 3.5vw, 2.75rem); background: var(--slate); color: var(--on-slate); border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow-md); }
.stat { padding: clamp(1.8rem, 3vw, 2.6rem); border-right: 1px solid var(--rule-slate); text-align: left; }
.stat:last-child { border-right: 0; }
.stat-num { font-family: var(--font-display); font-weight: 800; font-size: clamp(2rem, 4vw, 3rem); line-height: 1; color: var(--paper); display: block; margin-bottom: 0.4rem; }
.stat-num i { font-style: normal; color: var(--oxide-bright); }
.stat-label { font-family: var(--font-mono); font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--on-slate-dim); }

/* ============ Projects ============ */
.projects-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.4rem; }
.portfolio-card { background: var(--paper-3); position: relative; overflow: hidden; border-radius: var(--r-md); box-shadow: var(--shadow-sm); transition: box-shadow var(--dur-base) var(--ease); }
.portfolio-card:hover { box-shadow: var(--shadow-lg); }
.portfolio-card .image { overflow: hidden; aspect-ratio: 3 / 2; position: relative; }
.portfolio-card img { width: 100%; height: 100%; object-fit: cover; filter: saturate(0.9) contrast(1.03); transition: transform 700ms var(--ease); }
.portfolio-card:hover img { transform: scale(1.06); }
.portfolio-tag {
  position: absolute; top: 0.9rem; left: 0.9rem; z-index: 2;
  font-family: var(--font-mono); font-size: 0.66rem; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--oxide); background: var(--paper); border: 1.5px dashed var(--oxide); border-radius: var(--r-pill);
  padding: 0.3rem 0.75rem; transform: rotate(-4deg); box-shadow: var(--shadow-sm);
}
.caption { display: flex; align-items: center; gap: 0.8rem; padding: 1.1rem 1.3rem; }
.caption-index { display: none; }
.caption strong { font-family: var(--font-display); font-weight: 700; font-size: 1.02rem; flex: 1; }
.caption .tag { font-family: var(--font-mono); font-size: 0.66rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--paper); background: var(--moss); padding: 0.3rem 0.7rem; border-radius: var(--r-pill); }

/* ============ About ============ */
.about-grid { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: clamp(2rem, 5vw, 4rem); }
.about-lead p { font-size: 1.14rem; margin-bottom: 1.2rem; color: var(--ink-dim); }
.about-lead p:first-child { color: var(--ink); }
.signature { margin-top: 1.5rem; font-family: var(--font-body); font-style: italic; font-size: 1.3rem; color: var(--oxide); }
.about-panels { display: grid; gap: 1.1rem; }
.panel { background: var(--paper-3); padding: clamp(1.6rem, 3vw, 2.3rem); border-radius: var(--r-md); box-shadow: var(--shadow-sm); }
.panel-eyebrow { font-family: var(--font-mono); font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--oxide); margin-bottom: 0.5rem; }
.panel h3 { font-size: 1.4rem; margin-bottom: 1rem; }
.panel ul { list-style: none; }
.panel li { padding: 0.55rem 0 0.55rem 1.4rem; position: relative; border-bottom: 1px solid var(--rule-soft); color: var(--ink-dim); font-size: 0.98rem; }
.panel li:last-child { border-bottom: 0; }
.panel li::before { content: "→"; position: absolute; left: 0; color: var(--oxide); font-family: var(--font-mono); }

/* ============ Process (how a project runs) ============ */
.process-strip { display: grid; grid-template-columns: repeat(5, 1fr); gap: 0; position: relative; }
.process-strip::before {
  content: ""; position: absolute; top: 26px; left: calc(10% / 2); right: calc(10% / 2); height: 1.5px;
  background: repeating-linear-gradient(to right, var(--oxide) 0 8px, transparent 8px 16px); z-index: 0;
}
.process-step { position: relative; z-index: 1; padding: 0 0.8rem; text-align: left; }
.process-num {
  width: 52px; height: 52px; border-radius: 50%; background: var(--paper);
  border: 1.5px dashed var(--oxide); color: var(--oxide); font-family: var(--font-mono); font-weight: 500;
  font-size: 1.1rem; display: flex; align-items: center; justify-content: center; margin-bottom: 1.2rem;
}
.process-step h3 { font-size: 1.12rem; margin-bottom: 0.5rem; letter-spacing: -0.01em; }
.process-step p { color: var(--ink-dim); font-size: 0.94rem; }

/* ============ FAQ ============ */
.faq-list { display: grid; gap: 0.9rem; }
.faq-item { background: var(--paper-3); border-radius: var(--r-md); box-shadow: var(--shadow-sm); overflow: hidden; }
.faq-item summary { display: flex; align-items: center; gap: 1rem; padding: 1.3rem 1.5rem; cursor: pointer; list-style: none; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-num {
  font-family: var(--font-mono); font-size: 0.68rem; color: var(--oxide); letter-spacing: 0.04em;
  border: 1.5px dashed var(--oxide); border-radius: var(--r-pill); padding: 0.3rem 0.6rem; flex-shrink: 0;
}
.faq-q { font-family: var(--font-display); font-weight: 700; font-size: 1.14rem; flex: 1; }
.faq-toggle { position: relative; width: 16px; height: 16px; flex-shrink: 0; }
.faq-toggle::before, .faq-toggle::after { content: ""; position: absolute; background: var(--oxide); transition: transform var(--dur-quick) var(--ease); border-radius: 2px; }
.faq-toggle::before { top: 7px; left: 0; width: 16px; height: 2px; }
.faq-toggle::after  { left: 7px; top: 0; width: 2px; height: 16px; }
.faq-item[open] .faq-toggle::after { transform: scaleY(0); }
.faq-item p { padding: 0 1.5rem 1.5rem 3.5rem; color: var(--ink-dim); max-width: 68ch; }

/* ============ Reviews ============ */
.testimonial-spotlight {
  display: grid; grid-template-columns: auto 1fr; gap: 1.6rem; align-items: flex-start;
  background: var(--slate); color: var(--on-slate); padding: clamp(1.8rem, 4vw, 2.8rem);
  border-radius: var(--r-lg); box-shadow: var(--shadow-lg); margin-bottom: clamp(1.8rem, 4vw, 2.8rem);
}
.testimonial-spotlight .quote-mark { font-family: var(--font-display); font-size: 3.5rem; line-height: 0.6; color: var(--oxide); }
.testimonial-avatar {
  width: 56px; height: 56px; border-radius: 50%; background: var(--oxide); color: var(--paper);
  font-family: var(--font-display); font-weight: 800; font-size: 1.2rem;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.testimonial-spotlight blockquote { font-size: 1.3rem; font-style: italic; line-height: 1.5; margin-bottom: 1rem; color: var(--paper); }
.testimonial-meta { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.testimonial-meta strong { font-family: var(--font-display); font-size: 1.02rem; color: var(--paper); }
.testimonial-meta .stars { color: var(--oxide); letter-spacing: 2px; }
.testimonial-meta span.review-date { color: var(--on-slate-dim); }

.reviews-container { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: clamp(2rem, 4vw, 3.5rem); align-items: start; }
#reviewForm, #contactForm { background: var(--paper-3); border-radius: var(--r-md); box-shadow: var(--shadow-sm); padding: clamp(1.6rem, 3vw, 2.4rem); }
#reviewForm h3 { font-size: 1.5rem; margin-bottom: 1.4rem; }
#reviewForm > div, #contactForm > div { margin-bottom: 1.1rem; }
label { display: block; font-family: var(--font-mono); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-dim); margin-bottom: 0.45rem; }
input, textarea {
  width: 100%; font-family: var(--font-body); font-size: 1rem; color: var(--ink); background: var(--paper);
  border: 1.5px solid var(--rule); border-radius: var(--r-sm); padding: 0.85rem 1rem;
  transition: border-color var(--dur-quick) var(--ease), box-shadow var(--dur-quick) var(--ease);
}
input:focus, textarea:focus { outline: none; border-color: var(--oxide); box-shadow: 0 0 0 4px var(--oxide-soft); }
textarea { min-height: 120px; resize: vertical; }
.rating { display: flex; align-items: center; gap: 1rem; margin-bottom: 1.4rem; }
.rating > span { font-family: var(--font-mono); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-dim); }
.stars { display: inline-flex; flex-direction: row-reverse; }
#reviewForm .stars input { position: absolute; opacity: 0; width: 0; height: 0; }
#reviewForm .stars input:focus-visible + label { outline: 2px solid var(--oxide); outline-offset: 2px; border-radius: 3px; }
#reviewForm .stars label { font-size: 1.6rem; color: var(--lime); cursor: pointer; margin: 0; padding: 0 2px; transition: color var(--dur-quick); }
#reviewForm .stars input:checked ~ label, #reviewForm .stars label:hover, #reviewForm .stars label:hover ~ label { color: var(--oxide); }
.reviews-list h3 { font-size: 1.5rem; margin-bottom: 0.4rem; }
.reviews-list .sub { color: var(--ink-dim); margin-bottom: 1.6rem; }
.review-card { background: var(--paper-3); border-radius: var(--r-md); box-shadow: var(--shadow-sm); padding: 1.4rem 1.6rem; margin-bottom: 1rem; }
.review-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.6rem; gap: 1rem; }
.reviewer-name { font-family: var(--font-display); font-weight: 700; font-size: 1.05rem; display: block; }
.review-date { font-family: var(--font-mono); font-size: 0.7rem; color: var(--ink-muted); }
.review-card .stars { color: var(--oxide); font-size: 1rem; letter-spacing: 2px; }
.review-message { color: var(--ink-dim); font-style: italic; }

/* ============ Contact ============ */
.contact-grid { display: grid; grid-template-columns: 0.7fr 1.3fr; gap: clamp(2rem, 4vw, 3.5rem); align-items: start; }
.contact-aside { display: grid; gap: 0.9rem; }
.contact-block { background: var(--paper-3); border-radius: var(--r-md); box-shadow: var(--shadow-sm); padding: 1.4rem 1.6rem; }
.contact-block a, .contact-block span { font-size: 1.05rem; color: var(--ink); }
.contact-block a:hover { color: var(--oxide); }
#contactForm button, #reviewForm button { width: 100%; justify-content: center; }

/* ============ Footer ============ */
.footer { background: var(--slate); color: var(--on-slate); padding: clamp(2.5rem, 4.5vw, 3.5rem) var(--gutter) 0; }
.footer-inner { max-width: var(--max-content); margin: 0 auto; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 0.8fr 0.8fr 1fr; gap: clamp(2rem, 4vw, 3rem); padding-bottom: clamp(2.5rem, 5vw, 3.5rem); border-bottom: 1px solid var(--rule-slate); }
.footer-brand .brand { display: flex; align-items: center; gap: 0.6rem; margin-bottom: 0.9rem; }
.footer-brand .brand-mark { color: var(--paper); }
.footer-brand .brand-mark em { color: var(--oxide); }
.footer-brand p { color: var(--on-slate-dim); max-width: 32ch; }
.footer-col h3 { font-family: var(--font-mono); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--oxide-bright); margin-bottom: 1rem; }
.footer-col ul { list-style: none; display: grid; gap: 0.7rem; }
.footer-col a, .footer-col span { color: var(--on-slate-dim); font-size: 0.94rem; transition: color var(--dur-quick) var(--ease); }
.footer-col a:hover { color: var(--paper); }
.footer-bottom { max-width: var(--max-content); margin: 0 auto; display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; padding: 1.6rem 0; }
.footer-bottom p { color: var(--on-slate-dim); font-family: var(--font-mono); font-size: 0.76rem; }
.footer-bottom a { color: var(--on-slate-dim); }
.footer-bottom a:hover { color: var(--oxide); }

/* Legacy simple footer (blog + article pages) */
.footer-meta { text-align: right; }
.footer-meta p { color: var(--on-slate-dim); font-family: var(--font-mono); font-size: 0.78rem; margin-bottom: 0.3rem; }
.footer-meta a { color: var(--on-slate); }
.footer-meta a:hover { color: var(--oxide); }
.footer-links { display: flex; gap: 1.2rem; margin-top: 0.5rem; }
.footer-links a { font-family: var(--font-mono); font-size: 0.76rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--on-slate-dim); }
.footer-links a:hover { color: var(--oxide); }
.footer:has(.footer-meta) .footer-inner { display: flex; justify-content: space-between; align-items: flex-end; gap: 2rem; flex-wrap: wrap; padding-bottom: clamp(2.5rem, 5vw, 4rem); border-bottom: none; }

/* ============ BLOG ============ */
.blog-hero { padding: clamp(3.5rem, 7vw, 6rem) var(--gutter) clamp(2.5rem, 5vw, 4rem); max-width: var(--max-content); margin: 0 auto; }
.blog-hero h1 { font-size: clamp(2.6rem, 7vw, 5rem); margin: 1rem 0 1.2rem; }
.blog-hero .lede { font-size: 1.2rem; }
.blog-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4rem; max-width: var(--max-content); margin: 0 auto; padding: 0 var(--gutter) clamp(4rem, 8vw, 6rem); }
.post-card { display: flex; flex-direction: column; background: var(--paper-3); border-radius: var(--r-md); box-shadow: var(--shadow-sm); overflow: hidden; transition: box-shadow var(--dur-base) var(--ease), transform var(--dur-base) var(--ease); }
.post-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-6px); }
.post-thumb { overflow: hidden; aspect-ratio: 3 / 2; }
.post-thumb img { width: 100%; height: 100%; object-fit: cover; filter: saturate(0.9) contrast(1.03); transition: transform 700ms var(--ease); }
.post-card:hover .post-thumb img { transform: scale(1.05); }
.post-body { padding: 1.5rem 1.6rem 1.8rem; display: flex; flex-direction: column; flex: 1; }
.post-meta { display: flex; gap: 0.8rem; align-items: center; margin-bottom: 0.9rem; }
.post-cat { font-family: var(--font-mono); font-size: 0.66rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--paper); background: var(--moss); padding: 0.28rem 0.65rem; border-radius: var(--r-pill); }
.post-read { font-family: var(--font-mono); font-size: 0.7rem; color: var(--ink-muted); }
.post-card h3 { font-size: 1.35rem; line-height: 1.05; margin-bottom: 0.7rem; }
.post-card p { color: var(--ink-dim); font-size: 0.98rem; margin-bottom: 1.2rem; flex: 1; }
.post-more { font-family: var(--font-mono); font-size: 0.74rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--oxide); display: inline-flex; align-items: center; gap: 0.4rem; transition: gap var(--dur-quick) var(--ease); }
.post-card:hover .post-more { gap: 0.7rem; }
.article-wrap { max-width: 760px; margin: 0 auto; padding: clamp(2.5rem, 5vw, 4rem) var(--gutter) clamp(4rem, 8vw, 6rem); }
.article-back { font-family: var(--font-mono); font-size: 0.74rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-dim); display: inline-flex; align-items: center; gap: 0.5rem; margin-bottom: 2rem; }
.article-back:hover { color: var(--oxide); }
.article-meta { display: flex; gap: 0.9rem; align-items: center; margin-bottom: 1.2rem; }
.article-wrap h1 { font-size: clamp(2.2rem, 5.5vw, 3.6rem); line-height: 1.02; margin-bottom: 1.4rem; }
.article-lede { font-size: 1.28rem; color: var(--ink-dim); font-style: italic; margin-bottom: 2rem; padding-bottom: 2rem; border-bottom: 1px solid var(--rule); }
.article-hero-img { margin: 0 0 2.4rem; border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow-md); }
.article-hero-img img { width: 100%; aspect-ratio: 16/9; object-fit: cover; }
.article-body { font-size: 1.12rem; line-height: 1.75; }
.article-body h2 { font-size: 1.7rem; margin: 2.4rem 0 1rem; padding-top: 1.6rem; border-top: 1px solid var(--rule); }
.article-body h3 { font-size: 1.3rem; margin: 1.8rem 0 0.7rem; }
.article-body p { margin-bottom: 1.3rem; color: var(--ink-dim); }
.article-body p strong { color: var(--ink); font-weight: 600; }
.article-body ul, .article-body ol { margin: 0 0 1.5rem 1.2rem; color: var(--ink-dim); }
.article-body li { margin-bottom: 0.6rem; padding-left: 0.4rem; }
.article-body ul li::marker { color: var(--oxide); }
.article-body blockquote { border-left: 3px solid var(--oxide); background: var(--paper-3); border-radius: 0 var(--r-md) var(--r-md) 0; padding: 1.3rem 1.7rem; margin: 1.8rem 0; font-style: italic; font-size: 1.16rem; color: var(--ink); }
.callout { background: var(--slate); color: var(--on-slate); padding: 1.7rem 1.9rem; margin: 2rem 0; border-radius: var(--r-md); border-left: 4px solid var(--oxide); }
.callout .panel-eyebrow { color: var(--oxide-bright); }
.callout p { color: var(--on-slate-dim); margin: 0.4rem 0 0; }
.article-cta { margin-top: 3rem; padding-top: 2rem; border-top: 1px solid var(--rule); display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; flex-wrap: wrap; }
.article-cta p { font-family: var(--font-display); font-weight: 700; font-size: 1.4rem; margin: 0; }

/* ============ View transitions (progressive — no-op where unsupported) ============ */
@view-transition { navigation: auto; }
@media (prefers-reduced-motion: reduce) {
  @view-transition { navigation: none; }
}

/* ============ Hero ken-burns ============ */
@media (prefers-reduced-motion: no-preference) {
  .hero-frame img { animation: kenburns 22s ease-in-out infinite alternate; }
  @keyframes kenburns {
    0%   { transform: translateY(var(--hero-parallax, 0)) scale(1.06); }
    100% { transform: translateY(var(--hero-parallax, 0)) scale(1.14) translateX(-1%); }
  }
}

/* ============ Buttons: magnetic-ready + focus ============ */
.primary, .outline { will-change: transform; }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, summary:focus-visible {
  outline: 2px solid var(--oxide); outline-offset: 2px; border-radius: 4px;
}

/* ============ Projects: filter bar ============ */
.filter-bar { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-bottom: 1.8rem; }
.filter-bar button {
  font-family: var(--font-mono); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--ink-dim); border: 1.5px solid var(--rule); border-radius: var(--r-pill); padding: 0.55rem 1.1rem;
  transition: background var(--dur-quick) var(--ease), color var(--dur-quick) var(--ease), border-color var(--dur-quick) var(--ease);
}
.filter-bar button:hover { border-color: var(--oxide); color: var(--oxide); }
.filter-bar button.is-active { background: var(--slate); color: var(--on-slate); border-color: var(--slate); }
.portfolio-card { cursor: pointer; transition: opacity 380ms var(--ease), transform 380ms var(--ease), box-shadow var(--dur-base) var(--ease) !important; }
.portfolio-card.is-filtered-out { opacity: 0 !important; transform: scale(0.94) !important; pointer-events: none; }

/* ============ Lightbox ============ */
.lightbox {
  position: fixed; inset: 0; z-index: 300; display: flex; align-items: center; justify-content: center;
  background: rgba(35, 40, 35, 0.92); padding: clamp(1.5rem, 5vw, 4rem);
  opacity: 0; pointer-events: none; transition: opacity var(--dur-base) var(--ease);
}
.lightbox.is-open { opacity: 1; pointer-events: auto; }
.lightbox figure { max-width: 1100px; max-height: 90vh; margin: 0; transform: scale(0.96); transition: transform var(--dur-base) var(--ease); }
.lightbox.is-open figure { transform: scale(1); }
.lightbox img { max-height: 80vh; width: auto; margin: 0 auto; border-radius: var(--r-md); box-shadow: var(--shadow-lg); }
.lightbox-caption { color: var(--on-slate); font-family: var(--font-mono); font-size: 0.8rem; letter-spacing: 0.04em; text-align: center; margin-top: 1rem; }
.lightbox-close {
  position: absolute; top: clamp(1rem, 3vw, 2rem); right: clamp(1rem, 3vw, 2rem);
  width: 44px; height: 44px; font-size: 1.8rem; line-height: 1; color: var(--on-slate);
  border: 1px solid var(--rule-slate); border-radius: 50%; display: flex; align-items: center; justify-content: center;
  transition: background var(--dur-quick) var(--ease), color var(--dur-quick) var(--ease);
}
.lightbox-close:hover { background: var(--oxide); color: var(--paper); border-color: var(--oxide); }

/* ============ Grant eligibility checker ============ */
.grant-wrap { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: clamp(2rem, 4vw, 3.5rem); align-items: start; }
.grant-form { background: var(--paper-3); border-radius: var(--r-lg); box-shadow: var(--shadow-sm); padding: clamp(1.8rem, 3vw, 2.6rem); display: grid; gap: 1.6rem; }
.grant-q .grant-label { font-family: var(--font-display); font-weight: 700; font-size: 1.02rem; margin-bottom: 0.8rem; }
.grant-options { display: flex; flex-wrap: wrap; gap: 0.7rem; }
.grant-options label {
  display: inline-flex; align-items: center; gap: 0.5rem; font-family: var(--font-mono); font-size: 0.8rem;
  color: var(--ink-dim); border: 1.5px solid var(--rule); border-radius: var(--r-pill); padding: 0.65rem 1.1rem; cursor: pointer;
  transition: background var(--dur-quick) var(--ease), color var(--dur-quick) var(--ease), border-color var(--dur-quick) var(--ease);
}
.grant-options input { position: absolute; opacity: 0; width: 0; height: 0; }
.grant-options input:focus-visible + span { outline: 2px solid var(--oxide); outline-offset: 3px; border-radius: 3px; }
.grant-options label:hover { border-color: var(--oxide); color: var(--oxide); }
.grant-options label:has(input:checked) { background: var(--slate); border-color: var(--slate); color: var(--on-slate); }
.grant-result {
  background: var(--slate); color: var(--on-slate-dim); padding: clamp(1.8rem, 3vw, 2.6rem);
  border-radius: var(--r-lg); box-shadow: var(--shadow-lg); position: sticky; top: calc(var(--nav-height) + 1.5rem);
  opacity: 0; transform: translateY(12px); transition: opacity var(--dur-base) var(--ease), transform var(--dur-base) var(--ease);
}
.grant-result.is-visible { opacity: 1; transform: none; }
.grant-result .panel-eyebrow { color: var(--oxide-bright); }
.grant-result h3 { color: var(--paper); font-size: 1.5rem; margin: 0.5rem 0 0.8rem; }
.grant-result p { margin-bottom: 1rem; }
.grant-result p a { color: var(--on-slate-dim); text-decoration: underline; }
.grant-amount { font-family: var(--font-display); font-weight: 800; font-size: 2.2rem; color: var(--oxide-bright); margin-bottom: 0.8rem !important; }
.grant-disclaimer { font-size: 0.82rem; font-style: italic; opacity: 0.85; }
.grant-result .primary { margin-top: 0.4rem; box-shadow: none; }
.grant-result.tone-likely .grant-amount { color: #A9C0A6; }
.grant-result.tone-likely .panel-eyebrow { color: #A9C0A6; }
.grant-result .stamp-chip { border-color: var(--oxide); color: var(--oxide-bright); background: var(--slate-2); margin-bottom: 1rem; }
.grant-result.tone-likely .stamp-chip { border-color: #A9C0A6; color: #A9C0A6; }

/* ============ Process responsive + Footer legacy toggle helper ============ */

/* ============ Responsive ============ */
@media (max-width: 940px) {
  .hero-grid, .about-grid, .reviews-container, .contact-grid { grid-template-columns: 1fr; }
  .hero-media { order: -1; max-width: 440px; margin: 0 auto; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(2) { border-right: 0; }
  .blog-grid { grid-template-columns: repeat(2, 1fr); }
  .projects-grid { grid-template-columns: 1fr; }
  .grant-wrap { grid-template-columns: 1fr; }
  .grant-result { position: static; }
  .process-strip { grid-template-columns: repeat(2, 1fr); row-gap: 2rem; }
  .process-strip::before { display: none; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .testimonial-spotlight { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  header nav { position: fixed; inset: var(--nav-height) 0 auto 0; flex-direction: column; align-items: stretch; gap: 0; background: var(--paper); border-bottom: 1px solid var(--rule); padding: 0.5rem var(--gutter) 1rem; transform: translateY(-140%); transition: transform var(--dur-base) var(--ease); max-height: calc(100vh - var(--nav-height)); overflow-y: auto; }
  header nav.is-open { transform: translateY(0); }
  header nav a { padding: 0.9rem 0; border-bottom: 1px solid var(--rule-soft); font-size: 0.9rem; }
  .cta-btn { text-align: center; margin-top: 0.6rem; }
  .nav-toggle { display: flex; }
  .services-grid { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr; }
  .stat { border-right: 0; border-bottom: 1px solid var(--rule-slate); }
  .blog-grid { grid-template-columns: 1fr; }
  .section-head { flex-direction: column; align-items: flex-start; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
  .footer-meta { text-align: left; }
  .filter-bar { gap: 0.5rem; }
  .filter-bar button { flex: 1 1 auto; text-align: center; }
  .grant-options { flex-direction: column; align-items: stretch; }
  .grant-options label { justify-content: center; }
  .lightbox-close { top: 0.75rem; right: 0.75rem; }
  .process-strip { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .hero-accent-frame { width: 42%; max-width: 160px; }
}
