/* Blog-only layout. Consumes tokens from site/assets/tokens.css. */

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--et-bg);
  color: var(--et-ink);
  font-family: var(--et-sans);
}

a {
  color: inherit;
  text-decoration: none;
}

.wrap {
  max-width: var(--et-max);
  margin: 0 auto;
  padding: 0 32px;
}

/* Nav */
.blog-nav {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(11, 11, 12, .85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--et-line);
}

.blog-nav .wrap {
  max-width: none;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.blog-nav .brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 16px;
}

.blog-nav .brand img {
  height: 42px;
  width: auto;
}

.blog-nav .sitelinks {
  display: flex;
  align-items: center;
  gap: 24px;
  font-size: 14px;
  font-weight: 500;
  color: var(--et-ink-72);
  white-space: nowrap;
}

.blog-nav .sitelinks a {
  transition: color .2s;
}

.blog-nav .sitelinks a:hover {
  color: #fff;
}

.blog-nav nav {
  display: flex;
  align-items: center;
  gap: 24px;
  font-size: 14px;
}

.blog-hamburger {
  display: none;
  width: 40px;
  height: 40px;
  flex: none;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 8px;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
}

.blog-hamburger span {
  display: block;
  width: 18px;
  height: 2px;
  background: #fff;
}

#m-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .6);
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease;
  z-index: 299;
}

#m-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(300px, 82vw);
  background: #0E0F10;
  border-left: 1px solid rgba(255, 255, 255, .1);
  z-index: 300;
  transform: translateX(100%);
  transition: transform .28s ease;
  display: flex;
  flex-direction: column;
  padding: 20px;
  overflow-y: auto;
}

#m-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}

#m-drawer.is-open {
  transform: translateX(0);
}

#m-drawer a:hover {
  color: #fff;
}

#m-drawer .drawer-links {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 16px;
  font-weight: 500;
  color: var(--et-ink-72);
}

#m-drawer .drawer-links a {
  padding: 12px 4px;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
}

@media (max-width: 980px) {
  .blog-nav .sitelinks {
    display: none !important;
  }

  .blog-nav nav {
    display: none !important;
  }

  .blog-hamburger {
    display: flex !important;
  }
}

.blog-nav .lang-toggle {
  display: flex;
  gap: 6px;
  font-family: var(--et-mono);
  font-size: 12px;
}

.blog-nav .lang-toggle a {
  padding: 4px 8px;
  border-radius: 8px;
  border: 1px solid var(--et-line);
  color: var(--et-ink-62);
}

.blog-nav .lang-toggle a.active {
  color: var(--et-ink);
  border-color: var(--et-mint);
}

/* Mobile drawer: EN / ES as a proper segmented button pair (not plain text). */
#m-drawer .lang-toggle {
  display: flex;
  gap: 8px;
  margin-top: 6px;
  font-family: var(--et-mono);
  font-size: 13px;
  letter-spacing: .04em;
}

#m-drawer .lang-toggle a {
  flex: 1;
  text-align: center;
  padding: 12px 0;
  border-radius: 10px;
  border: 1px solid var(--et-line-2);
  color: var(--et-ink-62);
}

#m-drawer .lang-toggle a.active {
  color: var(--et-deep);
  background: var(--et-grad);
  border-color: transparent;
  font-weight: 700;
}

#m-drawer .lang-toggle a.active:hover {
  color: var(--et-deep);
}

.blog-nav .cta {
  padding: 9px 16px;
  border-radius: 12px;
  background: var(--et-grad);
  color: var(--et-deep);
  font-weight: 600;
  font-size: 13px;
}

.et-social-link:hover {
  color: var(--et-deep) !important;
  background: var(--et-grad);
  border-color: transparent !important;
}

/* Hero */
.blog-hero {
  padding: 64px 0 32px;
  border-bottom: 1px solid var(--et-line);
}

.blog-hero .eyebrow {
  font-family: var(--et-mono);
  font-size: 12px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--et-mint);
  margin-bottom: 14px;
}

.blog-hero h1 {
  font-size: clamp(32px, 4.5vw, 52px);
  line-height: 1.1;
  margin: 0 0 16px;
}

.blog-hero h1 .grad {
  background: var(--et-grad-text);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.blog-hero p {
  max-width: 620px;
  font-size: 18px;
  color: var(--et-ink-62);
  line-height: 1.6;
}

/* Category pills */
.cat-pills {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  padding: 24px 0;
  border-bottom: 1px solid var(--et-line);
}

.cat-pill {
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid var(--et-line-2);
  font-size: 13px;
  color: var(--et-ink-62);
  cursor: pointer;
  background: transparent;
  font-family: var(--et-sans);
}

.cat-pill.active {
  background: var(--et-surface-hi);
  border-color: var(--et-mint);
  color: var(--et-ink);
}

/* Featured */
.featured {
  margin: 40px 0;
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  gap: 32px;
  border: 1px solid var(--et-line-2);
  border-radius: var(--et-r-lg);
  background: var(--et-surface);
  overflow: hidden;
}

.featured .copy {
  padding: 40px;
}

.featured .badge {
  display: inline-block;
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--et-grad);
  color: var(--et-deep);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  margin-bottom: 16px;
}

