/* ==========================================================================
   TeamTrek — the blog
   --------------------------------------------------------------------------
   Five bands: a gradient hero carrying the breadcrumb, the masthead, the
   featured post and the tools; a "start here" row of picks; the archive
   beside a sticky rail; the letter band; and the closing panel every page
   ends on.

   No photographs anywhere. Each card's picture is built from the parts the
   product pages are drawn with -- a ruled ground, the tile the icons sit on
   everywhere else, and the icon for the subject. It costs nothing per post,
   never loads, never looks like somebody else's office.

   The hero is light rather than the dark teal band the product pages open
   with. A blog is a publication inside a product site, and giving it a
   pricing page's hero tells a reader it is more marketing.
   ========================================================================== */

/* ===================================================== the hero band ===== */
.bloghero {
  /* 6rem under the navbar, which is what every other hero on the site
     uses. It was 3.5rem, so the blog opened 40px higher than the page a
     reader had just come from. */
  padding: 6rem 0 clamp(2.5rem, 4vw, 3.5rem);
  background:
    radial-gradient(60rem 26rem at 50% -6rem, var(--primary-100) 0%, transparent 65%),
    linear-gradient(180deg, var(--neutral-50) 0%, #fff 60%);
  border-bottom: 1px solid var(--neutral-150);
}

/* Where the reader is, in the site rather than in the page. */
.blogcrumb {
  display: flex; flex-wrap: wrap; align-items: center; gap: .5rem;
  margin: 0 0 1.5rem;
  font-size: .875rem; color: var(--neutral-600);
}
.blogcrumb a { color: var(--primary-700); font-weight: 600; text-decoration: none; }
.blogcrumb a:hover { color: var(--primary-800); text-decoration: underline; }
.blogcrumb span[aria-hidden] { color: var(--neutral-300); }

.bloghero__head { max-width: 46rem; }
.bloghero__title {
  margin: 0;
  font-size: clamp(2.125rem, 1.4rem + 2.8vw, 3.25rem);
  line-height: 1.08; letter-spacing: -.035em; font-weight: 700;
  color: var(--neutral-900);
  text-wrap: balance;
}
.bloghero__copy {
  margin: 1.125rem 0 0; max-width: 42rem;
  font-size: 1.0625rem; line-height: 1.65; color: var(--neutral-600);
}

/* ======================================================== the tools ===== */
/* Under the featured card, not above it: the newest piece is the reason a
   reader came, and a filter is what they reach for after it. */
/* The tools open the section above the cards rather than sitting in the
   hero: a filter beside a masthead is decoration until a reader has seen
   what it narrows. */
.blogtools { display: grid; gap: 1rem; margin-bottom: 3rem; }
.blogsearch { position: relative; width: min(30rem, 100%); }
.blogsearch .icon {
  position: absolute; left: 1rem; top: 50%; transform: translateY(-50%);
  color: var(--neutral-500); pointer-events: none;
}
.blogsearch__field {
  width: 100%; height: 48px;
  padding: 0 1rem 0 2.75rem;
  border: 1px solid var(--neutral-200); border-radius: var(--r-md);
  background: #fff;
  font: inherit; font-size: .9375rem; color: var(--neutral-900);
}
.blogsearch__field::placeholder { color: var(--neutral-500); }
.blogsearch__field:focus-visible {
  outline: none; border-color: var(--primary-600);
  box-shadow: 0 0 0 3px var(--primary-100);
}

.blogtabs { display: flex; flex-wrap: wrap; gap: .5rem; }
.blogtab {
  display: inline-flex; align-items: center; gap: .4375rem;
  height: 40px; padding-inline: 1rem;
  border: 1px solid var(--neutral-200); border-radius: var(--r-pill);
  background: #fff;
  font-size: .875rem; font-weight: 600; color: var(--neutral-700);
  cursor: pointer;
  transition: background-color var(--dur-ui) var(--ease-ui),
              border-color var(--dur-ui) var(--ease-ui),
              color var(--dur-ui) var(--ease-ui);
}
.blogtab:hover { border-color: var(--primary-200); color: var(--primary-700); }
.blogtab[aria-pressed="true"] {
  background: var(--primary-700); border-color: var(--primary-700); color: #fff;
}
.blogtab:focus-visible { outline: 2px solid var(--primary-600); outline-offset: 2px; }
/* The count rides inside the tab, so a filter says how much is behind it
   before anybody presses it. */
.blogtab__count {
  font-size: .75rem; font-weight: 700; color: var(--neutral-400);
  font-variant-numeric: tabular-nums;
}
.blogtab[aria-pressed="true"] .blogtab__count { color: rgba(255, 255, 255, .72); }

/* ========================================================= the cards ===== */
.posts {
  display: grid; gap: 1.5rem;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 17rem), 1fr));
}

