/* /geo-guide hub: the /about design system (css/about.css, js/about.js) plus the hub's own parts — reading progress, the linked
   chapter index on black and the six chapter cards. Read state and the idle "pulse" come from js/geo-guide.js (.read, .pulse);
   the chapter pages keep their own styles in css/geo-guide.css. */

.gdh { --expo: cubic-bezier(.19, 1, .22, 1); }

/* ---------- hero + progress ---------- */
.gdh-hero { padding-bottom: clamp(88px, 10vw, 150px); }
.gdh-progress { display: inline-flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 14px 20px; margin-top: clamp(40px, 5vw, 56px); padding: 10px 10px 10px 24px; border: 1px solid var(--line-l); border-radius: 999px; background: #fff; }
.gdh-count { font-size: 15px; font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; }
.gdh-dots { display: inline-flex; gap: 5px; }
.gdh-dots i { width: 22px; height: 6px; border-radius: 3px; background: #e2e2e2; transition: background .5s, transform .5s var(--expo); }
.gdh-dots i.read { background: var(--lime); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .15); }
.gdh-dots i.hot { background: var(--ink); transform: scaleY(1.4); }
.ab .ab-btn--ink { min-height: 48px; padding: 12px 22px; border-radius: 999px; font-size: 15px; background: var(--ink); color: #fff; }
.ab .ab-btn--ink:hover { background: #333; }
html.ab-js .gdh-hero .gdh-progress { opacity: 0; animation: ab-fade .9s var(--ease) .6s forwards; }

/* ---------- reading path (linked big words) ---------- */
.gdh-words li { padding: 0; }
.gdh-words a { display: flex; align-items: baseline; justify-content: space-between; gap: 24px; width: 100%; padding: clamp(18px, 2vw, 28px) 0; text-decoration: none; }
.gdh-words .ab-word { font-size: clamp(48px, 8.6vw, 132px); }
.gdh-words .ab-word-desc { white-space: normal; max-width: 420px; text-align: right; font-size: clamp(15px, 1.25vw, 18px); line-height: 1.45; }
.gdh-words .ab-word-desc b { display: block; margin-bottom: 4px; font-size: 13px; font-weight: 700; letter-spacing: .08em; color: rgba(255, 255, 255, .45); font-variant-numeric: tabular-nums; }
.gdh-words a:hover .ab-word, .gdh-words a:focus-visible .ab-word { color: #fff; }
.gdh-words a:hover .ab-word-desc { color: var(--lime); }

/* ---------- chapter cards ---------- */
.gdh-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin-top: clamp(56px, 6vw, 88px); }
.gdh-card { position: relative; display: flex; flex-direction: column; min-height: clamp(380px, 30vw, 440px); padding: 32px; border-radius: 24px; background: #fff; border: 1px solid transparent; color: var(--ink); text-decoration: none; transition: transform .45s var(--ease), box-shadow .45s var(--ease), border-color .3s; }
.gdh-card:hover, .gdh-card.pulse { border-color: var(--ink); }
.gdh-card:hover { transform: translateY(-6px); box-shadow: 0 24px 48px -24px rgba(0, 0, 0, .25); }
.gdh-card .no { display: inline-flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 600; color: var(--muted); font-variant-numeric: tabular-nums; }
.gdh-card .no em { font-style: normal; font-size: 12px; font-weight: 600; padding: 2px 10px; border-radius: 999px; background: var(--lime); color: var(--ink); opacity: 0; transform: translateX(-6px); transition: opacity .4s, transform .4s var(--expo); }
.gdh-card.read .no em { opacity: 1; transform: none; }
.ab .gdh-card h3 { margin-top: auto; font-size: clamp(21px, 1.8vw, 26px); font-weight: 650; letter-spacing: -0.03em; line-height: 1.25; }
.gdh-card p { margin-top: 12px; font-size: 15.5px; line-height: 1.65; color: var(--muted); }
.gdh-card .ab-card-more { margin-top: 20px; }
.gdh-card:hover .ab-card-more svg { transform: translateX(4px); }

/* glyphs: black line art, lime on hover and on the idle pulse (motion ported from css/geo-guide.css) */
.gdh-glyph { position: absolute; right: 28px; top: 26px; width: 96px; height: 76px; color: #c4c4c4; transition: color .5s; }
.gdh-card:hover .gdh-glyph, .gdh-card.pulse .gdh-glyph { color: var(--ink); }
.gdh-glyph svg { width: 100%; height: 100%; overflow: visible; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.gdh-glyph [fill="currentColor"] { fill: var(--lime); stroke: var(--ink); }
.gdh-card:not(:hover):not(.pulse) .gdh-glyph [fill="currentColor"] { fill: #c4c4c4; stroke: none; }
.gdh-glyph .a, .gdh-glyph .b, .gdh-glyph .c, .gdh-glyph .d { transform-box: fill-box; transform-origin: center; }
.gdh-card:hover .g1 .a, .gdh-card.pulse .g1 .a { animation: gdhRing 1.8s ease-out infinite; }
.gdh-card:hover .g1 .b, .gdh-card.pulse .g1 .b { animation: gdhRing 1.8s ease-out .5s infinite; }
@keyframes gdhRing { from { transform: scale(.5); opacity: 1; } to { transform: scale(1.25); opacity: 0; } }
.gdh-glyph.g2 .a, .gdh-glyph.g2 .b, .gdh-glyph.g2 .c { transition: transform .7s var(--expo); }
.gdh-card:hover .g2 .a, .gdh-card.pulse .g2 .a { transform: translateY(-9px); }
.gdh-card:hover .g2 .c, .gdh-card.pulse .g2 .c { transform: translateY(9px); }
.gdh-glyph.g3 .a { stroke-dasharray: 60; stroke-dashoffset: 60; }
.gdh-card:hover .g3 .a, .gdh-card.pulse .g3 .a { animation: gdhDraw 1.6s steps(8) infinite; }
.gdh-card:hover .g3 .b, .gdh-card.pulse .g3 .b { animation: gdhBlink .7s steps(2) infinite; }
.gdh-glyph.g4 .a, .gdh-glyph.g4 .b, .gdh-glyph.g4 .c { stroke-dasharray: 16; stroke-dashoffset: 16; }
.gdh-card:hover .g4 .a, .gdh-card.pulse .g4 .a { animation: gdhDraw .5s var(--expo) forwards; }
.gdh-card:hover .g4 .b, .gdh-card.pulse .g4 .b { animation: gdhDraw .5s var(--expo) .25s forwards; }
.gdh-card:hover .g4 .c, .gdh-card.pulse .g4 .c { animation: gdhDraw .5s var(--expo) .5s forwards; }
.gdh-glyph.g5 .a { stroke-dasharray: 4 6; }
.gdh-card:hover .g5 .a, .gdh-card.pulse .g5 .a { animation: gdhDash .6s linear infinite; }
.gdh-glyph.g6 .a, .gdh-glyph.g6 .b, .gdh-glyph.g6 .c, .gdh-glyph.g6 .d { transform-origin: bottom; transition: transform .8s var(--expo); }
.gdh-glyph.g6 .a { transform: scaleY(.3); } .gdh-glyph.g6 .b { transform: scaleY(.45); } .gdh-glyph.g6 .c { transform: scaleY(.6); } .gdh-glyph.g6 .d { transform: scaleY(.75); }
.gdh-card:hover .g6 .a, .gdh-card.pulse .g6 .a, .gdh-card:hover .g6 .b, .gdh-card.pulse .g6 .b, .gdh-card:hover .g6 .c, .gdh-card.pulse .g6 .c, .gdh-card:hover .g6 .d, .gdh-card.pulse .g6 .d { transform: scaleY(1); }
.gdh-card:hover .g6 .b, .gdh-card.pulse .g6 .b { transition-delay: .08s; } .gdh-card:hover .g6 .c, .gdh-card.pulse .g6 .c { transition-delay: .16s; } .gdh-card:hover .g6 .d, .gdh-card.pulse .g6 .d { transition-delay: .24s; }
@keyframes gdhDraw { to { stroke-dashoffset: 0; } }
@keyframes gdhBlink { 50% { opacity: 0; } }
@keyframes gdhDash { to { stroke-dashoffset: -10; } }
/* cards fade up one after another */
html.ab-js .gdh-card[data-reveal]:nth-child(3n+2) { --d: 80ms; }
html.ab-js .gdh-card[data-reveal]:nth-child(3n) { --d: 160ms; }

@media (prefers-reduced-motion: reduce) {
  .gdh-glyph * { animation: none !important; }
  .gdh-glyph.g3 .a, .gdh-glyph.g4 .a, .gdh-glyph.g4 .b, .gdh-glyph.g4 .c { stroke-dashoffset: 0; }
  html.ab-js .gdh-hero .gdh-progress { opacity: 1; animation: none; }
}

@media (max-width: 1024px) {
  .gdh-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 768px) {
  .gdh-progress { flex-direction: column; gap: 12px; padding: 18px 20px; border-radius: 24px; }
  .gdh-words a { flex-direction: column; align-items: flex-start; gap: 6px; }
  .gdh-words .ab-word-desc { text-align: left; }
  .gdh-grid { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .gdh-card { min-height: 300px; padding: 26px; }
  .gdh-glyph { right: 20px; top: 20px; width: 76px; height: 60px; }
}
