/* ==========================================================================
   Red23 Group — site styles
   Palette: white / warm off-white, charcoal ink, single restrained red accent
   Type: Source Serif 4 (display) + Inter (body/UI)
   ========================================================================== */

:root {
  --ink:        #1a1a1a;
  --ink-soft:   #43423f;
  --muted:      #6e6d67;
  --paper:      #ffffff;
  --paper-2:    #faf9f6;
  --line:       #e6e4de;
  --line-2:     #d9d6cf;
  --red:        #c8102e;
  --red-dark:   #a30c25;

  --maxw: 1120px;
  --gutter: clamp(20px, 5vw, 56px);

  --f-display: "Source Serif 4", Georgia, "Times New Roman", serif;
  --f-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  --step--1: clamp(0.82rem, 0.8rem + 0.1vw, 0.9rem);
  --step-0:  clamp(1rem, 0.97rem + 0.15vw, 1.075rem);
  --step-1:  clamp(1.2rem, 1.1rem + 0.4vw, 1.45rem);
  --step-2:  clamp(1.55rem, 1.35rem + 0.9vw, 2.1rem);
  --step-3:  clamp(2.1rem, 1.7rem + 1.9vw, 3.1rem);
  --step-4:  clamp(2.7rem, 2rem + 3.2vw, 4.4rem);
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--f-body);
  font-size: var(--step-0);
  line-height: 1.65;
  color: var(--ink-soft);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3, h4 {
  font-family: var(--f-display);
  color: var(--ink);
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -0.01em;
  margin: 0;
}
p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }

/* ---------- layout helpers ---------- */
.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.section { padding-block: clamp(64px, 9vw, 124px); }
.section--tint { background: var(--paper-2); }
.section--line { border-top: 1px solid var(--line); }

.lede { font-size: var(--step-1); color: var(--ink-soft); line-height: 1.5; }
.measure { max-width: 62ch; }
.measure-tight { max-width: 48ch; }

/* ---------- eyebrow (signature: angled red tick from the logo geometry) ---------- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: var(--step--1);
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 22px;
}
.eyebrow::before {
  content: "";
  width: 22px;
  height: 2px;
  background: var(--red);
  transform: skewX(-24deg);
  transform-origin: left center;
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--f-body);
  font-size: var(--step--1);
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1;
  padding: 15px 26px;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: #fff;
  text-decoration: none;
  border-radius: 2px;
  cursor: pointer;
  transition: background .18s ease, border-color .18s ease, color .18s ease, transform .18s ease;
}
.btn:hover { background: var(--red); border-color: var(--red); }
.btn:active { transform: translateY(1px); }
.btn--ghost { background: transparent; color: var(--ink); }
.btn--ghost:hover { background: transparent; color: var(--red); border-color: var(--red); }
.btn--sm { padding: 11px 18px; }
.btn .arrow { transition: transform .18s ease; }
.btn:hover .arrow { transform: translateX(3px); }

/* ---------- header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255,255,255,0.86);
  backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid transparent;
  transition: border-color .25s ease, box-shadow .25s ease;
}
.site-header.is-scrolled {
  border-bottom-color: var(--line);
  box-shadow: 0 1px 0 rgba(0,0,0,0.02);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
}
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; }
.brand__mark { width: 26px; height: auto; }
.brand__name {
  font-family: var(--f-display);
  font-weight: 600;
  font-size: 1.15rem;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.nav { display: flex; align-items: center; gap: clamp(18px, 2.4vw, 34px); }
.nav a {
  font-size: var(--step--1);
  font-weight: 500;
  letter-spacing: 0.01em;
  color: var(--ink-soft);
  text-decoration: none;
  transition: color .16s ease;
}
.nav a:hover { color: var(--ink); }
.nav a.btn { color: #fff; }
.nav a.btn:hover { color: #fff; }
.nav a[aria-current="page"]:not(.btn) { color: var(--ink); }
.nav a[aria-current="page"]:not(.btn) { box-shadow: inset 0 -2px 0 var(--red); }

.nav-toggle {
  display: none;
  border: 1px solid var(--line-2);
  background: #fff;
  border-radius: 2px;
  padding: 9px 13px;
  font-size: var(--step--1);
  font-weight: 600;
  letter-spacing: 0.04em;
  cursor: pointer;
  color: var(--ink);
}

/* ---------- hero ---------- */
.hero { position: relative; overflow: hidden; }
.hero-inner {
  padding-block: clamp(72px, 12vw, 150px) clamp(56px, 9vw, 110px);
  position: relative;
  z-index: 1;
}
.hero h1 {
  font-size: var(--step-4);
  max-width: 16ch;
  margin-bottom: 26px;
}
.hero .lede { max-width: 52ch; }
.hero-cta { margin-top: 38px; display: flex; gap: 16px; flex-wrap: wrap; }