.post {
  display: flex; flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--neutral-200); border-radius: var(--r-lg);
  background: #fff;
  text-decoration: none;
  transition: border-color var(--dur-ui) var(--ease-ui),
              transform var(--dur-ui) var(--ease-ui),
              box-shadow var(--dur-ui) var(--ease-ui);
}
.post:hover {
  border-color: var(--primary-200);
  transform: translateY(-2px);
  box-shadow: 0 16px 32px -20px rgb(16 24 40 / .22);
}
.post:focus-visible { outline: 2px solid var(--primary-600); outline-offset: 3px; }

/* ------------------------------------------------------- the visual block
   Gradient fields rather than a drawn instrument. The product pages are
   full of real figures; a card is not the place for a chart nobody can
   read at 280px, and a photograph would be the only one on the site.

   Three soft fields, placed differently for each topic, with the icon tile
   on top. Two custom properties carry the hue, so a new topic is a pair of
   colours rather than a new rule. */
.post__visual {
  position: relative;
  display: flex; align-items: center; justify-content: center;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-bottom: 1px solid var(--neutral-150);
  /* the teal default; one topic overrides it below */
  --blob-a: var(--primary-400);
  --blob-b: var(--primary-200);
  --blob-c: var(--primary-100);
  /* where the three fields sit, overridden per topic */
  --at-a: 22% 32%;
  --at-b: 76% 28%;
  --at-c: 52% 86%;
  background:
    radial-gradient(42% 62% at var(--at-a), var(--blob-a) 0%, transparent 68%),
    radial-gradient(46% 66% at var(--at-b), var(--blob-b) 0%, transparent 66%),
    radial-gradient(52% 56% at var(--at-c), var(--blob-c) 0%, transparent 72%),
    var(--neutral-25);
}
/* A hairline sheen across the top, so the block has an edge rather than
   fading into the card. */
.post__visual::before {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgb(255 255 255 / .35) 0%, transparent 38%);
}

/* One arrangement per topic, so a reader learns the grid without reading
   the labels. */
.post[data-cat="Time tracking"] .post__visual,
.post--featured[data-cat="Time tracking"] .post__visual {
  --at-a: 18% 26%; --at-b: 78% 34%; --at-c: 58% 88%;
}
.post[data-cat="Productivity"] .post__visual {
  --at-a: 30% 78%; --at-b: 70% 20%; --at-c: 12% 40%;
}
.post[data-cat="Remote work"] .post__visual {
  --at-a: 74% 72%; --at-b: 26% 24%; --at-c: 88% 20%;
}
.post[data-cat="Workforce management"] .post__visual {
  --at-a: 50% 18%; --at-b: 20% 74%; --at-c: 82% 66%;
}
/* Release notes are the one thing on the blog that is an announcement
   rather than an argument, so they get the one colour that is not the
   brand's. */
.post[data-cat="Product updates"] .post__visual {
  --blob-a: #a79bf0;
  --blob-b: #cfc8f6;
  --blob-c: #e7e3fb;
  --at-a: 26% 30%; --at-b: 76% 70%; --at-c: 60% 16%;
}
.post[data-cat="Product updates"] .post__tile {
  border-color: #ddd8f8;
  color: #5b4bd6;
}
.post[data-cat="Product updates"] /* Category and date on one line, where a card carries both. .post__cat on
   its own, as the listing uses it, keeps the rules below. */
.post__meta {
  display: flex; flex-wrap: wrap; align-items: center; gap: .5rem;
  font-size: .75rem; color: var(--neutral-500);
}
.post__meta .post__cat { margin: 0; }

