/* pinni journal. sits on top of style.css and uses its tokens.
   apple newsroom feel: centered, large type, quiet color, soft cards. */

/* ---------- shared bits ---------- */
.j-fade { animation: jfade 0.55s var(--ease) both; animation-delay: var(--d, 0s); }
@keyframes jfade { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .j-fade { animation: none; } }

.cat { font-size: 13px; font-weight: 600; color: var(--accent); letter-spacing: 0.005em; }
.dot::before { content: "\00b7"; margin: 0 7px; color: var(--ink3); }

/* progress bar */
.progress { position: fixed; z-index: 60; top: 0; left: 0; right: 0; height: 2px; transform-origin: 0 50%; transform: scaleX(0); background: var(--accent); pointer-events: none; }

/* ---------- cover art ---------- */
.cv { position: relative; display: grid; place-items: center; overflow: hidden; border-radius: 26px; aspect-ratio: 16 / 11; isolation: isolate; }
.cv::before, .cv::after { content: ""; position: absolute; z-index: -1; border-radius: 50%; border: 1px solid currentColor; opacity: 0.1; }
.cv::before { width: 86%; aspect-ratio: 1; }
.cv::after { width: 58%; aspect-ratio: 1; opacity: 0.14; }
.cv i { display: grid; place-items: center; width: 27%; aspect-ratio: 1; border-radius: 28%; background: rgba(255, 255, 255, 0.62); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); box-shadow: 0 10px 34px rgba(20, 20, 40, 0.1), inset 0 0 0 1px rgba(255, 255, 255, 0.5); transition: transform 0.6s var(--ease); }
.cv svg { width: 46%; height: 46%; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.t-wine { background: linear-gradient(150deg, #7b2112 0%, #560C01 55%, #3d0801 100%); color: #F3E6DE; }
.t-wine i { background: rgba(255, 255, 255, 0.12); box-shadow: 0 10px 34px rgba(0, 0, 0, 0.25), inset 0 0 0 1px rgba(255, 255, 255, 0.18); }
.t-cream { background: linear-gradient(150deg, #FBF6F3 0%, #EFE3DD 100%); color: var(--accent); }
.t-fog { background: linear-gradient(150deg, #F1F1F5 0%, #DCDCE5 100%); color: #2A2A33; }
.t-rose { background: linear-gradient(150deg, #FBE9E4 0%, #F0CFC6 100%); color: #6a1a0b; }
.t-ink { background: linear-gradient(150deg, #34302f 0%, #1a1817 100%); color: #F3E6DE; }
.t-ink i { background: rgba(255, 255, 255, 0.1); box-shadow: 0 10px 34px rgba(0, 0, 0, 0.3), inset 0 0 0 1px rgba(255, 255, 255, 0.14); }

/* ---------- journal index ---------- */
.j-hero { padding-top: calc(var(--nav) + clamp(56px, 9vw, 116px)); text-align: center; }
.j-hero .cat { font-size: 15px; }
.j-hero h1 { font-size: clamp(42px, 6.6vw, 84px); max-width: 15ch; margin: 14px auto 0; }
.j-hero .lede { margin: 22px auto 0; max-width: 560px; color: var(--ink2); font-size: clamp(17px, 1.7vw, 21px); line-height: 1.5; }

.chips { display: flex; justify-content: center; margin-top: clamp(32px, 4.5vw, 48px); }
.chips-in { display: inline-flex; gap: 2px; padding: 4px; border-radius: 999px; background: rgba(20, 20, 40, 0.055); overflow-x: auto; max-width: 100%; scrollbar-width: none; }
.chips-in::-webkit-scrollbar { display: none; }
.chip { flex: none; height: 34px; padding: 0 16px; border-radius: 999px; font-size: 14px; font-weight: 500; color: var(--ink2); transition: background 0.3s var(--ease), color 0.3s, box-shadow 0.3s; }
.chip:hover { color: var(--ink); }
.chip.on { background: #fff; color: var(--ink); font-weight: 600; box-shadow: 0 1px 8px rgba(20, 20, 40, 0.1); }

.lead { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 64px); align-items: center; margin-top: clamp(40px, 6vw, 64px); padding: 14px; padding-right: clamp(28px, 4vw, 56px); background: #fff; border-radius: 36px; box-shadow: var(--shadow-soft); }
.lead[hidden] { display: none; }
.lead .cv { border-radius: 26px; aspect-ratio: 4 / 3; }
.lead h2 { font-size: clamp(28px, 3.4vw, 42px); line-height: 1.06; margin-top: 12px; }
.lead p { margin-top: 14px; color: var(--ink2); font-size: 17px; line-height: 1.55; max-width: 440px; }
.lead .meta { margin-top: 20px; font-size: 14px; color: var(--ink3); }
.lead:hover .cv i, .card:hover .cv i { transform: scale(1.05); }
.lead:hover h2 { text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 6px; text-decoration-color: rgba(20, 20, 20, 0.25); }

.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(36px, 4.4vw, 56px) clamp(20px, 2.6vw, 32px); margin-top: clamp(44px, 6vw, 72px); }
.card { display: block; }
.card[hidden] { display: none; }
.card .cv { transition: box-shadow 0.5s var(--ease), transform 0.5s var(--ease); }
.card:hover .cv { transform: translateY(-3px); box-shadow: 0 22px 50px rgba(20, 20, 40, 0.14); }
.card .cat { display: block; margin-top: 18px; }
.card h3 { margin-top: 6px; font-size: clamp(20px, 1.9vw, 23px); line-height: 1.2; letter-spacing: -0.03em; }
.card p { margin-top: 8px; color: var(--ink2); font-size: 15.5px; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.card .meta { margin-top: 10px; font-size: 13px; color: var(--ink3); }

/* ---------- article ---------- */
.a-head { padding-top: calc(var(--nav) + clamp(40px, 6vw, 76px)); text-align: center; }
.crumb { display: inline-flex; gap: 8px; font-size: 14px; color: var(--ink2); }
.crumb a:hover { color: var(--accent); }
.a-head .cat { display: block; margin-top: 26px; font-size: 14px; }
.a-head h1 { font-size: clamp(34px, 5.4vw, 66px); line-height: 1.04; margin: 12px auto 0; max-width: 17ch; }
.a-head .lede { margin: 20px auto 0; max-width: 620px; color: var(--ink2); font-size: clamp(17px, 1.6vw, 20px); line-height: 1.5; }
.a-head .meta { margin-top: 22px; font-size: 14px; color: var(--ink3); }
.a-cover { margin-top: clamp(32px, 5vw, 52px); }
.a-cover .cv { aspect-ratio: 21 / 9; border-radius: clamp(22px, 3vw, 34px); }
.a-cover .cv i { width: clamp(84px, 11vw, 124px); }

.art { display: grid; grid-template-columns: 190px minmax(0, 680px); gap: 64px; justify-content: center; margin-top: clamp(40px, 6vw, 64px); align-items: start; }
.art-toc { position: sticky; top: 84px; display: flex; flex-direction: column; gap: 1px; font-size: 14px; }
.art-toc b { padding: 0 12px 8px; font-size: 12px; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase; color: var(--ink3); }
.art-toc a { padding: 7px 12px; border-radius: 12px; color: var(--ink2); line-height: 1.3; transition: background 0.25s, color 0.25s; }
.art-toc a:hover { color: var(--ink); }
.art-toc a.on { background: #fff; color: var(--ink); font-weight: 600; box-shadow: var(--shadow-soft); }

.prose { font-size: 18px; min-width: 0; }
.prose p, .prose li { color: #3A3634; line-height: 1.75; }
.prose p + p, .prose ul + p, .prose ol + p, .prose .tbl + p, .prose figure + p { margin-top: 18px; }
.prose h2 { font-size: clamp(27px, 3.2vw, 36px); letter-spacing: -0.04em; line-height: 1.1; margin: clamp(44px, 6vw, 64px) 0 16px; scroll-margin-top: 84px; }
.prose h3 { font-size: 19px; letter-spacing: -0.02em; margin: 28px 0 6px; color: var(--ink); }
.prose a { color: var(--accent); font-weight: 500; text-decoration: underline; text-decoration-color: rgba(86, 12, 1, 0.3); text-underline-offset: 3px; transition: text-decoration-color 0.2s; }
.prose a:hover { text-decoration-color: var(--accent); }
.prose strong { font-weight: 600; color: var(--ink); }
.prose em { font-style: normal; background: var(--tint); padding: 0 5px; border-radius: 5px; color: var(--accent); }

.prose ul, .prose ol { margin: 16px 0 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 10px; }
.prose ul > li { position: relative; padding-left: 22px; }
.prose ul > li::before { content: ""; position: absolute; left: 4px; top: 0.78em; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); opacity: 0.7; }
.prose ol { counter-reset: s; gap: 14px; }
.prose ol > li { position: relative; padding-left: 46px; min-height: 30px; counter-increment: s; }
.prose ol > li::before { content: counter(s); position: absolute; left: 0; top: 0.1em; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--tint); color: var(--accent); font-size: 14px; font-weight: 700; line-height: 1; }

.quick { margin: 0 0 6px; padding: 22px 24px 24px; background: #fff; border-radius: 24px; box-shadow: var(--shadow-soft); }
.quick b { display: block; margin-bottom: 8px; font-size: 12px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--accent); }
.prose .quick p { font-size: 19px; line-height: 1.6; color: var(--ink); }

.tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.tags span { padding: 8px 14px; border-radius: 999px; background: #fff; box-shadow: var(--shadow-soft); font-size: 15px; line-height: 1.3; color: var(--ink); }
.prose em + ul, .prose ul + .tags { margin-top: 18px; }

.tip { margin-top: 26px; padding: 18px 22px 20px; background: var(--tint); border-radius: 20px; }
.tip b { display: block; margin-bottom: 6px; font-size: 12px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--accent); }
.prose .tip p { font-size: 17px; line-height: 1.65; }
.tip p + p { margin-top: 10px; }
.note { margin-top: 28px; padding: 4px 0 4px 22px; border-left: 3px solid var(--accent); }
.note p { font-size: 17px; }

.tbl { margin-top: 22px; background: #fff; border-radius: 22px; box-shadow: var(--shadow-soft); overflow-x: auto; }
.prose table { width: 100%; border-collapse: collapse; font-size: 16px; min-width: 460px; }
.prose th, .prose td { text-align: left; vertical-align: top; padding: 15px 20px; border-bottom: 1px solid var(--line); line-height: 1.5; }
.prose tr:last-child td { border-bottom: 0; }
.prose th { font-size: 12px; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase; color: var(--ink3); background: rgba(20, 20, 40, 0.02); }
.prose td:first-child { font-weight: 600; color: var(--ink); width: 28%; }
.prose td { color: #3A3634; }

.prose figure { margin: 32px 0 0; display: flex; gap: 24px; align-items: center; padding: 22px; background: #fff; border-radius: 26px; box-shadow: var(--shadow-soft); }
.prose figure img { flex: none; width: 140px; height: auto; aspect-ratio: 384 / 832; object-fit: cover; border-radius: 20px; box-shadow: 0 16px 40px rgba(20, 20, 40, 0.16); background: var(--slot); }
.prose figcaption { font-size: 15px; line-height: 1.55; color: var(--ink2); }

.faqs { margin-top: clamp(44px, 6vw, 64px); }
.prose .faqs h2 { margin-top: 0; }
.faqs details { border-bottom: 1px solid var(--line); }
.faqs details:first-of-type { border-top: 1px solid var(--line); margin-top: 22px; }
.faqs summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 20px 0; font-size: 18px; font-weight: 600; letter-spacing: -0.02em; line-height: 1.35; color: var(--ink); }
.faqs summary::-webkit-details-marker { display: none; }
.faqs summary::after { content: ""; flex: none; width: 22px; height: 22px; border-radius: 50%; background: var(--tint) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 22 22' fill='none' stroke='%23560C01' stroke-width='1.8' stroke-linecap='round'%3E%3Cpath d='M6.5 11h9M11 6.5v9'/%3E%3C/svg%3E") center / 22px no-repeat; transition: transform 0.35s var(--ease); }
.faqs details[open] summary::after { transform: rotate(45deg); }
.faqs summary:hover { color: var(--accent); }
.faqs details p { padding: 0 42px 22px 0; font-size: 17px; }

.cta { margin-top: clamp(48px, 7vw, 72px); padding: clamp(30px, 5vw, 52px); border-radius: 32px; background: linear-gradient(150deg, #6d1b0d 0%, #560C01 60%, #3d0801 100%); color: #F3E6DE; text-align: center; }
.prose .cta h2 { margin: 0 auto; color: #FBF1EC; font-size: clamp(28px, 3.6vw, 40px); max-width: 17ch; }
.prose .cta p { margin: 14px auto 0; max-width: 430px; color: rgba(243, 230, 222, 0.78); font-size: 17px; line-height: 1.55; }
.cta .btn { margin-top: 26px; background: #FBF1EC; color: var(--accent); }
.cta .btn:hover { box-shadow: 0 10px 28px rgba(0, 0, 0, 0.3); }
.prose .cta .btn { color: var(--accent); text-decoration: none; }

.more { margin-top: clamp(64px, 9vw, 96px); }
.more h2 { font-size: clamp(24px, 3vw, 32px); text-align: center; margin-bottom: clamp(24px, 4vw, 40px); }
.more .grid { margin-top: 0; }

@media (max-width: 1100px) {
  .art { grid-template-columns: minmax(0, 680px); gap: 0; }
  .art-toc { display: none; }
}
@media (max-width: 900px) {
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lead { grid-template-columns: 1fr; padding: 12px 12px 28px; border-radius: 30px; gap: 22px; }
  .lead > div:last-child { padding: 0 14px; }
}
@media (max-width: 760px) {
  .nav-links { display: none; }
  .prose { font-size: 17.5px; }
  .prose figure { flex-direction: column; align-items: flex-start; }
  .prose .quick p { font-size: 18px; }
  .a-cover .cv { aspect-ratio: 16 / 9; }
}
@media (max-width: 620px) {
  .grid { grid-template-columns: 1fr; }
  .more .grid { gap: 36px; }
}

/* app screenshots in posts */
.prose .shots { margin: 32px 0 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; padding: 22px; background: #fff; border-radius: 26px; box-shadow: var(--shadow-soft); }
.prose .shots figure { margin: 0; padding: 0; display: block; background: none; box-shadow: none; border-radius: 0; }
.prose .shots figure img { display: block; width: 100%; height: auto; aspect-ratio: 540 / 1168; border-radius: 16px; box-shadow: 0 12px 30px rgba(20, 20, 40, 0.16); }
.prose .shots figcaption { margin-top: 10px; font-size: 13.5px; line-height: 1.45; color: var(--ink2); }
.prose .shots figcaption b { display: block; color: var(--ink); font-weight: 600; }
.prose figure.one img { width: 150px; }
@media (max-width: 620px) { .prose .shots { grid-template-columns: repeat(2, 1fr); padding: 16px; } }
