/*
 * CivicKind Technologies — corporate site.
 *
 * The environment is light: white and near-white surfaces, charcoal type,
 * generous space, hairline rules. Purple is an accent and never a wash — it
 * marks actions, section eyebrows, rules, icons and hover states. Anything
 * that would read as a purple "brand block" is deliberately absent.
 *
 * Restraint is the point: squared corners on most surfaces, one shadow level,
 * short transitions, no decorative illustration.
 *
 * NOTE: the palette below is a close reading of the CivicKind logo's deep
 * purple and charcoal. When the logo file lands, sample it and correct
 * --purple-700/600/500 here — nothing else needs to change.
 */

:root {
  --purple-700: #3c2a63;
  --purple-600: #5b3e8e;
  --purple-500: #7b5bb5;
  --purple-100: #efeaf7;
  --purple-050: #f8f6fc;

  --ink-900: #14141a;
  --ink-700: #2a2a33;
  --ink-500: #5a5a66;
  --ink-300: #8b8b96;

  --white: #ffffff;
  --paper: #fbfbfd;
  --line: #e6e6ec;
  --line-strong: #d4d4dd;

  --shadow: 0 24px 60px -32px rgb(20 20 26 / 0.35);

  --max: 1180px;
  --gutter: 20px;

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

@media (min-width: 768px) {
  :root {
    --gutter: 40px;
  }
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--white);
  color: var(--ink-700);
  font-family: Inter, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4 {
  margin: 0 0 0.6em;
  color: var(--ink-900);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.025em;
  text-wrap: balance;
}

h1 {
  font-size: clamp(2.6rem, 6.5vw, 4.6rem);
  letter-spacing: -0.04em;
}

h2 {
  font-size: clamp(2rem, 4vw, 3rem);
}

h3 {
  font-size: 1.3rem;
  letter-spacing: -0.015em;
}

p {
  margin: 0 0 1.1em;
}

a {
  color: var(--purple-600);
  text-underline-offset: 3px;
}

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

.container {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.narrow {
  max-width: 760px;
}

.section {
  padding: 88px 0;
  border-top: 1px solid var(--line);
}

@media (min-width: 900px) {
  .section {
    padding: 132px 0;
  }
}

.section--plain {
  border-top: 0;
}

.section--paper {
  background: var(--paper);
}

.section--ink {
  background: var(--ink-900);
  border-top: 0;
  color: rgb(255 255 255 / 0.72);
}

.section--ink h2,
.section--ink h3 {
  color: var(--white);
}

/* Eyebrow: the one place purple appears as type. */
.eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 20px;
  color: var(--purple-600);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.eyebrow::before {
  content: '';
  width: 28px;
  height: 1px;
  background: var(--purple-500);
}

.section--ink .eyebrow {
  color: var(--purple-500);
}

.lead {
  max-width: 62ch;
  font-size: 1.16rem;
  color: var(--ink-500);
}

.section--ink .lead {
  color: rgb(255 255 255 / 0.66);
}

.muted {
  color: var(--ink-500);
}

.small {
  font-size: 0.92rem;
}

/* Buttons */
.button {
  display: inline-flex;
  white-space: nowrap;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 28px;
  border: 1px solid transparent;
  border-radius: 2px;
  font-size: 0.97rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition:
    background-color 0.2s var(--ease),
    color 0.2s var(--ease),
    border-color 0.2s var(--ease),
    transform 0.2s var(--ease);
}

.button:hover {
  transform: translateY(-1px);
}

.button--primary {
  background: var(--purple-600);
  color: var(--white);
}

.button--primary:hover {
  background: var(--purple-700);
}

.button--ghost {
  border-color: var(--line-strong);
  color: var(--ink-900);
  background: transparent;
}

.button--ghost:hover {
  border-color: var(--purple-600);
  color: var(--purple-600);
}

.button--light {
  background: var(--white);
  color: var(--ink-900);
}

.button--sm {
  min-height: 44px;
  padding: 0 20px;
  font-size: 0.9rem;
}

.arrow-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  text-decoration: none;
}

.arrow-link svg {
  transition: transform 0.2s var(--ease);
}

.arrow-link:hover svg {
  transform: translateX(4px);
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgb(255 255 255 / 0.86);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 28px;
  min-height: 76px;
}

.brand {
  display: inline-flex;
  align-items: center;
  /*gap: 12px;*/
  text-decoration: none;
  color: var(--ink-900);
  font-weight: 600;
  letter-spacing: -0.02em;
}

.brand img {
  /*height: 36px;*/
  width: auto;
}

/* Shown only if the logo file is missing, so the header never breaks. */
.brand-fallback {
  display: none;
  align-items: center;
  gap: 10px;
}

.brand-fallback::before {
  content: '';
  width: 28px;
  height: 28px;
  border: 2px solid var(--purple-600);
  border-radius: 50%;
  border-right-color: transparent;
}

.brand-name {
  font-size: 1.02rem;
  white-space: nowrap;
}

.nav {
  display: none;
  margin-left: auto;
  gap: 22px;
}

.nav a {
  position: relative;
  white-space: nowrap;
  color: var(--ink-700);
  font-size: 0.95rem;
  text-decoration: none;
  padding: 6px 0;
}

.nav a::after {
  content: '';
  position: absolute;
  left: 0;
  right: 100%;
  bottom: 0;
  height: 1.5px;
  background: var(--purple-600);
  transition: right 0.24s var(--ease);
}

.nav a:hover,
.nav a[aria-current='page'] {
  color: var(--ink-900);
}

.nav a:hover::after,
.nav a[aria-current='page']::after {
  right: 0;
}

.header-cta {
  display: none;
}

.nav-toggle {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  margin-left: auto;
  width: 48px;
  height: 48px;
  padding: 0 10px;
  background: none;
  border: 0;
  cursor: pointer;
}

.nav-toggle span {
  height: 1.5px;
  background: var(--ink-900);
  transition: transform 0.24s var(--ease), opacity 0.2s var(--ease);
}

.nav-toggle[aria-expanded='true'] span:nth-child(1) {
  transform: translateY(6.5px) rotate(45deg);
}

.nav-toggle[aria-expanded='true'] span:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded='true'] span:nth-child(3) {
  transform: translateY(-6.5px) rotate(-45deg);
}

