/* ==========================================================================
   Qanvry — Design System
   Concept: "Field Ledger" — a research-grade ledger/notebook aesthetic for
   a data + design consultancy. Ink-navy dominant, cool paper neutrals,
   amber signal accent, teal secondary. Fraunces (display) + Inter (body)
   + IBM Plex Mono (data/utility labels).
   ========================================================================== */

:root {
  /* Color */
  --ink: #101B34;        /* Ledger Ink — dominant dark */
  --ink-soft: #1B2A4E;   /* lighter ink for surfaces on dark */
  --paper: #EEF1F6;      /* cool paper — section backgrounds */
  --paper-line: #DCE2EC; /* grid/hairline on paper */
  --amber: #E8A33D;      /* Signal Amber — primary accent */
  --amber-deep: #C9832A;
  --teal: #2A8C82;       /* Field Teal — secondary accent */
  --slate: #3A4358;      /* body text */
  --slate-soft: #6B7288; /* muted text */
  --white: #FFFFFF;

  /* Type */
  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: "IBM Plex Mono", "Courier New", monospace;

  /* Layout */
  --container-max: 1200px;
  --radius: 10px;
  --shadow-card: 0 1px 2px rgba(16, 27, 52, 0.04), 0 8px 24px rgba(16, 27, 52, 0.06);
  --shadow-card-hover: 0 4px 8px rgba(16, 27, 52, 0.06), 0 16px 32px rgba(16, 27, 52, 0.10);
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* ---------- Base ---------- */
html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  color: var(--slate);
  background: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, .font-display {
  font-family: var(--font-display);
  color: var(--ink);
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.15;
}

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

::selection { background: var(--amber); color: var(--ink); }

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

.container-xl { max-width: var(--container-max); margin: 0 auto; padding: 0 24px; }

.font-mono { font-family: var(--font-mono); }

/* Eyebrow / mono tag pills — used instead of numbered markers */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--teal);
}

.tag-pill {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 5px 12px;
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 999px;
  color: rgba(255,255,255,0.85);
}
.tag-pill + .tag-pill { margin-left: 8px; }
.tag-pill.on-paper {
  border-color: var(--paper-line);
  color: var(--slate-soft);
}

/* ---------- Buttons ---------- */
.btn-qv {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 13px 26px;
  border-radius: 999px;
  border: 1px solid transparent;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, color 0.15s ease;
}
.btn-qv:active { transform: translateY(1px); }

.btn-qv-amber {
  background: var(--amber);
  color: var(--ink);
}
.btn-qv-amber:hover { background: var(--amber-deep); color: var(--ink); box-shadow: 0 8px 20px rgba(232,163,61,0.35); }

.btn-qv-outline {
  background: transparent;
  border-color: rgba(255,255,255,0.35);
  color: var(--white);
}
.btn-qv-outline:hover { border-color: var(--white); background: rgba(255,255,255,0.08); color: var(--white); }

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

/* ---------- Navbar ---------- */
.qv-navbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--ink);
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.qv-navbar .navbar-brand {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 600;
  font-size: 1.5rem;
  color: var(--white) !important;
}
.qv-navbar .navbar-brand span { color: var(--amber); }
.qv-navbar .nav-link {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.72) !important;
  padding: 10px 16px !important;
}
.qv-navbar .nav-link:hover,
.qv-navbar .nav-link.active { color: var(--white) !important; }
.qv-navbar .navbar-toggler { border-color: rgba(255,255,255,0.3); }
.qv-navbar .navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(255,255,255,0.85)' stroke-width='2' stroke-linecap='round' stroke-miterlimit='10' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* ---------- Hero ---------- */
.qv-hero {
  background: var(--ink);
  color: var(--white);
  position: relative;
  overflow: hidden;
  padding: 96px 0 80px;
}
.qv-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255,255,255,0.06) 1px, transparent 1px);
  background-size: 26px 26px;
  opacity: 0.5;
  pointer-events: none;
}
.qv-hero .hero-inner { position: relative; z-index: 1; }
.qv-hero h1 {
  color: var(--white);
  font-size: clamp(2.3rem, 4.4vw, 3.6rem);
  margin: 20px 0 20px;
}
.qv-hero .lede {
  color: rgba(255,255,255,0.75);
  font-size: 1.15rem;
  max-width: 46ch;
  margin-bottom: 32px;
}
.qv-hero .hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 8px; }

