/* =========================================================================
   Rosenhek Electric — site stylesheet
   Translates the design-system UI kit (ui_kits/website/*.jsx) into reusable
   class-based CSS. All tokens come from tokens.css; nothing here invents a
   new color/spacing/font value.
   ========================================================================= */

/* ---------- Base ---------- */
html, body { margin: 0; padding: 0; background: var(--paper-warm); }
* { box-sizing: border-box; }
img { max-width: 100%; height: auto; display: block; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

/* Section base — every full-width band uses .re-section for vertical rhythm.
   The JSX prototype set 96px vertical padding; we keep that and bump it slightly
   on very large screens so big monitors don't make the rhythm feel cramped. */
.re-section { padding: 96px 24px; }
@media (min-width: 1400px) { .re-section { padding: 120px 24px; } }
@media (max-width: 760px)  { .re-section { padding: 56px 16px; } }

.section--paper  { background: var(--paper); }
.section--warm   { background: var(--paper-warm); }
.section--ink    { background: var(--ink); color: var(--paper); }
.section--signal {
  background: var(--bolt-yellow);
  border-top: 3px solid var(--ink);
  border-bottom: 3px solid var(--ink);
}


/* ---------- Buttons (variants from Header.btnStyle) ---------- */
.re-btn {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 11px 18px;
  border-radius: var(--radius-1);
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 2.5px solid var(--ink);
  color: var(--ink);
  background: transparent;
  transition: transform var(--dur-fast) var(--ease-snap),
              box-shadow var(--dur-fast) var(--ease-snap),
              background var(--dur-fast) var(--ease-snap);
  white-space: nowrap;
}
.re-btn--lg { font-size: 16px; padding: 15px 26px; }
.re-btn--primary {
  background: var(--bolt-yellow);
  box-shadow: 4px 4px 0 0 var(--ink);
}
.re-btn--primary:hover { background: var(--bolt-yellow-deep); }
.re-btn--primary:active { transform: translate(2px, 2px); box-shadow: 0 0 0 0 var(--ink); }
.re-btn--outline:hover { background: var(--bolt-yellow); }
.re-btn--on-dark { color: var(--paper); border-color: var(--paper); }
.re-btn--on-dark:hover { background: var(--bolt-yellow); color: var(--ink); border-color: var(--ink); }
.re-btn--ink {
  background: var(--ink);
  color: var(--bolt-yellow);
  border-color: var(--ink);
}
.re-btn--ink:hover { background: var(--ink-soft); }

/* ---------- Eyebrow + Section head ---------- */
.re-eyebrow {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: var(--tracking-eyebrow);
  text-transform: uppercase;
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}
.re-eyebrow::before {
  content: "";
  width: 28px;
  height: 3px;
  background: var(--bolt-yellow);
  display: inline-block;
}
.re-eyebrow--on-dark { color: var(--bolt-yellow); }
.re-eyebrow--on-dark::before { background: var(--bolt-yellow); }
.re-eyebrow--on-yellow { color: var(--ink); }
.re-eyebrow--on-yellow::before { background: var(--ink); }

.re-section-title {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: clamp(32px, 4.5vw, 52px);
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin: 0 0 16px;
  text-wrap: balance;
  max-width: 880px;
}
.re-display-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(36px, 5.5vw, 64px);
  line-height: 1.05;
  letter-spacing: -0.025em;
  margin: 0 0 20px;
  text-wrap: balance;
}

/* ============== Header ============== */
.re-header { position: sticky; top: 0; z-index: 50; background: var(--paper-warm); }
.re-topbar {
  background: var(--ink); color: var(--paper);
  font-family: var(--font-heading); font-size: 12px; font-weight: 600;
  letter-spacing: 0.1em; text-transform: uppercase;
  padding: 8px 24px;
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
}
.re-topbar__dot {
  width: 7px; height: 7px; background: var(--bolt-yellow);
  border-radius: 999px; display: inline-block; margin-right: 8px;
}
.re-topbar__hours { opacity: 0.7; margin-right: 18px; }
.re-topbar__phone {
  color: var(--bolt-yellow); font-size: 14px; font-weight: 700;
  text-decoration: none; white-space: nowrap;
}
.re-topbar__group { display: inline-flex; align-items: center; }