.post__cat { color: #5b4bd6; }
.post[data-cat="Product updates"]:hover { border-color: #ddd8f8; }
.post[data-cat="Product updates"]:hover .post__title { color: #4a3cc0; }

/* Privacy pieces, which the article pages link to most. */
.post[data-cat="Privacy"] .post__visual {
  --at-a: 68% 24%; --at-b: 24% 66%; --at-c: 86% 82%;
}

/* A real photograph, where one exists: it covers the gradient fields
   rather than replacing the component, so a card with an image and a card
   without it are the same card. */
.post__img {
  position: absolute; inset: 0; z-index: 1;
  width: 100%; height: 100%;
  object-fit: cover;
}
.post__img + .post__tile { display: none; }

.post__tile {
  position: relative; z-index: 1;
  display: grid; place-items: center;
  width: 3.5rem; height: 3.5rem;
  border-radius: var(--r-md);
  border: 1px solid var(--primary-100);
  background: #fff;
  color: var(--primary-700);
  box-shadow: 0 10px 24px -14px rgb(16 24 40 / .35);
  transition: transform var(--dur-ui) var(--ease-ui);
}
.post__tile .icon { width: 22px; height: 22px; }
.post:hover .post__tile { transform: translateY(-2px) scale(1.03); }

/* --------------------------------------------------------- the text block */
.post__text {
  display: flex; flex-direction: column; flex: 1 1 auto;
  padding: 1.375rem 1.5rem 1.5rem;
}
.post__cat {
  margin: 0 0 .5rem;
  font-size: .6875rem; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; color: var(--primary-700);
}
.post__title {
  margin: 0 0 .625rem;
  font-size: 1.125rem; line-height: 1.35; font-weight: 700;
  letter-spacing: -.015em; color: var(--neutral-900);
}
.post:hover .post__title { color: var(--primary-800); }
.post__stand {
  margin: 0 0 1.25rem;
  font-size: .9375rem; line-height: 1.6; color: var(--neutral-600);
}
/* The foot sits at the bottom whatever the headline's length, so a row of
   cards has its bylines on one line. */
.post__foot {
  display: flex; flex-wrap: wrap; align-items: center; gap: .5rem;
  margin-top: auto; padding-top: 1rem;
  border-top: 1px solid var(--neutral-150);
  font-size: .8125rem; color: var(--neutral-500);
}
.post__who { font-weight: 600; color: var(--neutral-700); }
/* The author is the same words on every card, and the three of them
   together ran to two or three lines in a 280px column. On a card the date
   and the reading time are what differ, so they are what the foot carries;
   the featured card, which has the room, keeps the byline. */
.post:not(.post--featured) .post__who,
.post:not(.post--featured) .post__who + .post__dot { display: none; }
.post__dot { width: 3px; height: 3px; border-radius: 50%; background: var(--neutral-300); }

/* ====================================================== the featured ===== */
.post--featured {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  margin-top: 2.5rem;
  border-color: var(--primary-200);
  border-radius: 20px;
  box-shadow: 0 24px 48px -32px rgb(16 24 40 / .28);
}
.post--featured .post__visual {
  aspect-ratio: auto; min-height: 15rem; height: 100%;
  border-bottom: 0; border-right: 1px solid var(--primary-100);
}
.post--featured .post__tile { width: 4.5rem; height: 4.5rem; }
.post--featured .post__tile .icon { width: 28px; height: 28px; }
.post--featured .post__text { padding: clamp(1.5rem, 3vw, 2.5rem); justify-content: center; }
.post--featured .post__title {
  font-size: clamp(1.5rem, 1.1rem + 1.4vw, 2rem);
  letter-spacing: -.025em; max-width: 24ch;
}
.post--featured .post__stand { font-size: 1.0625rem; max-width: 58ch; }

/* The line that says why this one is at the top, in the tag's own style. */
.post__flag {
  margin: 0 0 .5rem;
  font-size: .6875rem; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; color: var(--primary-700);
}
.post__flag b { color: var(--neutral-900); font-weight: 700; }

/* A filtered-out card is removed from the flow rather than faded, so the
   grid closes up and the count beside the heading is the truth. */
.post[hidden] { display: none; }

/* ======================================== the archive and its rail ======= */
.blogsplit { display: grid; gap: 3rem; }
/* 3rem, not 2: at 2rem the descenders of a 2.5rem heading sat about
   16px off the first card, and the row read as one block. */
.blogfeed__head {
  display: flex; flex-wrap: wrap; align-items: baseline;
  justify-content: space-between; gap: .5rem 1rem;
  margin-bottom: 3rem;
}
.blogfeed__head h2 { margin: 0; }
.blogfeed__count { font-size: .9375rem; color: var(--neutral-600); font-variant-numeric: tabular-nums; }

.blogside { display: grid; gap: 1.5rem; align-content: start; }
.blogpanel {
  padding: 1.5rem;
  border: 1px solid var(--neutral-200); border-radius: var(--r-lg);
  background: #fff;
}
.blogpanel__head {
  margin: 0 0 1rem;
  font-size: .75rem; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; color: var(--neutral-500);
}

/* Most read: the number is the ranking, so it is counted rather than
   typed. */
.blogpop { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; counter-reset: pop; }
.blogpop li {
  display: grid; grid-template-columns: 1.5rem minmax(0, 1fr); gap: .625rem;
  counter-increment: pop;
}
.blogpop li::before {
  content: counter(pop);
  font-size: .9375rem; font-weight: 700; color: var(--primary-600);
  font-variant-numeric: tabular-nums;
}
.blogpop a {
  font-size: .9375rem; font-weight: 600; line-height: 1.4;
  color: var(--neutral-900); text-decoration: none;
}
.blogpop a:hover { color: var(--primary-700); }

.blogtopics { list-style: none; margin: 0; padding: 0; display: grid; }
.blogtopics button {
  display: flex; width: 100%; justify-content: space-between; gap: 1rem;
  padding: .625rem 0;
  border: 0; border-bottom: 1px solid var(--neutral-150);
  background: none; cursor: pointer;
  font: inherit; font-size: .9375rem; font-weight: 500; color: var(--neutral-800);
  text-align: left;
}
.blogtopics li:last-child button { border-bottom: 0; }
.blogtopics button:hover { color: var(--primary-700); }
.blogtopics button:focus-visible { outline: 2px solid var(--primary-600); outline-offset: 2px; }
.blogtopics span { color: var(--neutral-500); font-variant-numeric: tabular-nums; }

.posts__none {
  padding: 3rem 1.5rem;
  border: 1px dashed var(--neutral-200); border-radius: var(--r-lg);
  text-align: center; color: var(--neutral-500);
}

/* ========================================================= the pager ===== */
.pager {
  display: flex; flex-wrap: wrap; align-items: center;
  gap: .5rem; margin-top: 2.5rem;
}
.pager__btn {
  min-width: 44px; height: 44px; padding-inline: .875rem;
  display: inline-grid; place-items: center;
  border: 1px solid var(--neutral-200); border-radius: var(--r-sm);
  background: #fff;
  font-size: .9375rem; font-weight: 600; color: var(--neutral-700);
  font-variant-numeric: tabular-nums;
  cursor: pointer;
}
.pager__btn:hover:not([disabled]):not([aria-current="page"]) {
  border-color: var(--primary-200); color: var(--primary-700);
}
.pager__btn[aria-current="page"] {
  background: var(--primary-700); border-color: var(--primary-700); color: #fff;
}
.pager__btn[disabled] {
  background: var(--neutral-50); color: var(--neutral-400); cursor: not-allowed;
}
.pager__btn:focus-visible { outline: 2px solid var(--primary-600); outline-offset: 2px; }

/* ==================================================== the letter band ==== */
.letter {
  padding: clamp(2.5rem, 5vw, 4rem) 0;
  background:
    radial-gradient(40rem 20rem at 85% 0%, var(--primary-600) 0%, transparent 60%),
    var(--primary-800);
  color: #fff;
}
.letter__grid {
  display: grid; gap: 2rem; align-items: center;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}
.letter__title {
  margin: 0;
  font-size: clamp(1.5rem, 1.1rem + 1.2vw, 2rem);
  line-height: 1.15; letter-spacing: -.02em; font-weight: 700; color: #fff;
}
.letter__copy {
  margin: .875rem 0 0; max-width: 34rem;
  font-size: 1rem; line-height: 1.65; color: rgba(255, 255, 255, .78);
}
.letter__form { display: flex; flex-wrap: wrap; gap: .75rem; }
.letter__field {
  flex: 1 1 14rem; min-width: 0; height: 48px;
  padding-inline: 1rem;
  border: 1px solid rgba(255, 255, 255, .28); border-radius: var(--r-md);
  background: rgba(255, 255, 255, .08);
  font: inherit; font-size: .9375rem; color: #fff;
}
.letter__field::placeholder { color: rgba(255, 255, 255, .62); }
.letter__field:focus-visible {
  outline: none; border-color: #fff;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, .2);
}
.letter__small {
  margin: .875rem 0 0;
  font-size: .8125rem; line-height: 1.55; color: rgba(255, 255, 255, .72);
}
.letter__small a { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
/* What the form becomes once it is sent. */
.letter__ok {
  margin: 0; display: flex; align-items: center; gap: .625rem;
  font-size: 1rem; font-weight: 600; color: var(--primary-200);
}

/* ====================================================== responsive ======= */
@media (min-width: 1000px) {
  .blogsplit { grid-template-columns: minmax(0, 1fr) 20rem; align-items: start; }
  /* The rail follows the reader down the archive, and only there: it is a
     convenience, and it is the first thing to go when the measure needs
     the room. */
  .blogside { position: sticky; top: 6rem; }
}

@media (max-width: 899px) {
  /* The featured card stacks: a half-width visual beside a headline is a
     letterbox once the row is under about 900px. */
  .post--featured { grid-template-columns: minmax(0, 1fr); }
  .post--featured .post__visual {
    aspect-ratio: 21 / 9; min-height: 0; height: auto;
    border-right: 0; border-bottom: 1px solid var(--primary-100);
  }
  .letter__grid { grid-template-columns: minmax(0, 1fr); gap: 1.5rem; }
}

@media (max-width: 639px) {
  .bloghero { padding-top: 3rem; }
  .posts { gap: 1.25rem; }
  .post__text { padding: 1.125rem 1.25rem 1.25rem; }
  .post--featured .post__visual { aspect-ratio: 16 / 9; }
  /* The field and the button stack rather than squeezing to nothing. */
  .letter__form { flex-direction: column; }
  .letter__form .btn { width: 100%; }
  /* Nothing under 12px on a phone. */
  .post__cat,
  .post__flag,
  .blogtab__count,
  .blogpanel__head { font-size: .75rem; }
}

@media (prefers-reduced-motion: reduce) {
  .post,
  .post__tile,
  .blogtab { transition: none; }
  .post:hover { transform: none; }
  .post:hover .post__tile { transform: none; }
}

/* ==================================================== the closing band === */
/* The shared panel caps its title at 44rem, which put this page's line on
   four. The title alone gets the room and the break is placed where the
   sentence turns; below 1024 the line wraps on its own again. */
#cta .cta-panel__title { max-width: 66rem; }
@media (max-width: 1023px) {
  #cta .cta-panel__title br { display: none; }
}

/* ==================================================== section two's grid === */
/* The picks are a fixed three across: six of them in two even rows read as
   "start here", where auto-fill gave four and then a ragged two. The
   archive keeps filling by width, because it sits beside the rail. */
@media (min-width: 1100px) {
  #featured .posts { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (min-width: 640px) and (max-width: 1099px) {
  #featured .posts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 639px) {
  #featured .posts { grid-template-columns: minmax(0, 1fr); }
}

/* ==================================================== the tabs on a phone =
   Six topics wrapped onto five rows at 320px -- 232px of filter above the
   first card, which is most of a small screen spent on a control nobody has
   used yet. On phones the row scrolls sideways instead, bleeding to both
   edges so it is visibly scrollable, and each pill snaps.
   ========================================================================== */
@media (max-width: 639px) {
  .blogtabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    /* out to the container's edges, so the last pill is not clipped by the
       gutter and the row reads as continuing */
    margin-inline: calc(var(--container-pad) * -1);
    padding-inline: var(--container-pad);
    padding-bottom: .25rem;
  }
  .blogtabs::-webkit-scrollbar { display: none; }
  .blogtab { flex: 0 0 auto; scroll-snap-align: start; }
}
