/* Newe blog. Loaded after style.css and built from the same motif: blue (new), gold (we), green (newe).
   Used by the pages the blog generator writes (Newe/blog). The home page does not load this file. */

/* ---------- shared by every inner page ---------- */

.inner main { display: block; }
.nav-links a[aria-current]::after { transform: none; }

.contact--inner { padding-top: clamp(3rem, 7vw, 6rem); }
.contact--inner .foot { margin-top: 0; }

/* ---------- blog index ---------- */

.blog-head {
  padding-top: calc(clamp(8rem, 13vw, 11.5rem) + env(safe-area-inset-top, 0px));
  padding-bottom: clamp(2.5rem, 6vw, 5rem);
}
.blog-head .wrap { display: grid; gap: clamp(1.25rem, 2.5vw, 2rem); }
.blog-head h1 { font-size: clamp(2.7rem, 1.2rem + 6vw, 6.25rem); max-width: 11em; }

.blog-list { padding-bottom: var(--sec); }
.post-card {
  position: relative; isolation: isolate;
  display: grid; grid-template-columns: minmax(0, 15rem) minmax(0, 1fr); gap: .75rem clamp(1.5rem, 5vw, 5rem); align-items: baseline;
  padding-block: clamp(1.6rem, 3.2vw, 2.6rem);
  border-top: 1px solid var(--line);
}
.post-card:last-child { border-bottom: 1px solid var(--line); }
.post-card::before, .post-card::after {
  content: ""; position: absolute; left: 0; right: 0; top: -2px; height: 4px;
  transform: scaleX(0); transition: transform .6s var(--ease);
}
.post-card::before { background: var(--new); transform-origin: left; }
.post-card::after { background: var(--we); mix-blend-mode: multiply; transform-origin: right; }

.post-card-meta { display: grid; gap: .2rem; justify-items: start; font-size: .9375rem; color: var(--ink-2); }
.post-card-meta time { font-weight: 650; color: var(--ink); font-variant-numeric: tabular-nums; }
.post-card-topic, .post-card-state {
  margin-top: .55rem; padding: .3rem .75rem; border: 1px solid var(--line); border-radius: 999px;
  font-size: .8125rem; font-weight: 600; color: var(--ink); background: var(--sheet);
}
.post-card-state { border: 1.5px dashed var(--ink); background: var(--we); }

.post-card-body { display: grid; gap: .8rem; justify-items: start; }
.post-card h2 {
  font-size: clamp(1.75rem, 1rem + 2.7vw, 3.25rem); font-stretch: 86%; line-height: 1.02;
  transition: transform .5s var(--ease), color .3s ease;
}
.post-card h2 a { text-decoration: none; }
.post-card h2 a::after { content: ""; position: absolute; inset: 0; z-index: 1; } /* the whole row is the link */
.post-card h2 a:focus-visible { outline: none; }
.post-card:has(a:focus-visible) { outline: 3px solid var(--new); outline-offset: 6px; border-radius: 4px; }
.post-card-body > p { color: var(--ink-2); max-width: 38em; text-wrap: pretty; transition: color .3s ease; }
.post-card-go {
  display: inline-flex; align-items: center; gap: .5em; margin-top: .2rem; padding-block: .3em;
  font-weight: 600; font-size: 1rem;
  background: linear-gradient(90deg, var(--new) 0 38%, var(--newe) 38% 62%, var(--we) 62% 100%) left bottom / 100% 2px no-repeat;
  transition: background-size .4s var(--ease);
}
.post-card-go span { transition: transform .4s var(--ease); }
@media (hover: hover) {
  .post-card:hover::before, .post-card:hover::after { transform: scaleX(.62); }
  .post-card:hover h2 { transform: translateX(.9rem); color: var(--newe); }
  .post-card:hover .post-card-body > p { color: var(--ink); }
  .post-card:hover .post-card-go { background-size: 100% 5px; }
  .post-card:hover .post-card-go span { transform: translateX(4px); }
}

/* ---------- a post ---------- */

.post-head {
  padding-top: calc(clamp(8rem, 13vw, 11.5rem) + env(safe-area-inset-top, 0px));
  padding-bottom: clamp(2.5rem, 5vw, 4.5rem);
}
.post-head .wrap { display: grid; gap: clamp(1.25rem, 2.5vw, 2rem); }
.post-head h1 { font-size: clamp(2.5rem, 1.1rem + 5.4vw, 5.75rem); max-width: 14em; }
.post-head .lead { font-size: clamp(1.2rem, 1rem + .8vw, 1.6rem); max-width: 32em; }
.post-head .eyebrow a { text-decoration: none; padding-block: .5rem; }
.post-head .eyebrow a:hover, .post-head .eyebrow a:focus-visible { color: var(--ink); text-decoration: underline; text-underline-offset: .3em; }
.post-topic::before { content: "/"; margin-right: .75rem; color: var(--line); }

