/* Isekai to Midgard: the guild-board pages (server, news, how to play, rules, community, support, register).
   Sits on scrollcraft.css (floor) + site.css (brand tokens, buttons, marks, devlog cards, book form).
   Identity system v1.1: paper ground, River ink, Fraunces / Nunito / one Caveat note, gold only as light,
   arched doors hold brand illustrations, one Kohaku per layout, one button per layout. Calm editorial pages: no scroll film. */

:root { --wrap: 74rem; --pad: clamp(1.25rem, 4vw, 4rem); }
body.pg { background: radial-gradient(circle at 12% 6%, rgba(255,255,255,.55), transparent 42%),
  radial-gradient(circle at 92% 88%, rgba(155,176,163,.18), transparent 46%), var(--paper); }
.pg main { display: block; }
.pwrap { max-width: var(--wrap); margin-inline: auto; padding-inline: var(--pad); }

/* --- header ------------------------------------------------------------ */
.top { position: sticky; top: 0; z-index: 40; background: color-mix(in oklab, var(--paper) 90%, transparent);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); border-bottom: 1px solid rgba(71,95,90,.16); }
.top__in { display: flex; align-items: center; gap: 1.6rem; min-height: 4.4rem; position: relative; }
.top__mark img { height: 42px; width: auto; }
.top__nav { display: flex; align-items: center; gap: clamp(.9rem, 1.6vw, 1.6rem); margin-left: auto; }
.top__nav a { font-weight: 700; font-size: .98rem; color: var(--river); text-decoration: none; padding: .35rem 0; border-bottom: 2px solid transparent; }
.top__nav a:hover { border-bottom-color: rgba(71,95,90,.35); }
.top__nav a[aria-current="page"] { border-bottom-color: var(--gold); }
.top__cta { margin-left: .4rem; }
.menu { display: none; margin-left: auto; }
.menu summary { list-style: none; cursor: pointer; font-weight: 800; color: var(--river); padding: .45rem 1rem; border-radius: 999px; box-shadow: inset 0 0 0 2px var(--river); }
.menu summary::-webkit-details-marker { display: none; }
.menu__panel { position: absolute; left: calc(-1 * var(--pad)); right: calc(-1 * var(--pad)); top: 100%; background: var(--paper);
  border-bottom: 1px solid rgba(71,95,90,.2); box-shadow: 0 18px 30px -24px rgba(45,44,46,.5); padding: .6rem var(--pad) 1.4rem; display: grid; }
.menu__panel a { font-family: var(--sc-font-display); font-weight: 600; font-variation-settings: "SOFT" 100, "WONK" 1; font-size: 1.45rem; color: var(--river); text-decoration: none; padding: .5rem 0; border-bottom: 1px dashed rgba(71,95,90,.25); }
.menu__panel a[aria-current="page"] { color: var(--ink); }
@media (max-width: 1023px) { .top__nav { display: none; } .menu { display: block; } }

/* --- page hero: words left, an arched door right ----------------------- */
.phero { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: clamp(2rem, 5vw, 5.5rem); align-items: center;
  padding-block: clamp(2.5rem, 8vh, 5.5rem) clamp(2rem, 6vh, 4rem); }
.phero h1.display { font-size: clamp(2.7rem, 1.5rem + 3.9vw, 5.2rem); max-width: 11ch; }
.phero .lede { max-width: 36ch; }
.phero .note { margin-top: 1.4rem; }
.phero__act { display: flex; align-items: center; gap: 1.2rem 1.6rem; flex-wrap: wrap; margin-top: 1.8rem; }
.pdoor { justify-self: end; width: min(100%, 25rem); aspect-ratio: 3 / 4; overflow: hidden; border: 3px solid var(--river);
  border-radius: 50% 50% 14px 14px / 37.5% 37.5% 14px 14px; background: var(--deep);
  box-shadow: 0 2px 0 rgba(45,44,46,.08), 0 30px 50px -36px rgba(45,44,46,.55); }
.pdoor img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 799px) {
  .phero { grid-template-columns: 1fr; padding-top: 2rem; }
  .pdoor { justify-self: start; width: min(78vw, 20rem); order: -1; }
}

