/*
  Buffer v3 site pages: /employers, /employees, /how-it-works, /faq and
  /about, and the page for addresses that match nothing (the 404).
  Hand-written HTML in public/<page>/index.html, on top of v3-site.css
  (tokens, nav, footer, buttons, press states, glows).

  The handoff has no frame for these pages, so each part takes the look of
  its nearest relative on the site: the header is the legal pages' sage
  hero, the prose, tables and questions are the blog article's, the
  at-a-glance strip and the people are the home page's white cards, and the
  closing call is the home page's navy panel. Every colour is a token.

  Breakpoints: >= 1024 desktop · 768–1023 tablet · < 768 mobile.
*/

/* Proportional figures in the prose, as on the legal pages and articles:
   Inter's tabular feature also widens the hyphen ("per-employee"). Tables
   stay tabular. */
.v3-page-main,
.v3-page-404 { font-variant-numeric: normal; }
.v3-page-table { font-variant-numeric: tabular-nums; }

/* --------------------------------------------------------------- header */

.v3-page-hero {
  position: relative;
  margin: clamp(8px, 1vw, 12px) clamp(8px, 1vw, 12px) 0;
  border-radius: clamp(24px, 3vw, 28px);
  overflow: hidden;
  isolation: isolate;
  background: linear-gradient(180deg, var(--sage-200) 0%, var(--sage-100) 55%, var(--white) 100%);
  padding: clamp(120px, 14vw, 160px) clamp(16px, 4vw, 48px) clamp(48px, 6vw, 72px);
}

/* Room for the at-a-glance cards, which overlap the header's bottom edge. */
.v3-page-hero--glance { padding-bottom: clamp(96px, 10vw, 128px); }

.v3-page-hero .v3-page-glow-a { --t: 1.2; top: -200px; left: -120px; width: 720px; height: 720px; }
.v3-page-hero .v3-page-glow-b { --t: 1.2; top: -40px; right: -160px; width: 760px; height: 760px; }
.v3-page-hero .v3-page-glow-c { --t: 1.2; top: -80px; right: 260px; width: 520px; height: 520px; }

.v3-page-hero-inner {
  position: relative;
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 20px;
}

/* The header's text sits on the drifting glows, where teal and text-2 fall
   below 4.5:1: charcoal and navy stay above it (as on the legal pages). */
.v3-page-crumbs ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-2);
}

.v3-page-crumbs li { display: flex; align-items: center; }
.v3-page-crumbs a { color: var(--ink-2); text-decoration: none; }
.v3-page-crumbs [aria-current] { color: var(--ink); font-weight: 600; }

.v3-page-title {
  max-width: 920px;
  font-size: clamp(36px, 5vw, 60px);
  line-height: 1.05;
  font-weight: 700;
  letter-spacing: -.035em;
  color: var(--ink);
  text-wrap: balance;
}

.v3-page-intro {
  max-width: 760px;
  font-size: clamp(17px, 1.6vw, 19px);
  line-height: 1.6;
  color: var(--ink-2);
  text-wrap: pretty;
}

.v3-page-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 28px;
  margin-top: 8px;
}

/* Link chips: the on-page links on /how-it-works and /faq, and the places
   to start on the 404. White pills, as the blog's topic chips. */
