/* ==========================================================================
   Clairity Solutions — site styles
   ========================================================================== */

/* Inter (SIL Open Font License, see assets/fonts/OFL.txt), self-hosted so no
   visitor data is sent to a third-party font service */
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../assets/fonts/inter-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../assets/fonts/inter-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  /* Brand — sampled from the Clairity Solutions logo (#a01731) */
  --brand: #a01731;
  --brand-700: #7d1126;   /* hovers, gradient starts */
  --brand-300: #e2697f;   /* accent on dark backgrounds */
  --brand-100: #fbecef;   /* tints behind icons */

  /* Dark base — warm charcoal that sits with the crimson */
  --dark: #221b20;
  --dark-800: #2e2429;
  --dark-700: #423139;

  --ink: #1f1a1c;
  --ink-600: #574e52;
  --ink-400: #746c70;
  --line: #e8e3e5;
  --bg: #ffffff;
  --bg-soft: #f8f5f6;
  --white: #ffffff;
  --radius: 10px;
  --shadow: 0 6px 24px rgba(34, 27, 32, 0.10);
  --max: 1140px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 {
  margin: 0 0 0.5em;
  line-height: 1.2;
  color: var(--dark);
  font-weight: 700;
  letter-spacing: -0.01em;
}
h1 { font-size: clamp(2rem, 4.5vw, 3.25rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.25rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1em; }

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

.section { padding: 80px 0; }
.section--soft { background: var(--bg-soft); }
.section--dark { background: var(--dark); color: #ded5d9; }
.section--dark h2, .section--dark h3 { color: var(--white); }

.section-head { max-width: 680px; margin-bottom: 44px; }
.eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--brand);
  margin-bottom: 10px;
}
.section--dark .eyebrow { color: var(--brand-300); }
.section-head p { color: var(--ink-600); font-size: 1.05rem; }
.section--dark .section-head p { color: #c5b9be; }

.lead { font-size: 1.15rem; color: var(--ink-600); }

/* Buttons ---------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.95rem;
  border: 2px solid transparent;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.btn:hover { text-decoration: none; }
.btn--primary { background: var(--brand); color: var(--white); }
.btn--primary:hover { background: var(--brand-700); }
.btn--outline { border-color: var(--dark); color: var(--dark); background: transparent; }
.btn--outline:hover { background: var(--dark); color: var(--white); }
.btn--outline-light { border-color: rgba(255,255,255,0.6); color: var(--white); background: transparent; }
.btn--outline-light:hover { background: var(--white); color: var(--dark); }

/* Header ----------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255,255,255,0.96);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 80px;
}
.brand {
  display: inline-flex;
  align-items: center;
  line-height: 0;
}
.brand:hover { text-decoration: none; }
.brand img { height: 46px; width: auto; }

/* The logo is crimson artwork on a transparent ground, so on the dark footer
   it sits on its own white plate rather than fighting the background. */
.brand--footer {
  background: var(--white);
  padding: 12px 16px;
  border-radius: 8px;
}
.brand--footer img { height: 62px; }

.nav { display: flex; align-items: center; gap: 28px; }
.nav a {
  color: var(--ink-600);
  font-weight: 500;
  font-size: 0.95rem;
}
.nav a:hover, .nav a[aria-current="page"] { color: var(--dark); text-decoration: none; }
.nav a[aria-current="page"] { position: relative; }
.nav a[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -6px;
  height: 2px;
  background: var(--brand);
  border-radius: 2px;
}
.nav .btn { padding: 9px 18px; color: var(--white); }

.nav-toggle {
  display: none;
  background: none;
  border: 0;
  padding: 8px;
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  width: 24px; height: 2px;
  background: var(--dark);
  margin: 5px 0;
  transition: transform 0.2s, opacity 0.2s;
}

/* Hero ------------------------------------------------------------------- */
.hero {
  background:
    radial-gradient(900px 500px at 85% -10%, rgba(160,23,49,0.42), transparent 62%),
    linear-gradient(160deg, var(--dark) 0%, var(--dark-800) 58%, var(--dark-700) 100%);
  color: var(--white);
  padding: 110px 0 100px;
  position: relative;
  overflow: hidden;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.04) 1px, transparent 1px);
  background-size: 48px 48px;
  pointer-events: none;
}
.hero .container { position: relative; z-index: 1; }
.hero h1 { color: var(--white); max-width: 760px; margin-bottom: 20px; }
.hero p { max-width: 620px; font-size: 1.15rem; color: #d6cad0; margin-bottom: 32px; }
.hero .eyebrow { color: var(--brand-300); margin-bottom: 18px; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }

.hero--compact { padding: 70px 0 60px; }
.hero--compact p { margin-bottom: 0; }

/* Stats strip ------------------------------------------------------------ */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  padding: 36px 0;
  border-bottom: 1px solid var(--line);
}
.stat strong {
  display: block;
  font-size: 2rem;
  color: var(--dark);
  line-height: 1.1;
}
.stat span { color: var(--ink-600); font-size: 0.95rem; }