@media (min-width: 1120px) {
  .nav,
  .header-cta {
    display: flex;
  }

  .nav-toggle {
    display: none;
  }
}

@media (min-width: 1120px) {
  .mobile-menu {
    display: none !important;
  }
}

/* Mobile menu */
.mobile-menu {
  display: none;
  border-top: 1px solid var(--line);
  background: var(--white);
}

.mobile-menu[data-open='true'] {
  display: block;
}

.mobile-menu nav {
  display: flex;
  flex-direction: column;
  padding: 12px 0 24px;
}

.mobile-menu a {
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  color: var(--ink-900);
  text-decoration: none;
  font-size: 1.02rem;
}

.mobile-menu .button {
  margin-top: 20px;
  width: 100%;
}

@media (min-width: 1040px) {
  .mobile-menu {
    display: none !important;
  }
}

/* Hero */
.hero {
  position: relative;
  overflow: hidden;
  padding: 72px 0 88px;
}

@media (min-width: 900px) {
  .hero {
    padding: 120px 0 128px;
  }
}

/*
 * The only decoration on the site: a faint node-and-line field suggesting
 * connections between people and institutions. It is an SVG behind the text at
 * low opacity, and it never competes with the headline.
 */
.hero-field {
  position: absolute;
  inset: -10% -20% auto auto;
  width: min(880px, 92vw);
  opacity: 0.5;
  pointer-events: none;
}

.hero-inner {
  position: relative;
  max-width: 900px;
}

.hero h1 {
  margin-bottom: 24px;
}

.hero h1 em {
  font-style: normal;
  color: var(--purple-600);
}

.hero-sub {
  font-size: clamp(1.15rem, 2vw, 1.45rem);
  color: var(--ink-900);
  font-weight: 500;
  margin-bottom: 18px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 36px;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 28px;
  margin: 56px 0 0;
  padding: 26px 0 0;
  border-top: 1px solid var(--line);
  list-style: none;
  font-size: 0.86rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-300);
}

/* Section heads */
.section-head {
  display: grid;
  gap: 20px;
  margin-bottom: 56px;
}

@media (min-width: 900px) {
  .section-head--split {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
    gap: 64px;
    align-items: end;
  }
}

/* Process rail: LISTEN → RESEARCH → … */
.rail {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 40px 0 0;
  padding: 0;
  list-style: none;
}

.rail li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  border: 1px solid var(--line);
  border-radius: 2px;
  background: var(--white);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-900);
}

.rail li::before {
  content: '';
  width: 6px;
  height: 6px;
  background: var(--purple-500);
  border-radius: 50%;
}

