/*
 * ideamaker.ai — the blog.
 *
 * Loaded after styles.css, which supplies the tokens, the header and the
 * footer. Everything here is the index: big key-art cards you want to open,
 * built the way the App Store builds a Today page — artwork first, title over
 * it, one line of why you would care.
 *
 * The artwork is CSS. Every card is layered gradients plus a motif drawn with
 * pseudo-elements, so a shelf of nine posts still downloads nothing and there
 * is no image to get wrong at a breakpoint. Each card sets --a/--b/--c and the
 * rest is shared.
 */

.blog-wrap { max-width: 1160px; margin: 0 auto; padding: 0 24px; }

/* A wash behind the top of the page so the hero does not start on flat paint. */
body.blog {
  background:
    radial-gradient(1200px 520px at 12% -8%, rgba(78, 201, 212, 0.26), transparent 62%),
    radial-gradient(900px 420px at 92% 2%, rgba(120, 128, 240, 0.16), transparent 60%),
    var(--page);
  background-attachment: fixed;
}

/* ---- masthead ---- */
.blog-head { padding: 64px 0 34px; }
.blog-head h1 {
  font-size: clamp(42px, 6.4vw, 72px);
  line-height: 1.02;
  margin: 6px 0 14px;
  letter-spacing: -0.025em;
}
.blog-head p.lede {
  font-size: clamp(18px, 2.1vw, 21px);
  line-height: 1.5;
  max-width: 620px;
  margin: 0;
  color: var(--body);
}

/* ---- topic chips ---- */
.topics { display: flex; flex-wrap: wrap; gap: 9px; margin: 26px 0 0; padding: 0; list-style: none; }
.topics a, .topics span {
  display: inline-block;
  padding: 7px 15px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.55);
  color: var(--body);
  font-size: 14.5px;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}
.topics a:hover { background: var(--ink); border-color: var(--ink); color: #fff; }
.topics .on { background: var(--ink); border-color: var(--ink); color: #fff; }

/* ---- the artwork engine ----
   Shared by every card. --a/--b/--c are set per post; --motif picks the shape
   layer. Nothing here loads a file. */
.art {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  background:
    radial-gradient(120% 120% at 8% 4%, var(--a) 0%, transparent 58%),
    radial-gradient(110% 110% at 96% 12%, var(--b) 0%, transparent 56%),
    radial-gradient(150% 130% at 50% 108%, var(--c) 0%, transparent 62%),
    linear-gradient(150deg, var(--a), var(--c));
}
/* grain — keeps a big flat gradient from banding on a cheap panel */
.art::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 3;
  opacity: 0.32;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='0.5'/%3E%3C/svg%3E");
}

/* motif 1 — concentric rings radiating out of the mark */
.art.rings::before {
  content: '';
  position: absolute;
  z-index: 1;
  left: 50%; top: 54%;
  width: 150%; aspect-ratio: 1;
  translate: -50% -50%;
  border-radius: 50%;
  background: repeating-radial-gradient(circle at 50% 50%,
    rgba(255,255,255,0.20) 0 1.5px, transparent 1.5px 34px);
  mask-image: radial-gradient(circle at 50% 50%, #000 32%, transparent 72%);
}
/* motif 2 — a stack of gallery panels, as if work were piling up */
.art.panels .stack,
.art.panels .stack::before,
.art.panels .stack::after {
  position: absolute;
  z-index: 1;
  border-radius: 12px;
  background: linear-gradient(160deg, rgba(255,255,255,0.34), rgba(255,255,255,0.07));
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.5), 0 20px 34px rgba(11,18,19,0.2);
}
.art.panels .stack { left: 12%; top: 22%; width: 34%; height: 74%; rotate: -8deg; }
.art.panels .stack::before { content: ''; left: 84%; top: -12%; width: 100%; height: 104%; rotate: 5deg; }
.art.panels .stack::after  { content: ''; left: 172%; top: 6%; width: 96%; height: 92%; rotate: -3deg; opacity: 0.72; }

/* motif 3 — blueprint grid and a part sitting on it */
.art.blueprint::before {
  content: '';
  position: absolute;
  z-index: 1;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.3) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.3) 1px, transparent 1px);
  background-size: 30px 30px;
  mask-image: linear-gradient(200deg, #000 30%, rgba(0,0,0,0.25) 96%);
}
.art .part {
  position: absolute;
  z-index: 2;
  right: 9%; bottom: -10%;
  width: 42%; aspect-ratio: 1;
  border-radius: 24%;
  background: linear-gradient(160deg, rgba(255,255,255,0.46), rgba(255,255,255,0.08));
  box-shadow: inset 0 2px 0 rgba(255,255,255,0.55), 0 24px 40px rgba(11,18,19,0.22);
  rotate: -12deg;
}
.art .part::before {
  content: '';
  position: absolute;
  inset: 26%;
  border-radius: 50%;
  background: rgba(11, 18, 19, 0.16);
  box-shadow: inset 0 3px 8px rgba(11,18,19,0.28);
}
/* the mark, floated into the art on the feature card */
.art .mark {
  position: absolute;
  z-index: 2;
  right: 9%; top: 50%;
  translate: 0 -50%;
  width: 26%;
  max-width: 190px;
  height: auto;
  filter: drop-shadow(0 18px 30px rgba(11, 18, 19, 0.3));
}