.re-mainnav {
  border-bottom: 2px solid var(--ink);
  background: var(--paper-warm);
  padding: 14px 24px;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
}
.re-brand { display: block; text-decoration: none; flex-shrink: 0; }
.re-brand img { height: 64px; width: auto; display: block; }
.re-nav { display: flex; gap: 4px; align-items: center; flex: 1; justify-content: center; }
.re-nav__link {
  position: relative;
  padding: 10px 16px;
  font-family: var(--font-heading); font-weight: 500; font-size: 15px;
  letter-spacing: 0;
  color: var(--ink); text-decoration: none;
  border-bottom: 3px solid transparent;
  transition: border-color var(--dur-fast);
}
.re-nav__link:hover,
.re-nav__link:focus,
.re-nav__link.is-active { border-bottom-color: var(--bolt-yellow); background: transparent; }
.re-nav__cta { display: flex; gap: 10px; align-items: center; flex-shrink: 0; }

/* Services mega menu (hover/focus reveals) */
.re-nav__item--mega { position: relative; }
.re-mega {
  position: absolute; top: 100%; left: 50%; transform: translateX(-50%);
  background: var(--paper); border: 2.5px solid var(--ink);
  box-shadow: var(--shadow-bolt);
  padding: 16px;
  display: grid; grid-template-columns: repeat(3, minmax(180px, 1fr)); gap: 4px;
  min-width: 680px;
  visibility: hidden; opacity: 0;
  transition: opacity var(--dur-fast) var(--ease-out);
  pointer-events: none;
  z-index: 100;
}
.re-nav__item--mega:hover .re-mega,
.re-nav__item--mega:focus-within .re-mega { visibility: visible; opacity: 1; pointer-events: auto; }
.re-mega a {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px;
  text-decoration: none; color: var(--ink); background: transparent;
  font-family: var(--font-heading); font-weight: 500; font-size: 14px;
  transition: background var(--dur-fast);
}
.re-mega a:hover { background: var(--bolt-yellow); }

/* Mobile nav toggle (no JS server-rendered fallback uses :target) */
.re-nav-toggle {
  display: none;
  background: var(--ink); color: var(--paper); border: none;
  padding: 10px; cursor: pointer; border-radius: 2px;
}
.re-mobile-nav { display: none; background: var(--paper-warm); border-bottom: 2px solid var(--ink); padding: 12px 24px 20px; }
.re-mobile-nav a {
  display: block; padding: 12px 4px;
  font-family: var(--font-heading); font-weight: 500; font-size: 18px;
  color: var(--ink); text-decoration: none;
  border-bottom: 1px solid var(--hairline);
}
@media (max-width: 960px) {
  .re-nav { display: none; }
  .re-nav__cta { display: none; }
  .re-nav-toggle { display: inline-flex; }
}

/* ============== Hero ============== */
.re-hero { position: relative; overflow: hidden; background: var(--ink); color: var(--paper); }
.re-hero__photo {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
  opacity: 0.6;
}
.re-hero__scrim {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(10,10,10,0.55) 0%, rgba(10,10,10,0.35) 50%, rgba(10,10,10,0.75) 100%);
  pointer-events: none;
}
.re-hero__inner {
  position: relative; max-width: 1200px; margin: 0 auto;
  padding: 120px 24px 80px;
}
.re-hero__eyebrow {
  font-family: var(--font-heading); font-weight: 600; font-size: 13px;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--bolt-yellow);
  display: inline-flex; align-items: center; gap: 10px; margin-bottom: 18px;
}
.re-hero__eyebrow::before {
  content: ""; width: 28px; height: 3px; background: var(--bolt-yellow);
}
.re-hero__title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(44px, 6.5vw, 88px);
  line-height: 1.0; letter-spacing: -0.025em;
  margin: 0 0 24px;
  max-width: 980px;
  text-wrap: balance;
  color: var(--paper);
}
.re-hero__title--accent { color: var(--bolt-yellow); }
.re-hero__sub {
  font-size: 20px; line-height: 1.5; max-width: 620px;
  margin: 0 0 32px; color: rgba(255,255,255,0.9); font-weight: 400;
}
.re-hero__ctas { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 56px; }
.re-hero__trust { display: flex; flex-wrap: wrap; gap: 20px 36px; align-items: center; }
.re-trust__item {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-heading); font-weight: 600; font-size: 13px;
  letter-spacing: 0.06em; text-transform: uppercase; color: var(--paper);
}
.re-trust__check {
  width: 22px; height: 22px; background: var(--bolt-yellow); color: var(--ink);
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 2px;
}

