/* Cuisigo blog: the list of articles (/blog/) and the articles themselves.
   The header, footer, fonts, colours, buttons and viewfinder brackets come from /styles.css. */

.blog-main,
.post {
  padding-block: clamp(16px, 4vw, 40px) clamp(80px, 10vw, 128px);
}

/* The list of articles --------------------------------------------------------- */

.blog-hero {
  max-width: 48rem;
}

.blog-hero .lede {
  max-width: 38rem;
}

.post-grid {
  display: grid;
  gap: 40px;
  margin-top: clamp(48px, 7vw, 88px);
}

@media (min-width: 720px) {
  .post-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 44px 40px;
  }
}

@media (min-width: 1080px) {
  .post-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.post-grid > li {
  display: flex;
}

.post-card {
  display: flex;
  flex-direction: column;
  width: 100%;
  padding: 1.5rem 1.5rem 1.4rem;
  background: var(--card);
  text-decoration: none;
}

/* Brackets close in around the card on hover, like the camera locking on. */
.post-card.frame::before {
  inset: -14px;
  --t: 2px;
  --a: 18px;
  opacity: 0;
  transition: opacity 0.2s ease, inset 0.45s var(--ease);
}

.post-card:hover::before,
.post-card:focus-visible::before {
  inset: -8px;
  opacity: 1;
}

.post-card:focus-visible {
  outline: none;
}

.post-tag {
  color: var(--ink-2);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.post-card-title {
  margin-top: 0.7rem;
  font-size: 1.3rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.2;
  text-wrap: balance;
}

.post-card-desc {
  margin-top: 0.6rem;
  color: var(--ink-2);
  font-size: 0.95rem;
  text-wrap: pretty;
}

.post-card-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: auto;
  padding-top: 1.4rem;
  font-size: 0.85rem;
  font-weight: 600;
}

.post-card-meta .arrow {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  transition: transform 0.35s var(--ease);
}

.post-card:hover .arrow {
  transform: translateX(3px);
}

/* An article ---------------------------------------------------------------------- */

.post-article,
.post-cta,
.post-more {
  max-width: 44rem;
  margin-inline: auto;
}

.crumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem;
  color: var(--ink-2);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.crumbs a {
  color: var(--ink);
  text-decoration: none;
}

.crumbs a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.post-title {
  margin-top: 1.1rem;
  font-size: clamp(2.1rem, 1.35rem + 3vw, 3.4rem);
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 1.04;
  text-wrap: balance;
}

.post .lede {
  max-width: none;
}

.post-meta {
  margin-top: 1.25rem;
  color: var(--ink-2);
  font-size: 0.85rem;
}

/* The short answer, framed like the logo. */
.quick {
  position: relative;
  margin-top: 2.5rem;
  padding: 1.5rem 1.6rem 1.6rem;
  background: var(--card);
}

.quick.frame::before {
  inset: -10px;
  --t: 2px;
  --a: 20px;
}

.prose .quick-label {
  margin-top: 0;
}

.quick-label {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--ink-2);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.quick-label::before {
  content: "";
  flex: none;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ink);
}

.quick > p:not(.quick-label) {
  margin-top: 0.8rem;
  font-size: 1.08rem;
  line-height: 1.55;
}

.quick ul {
  margin-top: 0.8rem;
}

/* Article text */

.prose {
  font-size: 1.05rem;
  line-height: 1.65;
}