/* ---- the feature card ---- */
.feature {
  position: relative;
  display: block;
  margin: 34px 0 0;
  border-radius: 30px;
  overflow: hidden;
  text-decoration: none;
  color: #fff;
  box-shadow: 0 2px 4px rgba(11,18,19,0.06), 0 30px 70px rgba(11,18,19,0.22);
  transition: transform 0.4s cubic-bezier(0.2, 0.7, 0.2, 1), box-shadow 0.4s ease;
}
.feature .art { min-height: 460px; }
.feature:hover { transform: translateY(-4px); box-shadow: 0 2px 4px rgba(11,18,19,0.06), 0 40px 84px rgba(11,18,19,0.28); }
.feature .copy {
  position: absolute;
  z-index: 4;
  inset: auto 0 0 0;
  padding: 44px 44px 40px;
  background: linear-gradient(transparent, rgba(6, 26, 28, 0.58) 42%, rgba(6, 26, 28, 0.84));
}
.feature .eyebrow { color: rgba(255,255,255,0.86); margin-bottom: 8px; }
.feature h2 {
  color: #fff;
  font-size: clamp(30px, 4.4vw, 48px);
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin: 0 0 12px;
  max-width: 17ch;
}
.feature p {
  color: rgba(255,255,255,0.9);
  font-size: 18px;
  line-height: 1.5;
  max-width: 54ch;
  margin: 0 0 20px;
}
.cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  color: var(--ink);
  font-weight: 700;
  font-size: 15.5px;
  padding: 11px 20px;
  border-radius: 999px;
  transition: gap 0.2s ease;
}
.feature:hover .cta { gap: 13px; }
.cta svg { width: 14px; height: 14px; }

/* ---- the shelf ---- */
.shelf-head {
  display: flex;
  align-items: baseline;
  gap: 16px;
  margin: 64px 0 20px;
}
.shelf-head h2 { font-size: 30px; margin: 0; letter-spacing: -0.015em; }
.shelf-head .count { color: var(--muted); font-size: 15px; margin-left: auto; }

.shelf {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(330px, 1fr));
  gap: 26px;
}

.post {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  border-radius: 24px;
  overflow: hidden;
  background: rgba(255,255,255,0.7);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  transition: transform 0.4s cubic-bezier(0.2, 0.7, 0.2, 1), box-shadow 0.4s ease;
}
.post:hover { transform: translateY(-5px); box-shadow: 0 2px 4px rgba(11,18,19,0.05), 0 26px 52px rgba(11,18,19,0.16); }
.post .art { aspect-ratio: 16 / 10; }
.post .copy { padding: 22px 24px 26px; }
.post .eyebrow { margin-bottom: 7px; }
.post h3 { font-size: 23px; line-height: 1.2; margin: 0 0 9px; letter-spacing: -0.012em; }
.post p { font-size: 15.5px; line-height: 1.55; margin: 0; color: var(--body); }
.post .meta {
  margin: 16px 0 0;
  font-size: 13.5px;
  color: var(--muted);
  display: flex;
  gap: 8px;
  align-items: center;
}
.post .meta .dot { width: 3px; height: 3px; border-radius: 50%; background: var(--muted); }

