/* Peregrine Data Solutions homepage
   Implements project/Peregrine Homepage.dc.html (Claude Design handoff). */

:root {
  --pg-bg: #FAF7F2;
  --pg-bg2: #FFFFFF;
  --pg-text: #1F1B17;
  /* Darkened from the design's #7A7267 to meet WCAG AA (4.5:1) on every light background. */
  --pg-muted: #6B645B;
  --pg-surface: #FFFFFF;
  --pg-border: rgba(31,27,23,0.10);
  --pg-frame: #6B3410;
  --pg-plinth: #F1EADE;
  --pg-accent: #EC732E;
  --pg-accent-hover: #d0601f;
  /* Brand orange is for fills, borders and the dark theme. On light backgrounds it is
     under 3:1, so orange text and focus rings use this darker shade (4.8:1 or better). */
  --pg-accent-text: #A84B15;
  --pg-accent-text-hover: #8F3F10;
  --pg-ink: #1A1613;
  --pg-dark-text: #F5F0E8;
  --pg-dark-muted: #B8AFA3;
  --font-head: 'Manrope', sans-serif;
  --font-body: 'Inter', system-ui, sans-serif;
  color-scheme: light;
}

:root[data-theme="dark"] {
  --pg-bg: #1A1613;
  --pg-bg2: #120F0C;
  --pg-text: #F5F0E8;
  --pg-muted: #B8AFA3;
  --pg-surface: #211C18;
  --pg-border: rgba(245,240,232,0.13);
  --pg-frame: var(--pg-accent);
  --pg-plinth: #181410;
  --pg-accent-text: var(--pg-accent);
  --pg-accent-text-hover: var(--pg-accent-hover);
  color-scheme: dark;
}

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
* { box-sizing: border-box; }
body { margin: 0; background: var(--pg-bg); }
a { color: var(--pg-accent-text); text-decoration: none; }
a:hover { color: var(--pg-accent-text-hover); }
::selection { background: rgba(236,115,46,0.28); }
:focus-visible { outline: 2px solid var(--pg-accent-text); outline-offset: 3px; }
img { display: block; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

.page {
  font-family: var(--font-body);
  background: linear-gradient(168deg, var(--pg-bg) 0%, var(--pg-bg2) 100%);
  color: var(--pg-text);
  min-height: 100vh;
}

.container { max-width: 1180px; margin: 0 auto; padding: 0 48px; }

/* ---------- Shared type ---------- */
.h3 { font-family: var(--font-head); font-weight: 800; font-size: 23px; margin: 0 0 4px; color: var(--pg-text); }
.sub { font-size: 13px; color: var(--pg-muted); }
.lede { font-size: 14.5px; line-height: 1.75; color: var(--pg-muted); max-width: 46em; text-wrap: pretty; }
.label {
  font-family: var(--font-head); font-weight: 700; font-size: 11.5px; letter-spacing: 1.3px;
  text-transform: uppercase; color: var(--pg-muted);
}
.p-strong { font-size: 14.5px; line-height: 1.7; color: var(--pg-text); margin: 0; max-width: 36em; text-wrap: pretty; }
.bullets { display: flex; flex-direction: column; list-style: none; margin: 0; padding: 0; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  font-family: var(--font-head); font-weight: 700; border-radius: 6px;
}
.btn-primary { background: var(--pg-accent); color: var(--pg-ink); white-space: nowrap; }
.btn-primary:hover { background: var(--pg-accent-hover); color: var(--pg-ink); }
.btn-outline { background: transparent; border: 1.5px solid var(--pg-accent); color: var(--pg-text); }
.btn-outline:hover { background: rgba(236,115,46,0.10); color: var(--pg-text); }
.btn-sm { font-size: 13px; padding: 10px 19px; }
.btn-md { font-size: 14px; padding: 12px 24px; }
.btn-lg { font-size: 14.5px; padding: 14px 28px; }
.btn-xl { font-size: 15px; padding: 15px 30px; }

/* ---------- Header ---------- */
.site-header {
  display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap;
  padding: 20px 48px; border-bottom: 1px solid var(--pg-border);
}
.brand { display: flex; align-items: center; }
.brand img { height: 44px; width: auto; }
.logo-dark { display: none; }
:root[data-theme="dark"] .logo-light { display: none; }
:root[data-theme="dark"] .logo-dark { display: block; }

.nav {
  display: flex; align-items: center; gap: 28px;
  font-family: var(--font-head); font-weight: 600; font-size: 13.5px;
}
.nav-link { color: var(--pg-muted); }
.theme-toggle {
  font-family: var(--font-head); font-weight: 600; font-size: 12px; letter-spacing: 0.4px;
  background: transparent; color: var(--pg-muted);
  border: 1px solid var(--pg-border); border-radius: 999px; padding: 7px 14px; cursor: pointer;
}
.theme-toggle:hover { border-color: var(--pg-accent); color: var(--pg-accent-text); }

/* ---------- Hero ---------- */
.hero {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr));
  gap: 56px; align-items: center; padding: 84px 0 76px;
}
.eyebrow-pill {
  display: inline-flex; align-items: center; white-space: nowrap;
  font-family: var(--font-head); font-weight: 700; font-size: 11.5px; letter-spacing: 1.6px;
  text-transform: uppercase; color: var(--pg-accent-text);
  border: 1px solid var(--pg-border); border-radius: 999px; padding: 7px 14px; margin-bottom: 26px;
}
.hero h1 {
  font-family: var(--font-head); font-weight: 800; font-size: 44px; line-height: 1.22; letter-spacing: -0.8px;
  margin: 0 0 22px; text-wrap: pretty; color: var(--pg-text);
}
.hero h1 em { font-style: normal; color: var(--pg-accent-text); }
.hero-copy {
  font-size: 16.5px; line-height: 1.75; color: var(--pg-muted); max-width: 34em; margin: 0 0 32px; text-wrap: pretty;
}
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-art { display: flex; justify-content: center; }
.hero-art-frame {
  width: 100%; max-width: 420px; aspect-ratio: 1;
  display: flex; align-items: center; justify-content: center;
}
.hero-art-frame picture, .hero-art-frame img { width: 100%; height: 100%; }
.hero-art-frame img { object-fit: contain; }

