/* ============================================================
   Perigon Labs — modern light-mode design system (v5 overhaul)
   Display: Space Grotesk · Body: Hanken Grotesk · Accent: Newsreader italic
   Restrained palette: neutral + green/mint; full spectrum lives in the hero rings.
   ============================================================ */

:root {
  /* Ink & paper */
  --ink:        #16191f;
  --ink-soft:   #515a66;
  --ink-faint:  #939ba6;
  --paper:      #fbfaf7;   /* warm off-white page */
  --card:       #ffffff;
  --paper-warm: #f4f2ec;   /* deeper warm band */
  --line:       #e8e5dd;
  --line-soft:  #f0ede6;

  /* Brand accent — greens/teal only in content */
  --green:      #3f9e77;
  --green-deep: #2c7d5c;
  --mint:       #1fc8a6;
  /* Full spectrum — reserved for the ring motif + rare details */
  --coral:  #ff9d77;
  --yellow: #fbd561;
  --blue:   #0099ff;

  /* Type */
  --font-body:    "Hanken Grotesk", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-display: "Bricolage Grotesque", "Hanken Grotesk", -apple-system, BlinkMacSystemFont, sans-serif;
  --font-accent:  "Newsreader", Georgia, serif;
  /* micro-labels/eyebrows share the single body font for consistency */
  --font-eyebrow: "Hanken Grotesk", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  /* Shape */
  --r:    16px;
  --r-lg: 22px;
  --r-xl: 28px;

  /* Soft layered shadows */
  --shadow-sm: 0 1px 2px rgba(16,25,20,.04), 0 3px 8px rgba(16,25,20,.05);
  --shadow-md: 0 2px 6px rgba(16,25,20,.05), 0 14px 34px rgba(16,25,20,.08);
  --shadow-lg: 0 4px 12px rgba(16,25,20,.06), 0 28px 60px rgba(16,25,20,.12);

  --maxw: 1140px;
  --gutter: clamp(20px, 5vw, 60px);
}

/* ---------- Reset-ish ---------- */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.62;
  font-size: 18px;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
::selection { background: rgba(63,158,119,.18); }

/* ---------- Layout helpers ---------- */
.wrap { max-width: var(--maxw); margin: 0 auto; padding-inline: var(--gutter); }
.section { padding-block: clamp(66px, 9vw, 124px); }

.eyebrow {
  font-family: var(--font-eyebrow);
  font-size: 12.5px; font-weight: 600; letter-spacing: 0.2em;
  text-transform: uppercase; color: var(--green-deep); margin: 0 0 20px;
}
.lead { font-size: clamp(18px, 1.9vw, 21px); line-height: 1.6; color: var(--ink-soft); max-width: 60ch; }

h1, h2, h3 { font-family: var(--font-display); font-weight: 600; line-height: 1.1; letter-spacing: -0.02em; margin: 0; }
h1 { font-size: clamp(40px, 6vw, 68px); font-weight: 700; letter-spacing: -0.03em; }
h2 { font-size: clamp(29px, 4vw, 46px); letter-spacing: -0.025em; }
h3 { font-size: clamp(18px, 2vw, 22px); font-weight: 600; letter-spacing: -0.015em; line-height: 1.25; }

/* serif-italic accent word */
.accent-italic { font-family: var(--font-accent); font-style: italic; font-weight: 500; letter-spacing: 0; }


/* pill badge — glass */
.pill {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--font-eyebrow);
  font-size: 12px; font-weight: 600; letter-spacing: 0.13em; line-height: 1.35; text-transform: uppercase;
  color: var(--green-deep);
  background: rgba(255,255,255,.55);
  backdrop-filter: blur(12px) saturate(160%);
  -webkit-backdrop-filter: blur(12px) saturate(160%);
  border: 1px solid rgba(63,158,119,.28);
  padding: 9px 18px; border-radius: 999px; margin-bottom: 28px;
  box-shadow: var(--shadow-sm), inset 0 1px 0 rgba(255,255,255,.7);
}
@media (max-width: 560px) {
  .pill { font-size: 11px; letter-spacing: .07em; padding: 8px 15px; border-radius: 20px; text-align: center; }
}
.pill .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 3px rgba(63,158,119,.18); }