/* A card badge for the artwork corner — "New", "Guide", a reading time. */
.badge {
  position: absolute;
  z-index: 4;
  left: 18px; top: 18px;
  background: rgba(255,255,255,0.92);
  color: var(--ink);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 6px 11px;
  border-radius: 999px;
  backdrop-filter: blur(6px);
}

/* ---- notify strip ---- */
.notify {
  margin: 70px 0 0;
  border-radius: 26px;
  padding: 40px 44px;
  background: linear-gradient(140deg, rgba(78,201,212,0.22), rgba(255,255,255,0.5));
  border: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px 30px;
}
.notify h2 { font-size: 26px; margin: 0 0 6px; }
.notify p { margin: 0; max-width: 52ch; }
.notify .go { margin-left: auto; }
.notify .go a {
  display: inline-block;
  background: var(--ink);
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  font-size: 15.5px;
  padding: 13px 24px;
  border-radius: 999px;
  white-space: nowrap;
}
.notify .go a:hover { background: var(--accent-deep); }

/* ---- language row ---- */
.langs { margin: 58px 0 10px; padding: 26px 0 0; border-top: 1px solid var(--line); }
.langs p.label { font-size: 13px; font-weight: 700; letter-spacing: 0.09em; text-transform: uppercase; color: var(--muted); margin: 0 0 12px; }
.langs ul { list-style: none; display: flex; flex-wrap: wrap; gap: 8px 10px; padding: 0; margin: 0; }
.langs li { font-size: 14.5px; }
.langs a { text-decoration: none; color: var(--body); }
.langs a:hover { color: var(--ink); text-decoration: underline; }
.langs .here { font-weight: 700; color: var(--ink); }
.langs .soon { color: var(--muted); opacity: 0.62; }

/* ---- motion ----
   A staggered rise on load, on the document timeline, so it ALWAYS reaches its
   end state. Deliberately not a scroll-driven `animation-timeline: view()`:
   that leaves a card at opacity 0 whenever the timeline never advances (a very
   tall viewport, printing, a full-page capture), and content that can be
   invisible is not content. */
@media (prefers-reduced-motion: no-preference) {
  .feature, .post, .notify {
    animation: rise 0.62s cubic-bezier(0.2, 0.7, 0.2, 1) both;
  }
  .feature { animation-delay: 0.04s; }
  .shelf .post:nth-child(1) { animation-delay: 0.12s; }
  .shelf .post:nth-child(2) { animation-delay: 0.18s; }
  .shelf .post:nth-child(3) { animation-delay: 0.24s; }
  .shelf .post:nth-child(n+4) { animation-delay: 0.3s; }
  .notify { animation-delay: 0.2s; }
  @keyframes rise {
    from { opacity: 0; transform: translateY(22px) scale(0.99); }
    to   { opacity: 1; transform: none; }
  }
}

/* The blog runs wider than the product site, so the header has to widen with it
   or the wordmark sits inboard of the headline underneath it. */
body.blog header .wrap { max-width: 1160px; }

@media (max-width: 760px) {
  .blog-head { padding: 44px 0 26px; }
  .feature .art { min-height: 520px; }
  /* the mark has to clear the copy scrim, which starts around the midpoint on a
     phone — left where it is on desktop it sits behind the headline */
  .feature .art .mark { top: 22%; right: 50%; translate: 50% -50%; width: 31%; }
  .feature .copy { padding: 28px 24px 26px; }
  .notify { padding: 30px 26px; }
  .notify .go { margin-left: 0; }
  .shelf-head { margin: 48px 0 18px; }
}

/* ===================================================================
   A post page.
   The index sells the click; this earns the read. Same artwork engine,
   then a single column of type at a comfortable measure.
   =================================================================== */