/* Problem list */
.tick-list {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

@media (min-width: 720px) {
  .tick-list--two {
    grid-template-columns: 1fr 1fr;
    gap: 12px 40px;
  }
}

.tick-list li {
  display: flex;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
  color: var(--ink-500);
}

.tick-list li::before {
  content: '';
  flex: none;
  width: 14px;
  height: 1px;
  margin-top: 14px;
  background: var(--purple-500);
}

/* Cards */
.grid {
  display: grid;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}

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

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

.cell {
  background: var(--white);
  padding: 36px 32px;
  transition: background-color 0.24s var(--ease);
}

.cell:hover {
  background: var(--purple-050);
}

.cell p:last-child {
  margin-bottom: 0;
}

.cell-number {
  display: block;
  margin-bottom: 18px;
  color: var(--purple-600);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.16em;
}

/* Services: a numbered ledger rather than a card grid. */
.ledger {
  border-top: 1px solid var(--line);
}

.ledger-row {
  display: grid;
  gap: 8px 40px;
  padding: 32px 0;
  border-bottom: 1px solid var(--line);
  transition: padding-left 0.3s var(--ease);
}

.ledger-row:hover {
  padding-left: 12px;
}

@media (min-width: 900px) {
  .ledger-row {
    grid-template-columns: 90px minmax(0, 300px) minmax(0, 1fr);
    align-items: baseline;
  }
}

.ledger-row .cell-number {
  margin: 0;
}

.ledger-row h3 {
  margin: 0;
}

.ledger-row p {
  margin: 0;
  color: var(--ink-500);
}

/* Approach steps */
.steps {
  counter-reset: step;
  display: grid;
  gap: 1px;
  background: rgb(255 255 255 / 0.1);
  border: 1px solid rgb(255 255 255 / 0.12);
}

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

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

.step {
  background: var(--ink-900);
  padding: 34px 30px;
}

.step-number {
  display: block;
  margin-bottom: 14px;
  color: var(--purple-500);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.16em;
}

.step h3 {
  font-size: 1.15rem;
  margin-bottom: 8px;
}

.step p {
  margin: 0;
  color: rgb(255 255 255 / 0.64);
  font-size: 0.97rem;
}

/* Founder */
.founder {
  display: grid;
  gap: 44px;
  align-items: start;
}

@media (min-width: 900px) {
  .founder {
    grid-template-columns: minmax(0, 420px) minmax(0, 1fr);
    gap: 72px;
  }
}

.portrait {
  position: relative;
  border: 1px solid var(--line);
  background: var(--paper);
}

.portrait img {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 5;
  object-fit: cover;
}

/* A quiet stand-in until the photograph is dropped in. */
.portrait-fallback {
  display: none;
  aspect-ratio: 4 / 5;
  place-items: center;
  text-align: center;
  padding: 32px;
  color: var(--ink-300);
  font-size: 0.86rem;
  background:
    linear-gradient(140deg, var(--purple-050), var(--white) 60%);
}

.portrait::after {
  content: '';
  position: absolute;
  left: -1px;
  bottom: -1px;
  width: 64px;
  height: 3px;
  background: var(--purple-600);
}

.credentials {
  display: grid;
  gap: 14px;
  margin: 28px 0;
  padding: 0;
  list-style: none;
}

.credentials li {
  display: flex;
  gap: 14px;
  align-items: baseline;
  color: var(--ink-700);
}

.credentials li::before {
  content: '';
  flex: none;
  width: 6px;
  height: 6px;
  border: 1.5px solid var(--purple-600);
  transform: rotate(45deg);
}

.strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin-top: 30px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  list-style: none;
  padding-left: 0;
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-300);
}

/* SafeClub — its own identity inside a CivicKind page. */
.flagship {
  display: grid;
  gap: 40px;
  align-items: center;
}

@media (min-width: 940px) {
  .flagship {
    grid-template-columns: minmax(0, 1fr) minmax(0, 420px);
    gap: 80px;
  }
}

