/* Pallavex — site styles. No framework, no build step. */

:root {
  color-scheme: light dark;

  /* Light theme tokens */
  --bg: #f7f6f2;
  --surface: #ffffff;
  --surface-2: #eeece5;
  --text: #161a22;
  --text-muted: #4a5160;
  --border: #d9d6cc;
  --accent: #1d4e89;        /* links, buttons — 8.3:1 on white */
  --accent-strong: #143a68;
  --accent-contrast: #ffffff;
  --accent-soft: #e3ebf5;
  --mark-bg: #161a22;
  --mark-fg: #f7f6f2;
  --focus: #c2410c;         /* focus ring, distinct from accent */

  --font-sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-serif: "Source Serif 4", Georgia, "Times New Roman", serif;

  --radius: 10px;
  --radius-sm: 6px;
  --space-1: 0.5rem;
  --space-2: 1rem;
  --space-3: 1.5rem;
  --space-4: 2rem;
  --space-5: 3rem;
  --space-6: clamp(3.5rem, 8vw, 6rem);
  --max: 72rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e121a;
    --surface: #151b26;
    --surface-2: #1b2230;
    --text: #e8e9ec;
    --text-muted: #a9b0bd;
    --border: #2a3343;
    --accent: #8db8ec;       /* 8.9:1 on --bg */
    --accent-strong: #b5d1f3;
    --accent-contrast: #0e121a;
    --accent-soft: #1a2a40;
    --mark-bg: #e8e9ec;
    --mark-fg: #0e121a;
    --focus: #fb923c;
  }
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
}

h1, h2, h3 {
  font-family: var(--font-serif);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.01em;
  margin: 0 0 var(--space-2);
}
h1 { font-size: clamp(2rem, 5.2vw, 3.4rem); }
h2 { font-size: clamp(1.6rem, 3.4vw, 2.25rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 var(--space-2); }

a { color: var(--accent); text-underline-offset: 0.18em; }
a:hover { color: var(--accent-strong); }

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  border-radius: 3px;
}

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--space-3); }
@media (max-width: 400px) { .wrap { padding: 0 1.125rem; } }

.skip-link {
  position: absolute;
  left: var(--space-2);
  top: -4rem;
  z-index: 100;
  background: var(--surface);
  color: var(--text);
  padding: var(--space-1) var(--space-2);
  border: 2px solid var(--focus);
  border-radius: var(--radius-sm);
}
.skip-link:focus { top: var(--space-2); }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%);
  white-space: nowrap;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: saturate(1.4) blur(8px);
  border-bottom: 1px solid var(--border);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  min-height: 4rem;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--text);
  text-decoration: none;
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 1.3rem;
  letter-spacing: 0.01em;
}
.brand:hover { color: var(--text); }
.brand-mark { width: 30px; height: 30px; flex: none; }
.brand-mark .m-bg { fill: var(--mark-bg); }
.brand-mark .m-fg { fill: var(--mark-fg); }

.site-nav ul {
  display: flex;
  gap: var(--space-3);
  list-style: none;
  margin: 0;
  padding: 0;
  align-items: center;
}
.site-nav a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
}
.site-nav a:hover { color: var(--text); }
.site-nav a.btn { color: var(--accent-contrast); }
@media (max-width: 760px) {
  .site-nav .nav-secondary { display: none; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 44px;
  padding: 0.6rem 1.15rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--accent);
  background: var(--accent);
  color: var(--accent-contrast);
  font-weight: 600;
  font-size: 0.98rem;
  text-decoration: none;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}
.btn:hover { background: var(--accent-strong); border-color: var(--accent-strong); color: var(--accent-contrast); }
.btn-ghost { background: transparent; color: var(--accent); }
.btn-ghost:hover { background: var(--accent-soft); color: var(--accent-strong); border-color: var(--accent-strong); }
.site-nav .btn { min-height: 40px; padding: 0.45rem 0.95rem; }

/* ---------- Hero ---------- */
.hero { padding: var(--space-6) 0 var(--space-5); }
.eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: var(--space-2);
}
.hero h1 { max-width: 20ch; }
.hero .lede {
  font-size: clamp(1.1rem, 2.2vw, 1.3rem);
  color: var(--text-muted);
  max-width: 44rem;
  margin-bottom: var(--space-4);
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.hero-rule {
  margin-top: var(--space-5);
  border: 0;
  height: 1px;
  background: linear-gradient(90deg, var(--accent) 0 6rem, var(--border) 6rem 100%);
}

/* ---------- Sections ---------- */
.section { padding: var(--space-6) 0; }
.section-alt { background: var(--surface-2); }
.section-head { max-width: 46rem; margin-bottom: var(--space-4); }
.section-head p { color: var(--text-muted); }

/* ---------- Pillars ---------- */
.pillars {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr));
  gap: var(--space-3);
}
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--space-4);
}
@media (max-width: 400px) { .card { padding: var(--space-3); } }
.pillar-num {
  display: block;
  font-family: var(--font-serif);
  color: var(--accent);
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}
.card h3 { font-size: 1.45rem; }
.card > p { color: var(--text-muted); }