/* Signature element: self-drawing data line */
.hero-chart { width: 100%; height: auto; }
.hero-chart .line-path {
  fill: none;
  stroke: var(--amber);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 620;
  stroke-dashoffset: 620;
  animation: draw-line 2.2s ease-out 0.3s forwards;
}
.hero-chart .grid-line { stroke: rgba(255,255,255,0.10); stroke-width: 1; }
.hero-chart .marker {
  fill: var(--ink);
  stroke: var(--amber);
  stroke-width: 2.5;
  opacity: 0;
  animation: pop-in 0.4s ease-out forwards;
}
.hero-chart .marker-label {
  fill: rgba(255,255,255,0.65);
  font-family: var(--font-mono);
  font-size: 10px;
  opacity: 0;
  animation: pop-in 0.4s ease-out forwards;
}
@keyframes draw-line { to { stroke-dashoffset: 0; } }
@keyframes pop-in { to { opacity: 1; } }

/* ---------- Sections ---------- */
.section { padding: 88px 0; }
.section-paper { background: var(--paper); }
.section-white { background: var(--white); }
.section-ink { background: var(--ink); color: var(--white); }

.section-head { max-width: 640px; margin-bottom: 48px; }
.section-head h2 { font-size: clamp(1.9rem, 3vw, 2.5rem); margin: 12px 0 14px; }
.section-head p { color: var(--slate-soft); font-size: 1.05rem; }
.section-ink .section-head p { color: rgba(255,255,255,0.7); }

/* ---------- Cards ---------- */
.qv-card {
  background: var(--white);
  border: 1px solid var(--paper-line);
  border-radius: var(--radius);
  padding: 32px 28px;
  height: 100%;
  box-shadow: var(--shadow-card);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.qv-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-card-hover); }
.qv-card .card-icon {
  width: 46px; height: 46px;
  display: flex; align-items: center; justify-content: center;
  background: var(--paper);
  color: var(--teal);
  border-radius: 8px;
  font-size: 1.1rem;
  margin-bottom: 18px;
}
.qv-card h3 { font-size: 1.25rem; margin-bottom: 10px; }
.qv-card p { color: var(--slate-soft); margin-bottom: 0; font-size: 0.96rem; }
.qv-card ul.card-list {
  margin: 14px 0 0; padding: 0; list-style: none;
  font-size: 0.9rem; color: var(--slate-soft);
}
.qv-card ul.card-list li { padding-left: 18px; position: relative; margin-bottom: 6px; }
.qv-card ul.card-list li::before {
  content: "—"; position: absolute; left: 0; color: var(--amber-deep);
}

/* About / founder ledger card */
.founder-card {
  background: var(--ink);
  color: var(--white);
  border-radius: var(--radius);
  padding: 44px;
  position: relative;
  overflow: hidden;
}
.founder-card::before {
  content: "";
  position: absolute; inset: 0;
  background-image: radial-gradient(rgba(255,255,255,0.06) 1px, transparent 1px);
  background-size: 22px 22px;
}
.founder-monogram {
  width: 88px; height: 88px;
  border: 1px solid rgba(232,163,61,0.5);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 2rem;
  color: var(--amber);
  position: relative; z-index: 1;
  margin-bottom: 20px;
}
.founder-card .credentials { position: relative; z-index: 1; }
.founder-card .credentials li {
  font-size: 0.92rem;
  color: rgba(255,255,255,0.75);
  padding: 9px 0;
  border-top: 1px solid rgba(255,255,255,0.1);
  display: flex; gap: 10px;
}
.founder-card .credentials li:first-child { border-top: none; }
.founder-card .credentials li i { color: var(--amber); margin-top: 3px; }

/* Testimonials */
.quote-card {
  background: var(--white);
  border: 1px solid var(--paper-line);
  border-left: 3px solid var(--amber);
  border-radius: var(--radius);
  padding: 28px 26px;
  height: 100%;
}
.quote-card .fa-quote-left { color: var(--paper-line); font-size: 1.4rem; margin-bottom: 12px; }
.quote-card blockquote {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.05rem;
  color: var(--ink);
  margin-bottom: 16px;
}
.quote-card .attribution { font-family: var(--font-mono); font-size: 0.76rem; color: var(--slate-soft); text-transform: uppercase; letter-spacing: 0.04em; }
.quote-card .attribution .placeholder-flag {
  display: block; margin-top: 6px; color: var(--amber-deep); text-transform: none; letter-spacing: 0;
  font-family: var(--font-body); font-style: italic;
}