.v3-page-chips {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.v3-page-chip {
  height: 40px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid rgb(var(--navy-rgb) / .14);
  background: var(--surface);
  color: var(--ink-2);
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}

@media (hover: hover) and (pointer: fine) {
  .v3-page-chip:hover { background: var(--tray); }
}

[data-press="chip"].is-pressed {
  transform: scale(calc(1 - .04 * var(--m))) !important;
  transition: transform .09s ease-out !important;
}

@media (max-width: 767px) {
  .v3-page-actions { width: 100%; }
  .v3-page-actions .v3-btn { width: 100%; }
}

/* ------------------------------------------------------- at a glance */

/* Four white cards pulled up over the header's bottom edge, as the home
   page's pillars sit over its hero. */
.v3-page-glance {
  position: relative;
  z-index: 2;
  width: min(1200px, 100% - 2 * var(--gutter));
  margin: calc(-1 * clamp(64px, 7vw, 80px)) auto 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.v3-page-glance li {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: clamp(20px, 2.2vw, 24px);
  border-radius: 20px;
  background: var(--surface);
  box-shadow: var(--shadow-card);
  font-size: 15px;
  line-height: 1.55;
  color: var(--ink-2);
  text-wrap: pretty;
}

.v3-page-glance-icon {
  width: 32px;
  height: 32px;
  flex: none;
  border-radius: 50%;
  background: var(--zone);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
}

@media (max-width: 1023px) {
  .v3-page-glance { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 767px) {
  .v3-page-glance { grid-template-columns: minmax(0, 1fr); gap: 12px; }
}

/* ----------------------------------------------------------------- body */

/* The copy keeps to a 920px column (container.prose in tokens.json) on the
   left edge of the page's 1200px column, under the header's text. */
.v3-page-body {
  width: min(1200px, 100% - 2 * var(--gutter));
  margin: clamp(32px, 5vw, 56px) auto 0;
}

.v3-page-glance + .v3-page-body { margin-top: clamp(40px, 5vw, 64px); }

.v3-page-section {
  max-width: 920px;
  padding: clamp(28px, 3.6vw, 40px) 0;
}

.v3-page-section + .v3-page-section { border-top: 1px solid var(--hairline); }
.v3-page-section:first-child { padding-top: 0; }

.v3-page-section h2 {
  max-width: 760px;
  margin: 0 0 16px;
  font-size: clamp(24px, 2.4vw, 30px);
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: -.025em;
  color: var(--ink);
  scroll-margin-top: 110px;
  text-wrap: balance;
}

.v3-page-section h3 {
  margin: 0 0 8px;
  font-size: clamp(18px, 1.6vw, 20px);
  line-height: 1.4;
  font-weight: 600;
  color: var(--ink);
}

.v3-page-section p,
.v3-page-section ul:not([class]),
.v3-page-section ol:not([class]) {
  max-width: 760px;
  margin: 0 0 20px;
  font-size: clamp(17px, 1.4vw, 18px);
  line-height: 1.7;
  color: var(--ink-2);
  text-wrap: pretty;
}

.v3-page-section ul:not([class]),
.v3-page-section ol:not([class]) {
  display: flex;
  flex-direction: column;
}

.v3-page-section ul:not([class]) { padding-left: 24px; gap: 10px; }
.v3-page-section ol:not([class]) { padding-left: 26px; gap: 12px; }
.v3-page-section ul:not([class]) > li { padding-left: 4px; }
.v3-page-section ol:not([class]) > li { padding-left: 6px; }
.v3-page-main li::marker { color: var(--accent); }

.v3-page-section > :last-child,
.v3-page-section p:last-child { margin-bottom: 0; }

.v3-page-main strong { font-weight: 600; color: var(--ink); }

/* Links in the copy: navy, underlined in teal, as in the blog's articles. */
.v3-page-intro a,
.v3-page-section a:not(.v3-btn):not(.v3-link),
.v3-page-faq a,
.v3-page-facts a,
.v3-page-person a,
.v3-page-404 p a {
  color: var(--ink);
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: rgb(var(--teal-rgb) / .6);
  overflow-wrap: anywhere;
}

@media (hover: hover) and (pointer: fine) {
  .v3-page-intro a:hover,
  .v3-page-section a:not(.v3-btn):not(.v3-link):hover,
  .v3-page-faq a:hover,
  .v3-page-facts a:hover,
  .v3-page-person a:hover,
  .v3-page-404 p a:hover { text-decoration-color: var(--accent); }
}

/* "Read more", sources and other notes under the copy. */
.v3-page-section p.v3-page-more,
.v3-page-section p.v3-page-source {
  font-size: 15px;
  line-height: 1.6;
  color: var(--text-2);
}

.v3-page-section p.v3-page-source { font-size: 14px; }

/* A call to action inside a section. */
.v3-page-section .v3-page-section-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 28px;
  margin: 8px 0 0;
}

/* ---------------------------------------------------------------- tables */

/* The article's table: each cell has 8px of padding and the table reaches
   8px past the text column, so every column lines up with the prose. Wide
   tables scroll sideways on small screens. */
.v3-page-table-block { margin: 8px 0 28px; }
.v3-page-section > .v3-page-table-block:last-child { margin-bottom: 0; }

.v3-page-table-scroll {
  overflow-x: auto;
  margin: 0 -8px;
  padding: 0 8px;
  border-radius: 4px;
}

.v3-page-table {
  width: calc(100% + 16px);
  margin: 0 -8px;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: 15px;
  line-height: 1.55;
  color: var(--ink-2);
  --rule: rgb(var(--navy-rgb) / .1);
}

.v3-page-table thead { --rule: rgb(var(--navy-rgb) / .14); }

.v3-page-table th,
.v3-page-table td {
  padding: 14px 8px;
  text-align: left;
  vertical-align: top;
  background: linear-gradient(var(--rule), var(--rule)) no-repeat 0 100% / 100% 1px;
}

.v3-page-table th:first-child,
.v3-page-table td:first-child { background-position: 8px 100%; background-size: calc(100% - 8px) 1px; }

.v3-page-table th:last-child,
.v3-page-table td:last-child { background-size: calc(100% - 8px) 1px; }

/* Column labels: small, sentence case, as written. */
.v3-page-table thead th,
.v3-page-table thead td {
  padding-top: 0;
  padding-bottom: 12px;
  font-size: 13px;
  font-weight: 600;
  vertical-align: bottom;
  color: var(--text-2);
}

.v3-page-table tbody th {
  font-weight: 600;
  color: var(--ink);
  text-wrap: pretty;
}

.v3-page-table td { text-wrap: pretty; }

.v3-page-table-hint {
  display: none;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  font-size: 12px;
  color: var(--text-2);
}

@media (max-width: 767px) {
  .v3-page-table-scroll { margin: 0 -16px; padding: 0 16px; }
  .v3-page-table-block--wide .v3-page-table-hint { display: flex; }
}

/* ------------------------------------------------------------- questions */

/* /faq: every answer in the page, as the blog's questions and answers. */
.v3-page-faq { margin: 0; padding: 0; list-style: none; }

.v3-page-faq-item {
  padding: 20px 0;
  border-top: 1px solid var(--hairline);
}

.v3-page-faq-item:last-child { border-bottom: 1px solid var(--hairline); padding-bottom: 20px; }

.v3-page-section .v3-page-faq-item h3 { scroll-margin-top: 110px; }

.v3-page-section .v3-page-faq-item p {
  margin: 0 0 10px;
  font-size: 16px;
  line-height: 1.65;
}

.v3-page-section .v3-page-faq-item p:last-child { margin-bottom: 0; }

/* ----------------------------------------------------------------- people */

.v3-page-people {
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.v3-page-person {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: clamp(20px, 2.2vw, 24px);
  border-radius: 20px;
  background: var(--surface);
  box-shadow: var(--shadow-card);
}

.v3-page-people .v3-page-person-name {
  margin: 0;
  font-family: var(--heading);
  font-size: 18px;
  line-height: 1.3;
  font-weight: 700;
  letter-spacing: -.01em;
  color: var(--ink);
}

.v3-page-people .v3-page-person-role {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-2);
}

.v3-page-person a { align-self: flex-start; margin-top: 6px; font-size: 14px; }

@media (max-width: 1023px) {
  .v3-page-people { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 767px) {
  .v3-page-people { grid-template-columns: minmax(0, 1fr); gap: 12px; }
}

/* ------------------------------------------------------------------ facts */

.v3-page-facts {
  margin: 8px 0 0;
  padding: 4px clamp(20px, 2.4vw, 28px);
  border-radius: 20px;
  background: var(--surface);
  box-shadow: var(--shadow-card);
}

.v3-page-facts > div {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 4px 24px;
  padding: 16px 0;
}

.v3-page-facts > div + div { border-top: 1px solid var(--hairline); }

.v3-page-facts dt {
  font-size: 14px;
  line-height: 1.6;
  font-weight: 600;
  color: var(--text-2);
}

.v3-page-facts dd {
  margin: 0;
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink-2);
}

@media (max-width: 767px) {
  .v3-page-facts > div { grid-template-columns: minmax(0, 1fr); }
}

/* --------------------------------------------------------- closing call */

/* The home page's navy panel: a teal glow behind the copy, the heading in
   warm white, the text in sage-300, the button inverse. */
.v3-page-cta {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  width: min(1200px, 100% - 2 * var(--gutter));
  margin: clamp(56px, 7vw, 96px) auto 0;
  border-radius: clamp(24px, 2.6vw, 28px);
  background: var(--ink);
  padding: clamp(40px, 6vw, 72px) clamp(24px, 6vw, 72px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 32px 64px;
  align-items: center;
  box-shadow: var(--shadow-float);
}

.v3-page-cta-glow {
  position: absolute;
  bottom: -260px;
  left: -200px;
  width: 640px;
  height: 640px;
  border-radius: 50%;
  background: radial-gradient(circle closest-side, rgb(var(--teal-rgb) / .6) 0%, rgb(var(--teal-rgb) / .3) 45%, rgb(var(--teal-rgb) / 0) 100%);
  pointer-events: none;
  z-index: -1;
}

.v3-page-cta-copy {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 640px;
}

.v3-page-cta h2 {
  font-size: clamp(28px, 3.4vw, 40px);
  line-height: 1.1;
  font-weight: 700;
  letter-spacing: -.03em;
  color: var(--on-navy);
  text-wrap: balance;
}

.v3-page-cta p {
  font-size: 17px;
  line-height: 1.6;
  color: var(--on-navy-2);
  text-wrap: pretty;
}

.v3-page-cta-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 20px;
}

/* Text links on navy: warm white, underlined in their own colour (as the
   blog's banner draws them); Soft Gold on hover. */
.v3-page-cta a:not(.v3-btn) {
  color: var(--on-navy);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 4px;
  overflow-wrap: anywhere;
}

@media (hover: hover) and (pointer: fine) {
  .v3-page-cta a:not(.v3-btn):hover { text-decoration-color: var(--on-navy-accent); }
}

/* Copy only, with its links in the text (/faq). */
.v3-page-cta--single { grid-template-columns: minmax(0, 1fr); }

@media (max-width: 1023px) {
  .v3-page-cta { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 767px) {
  .v3-page-cta-actions { align-items: stretch; }
  .v3-page-cta-actions .v3-btn { width: 100%; }
}

/* ------------------------------------------------------------ not found */

.v3-page-404 {
  width: min(1200px, 100% - 2 * var(--gutter));
  margin: 0 auto;
  padding-top: clamp(140px, 16vw, 200px);
}

.v3-page-404-card {
  max-width: 640px;
  border-radius: 20px;
  background: var(--surface);
  box-shadow: var(--shadow-card);
  padding: clamp(28px, 4vw, 40px);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
}

.v3-page-404-card h1 {
  font-size: clamp(28px, 3vw, 34px);
  line-height: 1.15;
  font-weight: 700;
  letter-spacing: -.03em;
  color: var(--ink);
  text-wrap: balance;
}

.v3-page-404-card p {
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-2);
  text-wrap: pretty;
}

.v3-page-404-card .v3-btn { margin-top: 8px; }

@media print {
  .v3-nav, .v3-nav-scrim, .v3-page-cta, .v3-footer { display: none !important; }
  .v3-page-hero { padding-top: 24px; }
}