.flagship-card {
  padding: 40px 36px;
  border: 1px solid var(--line);
  background:
    radial-gradient(120% 120% at 100% 0%, #fde8ef 0%, var(--white) 58%);
}

.flagship-card .sc-wordmark {
  font-size: 2rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: #9e4e61;
  margin: 0;
}

.flagship-card .sc-tagline {
  color: #b95f73;
  font-weight: 500;
  margin: 2px 0 22px;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 26px 0 0;
  padding: 0;
  list-style: none;
}

.tag-row li {
  padding: 7px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-size: 0.83rem;
  color: var(--ink-500);
}

.section--ink .tag-row li {
  border-color: rgb(255 255 255 / 0.18);
  color: rgb(255 255 255 / 0.7);
}

/* Partners */
.partners {
  display: grid;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}

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

.partner {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 34px 32px;
  background: var(--white);
}

.partner-name {
  font-size: 1.08rem;
  font-weight: 600;
  color: var(--ink-900);
  letter-spacing: -0.015em;
}

.partner-full {
  font-size: 0.92rem;
  color: var(--ink-300);
}

.partner p {
  margin: 6px 0 0;
  color: var(--ink-500);
  font-size: 0.97rem;
}

.partner-note {
  margin-top: 28px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  color: var(--ink-500);
  font-size: 0.95rem;
}

/* Forms */
.form {
  display: grid;
  gap: 22px;
}

@media (min-width: 760px) {
  .form--two {
    grid-template-columns: 1fr 1fr;
  }

  .form .field--wide {
    grid-column: 1 / -1;
  }
}

.field {
  display: grid;
  gap: 8px;
}

.field label {
  font-size: 0.89rem;
  font-weight: 600;
  color: var(--ink-900);
}

.field .optional {
  font-weight: 400;
  color: var(--ink-300);
}

.field input,
.field textarea,
.field select {
  width: 100%;
  min-height: 52px;
  padding: 14px 16px;
  border: 1px solid var(--line-strong);
  border-radius: 2px;
  background: var(--white);
  color: var(--ink-900);
  font: inherit;
  font-size: 1rem;
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

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

.field input:focus,
.field textarea:focus,
.field select:focus {
  outline: none;
  border-color: var(--purple-600);
  box-shadow: 0 0 0 3px var(--purple-100);
}

.field-hint {
  font-size: 0.85rem;
  color: var(--ink-300);
}

.form-error {
  color: #b3261e;
  font-size: 0.88rem;
  font-weight: 600;
}

.form-status {
  margin: 0;
  font-size: 0.95rem;
  color: var(--ink-500);
}

.form-status:empty {
  display: none;
}

.notice {
  padding: 28px 30px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--purple-600);
  background: var(--purple-050);
}

.notice h3 {
  font-size: 1.05rem;
}

.notice p:last-child,
.notice ul:last-child {
  margin-bottom: 0;
}

.notice ul {
  margin: 0 0 1em;
  padding-left: 1.1em;
  color: var(--ink-500);
  font-size: 0.95rem;
}

.notice li {
  margin-bottom: 0.5em;
}

/* Contact */
.contact-grid {
  display: grid;
  gap: 48px;
}

@media (min-width: 940px) {
  .contact-grid {
    grid-template-columns: minmax(0, 340px) minmax(0, 1fr);
    gap: 80px;
  }
}

.contact-list {
  display: grid;
  gap: 22px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.contact-list dt {
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-300);
  margin-bottom: 4px;
}

.contact-list dd {
  margin: 0 0 20px;
  color: var(--ink-900);
}

/* Footer */
.site-footer {
  background: var(--ink-900);
  color: rgb(255 255 255 / 0.62);
  padding: 72px 0 32px;
}

.footer-top {
  display: grid;
  gap: 40px;
  padding-bottom: 44px;
  border-bottom: 1px solid rgb(255 255 255 / 0.12);
}

@media (min-width: 860px) {
  .footer-top {
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) minmax(0, 1fr);
    gap: 64px;
  }
}

.site-footer .brand {
  color: var(--white);
}

.site-footer h4 {
  color: var(--white);
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 18px;
}

.footer-links {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-links a {
  color: rgb(255 255 255 / 0.66);
  text-decoration: none;
  font-size: 0.96rem;
}

.footer-links a:hover {
  color: var(--white);
}

.socials {
  display: flex;
  gap: 12px;
  margin-top: 22px;
}

.socials a {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid rgb(255 255 255 / 0.18);
  border-radius: 50%;
  color: rgb(255 255 255 / 0.7);
  transition: border-color 0.2s var(--ease), color 0.2s var(--ease);
}

.socials a:hover {
  border-color: var(--purple-500);
  color: var(--white);
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  padding-top: 26px;
  font-size: 0.86rem;
  color: rgb(255 255 255 / 0.45);
}

/* Motion: entrances only, and only when motion is welcome. */
[data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition:
    opacity 0.6s var(--ease),
    transform 0.6s var(--ease);
}

[data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  [data-reveal] {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .button:hover,
  .arrow-link:hover svg,
  .ledger-row:hover {
    transform: none;
    padding-left: 0;
  }
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 10px;
  z-index: 100;
  padding: 10px 18px;
  background: var(--ink-900);
  color: var(--white);
  border-radius: 2px;
}

.skip-link:focus {
  left: 16px;
}

:focus-visible {
  outline: 2px solid var(--purple-600);
  outline-offset: 3px;
}
