/* =========================================================
   Clarity Data Solutions — Stylesheet
   Aesthetic: editorial, refined, technical-but-warm
   Palette: deep ink navy + warm cream + signal amber
   ========================================================= */

:root {
  /* Colors */
  --ink: #11161f;          /* deep navy-black */
  --ink-soft: #1c2330;
  --cream: #f5efe6;        /* warm paper */
  --cream-deep: #ece4d6;
  --rule: #d9cfbe;         /* hairline rule color on cream */
  --amber: #c8732b;        /* signal accent */
  --amber-soft: #e0a063;
  --muted: #6b6558;

  /* Typography */
  --font-display: 'Newsreader', 'Times New Roman', serif;
  --font-body: 'Inter', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, 'SF Mono', monospace;

  /* Layout */
  --max-w: 1200px;
  --pad-x: 1.5rem;
  --radius: 4px;
}

/* Reset */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--cream);
  line-height: 1.55;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-feature-settings: "liga" 1, "dlig" 0, "hlig" 0;
}

/* Subtle paper-grain background */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: radial-gradient(circle at 1px 1px, rgba(17,22,31,0.04) 1px, transparent 0);
  background-size: 24px 24px;
  pointer-events: none;
  z-index: 0;
}

main, section, header, footer { position: relative; z-index: 1; }

a { color: inherit; text-decoration: none; }
a:hover { color: var(--amber); }

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

.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding-left: var(--pad-x);
  padding-right: var(--pad-x);
}

/* =========================================================
   Header / Nav
   ========================================================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(245,239,230,0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--rule);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1rem;
  padding-bottom: 1rem;
}
.logo {
  display: inline-flex;
  align-items: baseline;
  gap: 0.5rem;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.35rem;
  letter-spacing: -0.01em;
}
.logo-mark {
  font-size: 1.4rem;
  color: var(--amber);
  transform: translateY(2px);
}
.logo-dot { color: var(--amber); }

.nav-links {
  display: flex;
  gap: 2rem;
  font-size: 0.95rem;
}
.nav-links a {
  position: relative;
  padding-bottom: 2px;
}
.nav-links a::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  height: 1px;
  width: 0;
  background: var(--amber);
  transition: width 0.25s ease;
}
.nav-links a:hover::after { width: 100%; }

.nav-cta { display: inline-flex; }

@media (max-width: 720px) {
  .nav-links { display: none; }
}

/* =========================================================
   Buttons
   ========================================================= */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.85rem 1.4rem;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.95rem;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
  text-decoration: none;
}
.btn:hover { transform: translateY(-1px); }
.btn-sm { padding: 0.5rem 0.9rem; font-size: 0.85rem; }
.btn-lg { padding: 1rem 1.7rem; font-size: 1rem; }

.btn-primary {
  background: var(--ink);
  color: var(--cream);
}
.btn-primary:hover { background: var(--ink-soft); color: var(--cream); }

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--ink);
}
.btn-ghost:hover { background: var(--ink); color: var(--cream); }

/* =========================================================
   Hero
   ========================================================= */
.hero {
  padding-top: 5rem;
  padding-bottom: 6rem;
  position: relative;
  border-bottom: 1px solid var(--rule);
}
.hero-inner { max-width: 920px; }

.hero-meta {
  display: inline-flex;
  align-items: center;
  gap: 0.85rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 2rem;
}
.eyebrow { color: var(--amber); font-weight: 500; }
.meta-divider {
  display: inline-block;
  width: 24px;
  height: 1px;
  background: var(--muted);
}

.hero-title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(3rem, 8vw, 6.5rem);
  line-height: 1.0;
  letter-spacing: -0.025em;
  margin: 0 0 2rem;
  font-variation-settings: "opsz" 72;
}
.hero-title em {
  font-style: normal;
  color: var(--amber);
  font-weight: 500;
}

.hero-lede {
  font-size: 1.25rem;
  line-height: 1.55;
  max-width: 620px;
  color: var(--ink-soft);
  margin: 0 0 2.5rem;
}

.hero-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 4rem;
}

.hero-stats {
  display: flex;
  gap: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--rule);
  max-width: 620px;
}
.stat { display: flex; flex-direction: column; gap: 0.25rem; }
.stat-num {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--amber);
  letter-spacing: 0.08em;
}
.stat-label {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-style: normal;
  font-weight: 400;
  color: var(--ink);
}

/* =========================================================
   Section primitives
   ========================================================= */