.post-cover { padding-bottom: clamp(2.5rem, 5vw, 4.5rem); }
.post-cover img { width: 100%; height: auto; border-radius: 1.25rem; border: 1px solid var(--line); }

.post-grid {
  display: grid; grid-template-columns: minmax(0, 15rem) minmax(0, 44rem);
  gap: clamp(2rem, 6vw, 6rem); align-items: start;
  padding-bottom: var(--sec);
}
.post-meta { position: sticky; top: 7rem; font-size: .9375rem; }
.post-meta dl > div { display: grid; gap: .1rem; padding-block: .9rem; border-top: 1px solid var(--line); }
.post-meta dl > div:last-child { border-bottom: 1px solid var(--line); }
.post-meta dt { font-size: .75rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-2); }
.post-meta dd { font-weight: 600; }
.post-meta dd span { display: block; font-weight: 400; color: var(--ink-2); }

/* ---------- the words of a post ---------- */

.prose { font-size: clamp(1.0625rem, 1rem + .28vw, 1.25rem); line-height: 1.65; overflow-wrap: break-word; }
.prose > * + * { margin-top: 1.2em; }
.prose > :first-child { margin-top: 0; }
.prose p, .prose li { text-wrap: pretty; }

.prose h2, .prose h3, .prose h4 { text-wrap: balance; scroll-margin-top: 6.5rem; }
.prose h2 { font-size: clamp(1.8rem, 1.2rem + 2.2vw, 2.9rem); font-stretch: 88%; line-height: 1.04; margin-top: 2.1em; }
.prose h3 { font-size: clamp(1.35rem, 1.1rem + .9vw, 1.75rem); font-weight: 600; font-stretch: 90%; letter-spacing: -.028em; line-height: 1.15; margin-top: 1.9em; }
.prose h4 { font-size: 1.05em; font-weight: 650; letter-spacing: -.01em; line-height: 1.3; margin-top: 1.7em; }
.prose h2 + *, .prose h3 + *, .prose h4 + * { margin-top: .75em; }

.prose strong { font-weight: 650; }
/* the serif italic runs small next to the sans, so it is sized up to sit level with it */
.prose p em, .prose li em, .prose td em { font-size: 1.14em; line-height: 1; }
.prose a {
  text-decoration: underline; text-decoration-color: var(--new); text-decoration-thickness: 2px; text-underline-offset: .22em;
  transition: text-decoration-color .25s ease, color .25s ease;
}
.prose a:hover, .prose a:focus-visible { color: var(--newe); text-decoration-color: var(--we); }

.prose ul, .prose ol { display: grid; gap: .55em; }
.prose li { position: relative; padding-left: 1.9em; }
.prose li > ul, .prose li > ol { margin-top: .55em; }
.prose li > p + p, .prose li > p + ul, .prose li > p + ol { margin-top: .55em; }
.prose ul > li::before {
  content: ""; position: absolute; left: .2em; top: .68em; width: 1.05em; height: .26em;
  background: linear-gradient(90deg, var(--new) 0 38%, var(--newe) 38% 62%, var(--we) 62% 100%);
}
/* list-item is the browser's own counter, so a list that starts at 4 still says 4 */
.prose ol > li::before {
  content: counter(list-item); position: absolute; left: 0; top: -.08em; width: 1.25em; text-align: center;
  font-family: var(--voice); font-style: italic; font-size: 1.45em; line-height: 1.3; color: var(--newe);
}

.prose blockquote {
  position: relative; padding-left: clamp(1.25rem, 3vw, 2rem);
  font-family: var(--voice); font-style: italic; font-size: 1.3em; line-height: 1.35; letter-spacing: -.012em;
}
.prose blockquote::before {
  content: ""; position: absolute; left: 0; top: .2em; bottom: .2em; width: 4px;
  background: linear-gradient(180deg, var(--new) 0 38%, var(--newe) 38% 62%, var(--we) 62% 100%);
}
.prose blockquote > * + * { margin-top: .7em; }
.prose blockquote em { font-size: 1em; font-style: normal; font-family: var(--sans); font-weight: 600; letter-spacing: -.02em; }
.prose blockquote, .prose figure, .prose .tabela, .prose pre { margin-block: 1.9em; }

.prose hr {
  border: 0; width: 3.5rem; height: .3rem; margin: 2.6em 0;
  background: linear-gradient(90deg, var(--new) 0 38%, var(--newe) 38% 62%, var(--we) 62% 100%);
}