/* CTA band */
.cta-band { background: var(--ink); color: var(--white); padding: 72px 0; text-align: center; position: relative; overflow: hidden; }
.cta-band::before {
  content: ""; position: absolute; inset: 0;
  background-image: radial-gradient(rgba(255,255,255,0.06) 1px, transparent 1px);
  background-size: 26px 26px;
}
.cta-band .inner { position: relative; z-index: 1; }
.cta-band h2 { color: var(--white); font-size: clamp(1.7rem, 3vw, 2.3rem); max-width: 640px; margin: 0 auto 26px; }

/* ---------- Footer ---------- */
.qv-footer { background: var(--ink); color: rgba(255,255,255,0.65); padding: 64px 0 28px; border-top: 1px solid rgba(255,255,255,0.08); }
.qv-footer h5 {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.85);
  margin-bottom: 18px;
}
.qv-footer .footer-brand { font-family: var(--font-display); font-style: italic; font-size: 1.4rem; color: var(--white); }
.qv-footer .footer-brand span { color: var(--amber); }
.qv-footer a { color: rgba(255,255,255,0.65); }
.qv-footer a:hover { color: var(--amber); }
.qv-footer ul { list-style: none; padding: 0; margin: 0; }
.qv-footer ul li { margin-bottom: 10px; font-size: 0.92rem; }
.qv-footer .footer-bottom {
  margin-top: 48px; padding-top: 24px;
  border-top: 1px solid rgba(255,255,255,0.08);
  font-family: var(--font-mono); font-size: 0.72rem;
  color: rgba(255,255,255,0.45);
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px;
}
.footer-social a {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.2);
  margin-right: 8px;
}
.footer-social a:hover { border-color: var(--amber); background: rgba(232,163,61,0.1); }

.placeholder-note {
  font-size: 0.8rem;
  color: var(--amber-deep);
  font-style: italic;
}

/* ---------- Page banner (interior pages) ---------- */
.page-banner {
  background: var(--ink);
  color: var(--white);
  padding: 64px 0 56px;
  position: relative;
  overflow: hidden;
}
.page-banner::before {
  content: "";
  position: absolute; inset: 0;
  background-image: radial-gradient(rgba(255,255,255,0.06) 1px, transparent 1px);
  background-size: 26px 26px;
}
.page-banner .inner { position: relative; z-index: 1; }
.page-banner h1 { color: var(--white); font-size: clamp(2rem, 3.6vw, 2.8rem); margin: 14px 0 10px; }
.page-banner p { color: rgba(255,255,255,0.72); max-width: 56ch; margin: 0; }

/* ---------- Forms ---------- */
.qv-form .form-label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--slate-soft);
  margin-bottom: 8px;
}
.qv-form .form-control, .qv-form .form-select {
  border: 1px solid var(--paper-line);
  border-radius: 8px;
  padding: 12px 14px;
  font-size: 0.96rem;
}
.qv-form .form-control:focus, .qv-form .form-select:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(42,140,130,0.15);
}

.contact-info-card {
  background: var(--paper);
  border-radius: var(--radius);
  padding: 34px;
}
.contact-info-card .info-row { display: flex; gap: 14px; margin-bottom: 22px; }
.contact-info-card .info-row i { color: var(--teal); font-size: 1.1rem; margin-top: 3px; width: 20px; }
.contact-info-card .info-row .label { font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--slate-soft); margin-bottom: 3px; }

/* ---------- Utility ---------- */
.text-teal { color: var(--teal) !important; }
.text-amber { color: var(--amber-deep) !important; }
.bg-paper { background: var(--paper) !important; }
.divider-line { border-top: 1px solid var(--paper-line); }

@media (max-width: 767px) {
  .section { padding: 64px 0; }
  .qv-hero { padding: 64px 0 56px; }
  .founder-card { padding: 30px; }
}