.featured .cat {
  font-family: var(--et-mono);
  font-size: 12px;
  color: var(--et-mint);
  margin-bottom: 10px;
}

.featured h2 {
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.2;
  margin: 0 0 14px;
}

.featured p {
  color: var(--et-ink-62);
  font-size: 16px;
  line-height: 1.6;
  margin: 0 0 20px;
}

.featured .meta-row {
  font-family: var(--et-mono);
  font-size: 13px;
  color: var(--et-ink-45);
}

.featured .read-more {
  display: inline-block;
  margin-top: 20px;
  color: var(--et-mint);
  font-weight: 600;
  font-size: 14px;
}

.featured .panel {
  background: radial-gradient(circle at 30% 30%, rgba(62, 210, 168, .18), transparent 60%), var(--et-bg-2);
  min-height: 280px;
}

/* With an image, the panel stretches to the copy column's height and the image
   fills it (cover), so a 16:9 image never leaves a gap in a taller card. */
.featured .panel.has-img {
  align-self: stretch;
}

.featured .panel img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Listing header */
.list-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 32px 0 20px;
}

.list-header h3 {
  font-size: 20px;
  margin: 0;
}

.list-header .count {
  font-family: var(--et-mono);
  font-size: 13px;
  color: var(--et-ink-45);
}

/* Card grid */
.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  padding-bottom: 64px;
}

@media (max-width: 980px) {
  .card-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .featured {
    grid-template-columns: 1fr;
  }

  /* Stacked: give the panel a definite 16:9 box so the cover image has a
     height to fill (no sibling column to stretch against here). */
  .featured .panel {
    aspect-ratio: 16 / 9;
    min-height: 0;
  }

  .blog-nav .m-navsocials {
    display: none !important;
  }
}

@media (max-width: 640px) {
  .card-grid {
    grid-template-columns: 1fr;
  }
}

.post-card {
  display: flex;
  flex-direction: row;
  gap: 20px;
  align-items: stretch;
  padding: 24px;
  border: 1px solid var(--et-line);
  border-radius: var(--et-r-md);
  background: var(--et-surface);
  transition: border-color .15s ease;
}

.post-card:hover {
  border-color: var(--et-line-2);
}

/* Every card carries a left visual — the post's image, or a branded gradient
   placeholder — so the listing never reads as plain text and all cards share
   the same shape (no uneven whitespace between image and text-only cards). */
.post-card .post-cover {
  flex: none;
  width: 120px;
  align-self: stretch;
  margin: -24px 0 -24px -24px;
  border-radius: var(--et-r-md) 0 0 var(--et-r-md);
  overflow: hidden;
  background: #0d0f10;
}

.post-card .post-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.post-card .post-cover.is-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(140deg, #f5f7f8 0%, #e4eaee 100%);
}

.post-card .post-cover.is-placeholder img {
  width: 68%;
  height: auto;
  max-height: 62%;
  object-fit: contain;
  opacity: 0.92;
}

.post-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
}

.post-card:hover .read-more {
  opacity: 1;
}

.post-card .cat {
  font-family: var(--et-mono);
  font-size: 11px;
  color: var(--et-mint);
  padding-bottom: 12px;
  border-bottom: 1px solid var(--et-line);
  margin-bottom: 14px;
}

.post-card h4 {
  font-size: 19px;
  line-height: 1.35;
  margin: 0 0 10px;
}

.post-card p {
  color: var(--et-ink-62);
  font-size: 14px;
  line-height: 1.55;
  margin: 0;
  flex: 1;
}

.post-card .meta-row {
  margin-top: auto;
  padding-top: 16px;
  font-family: var(--et-mono);
  font-size: 12px;
  color: var(--et-ink-45);
}

.post-card .read-more {
  opacity: 0;
  transition: opacity .15s ease;
  color: var(--et-mint);
  font-size: 13px;
  font-weight: 600;
  margin-top: 8px;
}

.empty-state {
  padding: 64px 0;
  text-align: center;
  color: var(--et-ink-45);
}

/* Article */
.article-head {
  padding: 48px 0 32px;
  border-bottom: 1px solid var(--et-line);
}

.breadcrumb {
  font-family: var(--et-mono);
  font-size: 12px;
  color: var(--et-ink-45);
  margin-bottom: 20px;
}

.breadcrumb a {
  color: var(--et-mint);
}

.article-head h1 {
  font-size: clamp(32px, 4.2vw, 54px);
  line-height: 1.15;
  margin: 0 0 20px;
}

.article-head .lead {
  font-size: 19px;
  color: var(--et-ink-62);
  line-height: 1.6;
  max-width: 720px;
  margin: 0 0 20px;
}

.article-head .meta-row {
  font-family: var(--et-mono);
  font-size: 13px;
  color: var(--et-ink-45);
  padding-top: 20px;
  border-top: 1px solid var(--et-line);
}