/* ============== Services Grid ============== */
.re-services__lead {
  font-size: 18px; line-height: 1.5; color: var(--ink-mid);
  max-width: 680px; margin: 0 0 48px;
}
.re-services__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}
.re-service-tile {
  background: var(--paper);
  border: 2px solid var(--ink);
  padding: 22px;
  text-decoration: none; color: var(--ink);
  display: flex; flex-direction: column; gap: 10px;
  min-height: 200px;
  transition: transform 160ms var(--ease-snap),
              box-shadow 160ms var(--ease-snap),
              background 160ms var(--ease-snap);
}
.re-service-tile:hover {
  background: var(--bolt-yellow);
  box-shadow: var(--shadow-bolt);
  transform: translate(-2px, -2px);
}
.re-service-tile__icon {
  width: 44px; height: 44px;
  border: 2px solid var(--ink);
  background: var(--bolt-yellow);
  border-radius: 2px;
  display: flex; align-items: center; justify-content: center;
  transition: background 160ms;
}
.re-service-tile:hover .re-service-tile__icon { background: var(--paper); }
.re-service-tile h3 {
  font-family: var(--font-heading); font-weight: 600;
  font-size: 20px; line-height: 1.2;
  letter-spacing: -0.01em;
  margin: 0;
}
.re-service-tile p {
  font-size: 14px; line-height: 1.5; color: var(--ink-mid);
  margin: 0; flex: 1;
}
.re-service-tile__more {
  font-family: var(--font-heading); font-weight: 700;
  font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase;
  margin-top: auto; display: inline-flex; align-items: center; gap: 6px;
}

/* ============== Why Us ============== */
.re-why {
  background: var(--paper);
  border-top: 2px solid var(--ink); border-bottom: 2px solid var(--ink);
}
.re-why__grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  gap: 56px; align-items: center;
}
.re-why__photo {
  position: relative;
  border: 3px solid var(--ink);
  box-shadow: 8px 8px 0 0 var(--ink);
  background: var(--paper-mute);
  aspect-ratio: 4/5;
  overflow: hidden;
}
.re-why__photo::after {
  /* Placeholder vibe when no photo is set */
  content: "Team photo";
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-heading); font-size: 14px;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-low);
}
.re-why__photo--has-image::after { content: none; }
.re-why__photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.re-why__lead { font-size: 18px; line-height: 1.5; color: var(--ink-mid); margin: 0 0 28px; }
.re-why__list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 14px; }
.re-why__list li { display: flex; align-items: flex-start; gap: 14px; }
.re-why__check {
  flex-shrink: 0; width: 30px; height: 30px;
  background: var(--bolt-yellow); border: 2px solid var(--ink); border-radius: 2px;
  display: inline-flex; align-items: center; justify-content: center;
}
.re-why__txt { font-size: 16px; line-height: 1.5; color: var(--ink); padding-top: 4px; }
.re-why__ctas { margin-top: 32px; display: flex; gap: 12px; flex-wrap: wrap; }