/* ---------- Trust bar ---------- */
.trust {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px;
  margin: 0 0 96px; padding: 0; list-style: none;
}
.trust-card {
  background: var(--pg-surface); border: 1px solid var(--pg-border); border-radius: 10px; padding: 22px 26px;
}
.trust-title { font-family: var(--font-head); font-weight: 800; font-size: 21px; color: var(--pg-accent-text); margin-bottom: 6px; }
.trust-desc { font-size: 13px; line-height: 1.55; color: var(--pg-muted); }

/* ---------- Services ---------- */
.services { padding-bottom: 40px; }
.section-title {
  font-family: var(--font-head); font-weight: 800; font-size: 30px; letter-spacing: -0.4px;
  margin: 0 0 12px; color: var(--pg-text); text-wrap: pretty;
}
.section-intro {
  font-size: 15.5px; line-height: 1.7; color: var(--pg-muted); max-width: 42em; margin: 0 0 56px; text-wrap: pretty;
}

.plinth {
  background: var(--pg-plinth); border: 1px solid var(--pg-border); border-radius: 16px; padding: 34px 30px 30px;
}
.plinth-head { padding: 0 8px; }
.plinth-head .lede { margin: 16px 0 0; }

.inline-label {
  margin: 18px 0 0; font-family: var(--font-head); font-weight: 700; font-size: 13.5px; color: var(--pg-accent-text);
}

.foundation-list {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 10px 28px;
  margin: 26px 0 0; padding: 0; list-style: none;
  font-size: 14px; line-height: 1.6; color: var(--pg-text);
}

.divider { height: 1px; margin: 30px 8px 18px; background: var(--pg-border); }

.card {
  background: var(--pg-surface); border: 1px solid var(--pg-border); border-top: 3px solid var(--pg-accent);
  border-radius: 14px; padding: 30px 30px 34px; box-shadow: 0 12px 30px rgba(31,27,23,0.10);
}
.card > .lede { margin: 16px 0 30px; }

.subcard-grid { display: grid; gap: 18px; }
.subcard-grid--wide { grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr)); }
.subcard-grid--narrow { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }

.subcard { border: 1px solid var(--pg-border); border-radius: 12px; padding: 22px 24px 24px; }
.subcard--framework { padding: 24px 24px 26px; }
.subcard-title { font-family: var(--font-head); font-weight: 800; font-size: 17px; color: var(--pg-text); margin: 0 0 10px; }
.subcard--framework .subcard-title { margin-bottom: 6px; }
.subcard-for {
  font-family: var(--font-head); font-weight: 600; font-size: 12.5px; letter-spacing: 0.2px;
  color: var(--pg-frame); margin-bottom: 14px;
}
.subcard p { font-size: 14px; line-height: 1.7; color: var(--pg-muted); margin: 0; text-wrap: pretty; }
.subcard--framework p { margin-bottom: 18px; }
.subcard .bullets {
  gap: 9px; font-size: 13.5px; line-height: 1.55; color: var(--pg-text);
  padding-top: 18px; border-top: 1px solid var(--pg-border);
}