/* ambient watermark of the mark, very faint, echoing the logo's diagonal */
.hero-mark {
  position: absolute;
  right: clamp(-90px, -4vw, -30px);
  top: 50%;
  transform: translateY(-50%);
  width: clamp(280px, 38vw, 560px);
  opacity: 0.05;
  z-index: 0;
  pointer-events: none;
}

/* ---------- generic section heading block ---------- */
.head-block { max-width: 60ch; margin-bottom: clamp(40px, 5vw, 60px); }
.head-block h2 { font-size: var(--step-3); margin-bottom: 18px; }

/* ---------- service cards ---------- */
.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}
.card {
  background: var(--paper);
  padding: clamp(28px, 3vw, 40px);
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: background .2s ease;
}
.card:hover { background: var(--paper-2); }
.card__icon { color: var(--red); }
.card__icon svg { width: 34px; height: 34px; display: block; }
.card h3 { font-size: var(--step-1); }
.card p { font-size: var(--step-0); color: var(--muted); }
.card__more {
  margin-top: auto;
  font-family: var(--f-body);
  font-size: var(--step--1);
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--ink);
  text-decoration: none;
  display: inline-flex;
  gap: 8px;
  align-items: center;
}
.card__more:hover { color: var(--red); }

/* ---------- value band (Why Red23) ---------- */
.values { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(32px, 4vw, 56px); }
.value h3 { font-size: var(--step-1); margin-bottom: 12px; }
.value p { color: var(--muted); font-size: var(--step-0); }
.value__rule { width: 30px; height: 2px; background: var(--red); transform: skewX(-24deg); margin-bottom: 22px; }

/* ---------- CTA band ---------- */
.cta-band { background: var(--ink); color: #fff; }
.cta-band .container { padding-block: clamp(56px, 7vw, 88px); }
.cta-grid { display: flex; align-items: center; justify-content: space-between; gap: 40px; flex-wrap: wrap; }
.cta-band h2 { color: #fff; font-size: var(--step-3); max-width: 18ch; }
.cta-band .btn { background: #fff; color: var(--ink); border-color: #fff; }
.cta-band .btn:hover { background: var(--red); color: #fff; border-color: var(--red); }

/* ---------- detailed service blocks (Services page) ---------- */
.svc {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: clamp(28px, 5vw, 72px);
  padding-block: clamp(48px, 6vw, 82px);
  border-top: 1px solid var(--line);
  align-items: start;
}
.svc:first-of-type { border-top: 0; }
.svc__label { font-size: var(--step-2); }
.svc__icon { color: var(--red); margin-bottom: 20px; }
.svc__icon svg { width: 40px; height: 40px; }
.svc p { margin-bottom: 22px; }
.svc ul { display: grid; gap: 12px; }
.svc li {
  position: relative;
  padding-left: 22px;
  color: var(--ink-soft);
  font-size: var(--step-0);
}
.svc li::before {
  content: "";
  position: absolute;
  left: 0; top: 0.62em;
  width: 11px; height: 2px;
  background: var(--red);
  transform: skewX(-24deg);
}

/* ---------- about ---------- */
.prose { max-width: 64ch; display: grid; gap: 24px; }
.prose p { font-size: var(--step-1); color: var(--ink-soft); line-height: 1.55; }
.facts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  margin-top: clamp(40px, 5vw, 64px);
}
.fact { background: var(--paper); padding: clamp(24px, 3vw, 36px); }
.fact dt { font-size: var(--step--1); letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); margin-bottom: 10px; }
.fact dd { margin: 0; font-family: var(--f-display); font-size: var(--step-1); color: var(--ink); }

/* ---------- contact ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(40px, 6vw, 88px); align-items: start; }
.contact-aside dl { display: grid; gap: 28px; margin: 0; }
.contact-aside dt { font-size: var(--step--1); letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.contact-aside dd { margin: 0; font-size: var(--step-1); color: var(--ink); font-family: var(--f-display); }
.contact-aside a { color: var(--ink); text-decoration: none; box-shadow: inset 0 -1px 0 var(--line-2); }
.contact-aside a:hover { color: var(--red); box-shadow: inset 0 -1px 0 var(--red); }

.form { display: grid; gap: 20px; }
.field { display: grid; gap: 8px; }
.field label { font-size: var(--step--1); font-weight: 600; letter-spacing: 0.02em; color: var(--ink); }
.field label .opt { font-weight: 400; color: var(--muted); letter-spacing: 0; }
.field input, .field textarea {
  font-family: var(--f-body);
  font-size: var(--step-0);
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line-2);
  border-radius: 2px;
  padding: 13px 15px;
  width: 100%;
  transition: border-color .16s ease, box-shadow .16s ease;
}
.field textarea { resize: vertical; min-height: 140px; }
.field input:focus, .field textarea:focus {
  outline: none;
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(200,16,46,0.12);
}
.hp { position: absolute; left: -9999px; opacity: 0; height: 0; overflow: hidden; }
.form-status { font-size: var(--step--1); min-height: 1.2em; }
.form-status.is-ok { color: #1d7a3f; }
.form-status.is-err { color: var(--red); }

/* ---------- legal / policy ---------- */
.legal { max-width: 72ch; }
.legal h2 { font-size: var(--step-2); margin-top: clamp(36px, 4vw, 52px); margin-bottom: 14px; }
.legal h2:first-of-type { margin-top: 0; }
.legal p, .legal li { color: var(--ink-soft); margin-bottom: 14px; }
.legal ul { list-style: none; display: grid; gap: 10px; margin-bottom: 18px; }
.legal li { position: relative; padding-left: 22px; }
.legal li::before { content: ""; position: absolute; left: 0; top: 0.62em; width: 11px; height: 2px; background: var(--red); transform: skewX(-24deg); }
.legal a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--line-2); }
.legal a:hover { color: var(--red); text-decoration-color: var(--red); }
.legal .updated { font-size: var(--step--1); color: var(--muted); letter-spacing: 0.02em; }