/* ============== How It Works ============== */
.re-how {
  background: var(--bolt-yellow);
  position: relative; overflow: hidden;
}
.re-how__head {
  display: flex; justify-content: space-between; align-items: flex-end;
  flex-wrap: wrap; gap: 24px; margin-bottom: 56px;
}
.re-how__display {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(36px, 5.5vw, 64px); line-height: 1.05;
  letter-spacing: -0.025em;
  margin: 0; max-width: 720px; text-wrap: balance;
}
.re-how__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 28px; }
.re-step {
  background: var(--paper);
  border: 3px solid var(--ink);
  box-shadow: var(--shadow-bolt);
  padding: 28px 26px;
  display: flex; flex-direction: column; gap: 12px;
  min-height: 240px;
}
.re-step__n {
  font-family: var(--font-display);
  font-size: 64px; line-height: 1;
  color: var(--ink);
}
.re-step h3 {
  font-family: var(--font-heading); font-weight: 600;
  font-size: 22px; line-height: 1.2; margin: 0;
  letter-spacing: -0.01em;
}
.re-step p { font-size: 15px; line-height: 1.55; color: var(--ink-mid); margin: 0; }

/* ============== Testimonials ============== */
.re-reviews__head {
  display: flex; justify-content: space-between; align-items: flex-end;
  flex-wrap: wrap; gap: 24px; margin-bottom: 40px;
}
.re-reviews__title-hit {
  background: var(--bolt-yellow); padding: 0 8px;
  box-shadow: 0 -8px 0 0 var(--bolt-yellow) inset;
}
.re-reviews__badge {
  background: var(--ink); color: var(--paper);
  padding: 14px 20px;
  display: flex; align-items: center; gap: 14px;
  border: 2px solid var(--ink);
}
.re-reviews__badge-stars { display: flex; gap: 2px; }
.re-reviews__badge-meta {
  font-family: var(--font-heading); font-weight: 600; font-size: 13px;
  letter-spacing: 0.08em; text-transform: uppercase;
}
.re-reviews__badge-score { font-size: 22px; font-weight: 700; }
.re-reviews__badge-source { opacity: 0.7; }
.re-reviews__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 18px; }
.re-quote {
  background: var(--paper);
  border: 2px solid var(--ink);
  padding: 22px;
  display: flex; flex-direction: column; gap: 12px;
}
.re-quote__stars { display: flex; gap: 2px; }
.re-quote__body { font-size: 15px; line-height: 1.55; color: var(--ink); margin: 0; flex: 1; }
.re-quote__foot {
  border-top: 1.5px solid var(--hairline); padding-top: 10px;
  display: flex; justify-content: space-between;
}
.re-quote__name { font-family: var(--font-heading); font-weight: 700; font-size: 14px; text-transform: uppercase; }
.re-quote__town { font-size: 13px; color: var(--ink-low); }

/* ============== Quote Form ============== */
.re-quote-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 48px; align-items: flex-start;
}
.re-quote__intro p { font-size: 18px; line-height: 1.5; margin: 0 0 28px; max-width: 480px; }
.re-contact-rows { display: flex; flex-direction: column; gap: 12px; }
.re-contact-row {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 18px; text-decoration: none;
  border: 2px solid var(--ink);
}
.re-contact-row--ink { background: var(--ink); color: var(--paper); }
.re-contact-row--ink .re-contact-row__big { color: var(--paper); }
.re-contact-row--paper { background: var(--paper); color: var(--ink); }
.re-contact-row__big {
  font-family: var(--font-heading); font-size: 22px; font-weight: 700;
}
.re-contact-row__small {
  font-size: 12px; opacity: 0.7; letter-spacing: 0.08em; text-transform: uppercase;
}
.re-form {
  background: var(--paper);
  border: 3px solid var(--ink);
  box-shadow: 8px 8px 0 0 var(--ink);
  padding: 28px;
  display: flex; flex-direction: column; gap: 16px;
}
.re-field { display: flex; flex-direction: column; gap: 6px; }
.re-field__label {
  font-family: var(--font-heading); font-weight: 600; font-size: 12px;
  letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink);
}
.re-input, .re-select, .re-textarea {
  font-family: var(--font-body); font-size: 15px;
  color: var(--ink); background: var(--paper);
  border: 2px solid var(--ink); border-radius: 2px;
  padding: 11px 12px; outline: none; width: 100%; box-sizing: border-box;
}
.re-textarea { resize: vertical; min-height: 96px; }
.re-form__note { font-size: 12px; color: var(--ink-low); text-align: center; }