.deliverables { list-style: none; margin: var(--space-3) 0 0; padding: 0; }
.deliverables li {
  padding: 0.85rem 0;
  border-top: 1px solid var(--border);
}
.deliverables strong { display: block; font-weight: 600; }
.deliverables span { display: block; color: var(--text-muted); font-size: 0.97rem; }

/* ---------- Process ---------- */
.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr));
  gap: var(--space-3);
  counter-reset: step;
}
.steps li {
  counter-increment: step;
  border-top: 2px solid var(--accent);
  padding-top: var(--space-2);
}
.steps li::before {
  content: "0" counter(step);
  display: block;
  font-family: var(--font-serif);
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 0.35rem;
}
.steps h3 { margin-bottom: 0.5rem; }
.steps p { color: var(--text-muted); font-size: 0.98rem; }

/* ---------- Why ---------- */
.why {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 26rem), 1fr));
  gap: var(--space-4) var(--space-5);
  max-width: 60rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.why li { padding-left: 1.25rem; border-left: 2px solid var(--border); }
.why h3 { font-size: 1.15rem; margin-bottom: 0.4rem; }
.why p { color: var(--text-muted); margin: 0; }

/* ---------- FAQ ---------- */
.faq { max-width: 48rem; }
.faq details {
  border-bottom: 1px solid var(--border);
}
.faq details:first-of-type { border-top: 1px solid var(--border); }
.faq summary {
  cursor: pointer;
  list-style: none;
  padding: 1.1rem 2.25rem 1.1rem 0;
  font-weight: 600;
  position: relative;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "";
  position: absolute;
  right: 0.35rem;
  top: 50%;
  width: 0.6rem;
  height: 0.6rem;
  border-right: 2px solid var(--accent);
  border-bottom: 2px solid var(--accent);
  transform: translateY(-70%) rotate(45deg);
  transition: transform 0.15s ease;
}
.faq details[open] summary::after { transform: translateY(-30%) rotate(-135deg); }
.faq details > div { padding: 0 0 1.1rem; color: var(--text-muted); }
.faq details > div p:last-child { margin-bottom: 0; }

/* ---------- Contact ---------- */
.contact-box {
  display: grid;
  gap: var(--space-3);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 1fr));
  align-items: center;
}
.contact-box h2 { margin-bottom: var(--space-1); }
.contact-box p { color: var(--text-muted); }
.contact-actions { display: flex; flex-direction: column; gap: 0.75rem; align-items: flex-start; }
.contact-email { font-weight: 600; font-size: 1.1rem; word-break: break-all; }
.contact-list { margin: var(--space-2) 0 0; padding-left: 1.2rem; color: var(--text-muted); }
.contact-list li { margin-bottom: 0.3rem; }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--border);
  padding: var(--space-4) 0;
  font-size: 0.92rem;
  color: var(--text-muted);
}
.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--space-2);
  align-items: center;
}
.site-footer ul { display: flex; flex-wrap: wrap; gap: var(--space-3); list-style: none; margin: 0; padding: 0; }
.site-footer a { color: var(--text-muted); }
.site-footer a:hover { color: var(--text); }
.site-footer p { margin: 0; }

/* ---------- Simple pages (privacy, 404) ---------- */
.page { padding: var(--space-6) 0; }
.prose { max-width: 44rem; }
.prose h2 { font-size: 1.4rem; margin-top: var(--space-4); }
.prose p, .prose li { color: var(--text-muted); }
.prose ul { padding-left: 1.2rem; }
.notice {
  border: 1px solid var(--focus);
  background: var(--surface);
  border-radius: var(--radius-sm);
  padding: var(--space-2);
  margin-bottom: var(--space-4);
  font-size: 0.95rem;
}
.notice p { color: var(--text); margin: 0; }
.not-found { min-height: 60vh; display: flex; align-items: center; }
.not-found .code { font-family: var(--font-serif); color: var(--accent); font-weight: 600; font-size: 1rem; letter-spacing: 0.1em; }