/* Cards & grids ---------------------------------------------------------- */
.grid { display: grid; gap: 24px; }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }

.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  transition: transform 0.15s, box-shadow 0.15s;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.card .icon {
  width: 48px; height: 48px;
  border-radius: 10px;
  background: var(--brand-100);
  color: var(--brand);
  display: grid;
  place-items: center;
  margin-bottom: 18px;
}
.card .icon svg { width: 24px; height: 24px; }
.card h3 { margin-bottom: 8px; }
.card p { color: var(--ink-600); margin-bottom: 0; }
.card ul { margin: 12px 0 0; padding-left: 18px; color: var(--ink-600); }
.card li { margin-bottom: 4px; }

/* Project cards ---------------------------------------------------------- */
.project {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 0;
}
.project__banner {
  height: 150px;
  display: flex;
  align-items: flex-end;
  padding: 20px;
  color: var(--white);
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  /* the dark wash keeps the label legible over the lighter gradients */
  background-image:
    linear-gradient(to bottom, rgba(0,0,0,0) 45%, rgba(0,0,0,0.38) 100%),
    linear-gradient(135deg, var(--banner-from), var(--banner-to));
}
.case__banner {
  background-image: linear-gradient(135deg, var(--banner-from), var(--banner-to));
}
.project__banner--a { --banner-from: #a01731; --banner-to: #c23e56; }
.project__banner--b { --banner-from: #2e2429; --banner-to: #6b4f5c; }
.project__banner--c { --banner-from: #6d0f22; --banner-to: #a01731; }
.project__banner--d { --banner-from: #221b20; --banner-to: #5c4a52; }
.project__banner--e { --banner-from: #4a2340; --banner-to: #a01731; }
.project__banner--f { --banner-from: #7d1126; --banner-to: #221b20; }
.project__body { padding: 24px 28px 28px; display: flex; flex-direction: column; flex: 1; }
.project__body p { flex: 1; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.tag {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--bg-soft);
  color: var(--ink-600);
  border: 1px solid var(--line);
}

/* Case study (projects page) --------------------------------------------- */
.case {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 40px;
  padding: 48px 0;
  border-bottom: 1px solid var(--line);
}
.case:last-child { border-bottom: 0; }
.case__meta dl { margin: 0; }
.case__meta dt {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-400);
  font-weight: 600;
  margin-top: 14px;
}
.case__meta dt:first-child { margin-top: 0; }
.case__meta dd { margin: 2px 0 0; color: var(--ink); font-weight: 500; }
.case__banner {
  height: 120px;
  border-radius: var(--radius);
  margin-bottom: 22px;
}
.case h3 { font-size: 1.5rem; }
.case h4 {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--brand);
  margin: 22px 0 6px;
}
.case p { color: var(--ink-600); }
.case ul { color: var(--ink-600); padding-left: 20px; margin: 0; }
.case li { margin-bottom: 6px; }

/* Process ---------------------------------------------------------------- */
.steps { counter-reset: step; }
.step {
  position: relative;
  padding-left: 64px;
}
.step::before {
  counter-increment: step;
  content: counter(step, decimal-leading-zero);
  position: absolute;
  left: 0; top: 0;
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--brand);
  color: var(--white);
  font-weight: 700;
  display: grid;
  place-items: center;
}
.step h3 { margin-bottom: 6px; }
.step p { color: var(--ink-600); margin: 0; }
.section--dark .step p { color: #c5b9be; }

/* Split layout ----------------------------------------------------------- */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
}
ul.checks { list-style: none; padding: 0; margin: 0; }
ul.checks li {
  position: relative;
  padding-left: 30px;
  margin-bottom: 12px;
  color: var(--ink-600);
}
ul.checks li::before {
  content: "";
  position: absolute;
  left: 0; top: 4px;
  width: 18px; height: 18px;
  border-radius: 50%;
  background-color: var(--brand-100);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23a01731' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E");
  background-size: 11px;
  background-repeat: no-repeat;
  background-position: center;
}

.map-panel {
  background: var(--dark);
  border-radius: var(--radius);
  padding: 36px;
  color: #d6cad0;
}
.map-panel h3 { color: var(--white); }
.map-panel .pin {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 14px 0;
  border-top: 1px solid rgba(255,255,255,0.1);
}
.map-panel .pin:first-of-type { border-top: 0; }
.map-panel .pin svg { flex: none; width: 20px; height: 20px; color: var(--brand-300); margin-top: 3px; }
.map-panel .pin strong { display: block; color: var(--white); }

/* Testimonials ----------------------------------------------------------- */
.quote {
  background: var(--white);
  border-left: 4px solid var(--brand);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
  margin: 0;
}
.quote p { font-size: 1.05rem; color: var(--ink); font-style: italic; }
.quote footer { color: var(--ink-600); font-size: 0.9rem; }
.quote footer strong { color: var(--dark); }

/* CTA band --------------------------------------------------------------- */
.cta {
  background: linear-gradient(135deg, var(--brand-700), var(--brand));
  color: var(--white);
  padding: 64px 0;
}
.cta .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
}
.cta h2 { color: var(--white); margin-bottom: 6px; }
.cta p { margin: 0; color: rgba(255,255,255,0.9); }
.cta .btn { background: var(--white); color: var(--brand); }
.cta .btn:hover { background: var(--dark); color: var(--white); }

/* Contact ---------------------------------------------------------------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 56px;
}
.contact-list { list-style: none; padding: 0; margin: 24px 0 0; }
.contact-list li {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 16px 0;
  border-top: 1px solid var(--line);
}
.contact-list li:first-child { border-top: 0; padding-top: 0; }
.contact-list svg { flex: none; width: 22px; height: 22px; color: var(--brand); margin-top: 2px; }
.contact-list strong { display: block; color: var(--dark); }
.contact-list span, .contact-list a { color: var(--ink-600); }

.contact-card {
  align-self: start;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: var(--shadow);
}
.contact-card p { color: var(--ink-600); }
.contact-card .btn { margin-top: 8px; }
.contact-card .form-note { font-size: 0.85rem; color: var(--ink-400); margin: 16px 0 0; }

/* Long-form text (privacy notice) ---------------------------------------- */
.prose { max-width: 760px; }
.prose h2 { font-size: 1.5rem; margin-top: 2em; }
.prose h2:first-child { margin-top: 0; }
.prose p, .prose li { color: var(--ink-600); }
.prose ul { padding-left: 1.25em; margin: 0 0 1em; }
.prose li { margin-bottom: 6px; }
.prose strong { color: var(--dark); }
.prose .updated { font-size: 0.9rem; color: var(--ink-400); }
.table-wrap { overflow-x: auto; margin: 0 0 1em; }
.prose table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
.prose th, .prose td { text-align: left; vertical-align: top; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.prose th { color: var(--dark); background: var(--bg-soft); font-weight: 600; }
.prose td { color: var(--ink-600); }

/* Footer ----------------------------------------------------------------- */
.site-footer {
  background: var(--dark);
  color: #b7abb0;
  padding: 56px 0 28px;
  font-size: 0.93rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.4fr;
  gap: 40px;
  padding-bottom: 36px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
.site-footer h4 { color: var(--white); font-size: 0.9rem; text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 14px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 8px; }
.site-footer a { color: #b7abb0; }
.site-footer a:hover { color: var(--white); }
.site-footer .brand { margin-bottom: 16px; }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding-top: 24px;
  font-size: 0.85rem;
  color: #8d8287;
}
.footer-bottom a { color: #b7abb0; text-decoration: underline; }
.footer-legal { margin-top: 16px; font-size: 0.8rem; line-height: 1.55; color: #8d8287; }
.footer-legal p { margin: 0 0 6px; }

/* Responsive ------------------------------------------------------------- */
@media (max-width: 960px) {
  .grid--3, .grid--4 { grid-template-columns: repeat(2, 1fr); }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .split, .contact-grid, .case { grid-template-columns: 1fr; gap: 36px; }
}

@media (max-width: 720px) {
  .section { padding: 56px 0; }
  .hero { padding: 72px 0 64px; }
  .grid--2, .grid--3, .grid--4 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }

  .nav-toggle { display: block; }
  .nav {
    position: absolute;
    top: 80px; left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--white);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow);
    display: none;
    padding: 8px 0 16px;
  }
  .nav.is-open { display: flex; }
  .nav a { padding: 12px 20px; }
  .nav a[aria-current="page"]::after { display: none; }
  .nav .btn { margin: 8px 20px 0; justify-content: center; }
  .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); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .card, .btn, .nav-toggle span { transition: none; }
}