.section {
  padding-top: 6rem;
  padding-bottom: 6rem;
  border-bottom: 1px solid var(--rule);
}
.section-head {
  display: flex;
  align-items: baseline;
  gap: 1.25rem;
  margin-bottom: 3rem;
}
.section-num {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--amber);
  letter-spacing: 0.08em;
}
.section-title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(2rem, 4vw, 3rem);
  letter-spacing: -0.02em;
  margin: 0;
}

/* =========================================================
   Services
   ========================================================= */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}
.service-card {
  background: var(--cream-deep);
  border: 1px solid var(--rule);
  padding: 2rem;
  border-radius: var(--radius);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  position: relative;
}
.service-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 32px -16px rgba(17,22,31,0.18);
}
.service-num {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--amber);
  letter-spacing: 0.08em;
  margin-bottom: 1rem;
}
.service-card h3 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.6rem;
  letter-spacing: -0.015em;
  margin: 0 0 0.85rem;
}
.service-card p {
  color: var(--ink-soft);
  margin: 0 0 1.25rem;
}
.service-list {
  list-style: none;
  padding: 0;
  margin: 0;
  border-top: 1px solid var(--rule);
  padding-top: 1rem;
}
.service-list li {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--muted);
  padding: 0.35rem 0;
}
.service-list li::before {
  content: '→ ';
  color: var(--amber);
}

/* =========================================================
   About
   ========================================================= */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
}
.about-lede {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.5rem, 2.5vw, 2rem);
  line-height: 1.3;
  letter-spacing: -0.015em;
  margin: 0;
}
.about-lede em { color: var(--amber); font-style: normal; font-weight: 600; }
.about-body p { margin: 0 0 1rem; color: var(--ink-soft); }
.about-body p:last-child { margin-bottom: 0; }

@media (max-width: 760px) {
  .about-grid { grid-template-columns: 1fr; gap: 2rem; }
}

/* =========================================================
   Book
   ========================================================= */
.book-lede {
  font-size: 1.15rem;
  color: var(--ink-soft);
  max-width: 640px;
  margin: 0 0 2.5rem;
}
.calendar-embed {
  background: var(--cream-deep);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  overflow: hidden;
  padding: 0.5rem;
}
.calendar-embed iframe {
  display: block;
  border-radius: calc(var(--radius) - 1px);
  background: #fff;
}

/* =========================================================
   Contact form
   ========================================================= */
.contact-lede {
  font-size: 1.15rem;
  color: var(--ink-soft);
  max-width: 640px;
  margin: 0 0 2.5rem;
}
.contact-lede code {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  background: var(--cream-deep);
  padding: 0.15rem 0.5rem;
  border-radius: 3px;
  color: var(--amber);
}

.contact-form {
  max-width: 620px;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}
.form-row {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.form-row label {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.optional { text-transform: none; opacity: 0.7; }

.form-row input,
.form-row textarea {
  font-family: var(--font-body);
  font-size: 1rem;
  padding: 0.85rem 1rem;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  background: var(--cream-deep);
  color: var(--ink);
  transition: border-color 0.2s ease, background 0.2s ease;
  resize: vertical;
}
.form-row input:focus,
.form-row textarea:focus {
  outline: none;
  border-color: var(--ink);
  background: #fff;
}

.contact-form button { align-self: flex-start; }

/* =========================================================
   Footer
   ========================================================= */
.site-footer {
  padding: 3rem 0;
  background: var(--ink);
  color: var(--cream);
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.5rem;
}
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-display);
  font-size: 1.1rem;
}
.footer-brand .logo-mark { color: var(--amber-soft); }
.footer-meta {
  display: flex;
  gap: 2rem;
  font-size: 0.9rem;
  flex-wrap: wrap;
  color: rgba(245,239,230,0.7);
}
.footer-meta a { color: var(--amber-soft); }
.footer-meta a:hover { color: var(--cream); }

/* =========================================================
   Page-load animation: gentle stagger reveal
   ========================================================= */
@media (prefers-reduced-motion: no-preference) {
  .hero-meta, .hero-title, .hero-lede, .hero-actions, .hero-stats {
    opacity: 0;
    transform: translateY(12px);
    animation: rise 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) forwards;
  }
  .hero-meta    { animation-delay: 0.05s; }
  .hero-title   { animation-delay: 0.15s; }
  .hero-lede    { animation-delay: 0.30s; }
  .hero-actions { animation-delay: 0.45s; }
  .hero-stats   { animation-delay: 0.60s; }

  @keyframes rise {
    to { opacity: 1; transform: translateY(0); }
  }
}