.fineprint {
  margin-top: 26px; display: flex; flex-direction: column; gap: 12px; max-width: 52em;
  font-size: 13px; line-height: 1.7; color: var(--pg-muted);
}
.fineprint p { margin: 0; }
.disclaimer { font-size: 13px; line-height: 1.7; color: var(--pg-muted); max-width: 52em; margin: 12px 0 0; }

.card-cta {
  display: flex; align-items: center; gap: 20px; flex-wrap: wrap;
  margin-top: 28px; padding-top: 26px; border-top: 1px solid var(--pg-border);
}
.card-cta--split { justify-content: space-between; margin-top: 24px; }
.cta-stack { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.cta-note { font-size: 12.5px; color: var(--pg-muted); }

/* Governed AI */
.governed { margin-top: 56px; }
.governed .card > .lede { margin-bottom: 26px; }
.governed .label { margin: 0 0 14px; }
.governed .label--spaced { margin: 30px 0 14px; }
.options {
  gap: 10px; font-size: 14px; line-height: 1.65; color: var(--pg-text); max-width: 52em;
}
.options strong, .how-we-work strong { font-weight: 600; }
.note-line {
  font-family: var(--font-head); font-weight: 600; font-size: 14px; line-height: 1.65;
  color: var(--pg-frame); margin: 20px 0 0; max-width: 52em;
}
.proof-line { font-size: 12.5px; line-height: 1.7; color: var(--pg-muted); margin: 24px 0 0; max-width: 52em; }

/* Beyond managed IT */
.beyond { margin-top: 56px; }
.beyond .plinth-head .lede { margin: 16px 0 30px; }
.beyond-stack { display: flex; flex-direction: column; gap: 24px; }
.beyond .card .sub { margin-bottom: 26px; }
.beyond-cta {
  display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap;
  margin: 28px 8px 0;
}

/* ---------- About ---------- */
.about {
  margin: 96px 0 0; scroll-margin-top: 24px; padding: 34px 38px;
  border: 1px solid var(--pg-border); border-radius: 14px;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr)); gap: 40px 48px;
}
.headshot {
  width: 112px; height: 112px; border-radius: 999px; object-fit: cover;
  margin-bottom: 22px; border: 1px solid var(--pg-border);
}
.about-eyebrow {
  font-family: var(--font-head); font-weight: 700; font-size: 11.5px; letter-spacing: 1.6px;
  text-transform: uppercase; color: var(--pg-frame); margin-bottom: 14px;
}
.about h2 {
  font-family: var(--font-head); font-weight: 800; font-size: 27px; line-height: 1.3; letter-spacing: -0.3px;
  margin: 0 0 18px; color: var(--pg-text); text-wrap: pretty;
}
.about-copy { font-size: 14.5px; line-height: 1.75; color: var(--pg-muted); margin: 0 0 14px; text-wrap: pretty; }
.about-copy:last-child { margin-bottom: 0; }
.about-side { display: flex; flex-direction: column; gap: 28px; }