.prose h2 {
  margin-top: 3rem;
  font-size: clamp(1.45rem, 1.25rem + 0.8vw, 1.85rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.15;
  text-wrap: balance;
}

.prose h3 {
  margin-top: 2rem;
  font-size: 1.2rem;
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.25;
}

.prose p,
.prose ul,
.prose ol {
  margin-top: 1rem;
  text-wrap: pretty;
}

.prose h2 + p,
.prose h3 + p {
  margin-top: 0.6rem;
}

.prose strong {
  font-weight: 600;
}

.prose a {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.prose a:hover {
  text-decoration-thickness: 2px;
}

/* Bullets are the brand dot. */
.prose ul > li,
.quick ul > li {
  position: relative;
  padding-left: 1.35rem;
}

.prose ul > li::before,
.quick ul > li::before {
  content: "";
  position: absolute;
  top: 0.68em;
  left: 0.2rem;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ink);
}

.prose li + li,
.quick li + li {
  margin-top: 0.5rem;
}

.prose ol {
  counter-reset: step;
}

.prose ol > li {
  position: relative;
  padding-left: 2.1rem;
  counter-increment: step;
}

.prose ol > li::before {
  content: counter(step);
  position: absolute;
  top: -0.1em;
  left: 0;
  font-family: var(--serif);
  font-size: 1.4rem;
  font-style: italic;
  line-height: 1.4;
}

/* "15 min" beside a recipe idea, "$" beside a budget meal. */
.badge {
  display: inline-block;
  margin-left: 0.45rem;
  padding: 0.18rem 0.5rem;
  border: 1px solid var(--line);
  color: var(--ink-2);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  line-height: 1.3;
  text-transform: uppercase;
  vertical-align: 0.25em;
  white-space: nowrap;
}

.table-wrap {
  margin-top: 1.25rem;
  overflow-x: auto;
}

.prose table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
  line-height: 1.45;
}

.prose th {
  padding: 0 1rem 0.6rem 0;
  border-bottom: 1.5px solid var(--ink);
  color: var(--ink-2);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-align: left;
  text-transform: uppercase;
  vertical-align: bottom;
}

.prose td {
  padding: 0.7rem 1rem 0.7rem 0;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

.prose td:first-child {
  font-weight: 600;
}

/* Phones: tables wrap to the screen instead of scrolling sideways. */
@media (max-width: 559px) {
  .prose table {
    font-size: 0.88rem;
  }

  .prose th,
  .prose td {
    padding-right: 0.7rem;
  }

  .prose th {
    letter-spacing: 0.08em;
  }
}

.prose .note {
  margin-top: 1.5rem;
  padding: 1rem 1.2rem;
  border-left: 3px solid var(--ink);
  background: var(--card);
  font-size: 0.98rem;
}

.sources {
  margin-top: 3rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
  color: var(--ink-2);
  font-size: 0.85rem;
  line-height: 1.55;
}

.sources h2 {
  margin-top: 0;
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.sources p,
.sources ul {
  margin-top: 0.6rem;
}

.sources ul > li::before {
  top: 0.6em;
  width: 4px;
  height: 4px;
  background: var(--ink-2);
}

/* After the article: the app, then more answers. */

.post-cta {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: clamp(72px, 10vw, 112px);
  padding: clamp(44px, 7vw, 72px) clamp(24px, 5vw, 56px);
  text-align: center;
}

.post-cta.frame::before {
  inset: 0;
  --t: 3px;
  --a: clamp(26px, 4vw, 44px);
}

.post-cta .display-2 {
  margin-top: 0;
  font-size: clamp(2rem, 1.3rem + 2.6vw, 3rem);
}

.post-cta .lede {
  margin-inline: auto;
}

.post-cta .btn {
  margin-top: 2rem;
}

.post-more {
  margin-top: clamp(64px, 9vw, 96px);
}

.post-more h2 {
  color: var(--ink-2);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.post-more ul {
  margin-top: 1rem;
  border-top: 1.5px solid var(--ink);
}

.post-more a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.1rem 0;
  border-bottom: 1px solid var(--line);
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: -0.015em;
  text-decoration: none;
}

.post-more a:hover {
  color: var(--ink-2);
}

.post-more .arrow {
  flex: none;
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  transition: transform 0.35s var(--ease);
}

.post-more a:hover .arrow {
  transform: translateX(3px);
}

@media (prefers-reduced-motion: no-preference) {
  .blog-hero,
  .post-article {
    animation: rise 0.8s var(--ease) both;
  }

  .post-grid > li {
    animation: rise 0.8s var(--ease) both;
  }

  .post-grid > li:nth-child(2) { animation-delay: 0.05s; }
  .post-grid > li:nth-child(3) { animation-delay: 0.1s; }
  .post-grid > li:nth-child(4) { animation-delay: 0.15s; }
  .post-grid > li:nth-child(5) { animation-delay: 0.2s; }
  .post-grid > li:nth-child(n + 6) { animation-delay: 0.25s; }
}

@media print {
  .site-header,
  .site-footer,
  .post-cta,
  .post-more {
    display: none;
  }
}

/* Terms of use: sections opened by a link (/terms/#cookies) keep some space above. */
.terms > section {
  scroll-margin-top: 1.5rem;
}