/* section heading with subtle left accent bar */
.h-accent { position: relative; padding-left: 22px; }
.h-accent::before {
  content: ""; position: absolute; left: 0; top: .1em; bottom: .1em; width: 4px; border-radius: 4px;
  background: linear-gradient(180deg, var(--green), var(--mint));
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px; text-decoration: none;
  font-family: var(--font-body); font-weight: 600; font-size: 15.5px; letter-spacing: -0.005em;
  padding: 14px 26px; border-radius: 999px;
  transition: transform .16s ease, box-shadow .16s ease, background .16s ease, border-color .16s ease;
}
.btn-primary { background: var(--green); color: #fff; box-shadow: 0 6px 18px rgba(63,158,119,.30), inset 0 1px 0 rgba(255,255,255,.22); }
.btn-primary:hover { background: var(--green-deep); transform: translateY(-2px); box-shadow: 0 12px 28px rgba(63,158,119,.36); }
.btn-ghost {
  color: var(--ink); background: rgba(255,255,255,.6);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--line); box-shadow: var(--shadow-sm);
}
.btn-ghost:hover { border-color: #cfcabd; transform: translateY(-2px); box-shadow: var(--shadow-md); }

/* ============================================================
   Header
   ============================================================ */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(251,250,247,.55);
  backdrop-filter: saturate(180%) blur(18px);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  border-bottom: 1px solid rgba(232,229,221,.55);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.logo { display: inline-flex; align-items: center; text-decoration: none; }
.logo img { height: 24px; width: auto; display: block; }
.logo--sm img { height: 22px; }
.nav-cta {
  font-family: var(--font-body); font-size: 14.5px; font-weight: 600; text-decoration: none;
  padding: 10px 20px; border-radius: 999px; background: var(--ink); color: #fff;
  transition: transform .16s ease, background .16s ease, box-shadow .16s ease;
  box-shadow: var(--shadow-sm);
}
.nav-cta:hover { background: var(--green-deep); transform: translateY(-1px); box-shadow: var(--shadow-md); }

/* ============================================================
   Hero
   ============================================================ */
.hero { position: relative; overflow: hidden; padding-block: clamp(76px, 12vw, 152px); }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(58% 52% at 84% 6%, rgba(31,200,166,.12), transparent 60%),
    radial-gradient(48% 48% at 94% 38%, rgba(255,157,119,.09), transparent 62%),
    radial-gradient(42% 40% at -4% 96%, rgba(0,153,255,.07), transparent 60%);
}
.hero .wrap { position: relative; z-index: 2; }
.hero h1 { max-width: 15ch; }
.hero .lead { margin-top: 28px; font-size: clamp(18px, 2vw, 22px); }
.hero .lead strong { color: var(--ink); font-weight: 600; }
.hero-actions { margin-top: 40px; display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }

.rings { position: absolute; inset: 0; z-index: 1; pointer-events: none; }
.ring { position: absolute; height: auto; }
.ring--1 { width: 560px; right: -150px; top: -130px; opacity: .85; }
.ring--2 { width: 260px; right: 90px;  top: 70px;  opacity: .7; }
.ring--3 { width: 190px; left: -70px;  bottom: -80px; opacity: .5; }

/* ============================================================
   Positioning strip
   ============================================================ */
.positioning { background: var(--paper-warm); border-block: 1px solid var(--line); }
.positioning p {
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(27px, 3.4vw, 44px); line-height: 1.16; max-width: 20ch; letter-spacing: -0.025em;
}
.positioning p .hl { color: var(--green-deep); }
.positioning .sub { font-family: var(--font-body); font-size: 18px; line-height: 1.62; color: var(--ink-soft); font-weight: 400; max-width: 58ch; margin-top: 26px; }

/* who this is for — chips */
.fit { margin-top: 36px; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.fit-label { font-family: var(--font-eyebrow); font-size: 12px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-faint); margin-right: 4px; }
.chip {
  font-family: var(--font-body); font-size: 14px; font-weight: 500; color: var(--ink-soft);
  background: rgba(63,158,119,.08); border: 1px solid rgba(63,158,119,.22);
  padding: 8px 15px; border-radius: 999px;
}

/* ============================================================
   Focus areas — unified neutral cards, green accent only
   ============================================================ */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin-top: 48px; }
.card {
  position: relative; background: var(--card); border: 1.5px solid var(--line); border-radius: var(--r-lg);
  padding: 32px 30px 34px; box-shadow: var(--shadow-sm);
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}
.card:hover { transform: translateY(-5px); box-shadow: var(--shadow-md); border-color: var(--green); }
.card .num {
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--font-body); font-size: 13px; font-weight: 700; letter-spacing: .02em;
  color: #8a939e; background: #f1efe9; border: 1px solid #e3e0d8;
  width: 38px; height: 38px; border-radius: 11px;
  transition: color .22s ease, background .22s ease, border-color .22s ease;
}
.card:hover .num { color: var(--green-deep); background: rgba(63,158,119,.12); border-color: rgba(63,158,119,.32); }
.card h3 { margin: 22px 0 11px; }
.card p { margin: 0; color: var(--ink-soft); font-size: 16px; line-height: 1.58; }