.fallback-notice {
  margin: 32px 0;
  padding: 16px 20px;
  border: 1px solid var(--et-line-2);
  border-radius: var(--et-r-sm);
  background: var(--et-surface-hi);
  color: var(--et-ink-72);
  font-size: 14px;
}

.article-disclaimer {
  margin: 8px 0 32px;
  padding-top: 16px;
  border-top: 1px solid var(--et-line);
  color: var(--et-ink-45);
  font-size: 12.5px;
  line-height: 1.5;
}

.article-cover {
  display: block;
  margin: 0 0 32px;
  width: 100%;
  height: auto;
  border-radius: var(--et-r-lg);
  border: 1px solid var(--et-line-2);
}

.article-figure {
  margin: 32px 0;
}

.article-figure img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--et-r-lg);
  border: 1px solid var(--et-line-2);
}

.article-figure figcaption {
  margin-top: 10px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--et-ink-45);
  text-align: center;
}

.article-back {
  padding: 8px 0 40px;
}

.article-back a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 20px;
  border: 1px solid var(--et-line-2);
  border-radius: 999px;
  color: var(--et-ink-72);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: border-color .15s ease, color .15s ease;
}

.article-back a:hover {
  border-color: var(--et-mint);
  color: var(--et-ink);
}

.article-body {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 56px;
  padding: 48px 0 64px;
}

@media (max-width: 1000px) {
  .article-body {
    grid-template-columns: 1fr;
  }

  .toc {
    display: none;
  }
}

.takeaways {
  margin: 0 0 40px;
  padding: 24px;
  border: 1px solid var(--et-line-2);
  border-radius: var(--et-r-md);
  background: var(--et-surface-hi);
}

.takeaways h3 {
  margin: 0 0 14px;
  font-size: 15px;
}

.takeaways ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.takeaways li {
  padding: 6px 0 6px 26px;
  position: relative;
  font-size: 15px;
  color: var(--et-ink-72);
}

.takeaways li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--et-mint);
}

.article-section {
  scroll-margin-top: 110px;
  padding-bottom: 32px;
}

.article-section h2 {
  font-size: 24px;
  margin: 0 0 16px;
}

.article-section p {
  font-size: 17px;
  line-height: 1.68;
  color: var(--et-ink-72);
  margin: 0 0 16px;
}

/* Inline links inside the article body (from [text](url) markers). */
.article-section p a,
.article-section .list-box a {
  color: var(--et-mint);
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: opacity .15s ease;
}

.article-section p a:hover,
.article-section .list-box a:hover {
  opacity: .8;
}

.article-section .list-box {
  border: 1px solid var(--et-line-2);
  border-radius: var(--et-r-sm);
  padding: 20px 24px;
  margin: 16px 0;
}

.article-section .list-box ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.article-section .list-box li {
  padding: 6px 0 6px 20px;
  position: relative;
  color: var(--et-ink-72);
}

.article-section .list-box li::before {
  content: "—";
  position: absolute;
  left: 0;
  color: var(--et-ink-45);
}

.cta-band {
  margin: 40px 0;
  padding: 40px;
  border-radius: var(--et-r-lg);
  background: var(--et-grad);
  color: var(--et-deep);
  text-align: center;
}

.cta-band h3 {
  margin: 0 0 8px;
  font-size: 22px;
}

.cta-band a.btn {
  display: inline-block;
  margin-top: 16px;
  padding: 12px 24px;
  border-radius: 12px;
  background: var(--et-deep);
  color: var(--et-ink);
  font-weight: 600;
  font-size: 14px;
}

.faq-item {
  padding: 20px 0;
  border-bottom: 1px solid var(--et-line);
}

.faq-item h4 {
  margin: 0 0 8px;
  font-size: 16px;
}

.faq-item p {
  margin: 0;
  color: var(--et-ink-62);
  font-size: 15px;
  line-height: 1.6;
}

.toc {
  align-self: start;
  position: sticky;
  top: 96px;
  font-size: 13px;
}

.toc .toc-label {
  font-family: var(--et-mono);
  color: var(--et-ink-45);
  text-transform: uppercase;
  letter-spacing: .08em;
  font-size: 11px;
  margin-bottom: 14px;
}

.toc a {
  display: block;
  padding: 6px 0;
  color: var(--et-ink-62);
  border-left: 2px solid var(--et-line);
  padding-left: 14px;
}

.toc a:hover {
  color: var(--et-ink);
  border-left-color: var(--et-mint);
}

.related {
  padding: 48px 0 64px;
  border-top: 1px solid var(--et-line);
}

.related h3 {
  font-size: 20px;
  margin: 0 0 24px;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

@media (max-width: 900px) {
  .related-grid {
    grid-template-columns: 1fr;
  }
}

/* Related cards reuse the listing card shape (side image + body); clamp the
   text so the three cards keep even heights regardless of meta length. */
.related .post-card h4 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.related .post-card p {
  flex: none;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Footer */
.blog-footer {
  background: var(--et-bg-2);
  border-top: 1px solid var(--et-line);
  padding: 32px 0;
  font-size: 13px;
  color: var(--et-ink-45);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.blog-footer nav {
  display: flex;
  gap: 20px;
}