/* Reading progress. Decorative only — nothing is hidden behind it — so a
   scroll-driven timeline is safe here in a way it is not for content. */
.progress {
  position: fixed;
  z-index: 10;
  inset: 0 0 auto 0;
  height: 3px;
  background: var(--accent);
  transform-origin: 0 50%;
  scale: 0 1;
}
@supports (animation-timeline: scroll()) {
  @media (prefers-reduced-motion: no-preference) {
    .progress { animation: fill linear both; animation-timeline: scroll(root block); }
    @keyframes fill { to { scale: 1 1; } }
  }
}

.post-hero {
  position: relative;
  border-radius: 0 0 34px 34px;
  overflow: hidden;
  margin-bottom: 44px;
}
.post-hero .art { min-height: 540px; }
.post-hero .copy {
  position: absolute;
  z-index: 4;
  inset: auto 0 0 0;
  padding: 0 0 52px;
  background: linear-gradient(transparent, rgba(6, 26, 28, 0.55) 40%, rgba(6, 26, 28, 0.86));
}
.post-hero .copy .blog-wrap { color: #fff; }
.post-hero .eyebrow { color: rgba(255,255,255,0.86); }
.post-hero h1 {
  color: #fff;
  font-size: clamp(36px, 6vw, 68px);
  line-height: 1.02;
  letter-spacing: -0.025em;
  margin: 8px 0 18px;
  max-width: 16ch;
}
.post-hero .byline {
  color: rgba(255,255,255,0.82);
  font-size: 15.5px;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  align-items: center;
}
.post-hero .byline a { color: #fff; text-decoration: none; border-bottom: 1px solid rgba(255,255,255,0.45); }
.post-hero .byline .dot { width: 3px; height: 3px; border-radius: 50%; background: rgba(255,255,255,0.7); }

/* breadcrumb sits above the hero, on the page ground */
.crumbs { padding: 18px 0 0; font-size: 14.5px; color: var(--muted); }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--ink); text-decoration: underline; }

/* ---- the column of type ---- */
.post-body { max-width: 690px; margin: 0 auto; }
.post-body > p { font-size: 18.5px; line-height: 1.68; margin: 0 0 22px; max-width: none; }
.post-body > p.lede {
  font-size: 23px;
  line-height: 1.5;
  color: var(--ink);
  margin: 0 0 32px;
  letter-spacing: -0.008em;
}
.post-body h2 {
  font-size: clamp(27px, 3.2vw, 34px);
  line-height: 1.18;
  letter-spacing: -0.018em;
  margin: 52px 0 14px;
}
.post-body h3 { font-size: 21px; margin: 34px 0 10px; }
.post-body ul, .post-body ol { font-size: 18.5px; line-height: 1.66; padding-left: 24px; margin: 0 0 22px; }
.post-body li { margin: 0 0 9px; }
.post-body li::marker { color: var(--accent-deep); }
.post-body strong { color: var(--ink); }
.post-body a { text-underline-offset: 3px; }

.post-body blockquote.pull {
  margin: 44px 0;
  padding: 0 0 0 26px;
  border-left: 3px solid var(--accent);
  font-family: 'Afacad', -apple-system, sans-serif;
  font-weight: 700;
  font-size: clamp(24px, 3vw, 31px);
  line-height: 1.24;
  letter-spacing: -0.015em;
  color: var(--ink);
}
.post-body blockquote.pull p { margin: 0; font-size: inherit; line-height: inherit; }

.post-body figure { margin: 40px 0; }
.post-body figure .art { border-radius: 20px; aspect-ratio: 16 / 9; box-shadow: var(--shadow); }
.post-body figcaption { font-size: 14.5px; color: var(--muted); margin-top: 11px; line-height: 1.5; }

