:root {
  --graphite: #1c1e22;
  --graphite-deep: #121316;
  --panel: #202329;
  --paper: #eceae4;
  --paper-dim: #a3a29b;
  --line: #34373d;

  --swatch-1: #b5432c;
  --swatch-2: #c9862f;
  --swatch-3: #4f7a5b;
  --swatch-4: #3c6e8f;
  --swatch-5: #5b4c8a;
  --swatch-6: #8a3c5e;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--graphite-deep);
  color: var(--paper);
  font-family: -apple-system, "Segoe UI", "Inter", Helvetica, Arial, sans-serif;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: inherit; }

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

header.site {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 18px clamp(20px, 5vw, 56px);
  border-bottom: 1px solid var(--line);
}

.wordmark {
  justify-self: start;
  font-weight: 650;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}

.brand-blocks {
  display: flex;
  gap: 2px;
}
.brand-blocks div { width: 6px; height: 6px; }
.brand-blocks div:nth-child(1) { background: #E63946; }
.brand-blocks div:nth-child(2) { background: #F3722C; }
.brand-blocks div:nth-child(3) { background: #F9C74F; }
.brand-blocks div:nth-child(4) { background: #90BE6D; }
.brand-blocks div:nth-child(5) { background: #17A398; }
.brand-blocks div:nth-child(6) { background: #277DA1; }
.brand-blocks div:nth-child(7) { background: #6A4C93; }

.header-slogan {
  font-size: 0.68rem;
  font-weight: 600;
  color: #17A398;
  letter-spacing: 0.01em;
  margin-top: 1px;
}

.header-phone {
  justify-self: center;
  color: var(--paper);
  font-weight: 650;
  font-size: 0.95rem;
  text-decoration: none;
  border-bottom: 1px solid var(--line);
  padding-bottom: 2px;
  white-space: nowrap;
}
.header-phone:hover { border-color: var(--paper); }

nav.site {
  justify-self: end;
  display: flex;
  gap: clamp(18px, 3vw, 32px);
}

nav.site a {
  text-decoration: none;
  color: var(--paper-dim);
  font-size: 0.95rem;
  padding-bottom: 3px;
  border-bottom: 1px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}

nav.site a:hover,
nav.site a[aria-current="page"] {
  color: var(--paper);
  border-color: var(--swatch-2);
}

/* ---------- Shared layout helpers ---------- */

main {
  flex: 1;
  width: 100%;
}

.wrap {
  max-width: 880px;
  margin: 0 auto;
  padding: 0 clamp(20px, 5vw, 56px);
}

.swatch-row {
  display: flex;
  gap: 6px;
}

.swatch-row div {
  width: 30px;
  height: 30px;
  border-radius: 3px;
}
.swatch-row div:nth-child(1) { background: #E63946; }
.swatch-row div:nth-child(2) { background: #F3722C; }
.swatch-row div:nth-child(3) { background: #F9C74F; }
.swatch-row div:nth-child(4) { background: #90BE6D; }
.swatch-row div:nth-child(5) { background: #17A398; }
.swatch-row div:nth-child(6) { background: #277DA1; }
.swatch-row div:nth-child(7) { background: #6A4C93; }

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

footer.site {
  border-top: 1px solid var(--line);
  padding: 28px clamp(20px, 5vw, 56px);
  color: var(--paper-dim);
  font-size: 0.88rem;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

footer.site a {
  color: var(--paper);
  text-decoration: none;
  border-bottom: 1px solid var(--line);
}
footer.site a:hover { border-bottom-color: var(--paper); }

/* ---------- Focus visibility ---------- */

a:focus-visible, button:focus-visible {
  outline: 2px solid var(--swatch-4);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: no-preference) {
  .rise { animation: rise 0.5s ease-out; }
  @keyframes rise {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
  }
}
