/*
  Circle Valley — minimal editorial theme.
  Single stylesheet, no dependencies.
*/

:root {
  --bg: #faf7f2;
  --surface: #ffffff;
  --ink: #1a2230;
  --ink-soft: #4a5468;
  --muted: #7b8396;
  --rule: rgba(26, 34, 48, 0.12);
  --accent: #2f4d6e;
  --accent-strong: #1f3a58;
  --accent-wash: #eaf0f6;

  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Helvetica, sans-serif;

  --measure: 34rem;
  --measure-wide: 52rem;
  --radius: 4px;
  --space: clamp(1rem, 2vw, 1.5rem);
}

* { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  font-size: 16px;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  transition: color 0.15s ease;
}

a:hover {
  color: var(--accent-strong);
  text-decoration-thickness: 2px;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.2;
  color: var(--ink);
  margin: 2.5rem 0 0.75rem;
}

h1 {
  font-size: clamp(2rem, 5vw, 3.25rem);
  letter-spacing: -0.01em;
  line-height: 1.1;
}

h2 {
  font-size: clamp(1.75rem, 3.2vw, 2.25rem);
  margin-top: 3rem;
}

h3 {
  font-size: clamp(1.35rem, 2vw, 1.5rem);
  margin-top: 2rem;
  line-height: 1.25;
}

p, ul, ol { margin: 0 0 1.1rem; }

strong { color: var(--ink); font-weight: 600; }

code, pre {
  font-family: "SF Mono", "Menlo", "Consolas", monospace;
  font-size: 0.95em;
}

hr {
  border: 0;
  height: 1px;
  background: var(--rule);
  margin: 3rem auto;
  max-width: 6rem;
}

/* --- Header --- */

.site-header {
  background: var(--bg);
  border-bottom: 1px solid var(--rule);
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: saturate(180%) blur(12px);
  background: rgba(250, 247, 242, 0.85);
}

.site-header__inner {
  max-width: 72rem;
  margin: 0 auto;
  padding: 1rem var(--space);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.site-header__brand {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  color: var(--ink);
  text-decoration: none;
  letter-spacing: -0.015em;
  line-height: 1;
}

.site-header__nav {
  display: flex;
  gap: 1.5rem;
}

.site-header__nav a {
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
}

.site-header__nav a:hover { color: var(--accent); }

@media (max-width: 540px) {
  .site-header__nav { gap: 1rem; }
  .site-header__nav a { font-size: 0.9rem; }
}

/* --- Footer --- */

.site-footer {
  border-top: 1px solid var(--rule);
  margin-top: 6rem;
  padding: 2rem var(--space);
  color: var(--muted);
  font-size: 0.9rem;
}

.site-footer__inner {
  max-width: 72rem;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.site-footer a {
  color: var(--ink-soft);
  text-decoration: none;
}

.site-footer a:hover { color: var(--accent); }

.site-footer__links span { color: var(--rule); }

/* --- Hero (home) --- */

.hero {
  padding: clamp(2.5rem, 6vw, 5rem) var(--space) clamp(1.5rem, 4vw, 3rem);
}

.hero__inner {
  max-width: 72rem;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 3.5rem);
  align-items: center;
}

@media (min-width: 768px) {
  .hero__inner {
    grid-template-columns: minmax(0, 14rem) minmax(0, 1fr);
  }
}

.hero__portrait img {
  width: 100%;
  max-width: 14rem;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 50%;
  box-shadow: 0 1px 2px rgba(0,0,0,0.06), 0 6px 24px rgba(26,34,48,0.08);
}

.hero__text .eyebrow {
  font-family: var(--sans);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 0.75rem;
}

.hero__text h1 {
  margin: 0 0 1rem;
  max-width: 20ch;
}

.hero__lede {
  font-size: 1.125rem;
  color: var(--ink-soft);
  max-width: 42ch;
  line-height: 1.55;
}

.hero__ctas {
  margin-top: 1.75rem;
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

/* --- Buttons --- */

.btn {
  display: inline-block;
  padding: 0.65rem 1.1rem;
  border-radius: var(--radius);
  font-family: var(--sans);
  font-size: 0.95rem;
  font-weight: 500;
  text-decoration: none;
  line-height: 1.2;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.btn--primary {
  background: var(--accent);
  color: #ffffff;
  border: 1px solid var(--accent);
}

.btn--primary:hover {
  background: var(--accent-strong);
  border-color: var(--accent-strong);
  color: #ffffff;
  text-decoration: none;
}

.btn--ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--rule);
}

.btn--ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
  text-decoration: none;
}

/* --- Prose / content --- */

.prose {
  max-width: var(--measure-wide);
  margin: 0 auto;
  padding: 0 var(--space);
}

.prose p,
.prose ul,
.prose ol {
  max-width: var(--measure);
}

.prose h2 { max-width: var(--measure); }
.prose h3 { max-width: var(--measure); }

.prose--page { padding-top: clamp(2.5rem, 6vw, 4rem); }

.page-header {
  max-width: var(--measure);
  margin-bottom: 2rem;
}

.page-header h1 { margin-top: 0; }

.page-header__lede {
  font-size: 1.15rem;
  color: var(--ink-soft);
}

/* Services block: give each h3 + p a card-like accent bar */
#services {
  scroll-margin-top: 5rem;
}

.prose h2[id="services"] ~ h3 {
  border-left: 3px solid var(--accent);
  padding-left: 0.9rem;
  margin-top: 1.75rem;
}

.prose h2[id="services"] ~ h3 + p {
  padding-left: 0.9rem;
  border-left: 3px solid transparent;
  margin-top: 0.4rem;
}

/* Tables, if any */
.prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.95rem;
}
.prose th, .prose td {
  text-align: left;
  padding: 0.55rem 0.75rem;
  border-bottom: 1px solid var(--rule);
}

/* Blockquotes */
.prose blockquote {
  border-left: 3px solid var(--accent);
  margin: 1.5rem 0;
  padding: 0.25rem 1rem;
  color: var(--ink-soft);
  font-style: italic;
}

/* Small screens: tighten measure */
@media (max-width: 640px) {
  body { font-size: 1rem; }
  .prose { padding-left: 1rem; padding-right: 1rem; }
}