.pills { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.pill {
  font-family: var(--font-head); font-weight: 700; font-size: 13px; color: var(--pg-text);
  border: 1px solid var(--pg-border); border-radius: 999px; padding: 9px 18px;
}

.stats {
  margin: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px;
  padding: 22px 0; border-top: 1px solid var(--pg-border); border-bottom: 1px solid var(--pg-border);
}
/* column-reverse packs from the bottom by default; flex-end keeps figures top-aligned. */
.stats > div { display: flex; flex-direction: column-reverse; justify-content: flex-end; gap: 4px; }
.stats dt { font-size: 13px; line-height: 1.5; color: var(--pg-muted); }
.stats dd { margin: 0; font-family: var(--font-head); font-weight: 800; font-size: 21px; color: var(--pg-accent-text); }

.how-we-work h3 { font-family: var(--font-head); font-weight: 800; font-size: 17px; margin: 0 0 12px; color: var(--pg-text); }
.how-we-work .bullets { gap: 10px; font-size: 14px; line-height: 1.65; color: var(--pg-text); }

/* ---------- Tooling band ---------- */
.tooling {
  margin: 96px 0 0; padding: 34px 38px; border: 1px solid var(--pg-border); border-radius: 14px;
  display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: 40px; align-items: center;
}
.tooling-title { font-family: var(--font-head); font-weight: 800; font-size: 17px; color: var(--pg-text); margin: 0 0 6px; }
.tooling-desc { font-size: 13.5px; line-height: 1.65; color: var(--pg-muted); margin: 0; }

/* ---------- Closing CTA ---------- */
/* The closing band and footer are dark in both themes, so they keep the bright orange. */
.closing, .site-footer { --pg-accent-text: var(--pg-accent); --pg-accent-text-hover: var(--pg-accent-hover); }
.closing {
  margin: 96px 0 120px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 40px; align-items: center;
  padding: 46px 44px; border-radius: 16px; background: var(--pg-ink); border: 1px solid rgba(245,240,232,0.10);
}
.closing h2 {
  font-family: var(--font-head); font-weight: 800; font-size: 27px; letter-spacing: -0.3px;
  margin: 0 0 10px; color: var(--pg-dark-text); text-wrap: pretty;
}
.closing p { font-size: 15px; line-height: 1.7; color: var(--pg-dark-muted); margin: 0; max-width: 40em; text-wrap: pretty; }

/* ---------- Footer ---------- */
.site-footer { background: var(--pg-ink); border-top: 1px solid rgba(245,240,232,0.10); }
.footer-main {
  max-width: 1180px; margin: 0 auto; padding: 56px 48px 44px;
  display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) minmax(0, 0.8fr); gap: 48px;
}
.footer-logo { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.footer-logo img { height: 48px; width: auto; max-width: 100%; }
.footer-tagline { font-size: 14px; line-height: 1.7; color: var(--pg-dark-muted); margin: 0; max-width: 26em; text-wrap: pretty; }

.footer-contact {
  display: flex; flex-direction: column; gap: 13px; font-size: 14px; color: var(--pg-dark-text);
  font-style: normal;
}
.footer-contact-row { display: flex; align-items: flex-start; gap: 10px; }
.footer-contact-row svg { flex-shrink: 0; margin-top: 2px; }
.footer-contact a { color: var(--pg-dark-text); }
.footer-contact a:hover { color: var(--pg-accent); }

.footer-follow { display: flex; flex-direction: column; gap: 16px; }
.footer-follow .label { color: var(--pg-dark-muted); }
.socials { display: flex; align-items: center; gap: 12px; }
.social {
  width: 38px; height: 38px; border-radius: 999px; border: 1px solid rgba(245,240,232,0.16);
  display: flex; align-items: center; justify-content: center;
}
.social:hover { border-color: var(--pg-accent); }

.footer-bottom-wrap { max-width: 1180px; margin: 0 auto; padding: 0 48px 40px; }
.footer-bottom {
  border-top: 1px solid rgba(245,240,232,0.10); padding-top: 22px;
  display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap;
  font-size: 12.5px; color: var(--pg-dark-muted);
}
.footer-links { display: flex; gap: 22px; flex-wrap: wrap; }
.footer-links a { color: var(--pg-dark-muted); }
.footer-links a:hover { color: var(--pg-accent); }

/* ---------- Responsive ----------
   The design is specified at desktop width. These rules only kick in where the
   desktop layout would overflow or crowd on tablets and phones. */
@media (max-width: 900px) {
  .tooling { grid-template-columns: 1fr; gap: 20px; }
  .closing { grid-template-columns: 1fr; gap: 28px; justify-items: start; }
  .footer-main { grid-template-columns: 1fr 1fr; }
  .footer-main > :first-child { grid-column: 1 / -1; }
}

@media (max-width: 640px) {
  .site-header { padding: 16px 20px; }
  .nav { flex-wrap: wrap; gap: 14px 20px; }
  .container { padding: 0 20px; }
  .hero { padding: 48px 0 56px; gap: 40px; }
  .hero h1 { font-size: 34px; letter-spacing: -0.5px; }
  .eyebrow-pill { white-space: normal; }
  .trust { margin-bottom: 72px; }
  .section-title { font-size: 26px; }
  .section-intro { margin-bottom: 36px; }
  .plinth { padding: 26px 16px 18px; }
  .card { padding: 24px 20px 28px; }
  .subcard-grid--narrow { grid-template-columns: 1fr; }
  .about, .tooling { padding: 26px 22px; }
  .about, .tooling, .closing { margin-top: 72px; }
  .stats { grid-template-columns: 1fr; }
  .closing { padding: 32px 24px; margin-bottom: 80px; }
  .closing h2 { font-size: 24px; }
  .btn-primary { white-space: normal; text-align: center; }
  .footer-main { grid-template-columns: 1fr; padding: 44px 20px 32px; gap: 32px; }
  .footer-bottom-wrap { padding: 0 20px 32px; }
}
