/* ============================================================
   CUTIE NAILS — Blog
   blog/index.html and blog/nail-trends-*.html, generated by
   marketing/trends/build_blog_post.py.
   Requires tokens.css + base.css + pages.css.
   ============================================================ */

.post-container { max-width: 880px; }
a.badge { align-self: flex-start; text-decoration: none; }
.page-hero__inner .badge { align-self: flex-start; }

.post-byline { font-size: var(--text-sm); color: var(--text-secondary); }

.post-disclosure {
  font-size: var(--text-sm);
  color: var(--text-body);
  background: var(--surface-sunk);
  border-left: 3px solid var(--rose-gold);
  border-radius: var(--radius-sm);
  padding: var(--space-4) var(--space-5);
  margin-bottom: var(--space-8);
  max-width: 68ch;
}
.post-lede {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  line-height: var(--leading-snug);
  color: var(--text-primary);
  margin-bottom: var(--space-10);
  max-width: 60ch;
}

.post-trends {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--space-4);
}
.post-trends li {
  background: var(--surface-card);
  border-top: 2px solid var(--petal-pink);
  border-radius: var(--radius-sm);
  padding: var(--space-4) var(--space-5);
  font-size: var(--text-base);
  color: var(--text-body);
  line-height: var(--leading-normal);
}

/* ---------- One shade or look ---------- */
.post-item {
  display: grid;
  grid-template-columns: minmax(0, 300px) minmax(0, 1fr);
  gap: var(--space-8);
  align-items: start;
  padding: var(--space-10) 0;
  border-top: 1px solid var(--border-subtle);
}
.post-item:first-of-type { border-top: 0; padding-top: 0; }
/* A shade: bottle and try-on side by side, so the media column is wider. */
.post-item__pair { grid-template-columns: minmax(0, 440px) minmax(0, 1fr); }
.post-item__visual { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: var(--space-3); align-items: start; }
.post-item__shade { margin: 0; display: flex; flex-direction: column; gap: var(--space-2); }
.post-item__shade a { display: block; }
.post-item__shade .bottle {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 5;
  object-fit: contain;  /* bottle shots come in every ratio; never crop the bottle */
  background: var(--surface-card);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}
.post-item__shade figcaption { font-size: var(--text-xs); color: var(--text-secondary); }
.post-item__shade figcaption a { color: inherit; }
.post-item__media { position: relative; margin: 0; }
.post-item__media img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: 60% 45%;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}
.swatch {
  position: absolute;
  left: var(--space-3);
  bottom: var(--space-3);
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: 5px var(--space-3) 5px 5px;
  border-radius: var(--radius-pill);
  background: var(--surface-card);
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: capitalize;
  color: var(--text-primary);
}
.swatch i {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--swatch);
  box-shadow: inset 0 0 0 1px rgb(var(--plum-rgb) / 0.15);
}
.post-item__body { display: flex; flex-direction: column; gap: var(--space-3); min-width: 0; }
.post-item__body h3 {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 400;
  line-height: var(--leading-snug);
  letter-spacing: var(--tracking-display);
}
.post-item__body p { font-size: var(--text-base); color: var(--text-body); line-height: var(--leading-normal); }
.post-item__kicker {
  font-size: var(--text-xs) !important;
  font-weight: 600;
  letter-spacing: var(--tracking-caps);
  text-transform: uppercase;
  color: var(--rose-gold) !important;
}
.post-item__actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-4); margin-top: var(--space-2); }
.post-item__actions .btn { padding: 12px var(--space-6); min-height: 44px; }
.post-item__actions a:not(.btn), .post-item__credit a, .post-sources a { color: var(--rose-gold); }
.post-item__note, .post-item__credit { font-size: var(--text-sm) !important; color: var(--text-secondary) !important; }

.post-sources {
  columns: 2 280px;
  padding-left: var(--space-5);
  font-size: var(--text-sm);
  color: var(--text-body);
}
.post-sources li { break-inside: avoid; margin-bottom: var(--space-2); overflow-wrap: anywhere; }

/* ---------- Quick answers (FAQPage) ---------- */
.post-faq { max-width: 68ch; }
.post-faq__item { padding: var(--space-6) 0; border-top: 1px solid var(--border-subtle); }
.post-faq__item:first-child { border-top: 0; padding-top: 0; }
.post-faq__item h3 {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 400;
  line-height: var(--leading-snug);
  color: var(--text-primary);
  margin-bottom: var(--space-2);
}
.post-faq__item p { color: var(--text-body); line-height: var(--leading-normal); }