/* ============================================================
   Approach — dark band
   ============================================================ */
.approach { background: var(--ink); color: #fff; position: relative; overflow: hidden; }
.approach .eyebrow { color: var(--mint); }
.approach h2 { max-width: 17ch; }
.approach .lead { color: #b9c1cc; margin-top: 24px; max-width: 64ch; }
.approach .signature { margin-top: 48px; padding-top: 38px; border-top: 1px solid rgba(255,255,255,.14); }
.sig-line {
  font-family: var(--font-display); font-size: clamp(24px, 3vw, 40px);
  font-weight: 600; line-height: 1.2; letter-spacing: -0.025em; max-width: 20ch; margin: 0; color: #fff;
}
.sig-accent { position: relative; color: var(--mint); white-space: nowrap; }
.sig-accent::after {
  content: ""; position: absolute; left: -5%; right: -5%; top: -14%; bottom: -14%;
  border: 2px solid rgba(31,200,166,.55); border-radius: 50%;
  transform: rotate(-2.5deg); pointer-events: none;
}
.sig-sub {
  margin: 18px 0 0; font-family: var(--font-body); font-size: 11px; font-weight: 600;
  letter-spacing: .18em; text-transform: uppercase; color: #6f7b88;
}

/* ============================================================
   Current Labs — glass-tinted cards, parity, unified accent
   ============================================================ */
.labs .head { display: flex; justify-content: space-between; align-items: flex-end; gap: 28px; flex-wrap: wrap; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; margin-top: 48px; }
.lab-card {
  position: relative; border-radius: var(--r-xl);
  padding: 36px 34px 34px;
  background: var(--card);
  border: 1.5px solid var(--line);
  box-shadow: var(--shadow-sm);
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease, background .22s ease;
}
.lab-card:hover {
  transform: translateY(-6px); box-shadow: var(--shadow-md);
  border-color: rgba(63,158,119,.30);
  background: linear-gradient(140deg, rgba(63,158,119,.15), rgba(31,200,166,.11));
}
.lab-card h3 { font-size: clamp(21px, 2.4vw, 27px); }
.lab-card p { color: var(--ink-soft); font-size: 16px; line-height: 1.58; margin: 14px 0 24px; }
.lab-card .work { font-size: 14px; color: var(--ink-faint); letter-spacing: .01em; }
.lab-card .work strong { color: var(--ink); font-weight: 700; font-family: var(--font-body); font-size: 12.5px; text-transform: uppercase; letter-spacing: .1em; display: block; margin-bottom: 6px; }
.labs .note { margin-top: 32px; color: var(--ink-faint); font-size: 15px; text-align: center; letter-spacing: .01em; }

/* ============================================================
   Testimonial — glass card
   ============================================================ */
.testimonial { background: var(--paper-warm); border-block: 1px solid var(--line); }
.testimonial .wrap { max-width: 1100px; }

/* founder + testimonial pairing */
.proof { display: grid; grid-template-columns: 0.82fr 1.18fr; gap: 24px; align-items: center; }
.founder {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r-xl);
  padding: 36px 34px; box-shadow: var(--shadow-sm);
}
.founder-photo {
  width: 112px; height: 112px; border-radius: 50%; object-fit: cover; object-position: center top;
  margin-bottom: 24px; border: 3px solid #fff; box-shadow: 0 8px 22px rgba(20,24,31,.14);
}
.founder-role {
  font-family: var(--font-eyebrow); font-size: 12px; font-weight: 600;
  letter-spacing: .14em; text-transform: uppercase; color: var(--green-deep); margin: 0 0 6px;
}
.founder-name { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-size: clamp(21px, 2.3vw, 26px); margin: 0 0 16px; }
.founder-linkedin { display: inline-flex; color: var(--ink-faint); transition: color .15s ease, transform .15s ease; }
.founder-linkedin svg { width: 18px; height: 18px; display: block; }
.founder-linkedin:hover { color: var(--green-deep); transform: translateY(-1px); }
.founder-bio { color: var(--ink-soft); font-size: 15px; line-height: 1.62; margin: 0; }
.founder-bio a { color: var(--green-deep); text-decoration: none; border-bottom: 1px solid rgba(63,158,119,.4); transition: border-color .15s ease, color .15s ease; }
.founder-bio a:hover { color: var(--green); border-color: var(--green); }
@media (max-width: 900px) { .proof { grid-template-columns: 1fr; } }
.tcard {
  position: relative; text-align: center; border-radius: var(--r-xl);
  padding: clamp(64px, 8vw, 104px) clamp(30px, 6vw, 76px) clamp(40px, 5vw, 60px);
  background: rgba(255,255,255,.62);
  backdrop-filter: blur(18px) saturate(150%); -webkit-backdrop-filter: blur(18px) saturate(150%);
  border: 1px solid rgba(255,255,255,.7);
  box-shadow: var(--shadow-lg), inset 0 1px 0 rgba(255,255,255,.7);
}
/* oversized corner quote mark — fully visible, tucked top-left */
.tcard .mark {
  position: absolute; left: clamp(20px, 4vw, 52px); top: clamp(24px, 4vw, 48px);
  font-family: var(--font-accent); font-style: italic;
  font-size: clamp(96px, 12vw, 150px); line-height: .8; height: .62em; overflow: hidden;
  pointer-events: none;
  background: linear-gradient(150deg, var(--green), var(--mint));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.quote {
  position: relative; z-index: 1;
  font-family: var(--font-display); font-size: clamp(22px, 2.8vw, 33px);
  font-weight: 500; line-height: 1.36; letter-spacing: -0.02em; margin: 0 auto 28px; color: var(--ink);
  max-width: 40ch;
}
.attrib { color: var(--ink-soft); font-size: 15.5px; }
.attrib strong { color: var(--ink); font-weight: 600; }

/* ============================================================
   Contact
   ============================================================ */
.contact.section { padding-block: clamp(52px, 6vw, 88px); text-align: center; }
.contact h2 { max-width: 20ch; margin: 0 auto; font-size: clamp(26px, 3.2vw, 38px); }
.contact .email {
  display: inline-flex; align-items: center; gap: .38em; margin-top: 26px;
  font-family: var(--font-display); font-size: clamp(22px, 3vw, 34px); font-weight: 600; letter-spacing: -0.025em;
  text-decoration: none; color: var(--green-deep);
  transition: color .18s ease;
}
.contact .email .arw { display: inline-block; transition: transform .2s ease; }
.contact .email:hover { color: var(--green); }
.contact .email:hover .arw { transform: translateX(5px); }
.contact .book-line { margin: 18px 0 0; }
.contact .book {
  font-family: var(--font-body); font-size: 14.5px; color: var(--ink-faint); text-decoration: none;
  border-bottom: 1px solid rgba(147,155,166,.45); padding-bottom: 1px;
  transition: color .16s ease, border-color .16s ease;
}
.contact .book:hover { color: var(--green-deep); border-color: var(--green-deep); }

/* ============================================================
   Footer — dark, structured, branded
   ============================================================ */
.site-footer { background: var(--ink); color: #fff; position: relative; overflow: hidden; padding-block: clamp(56px, 7vw, 84px) 34px; }
.site-footer::before {
  content: ""; position: absolute; right: -120px; top: -120px; width: 360px; height: 360px; border-radius: 50%;
  border: 2px solid transparent;
  background: linear-gradient(120deg, var(--coral), var(--yellow), var(--mint), var(--blue)) border-box;
  -webkit-mask: linear-gradient(#000 0 0) padding-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  opacity: .35; pointer-events: none;
}
.footer-top { position: relative; z-index: 1; display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; }
.footer-brand .logo img { height: 26px; }
.footer-brand p { margin: 20px 0 0; color: #9aa3ae; font-size: 15px; line-height: 1.6; max-width: 34ch; }
.footer-col h4 {
  font-family: var(--font-eyebrow); font-size: 11.5px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase;
  color: #6b7482; margin: 0 0 18px;
}
.footer-col a { display: block; color: #cfd5dd; text-decoration: none; font-size: 15px; margin-bottom: 12px; transition: color .15s ease; width: fit-content; }
.footer-col a:hover { color: #fff; }
.footer-bottom {
  position: relative; z-index: 1; margin-top: clamp(40px, 6vw, 64px); padding-top: 26px;
  border-top: 1px solid rgba(255,255,255,.1);
  display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap;
}
.footer-bottom small { color: #7f8896; font-size: 13.5px; }
.footer-bottom .made { color: #7f8896; font-size: 13.5px; }
.footer-bottom .made em { font-style: normal; color: var(--mint); }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 900px) {
  .grid-3 { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
  .footer-top { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 860px) {
  .ring--1 { width: 360px; right: -120px; top: -60px; }
  .ring--2 { display: none; }
  .ring--3 { width: 150px; }
}
@media (max-width: 520px) {
  body { font-size: 17px; }
  .nav-cta { display: none; }
  .footer-top { grid-template-columns: 1fr; gap: 32px; }
}