/* --- sections -------------------------------------------------------- */
.psec { padding-block: clamp(2.6rem, 7vh, 4.8rem); border-top: 1px solid rgba(71,95,90,.16); }
.psec__head { display: grid; gap: .6rem; margin-bottom: clamp(1.6rem, 3vw, 2.4rem); max-width: 46rem; }
.h2 { font-family: var(--sc-font-display); font-weight: 600; font-variation-settings: "SOFT" 100, "WONK" 1, "opsz" 72; color: var(--river);
  font-size: clamp(1.9rem, 1.3rem + 1.8vw, 3rem); line-height: 1.06; letter-spacing: -.01em; margin: 0; text-wrap: balance; }
.psec__head p { margin: 0; color: var(--sc-ink-soft); max-width: 60ch; }
.prose { max-width: 62ch; }
.prose p { margin: 0 0 1rem; color: var(--ink); }
.prose ul, .prose ol { margin: 0 0 1rem; padding-left: 1.2rem; }
.prose li { margin: .35rem 0; }

/* facts at a glance */
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: 1.4rem 2rem; margin: 0; }
.fact { border-top: 3px solid var(--river); padding-top: .9rem; }
.fact dt { font-size: .78rem; letter-spacing: .14em; text-transform: uppercase; font-weight: 800; color: var(--river); }
.fact dd { margin: .35rem 0 0; font-family: var(--sc-font-display); font-weight: 600; font-variation-settings: "SOFT" 100, "WONK" 1; font-size: 1.45rem; line-height: 1.2; color: var(--ink); }
.fact dd small { display: block; margin-top: .35rem; font-family: var(--sc-font-text); font-weight: 400; font-size: .95rem; color: var(--sc-ink-soft); line-height: 1.45; }

/* cards */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(16.5rem, 1fr)); gap: 1.2rem; }
.card { background: var(--deep); border-radius: 14px; padding: 1.5rem 1.5rem 1.6rem; box-shadow: 0 1px 2px rgba(45,44,46,.1), 0 14px 28px -22px rgba(45,44,46,.5); display: flex; flex-direction: column; gap: .5rem; }
.card h3 { margin: 0; }
.card p { margin: 0; color: var(--ink); }
.card .dotlink { align-self: flex-start; margin-top: .6rem; }
.card--quiet { background: transparent; box-shadow: inset 0 0 0 2px rgba(71,95,90,.35); }

/* the three lines */
.lines { list-style: none; counter-reset: line; padding: 0; margin: 0; display: grid; gap: 1rem; }
.lines li { counter-increment: line; display: grid; grid-template-columns: 3.2rem 1fr; align-items: baseline; font-family: var(--sc-font-display);
  font-weight: 600; font-variation-settings: "SOFT" 100, "WONK" 1; font-size: clamp(1.45rem, 1.1rem + 1.2vw, 2.2rem); color: var(--river); line-height: 1.15; }
.lines li::before { content: counter(line); display: grid; place-items: center; width: 2.4rem; height: 2.4rem; border-radius: 50%;
  font-size: 1.2rem; color: var(--river); background: rgba(232,184,96,.45); box-shadow: inset 0 0 0 2px var(--river); }  /* gold as light behind River, never gold text on paper */

/* a rule block */
.rules { display: grid; grid-template-columns: repeat(auto-fit, minmax(19rem, 1fr)); gap: 1.6rem 2.4rem; }
.rule h3 { margin-bottom: .4rem; }
.rule ul { margin: 0; padding-left: 1.1rem; color: var(--ink); }
.rule li { margin: .3rem 0; }

/* steps */
.steps { list-style: none; counter-reset: step; padding: 0; margin: 0; display: grid; gap: 1.1rem; max-width: 48rem; }
.steps li { counter-increment: step; display: grid; grid-template-columns: 2.6rem 1fr; gap: 1rem; align-items: start; }
.steps li::before { content: counter(step); display: grid; place-items: center; width: 2.4rem; height: 2.4rem; border-radius: 50%;
  background: var(--river); color: var(--paper); font-weight: 800; }
.steps b { color: var(--river); }