.prose img { height: auto; border-radius: 1rem; border: 1px solid var(--line); }
.prose figcaption { margin-top: .7rem; font-size: .875rem; line-height: 1.45; color: var(--ink-2); }

.prose .tabela { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--line); border-radius: 1rem; background: var(--sheet); }
.prose table { width: 100%; min-width: 28rem; border-collapse: collapse; font-size: .9em; line-height: 1.4; }
.prose th, .prose td { padding: .85rem 1.1rem; text-align: left; vertical-align: top; }
.prose th { font-size: .75rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-2); border-bottom: 1.5px solid var(--ink); }
.prose td { border-top: 1px solid var(--line); }
.prose tbody tr:first-child td { border-top: 0; }
.prose td:first-child { font-weight: 600; }

.prose code {
  font-family: ui-monospace, "Cascadia Code", Consolas, "SF Mono", Menlo, monospace; font-size: .86em;
  padding: .15em .4em; border-radius: .35em; background: var(--paper-2);
}
.prose pre { padding: 1.2em 1.4em; border-radius: 1rem; background: var(--ink); color: var(--on-dark); overflow-x: auto; line-height: 1.5; }
.prose pre code { padding: 0; background: none; font-size: .82em; }

/* ---------- after a post ---------- */

.blog-cta { padding-bottom: var(--sec); }
.blog-cta-box {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2rem clamp(2rem, 5vw, 5rem); align-items: end;
  padding: clamp(1.75rem, 5vw, 4rem);
  border-radius: 1.5rem; background: var(--newe); color: var(--on-dark);
}
.blog-cta-text { display: grid; gap: 1.1rem; }
.blog-cta-box .eyebrow { color: var(--on-dark-2); }
.blog-cta-box .eyebrow::before { background: linear-gradient(90deg, var(--new) 0 38%, var(--newe-lit) 38% 62%, var(--we) 62% 100%); }
.blog-cta-box h2 { font-size: clamp(2rem, 1.1rem + 3.4vw, 4rem); max-width: 13em; }
.blog-cta-box h2 em { color: var(--we); }
.blog-cta-box p:not(.eyebrow) { color: var(--on-dark-2); max-width: 36em; text-wrap: pretty; }
.blog-cta-box .btn { justify-self: start; }

.post-nav { padding-bottom: var(--sec); }
.post-nav-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(1.5rem, 4vw, 4rem); }
.post-nav-link { display: grid; gap: .45rem; align-content: start; padding-top: 1.25rem; border-top: 1px solid var(--line); text-decoration: none; }
.post-nav-link span { font-size: .9375rem; color: var(--ink-2); }
.post-nav-link strong {
  font-size: clamp(1.4rem, 1rem + 1.4vw, 2.1rem); font-weight: 600; font-stretch: 88%; letter-spacing: -.03em; line-height: 1.08; text-wrap: balance;
  transition: color .3s ease;
}
.post-nav-link:hover strong, .post-nav-link:focus-visible strong { color: var(--newe); }
.post-nav-link[rel="next"] { grid-column: 2; }

/* ---------- preview only: marks a post that is not live ---------- */

.faixa-previa {
  position: fixed; left: 50%; bottom: calc(1rem + env(safe-area-inset-bottom, 0px)); z-index: 80; transform: translateX(-50%);
  width: max-content; max-width: calc(100% - 2rem);
  padding: .7rem 1.2rem; border-radius: 999px; border: 1.5px dashed var(--ink);
  background: var(--we); color: var(--ink); font-size: .875rem; font-weight: 600; text-align: center;
}

/* ---------- responsive ---------- */

@media (max-width: 56rem) {
  .post-card { grid-template-columns: minmax(0, 1fr); }
  .post-card-meta { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem .9rem; }
  .post-card-topic, .post-card-state { margin-top: 0; }
  .post-grid { grid-template-columns: minmax(0, 1fr); }
  .post-meta { position: static; }
  .post-meta dl { display: flex; flex-wrap: wrap; gap: 0 2rem; border-block: 1px solid var(--line); }
  .post-meta dl > div, .post-meta dl > div:last-child { border: 0; }
  .blog-cta-box { grid-template-columns: minmax(0, 1fr); align-items: start; }
}

@media (max-width: 36rem) {
  .post-nav-grid { grid-template-columns: minmax(0, 1fr); }
  .post-nav-link[rel="next"] { grid-column: auto; }
  .prose li { padding-left: 1.7em; }
}

@media print {
  .blog-cta, .post-nav, .faixa-previa, .contact--inner { display: none !important; }
  .post-head { padding-top: 0; }
  .post-grid { grid-template-columns: minmax(0, 1fr); }
}