.post-body table { width: 100%; border-collapse: collapse; margin: 34px 0; font-size: 16.5px; }
.post-body th, .post-body td { text-align: left; padding: 13px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.post-body thead th { font-size: 13px; letter-spacing: 0.07em; text-transform: uppercase; color: var(--muted); border-bottom-color: rgba(11,18,19,0.2); }
.post-body tbody tr:last-child td { border-bottom: none; }
.post-body td:first-child { color: var(--ink); font-weight: 600; }

/* a callout for the one thing to remember */
.post-body .note {
  margin: 38px 0;
  padding: 22px 26px;
  border-radius: 18px;
  background: rgba(78, 201, 212, 0.14);
  border: 1px solid rgba(78, 201, 212, 0.34);
}
.post-body .note p { margin: 0; font-size: 17px; }
.post-body .note p + p { margin-top: 10px; }

/* end-of-post rule */
.post-end { max-width: 690px; margin: 54px auto 0; padding-top: 30px; border-top: 1px solid var(--line); }
.post-end p { font-size: 16.5px; color: var(--muted); margin: 0; }

@media (max-width: 760px) {
  .post-hero { border-radius: 0 0 26px 26px; margin-bottom: 32px; }
  .post-hero .art { min-height: 460px; }
  .post-hero .copy { padding-bottom: 34px; }
  .post-body > p { font-size: 17.5px; }
  .post-body > p.lede { font-size: 20px; }
  .post-body table { font-size: 15.5px; }
  .post-body th, .post-body td { padding: 11px 10px; }
}

/* The strike in the masthead headline: the old word is struck, the new one
   replaces it in place. Thin rule, muted, so it reads as an edit and not damage. */
.blog-head h1 s {
  color: var(--muted);
  text-decoration-color: rgba(11, 18, 19, 0.46);
  text-decoration-thickness: 0.055em;   /* relative, so it holds at every clamp size */
  margin-right: 0.06em;
}

/* ---- per-script fallbacks ----
   Afacad carries no CJK, Devanagari or Cyrillic glyphs. Latin still renders in
   Afacad ("Idea Maker AI" keeps its wordmark); only the glyphs Afacad lacks
   fall through, so each script needs a named face behind it rather than
   whatever the browser happens to reach for. */
html[lang="ja"] h1, html[lang="ja"] h2, html[lang="ja"] h3, html[lang="ja"] .brand-name,
html[lang="ja"] .pull, html[lang="ja"] .cta {
  font-family: 'Afacad', 'Hiragino Sans', 'Noto Sans JP', 'Yu Gothic', Meiryo, sans-serif;
}
html[lang="ko"] h1, html[lang="ko"] h2, html[lang="ko"] h3, html[lang="ko"] .brand-name,
html[lang="ko"] .pull, html[lang="ko"] .cta {
  font-family: 'Afacad', 'Apple SD Gothic Neo', 'Noto Sans KR', 'Malgun Gothic', sans-serif;
}
html[lang="zh-Hans"] h1, html[lang="zh-Hans"] h2, html[lang="zh-Hans"] h3, html[lang="zh-Hans"] .brand-name,
html[lang="zh-Hans"] .pull, html[lang="zh-Hans"] .cta {
  font-family: 'Afacad', 'PingFang SC', 'Noto Sans SC', 'Microsoft YaHei', sans-serif;
}
html[lang="hi"] h1, html[lang="hi"] h2, html[lang="hi"] h3, html[lang="hi"] .brand-name,
html[lang="hi"] .pull, html[lang="hi"] .cta {
  font-family: 'Afacad', 'Noto Sans Devanagari', 'Nirmala UI', 'Mangal', sans-serif;
}
/* CJK has no descenders to speak of and reads badly at Latin line-heights. */
html[lang="ja"] .post-body > p, html[lang="ko"] .post-body > p, html[lang="zh-Hans"] .post-body > p { line-height: 1.85; }
html[lang="ja"] h1, html[lang="ko"] h1, html[lang="zh-Hans"] h1 { letter-spacing: 0; line-height: 1.22; }

/* A 16ch measure is a sensible headline width in Latin and far too narrow in
   CJK, where one character is a whole syllable — it forced breaks mid-phrase. */
html[lang="ja"] .post-hero h1, html[lang="ko"] .post-hero h1, html[lang="zh-Hans"] .post-hero h1 { max-width: 24ch; }
html[lang="ja"] .feature h2, html[lang="ko"] .feature h2, html[lang="zh-Hans"] .feature h2 { max-width: 24ch; }