.page-head { padding-block: clamp(56px, 8vw, 96px) clamp(8px, 2vw, 20px); }
.page-head h1 { font-size: var(--step-3); max-width: 20ch; margin-bottom: 18px; }

/* ---------- footer ---------- */
.site-footer { background: var(--paper-2); border-top: 1px solid var(--line); }
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: clamp(32px, 5vw, 64px);
  padding-block: clamp(48px, 6vw, 72px);
}
.footer-brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; margin-bottom: 18px; }
.footer-brand img { width: 24px; }
.footer-brand span { font-family: var(--f-display); font-weight: 600; font-size: 1.1rem; color: var(--ink); }
.footer-col h4 { font-family: var(--f-body); font-size: var(--step--1); letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); font-weight: 600; margin-bottom: 16px; }
.footer-col p, .footer-col a { font-size: var(--step-0); color: var(--ink-soft); }
.footer-col a { text-decoration: none; }
.footer-col a:hover { color: var(--red); }
.footer-col ul { display: grid; gap: 10px; }
.footer-about { font-size: var(--step-0); color: var(--muted); max-width: 36ch; }
.footer-base {
  border-top: 1px solid var(--line);
  padding-block: 22px 28px;
  display: flex;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  font-size: var(--step--1);
  color: var(--muted);
}
.footer-base a { color: var(--muted); text-decoration: none; }
.footer-base a:hover { color: var(--red); }

/* ---------- scroll reveal (only when JS is active) ---------- */
.js [data-reveal] { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s ease; }
.js [data-reveal].is-in { opacity: 1; transform: none; }

/* ---------- focus visibility ---------- */
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 2px;
}

/* ---------- responsive ---------- */
@media (max-width: 860px) {
  .cards { grid-template-columns: 1fr; }
  .values { grid-template-columns: 1fr; gap: 36px; }
  .svc { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .facts { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }

  .nav {
    position: fixed;
    inset: 72px 0 auto 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    background: #fff;
    border-bottom: 1px solid var(--line);
    padding: 8px var(--gutter) 20px;
    transform: translateY(-12px);
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s ease, transform .2s ease;
  }
  .nav.is-open { transform: none; opacity: 1; pointer-events: auto; }
  .nav a { width: 100%; padding: 14px 0; border-bottom: 1px solid var(--line); }
  .nav a.btn { margin-top: 14px; width: auto; border-bottom: 1px solid var(--ink); }
  .nav-toggle { display: inline-flex; align-items: center; }
  .cta-grid { flex-direction: column; align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js [data-reveal] { opacity: 1; transform: none; transition: none; }
  .btn, .card, .nav, .nav a { transition: none; }
}