/* ============== Footer ============== */
.re-caution-stripe {
  height: 18px;
  background: repeating-linear-gradient(-45deg, var(--bolt-yellow) 0 14px, var(--ink) 14px 28px);
}
.re-footer { background: var(--ink); color: var(--paper); padding: 64px 24px 32px; }
.re-footer__grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 40px; margin-bottom: 48px;
}
.re-footer__brand img { height: 80px; width: auto; margin-bottom: 18px; filter: brightness(1.05); }
.re-footer__blurb { font-size: 15px; line-height: 1.6; color: rgba(255,255,255,0.75); margin: 0 0 16px; max-width: 280px; }
.re-license-chip {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-mono); font-size: 12px;
  color: var(--bolt-yellow);
  border: 1.5px solid var(--bolt-yellow);
  padding: 6px 10px;
}
.re-license-chip::before {
  content: ""; width: 6px; height: 6px;
  background: var(--bolt-yellow); border-radius: 999px; display: inline-block;
}
.re-footer__h {
  font-family: var(--font-heading); font-weight: 700; font-size: 13px;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--bolt-yellow);
  margin: 0 0 16px;
}
.re-footer__col ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.re-footer__col a {
  color: rgba(255,255,255,0.85); text-decoration: none; font-size: 14px;
  transition: color var(--dur-fast);
}
.re-footer__col a:hover { color: var(--bolt-yellow); background: transparent; }
.re-footer__contact { display: flex; flex-direction: column; gap: 12px; font-size: 14px; color: rgba(255,255,255,0.85); }
.re-footer__phone {
  color: var(--bolt-yellow); font-family: var(--font-heading);
  font-size: 22px; font-weight: 700; text-decoration: none;
}
.re-footer__phone:hover { background: transparent; }
.re-footer__hours-label {
  font-family: var(--font-heading); font-size: 11px; letter-spacing: 0.14em;
  text-transform: uppercase; opacity: 0.7; margin-bottom: 4px;
}
.re-footer__emergency { color: var(--bolt-yellow); }
.re-footer__bottom {
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 16px;
  border-top: 1.5px solid rgba(255,255,255,0.15);
  padding-top: 24px;
}
.re-footer__copy { font-size: 13px; color: rgba(255,255,255,0.6); }
.re-footer__mascot { display: flex; gap: 20px; align-items: center; }
.re-footer__mascot img { height: 60px; opacity: 0.95; filter: none; margin: 0; }
.re-footer__mascot span { font-size: 13px; color: rgba(255,255,255,0.5); font-style: italic; }

/* ============== Generic page body (About, Services index intro, etc.) ============== */
.re-page-body { padding: 96px 24px; }
.re-page-body .container { max-width: 760px; }
.re-page-body h1 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(36px, 5vw, 60px);
  line-height: 1.1;
  letter-spacing: -0.025em;
  margin: 0 0 24px;
}
.re-page-body p, .re-page-body li {
  font-family: var(--font-body); font-size: 17px; line-height: 1.65;
  color: var(--ink-soft); margin: 0 0 16px;
}

/* ============== Photo grid (blog posts) ============== */
.re-photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; }
.re-photo-grid figure { margin: 0; border: 2px solid var(--ink); background: var(--paper); }
.re-photo-grid figcaption {
  font-family: var(--font-heading); font-weight: 500; font-size: 14px;
  padding: 14px 16px; border-top: 2px solid var(--ink);
}

/* ============== Service Area chips ============== */
.re-chips { display: flex; flex-wrap: wrap; gap: 10px; }
.re-chip {
  background: var(--paper); border: 2px solid var(--ink);
  padding: 8px 14px;
  font-family: var(--font-heading); font-weight: 500; font-size: 14px;
}