/* ---------- Blog index ---------- */
.blog-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: var(--space-8); }
.blog-card {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  color: inherit;
  text-decoration: none;
}
.blog-card img {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: 60% 45%;
  border-radius: var(--radius-md);
  margin-bottom: var(--space-2);
}
.blog-card__date { font-size: var(--text-xs); color: var(--text-secondary); text-transform: uppercase; letter-spacing: var(--tracking-caps); }
.blog-card__title { font-family: var(--font-display); font-size: var(--text-xl); line-height: var(--leading-snug); color: var(--text-primary); }
.blog-card__dek { font-size: var(--text-sm); color: var(--text-body); line-height: var(--leading-normal); }
.blog-card:hover .blog-card__title { color: var(--rose-gold); }
.blog-card:focus-visible { outline: none; box-shadow: var(--focus-ring); border-radius: var(--radius-md); }

@media (max-width: 768px) {
  .post-item { grid-template-columns: 1fr; gap: var(--space-5); }
  .post-item__visual { max-width: 520px; }
}

/* ---------- Enlarge a try-on photo (js/blog.js) ---------- */
.zoom { display: block; cursor: zoom-in; border-radius: var(--radius-md); }
.zoom:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.post-item__kicker a { color: inherit; text-decoration: none; }
.post-item__kicker a:hover, .post-item__kicker a:focus-visible { text-decoration: underline; }

.lightbox {
  margin: auto;  /* base.css zeroes every margin, which pins a <dialog> to the top-left */
  padding: 0;
  border: 0;
  background: transparent;
  max-width: min(92vw, 720px);
  max-height: 92vh;
  overflow: visible;
}
.lightbox::backdrop { background: rgb(var(--plum-rgb) / 0.82); }
.lightbox img {
  display: block;
  max-width: 100%;
  max-height: 92vh;
  width: auto;
  height: auto;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
}
.lightbox__close {
  position: absolute;
  top: var(--space-3);
  right: var(--space-3);
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: var(--surface-card);
  color: var(--text-primary);
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
}
.lightbox__close:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.lightbox[open] { animation: lightbox-in var(--dur-fast) var(--ease-out); }
@keyframes lightbox-in { from { opacity: 0; transform: scale(0.97); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .lightbox[open] { animation: none; } }

/* ---------- Skin-tone picker (posts built with --hands) ----------
   Hidden without JS: the thumbnails under each photo still link to
   every tone's large photo. Sticky under the fixed nav for the whole
   post, because it lives directly in <main>, not inside a section. */
.tone-picker { display: none; }
.js .tone-picker {
  display: block;
  position: sticky;
  top: var(--nav-height);
  z-index: var(--z-raised);
  background: var(--surface-page);
  border-block: 1px solid var(--border-subtle);
}
.tone-picker__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
  padding-block: var(--space-3);
}
.tone-picker__label { margin-right: var(--space-2); font-size: var(--text-sm); font-weight: 600; color: var(--text-primary); }
.tone-picker button {
  min-height: 36px;
  padding: 6px var(--space-4);
  border: 1.5px solid rgb(var(--plum-rgb) / 0.2);
  border-radius: var(--radius-pill);
  background: var(--surface-card);
  color: var(--text-primary);
  font: inherit;
  font-size: var(--text-sm);
  cursor: pointer;
}
.tone-picker button[aria-pressed="true"] { background: var(--petal-pink); border-color: var(--petal-pink); font-weight: 600; }
.tone-picker button:focus-visible { outline: none; box-shadow: var(--focus-ring); }

.post-item__photo { position: relative; }
.tone-row {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  gap: 6px;
  margin-top: var(--space-2);
}
.tone-row__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  border-radius: var(--radius-sm);
  font-size: 0.68rem;
  color: var(--text-secondary);
  text-decoration: none;
}
.tone-row__item img {
  border: 2px solid transparent;
  border-radius: var(--radius-sm);
  box-shadow: none;
}
.tone-row__item[aria-current="true"] { color: var(--text-primary); font-weight: 600; }
.tone-row__item[aria-current="true"] img { border-color: var(--rose-gold); }
.tone-row__item:focus-visible { outline: none; box-shadow: var(--focus-ring); }