/* FAQ */
.faq { display: grid; gap: .6rem; max-width: 52rem; }
.faq details { background: var(--deep); border-radius: 12px; padding: .9rem 1.2rem; }
.faq summary { cursor: pointer; font-weight: 800; color: var(--river); }
.faq details p { margin: .6rem 0 .2rem; }

/* news */
.news { list-style: none; padding: 0; margin: 0; }
.entry { display: grid; grid-template-columns: 9rem minmax(0, 1fr); gap: .4rem 2rem; padding: 1.4rem 0; border-top: 1px dashed rgba(71,95,90,.3); }
.entry:first-child { border-top: 0; }
.entry time { font-weight: 800; color: var(--river); font-size: .95rem; padding-top: .25rem; }
.entry h3 { margin: .35rem 0 .3rem; }
.entry p { margin: 0; max-width: 62ch; }
.tag { display: inline-block; font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; font-weight: 800; padding: .22rem .6rem; border-radius: 999px; background: var(--river); color: var(--paper); }
.tag--patch { background: var(--sage); color: var(--ink); }
.tag--event { background: var(--gold); color: var(--ink); }
.tag--workshop { background: transparent; color: var(--river); box-shadow: inset 0 0 0 2px var(--river); }
@media (max-width: 640px) { .entry { grid-template-columns: 1fr; } }

/* words beside Kohaku: Kohaku stands on calm paper, never inside or over a door */
.with-k { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: clamp(1.5rem, 4vw, 4rem); align-items: center; }
.with-k .kohaku { width: clamp(8.5rem, 15vw, 13rem); height: auto; }
.with-k .kohaku--wide { width: clamp(10rem, 16vw, 14rem); }
.with-k .kohaku--tall { width: clamp(7.5rem, 11vw, 10rem); }
@media (max-width: 720px) { .with-k { grid-template-columns: 1fr; } .with-k .kohaku { justify-self: end; width: 8.5rem; } }

/* lists that say no */
.never { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); gap: .6rem 1.4rem; }
.never li { display: flex; gap: .6rem; align-items: baseline; padding: .55rem 0; border-bottom: 1px dashed rgba(71,95,90,.3); }
.never li::before { content: ""; flex: none; width: .8rem; height: 2px; background: var(--river); translate: 0 -.3rem; }

/* register / support book on a page */
.pg .book { max-width: 40rem; }
.pg .book__msg:empty { min-height: 0; margin: 0; }
.draft { display: inline-block; font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; font-weight: 800; color: var(--river); box-shadow: inset 0 0 0 2px var(--river); border-radius: 999px; padding: .2rem .65rem; }

/* versions on a page: a calm grid instead of the landing's sideways rail */
.pg .vers { display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: 1.2rem; }
.pg .vers .ver { width: auto; }
.pg .ver__v { font-size: clamp(1.7rem, 1.3rem + 1vw, 2.3rem); }
.pg .costs div { grid-template-columns: minmax(10rem, 15rem) 1fr; }

/* --- footer ------------------------------------------------------------ */
.pfoot { margin-top: clamp(2rem, 6vh, 4rem); border-top: 1px solid rgba(71,95,90,.2); padding-block: 2.4rem 2rem; color: var(--sc-ink-soft); font-size: .95rem; }
.pfoot__grid { display: grid; grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr)); gap: 2rem; }
.pfoot__brand img { height: 36px; width: auto; margin-bottom: .8rem; }
.pfoot__brand p { margin: 0; max-width: 30ch; }
.pfoot h2 { font-size: .78rem; letter-spacing: .14em; text-transform: uppercase; font-weight: 800; color: var(--river); margin: 0 0 .6rem; }
.pfoot ul { list-style: none; padding: 0; margin: 0; display: grid; gap: .35rem; }
.pfoot a { color: var(--river); font-weight: 700; text-decoration: none; }
.pfoot a:hover { text-decoration: underline; }
.pfoot__small { margin-top: 2rem; display: flex; gap: 1rem; flex-wrap: wrap; justify-content: space-between; font-size: .85rem; }
.pfoot .note { font-size: 1.5rem; }
@media (max-width: 860px) { .pfoot__grid { grid-template-columns: 1fr 1fr; } .pfoot__brand { grid-column: 1 / -1; } }
