/* =========================================================
   Oblivion Avoidance Meditation — Site theme (pure CSS)
   ========================================================= */

/* Local fonts (self-hosted) */
@font-face {
  font-family: "Cinzel";
  src:
    url("/assets/fonts/cinzel/cinzel-regular.woff2") format("woff2"),
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Cinzel";
  src:
    url("/assets/fonts/cinzel/cinzel-semibold.woff2") format("woff2"),
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Crimson Pro";
  src:
    url("/assets/fonts/crimson-pro/crimsonpro-regular.woff2") format("woff2"),
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Crimson Pro";
  src:
    url("/assets/fonts/crimson-pro/crimsonpro-italic.woff2") format("woff2"),
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: "Crimson Pro";
  src:
    url("/assets/fonts/crimson-pro/crimsonpro-semibold.woff2") format("woff2"),
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Crimson Pro";
  src:
    url("/assets/fonts/crimson-pro/crimsonpro-semibolditalic.woff2") format("woff2"),
  font-weight: 600;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: "IM Fell English";
  src: url("/assets/fonts/im-fell-english/im-fell-english-regular.woff2") format("woff2"),
       url("/assets/fonts/im-fell-english/im-fell-english-regular.woff") format("woff");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "IM Fell English";
  src: url("/assets/fonts/im-fell-english/im-fell-english-italic.woff2") format("woff2"),
       url("/assets/fonts/im-fell-english/im-fell-english-italic.woff") format("woff");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  .edition,
  .edition > .details-body,
  .edition summary::before {
    transition: none;
  }
}


:root {
  /* Parchment Archive — light theme */
  --bg: #F3EFE6;          /* parchment */
  --surface: #FFFFFF;     /* clean paper */
  --surface-2: #ECE6DA;   /* aged paper */

  --text: #1E242B;        /* ink */
  --muted: #4F5B66;       /* faded ink */

  --accent: #1F5FBF;      /* blue ink */
  --accent-2: #0F766E;    /* green annotation */

  --border: rgba(30, 36, 43, 0.12);
  --border-2: rgba(30, 36, 43, 0.18);

  --shadow: 0 8px 22px rgba(30, 36, 43, 0.12);
  --radius: 14px;

  --max-reading: 100ch;
  --max-index: 120ch;

    /* Typography: RPG-ish but readable */
  --font-body: "IM Fell English", "Crimson Pro", Georgia, "Times New Roman", Times, serif;
  --font-display: "Cinzel", Georgia, "Times New Roman", Times, serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;

  /* Smaller scale across the site */
  --step--1: 0.84rem;
  --step-0: 0.98rem;  /* base */
  --step-1: 1.14rem;
  --step-2: 1.42rem;
  --step-3: 1.82rem;

  --lh: 1.72;
}

* { box-sizing: border-box; }
html {
    color-scheme: light;
    scroll-behavior: smooth;
}
body {
  margin: 0;
  background:
    radial-gradient(1200px 800px at 20% -10%, rgba(31,95,191,0.05), transparent 60%),
    radial-gradient(1000px 700px at 120% 10%, rgba(15,118,110,0.04), transparent 60%),
    var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: var(--lh);
}


/* --- Layout primitives --- */
.wrap {
  width: 100%;
  margin: 0 auto;
  padding: 1.25rem clamp(1rem, 4vw, 2rem);
}
.container-reading { max-width: var(--max-reading); }
.container-index { max-width: var(--max-index); }

hr {
  border: 0;
  border-top: 1px solid var(--border);
  margin: 1.5rem 0;
}

/* --- Header / nav --- */
.site-header {
  position: static;
/*top: 0; 
  backdrop-filter: blur(8px);
  background: rgba(243, 239, 230, 0.85); */
  z-index: 10;
  border-bottom: 1px solid var(--border);
}
.site-header .bar {
  display: flex;
  gap: 1rem;
}
.brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.brand a {
  display: flex;
  justify-content: center;
  text-align: center;
  color: var(--text);
  text-decoration: none;
  
}
.brand-title {
  font-family: var(--font-display);
  font-size: 1.45rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-align: center;
  font-weight: 600;
  line-height: 1.15;
}
.brand-subtitle {
  font-size: var(--step--1);
  color: var(--muted);
}
.bar-vertical {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.65rem;
  padding-bottom: 0.25rem;
}
.nav {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  align-items: center;
}
.nav a {
  color: var(--text);
  text-decoration: underline;
  text-decoration-color: rgba(230,237,243,0.25);
  text-underline-offset: 0.18em;
  padding: 0.25rem 0.35rem;
  border-radius: 0px;
  border-bottom: 1px solid var(--border);
}
.nav a:hover{ 
  color: var(--accent);
  text-decoration-color: rgba(110,168,254,0.7);
  background: rgba(110,168,254,0.08);
}
.nav a[aria-current="page"] {
  position: relative;
  z-index: 2;

  border: 1px solid var(--border);
  border-bottom: none;                /* abre para o subnav */
  border-top-left-radius: 10px;       /* cantos só em cima */
  border-top-right-radius: 10px;
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;

  padding: 0.35rem 0.65rem 0.45rem;
  margin-bottom: -1px;                /* “apaga” a borda inferior do nav */

  background: var(--bg);
  text-decoration: none;
}
.nav a[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 1px;
  background: var(--bg);
}
.subnav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.6rem 1rem;

  margin: 0;                  /* remove o -0.5rem */
  padding: 0.15rem 0 0;       /* colado, mas legível */
  width: 100%;
  border: none;
}
.subnav a {
  font-family: inherit;        /* mesma fonte do nav */
  letter-spacing: 0.06em;
  line-height: 1.2;

  font-weight: 500;               /* se o nav for 600 */

  text-decoration: none;
  color: var(--muted);
}

.subnav a:hover {
  text-decoration: underline;
}

.subnav-exalted {
}

details[open] .closed-only {
    display: none;
}

.closed-only {
    font-weight: normal;
    font-size: 0.9em;
    opacity: 0.7;
    margin-left: 0.25rem;
}

.details-body {
    overflow: hidden;
    transition:
	grid-template-rows 0.25s ease,
	opacity 0.2s ease;
}
.edition > .details-body {
  overflow: hidden;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.edition[open] > .details-body {
  opacity: 1;
}

.details-body > *:first-child {
  margin-top: 0.6rem;
}


/* The animation trick: animate the <details> grid rows */
.edition {
  display: grid;
  grid-template-rows: auto 0fr;       /* CLOSED */
  margin: 0;
  padding-left: 0.75rem;
  transition: grid-template-rows 0.25s ease;
}
.edition[open] {
    grid-template-rows: auto 1fr;
}

/* Paragraph rhythm inside collapsibles */
.edition p {
  margin: 0.5rem 0 1rem;
  color: var(--muted);
  line-height: 1.5;
}

.edition summary {
  display: flex;
  align-items: baseline;
  gap: 0.25rem;

  cursor: pointer;
  font-weight: 600;
  font-size: var(--step-0);
  list-style: none; /* remove default marker */
}
.edition summary {
  cursor: pointer;
  font-weight: 600;
  font-size: var(--step-0);
  list-style: none; /* remove marker padrão */
}
/* state indicator */
.edition summary::before {
  content: "▸";
  display: inline-block;
  transform-origin: center;
  transition: transform 0.15s ease;
}
.edition[open] summary::before {
  transform: rotate(90deg);
}
/* remove o triângulo padrão (Chrome/Safari) */
.edition summary::-webkit-details-marker {
  display: none;
}

/* indicador discreto de estado */
.edition summary::before {
  content: "▸  ";
  display: inline-block;
  transform-origin: center;
  transition: transform 0.15s ease;
}

.edition[open] summary::before {
  transform: rotate(90deg);
}

/* texto interno */
.edition p {
  margin: 0.5rem 0 1rem;
  color: var(--muted);
  line-height: 1.5;
}

.sheets {
    padding-top: 0;
}

.artifact-desc {
    margin-bottom: 0.4rem;
}
.artifact-list {
    margin-top: 0;
}

/* --- Typography --- */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  line-height: 1.25;
  margin: 1.4rem 0 0.6rem;
  letter-spacing: -0.01em;
}
h1 {
    font-size: var(--step-3);
    margin-top: 1.6rem;
}

h2 {
    font-size: var(--step-2);
    margin-top: 1.2rem;
}

h3 {
    font-size: var(--step-1);
    margin-left: 1.2rem;
    margin-top: 0.8rem;
}
h3 a {
    color: var(--text);
    text-decoration: none;
}
h3 a:hover{
    color: var(--accent);
}
.card h3 {
    margin-top: 0;
}

h4 {
    font-size: var(--step-0);
    margin-top: 0.4rem;
    margin-left: 1.8rem;
}

.card h4{
    margin-left: 0;
}

h5 {
    font-size: var(--step-0);
    margin-top: 0.4rem;
    margin-bottom: 0rem;
}

summary h3,
summary h4{
    display: inline;
    font-size: inherit;
    font-weight: inherit;
}

p { margin: 0.9rem 0; }
small, .small { font-size: var(--step--1); color: var(--muted); }
.lede {
    font-size: var(--step-1);
    color: var(--text);
}

a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}
a:hover { text-decoration-thickness: 2px; }

code, pre, .mono {
  font-family: var(--font-mono);
  font-size: 0.95em;
}
code {
  background: rgba(230,237,243,0.06);
  border: 1px solid var(--border);
  padding: 0.08em 0.35em;
  border-radius: 8px;
}
pre {
  background: rgba(230,237,243,0.05);
  border: 1px solid var(--border);
  padding: 1rem;
  border-radius: var(--radius);
  overflow: auto;
}

.sigil {
  display: block;
  width: 100%;        /* cobre toda a largura do conteúdo */
  max-width: none;    /* remove qualquer limitação anterior */
  height: 28px;       /* altura pequena e controlada */
  margin: 0.55rem auto 0.4rem;

  object-fit: contain;
  object-position: center;

  color: var(--border-2);
  opacity: 0.85;
}

/* --- Components --- */
.card {
  background: linear-gradient(180deg, #FFFFFF, #F6F2EA);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.0rem 1.1rem;
  margin-top: 0;
}

.card.tight { padding: 0.85rem 1rem; }

.callout {
  background: rgba(31,95,191,0.06);
  border: 1px solid rgba(31,95,191,0.22);
  border-radius: var(--radius);
  padding: 1rem 1.1rem;
}

.grid {
  display: grid;
  gap: 1rem;
}
.grid.cols-2 { grid-template-columns: 1fr; }
.grid.cols-3 { grid-template-columns: 1fr; }

@media (min-width: 860px) {
  .grid.cols-2 { grid-template-columns: 1fr 1fr; }
  .grid.cols-3 { grid-template-columns: 1fr 1fr 1fr; }
}

.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  align-items: center;
  color: var(--muted);
  font-size: var(--step--1);
}
.meta-row span::before {
  content: "•";
  margin-right: 0.5rem;
  color: rgba(230,237,243,0.20);
}
.meta-row span:first-child::before { content: ""; margin-right: 0; }

.callout {
  background: rgba(110,168,254,0.07);
  border: 1px solid rgba(110,168,254,0.22);
  border-radius: var(--radius);
  padding: 1rem 1.1rem;
}
.callout .title {
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: var(--step--1);
  color: var(--text);
}
.callout p { margin: 0.6rem 0 0; }

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.55rem 0.85rem;
  border-radius: 12px;
  border: 1px solid rgba(110,168,254,0.35);
  background: rgba(110,168,254,0.10);
  color: var(--text);
  text-decoration: none;
}
.button:hover {
  background: rgba(110,168,254,0.16);
  border-color: rgba(110,168,254,0.55);
  color: var(--accent);
}

/* --- Charm entry (2e-style field block) --- */
.charm-entry {
  padding-top: 1.1rem;
}

.charm-title {
  margin: 0 0 0.6rem;
  line-height: 1.15;
}

/* Field list */
.charm-fields {
  padding-bottom: 0.6rem;
  border-bottom: 1px solid var(--border);
}

.charm-field {
  display: grid;
  grid-template-columns: max-content 1fr;
  column-gap: 0.5rem;
  align-items: baseline;

  padding: 0.15rem 0;
}

.charm-field dt,
.charm-field dd {
  margin: 0;
}

.charm-field dt strong {
  font-weight: 600;
}

/* Keep the values from looking too “bulky” */
.charm-field dd {
  color: var(--text);
}

/* Description heading */
.charm-subhead {
  margin: 0.8rem 0 0.4rem;
}

/* Paragraph rhythm */
.charm-body p {
  margin: 0.6rem 0;
  line-height: 1.55;
}

/* Optional: slightly tighter spacing on very small screens */
@media (max-width: 520px) {
  .charm-field {
    grid-template-columns: 1fr;
    row-gap: 0.1rem;
  }
}

/* --- Lists / entries --- */
.entry {
  padding: 0.9rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(230,237,243,0.04);
}
.entry + .entry { margin-top: 0.9rem; }
.entry-title {
  font-size: var(--step-1);
  margin: 0 0 0.3rem;
}
.entry-title a { color: var(--text); }
.entry-title a:hover { color: var(--accent); }
.entry-desc { color: rgba(230,237,243,0.90); margin: 0.4rem 0; }

/* --- Footer --- */
.site-footer {
  border-top: 1px solid var(--border);
  margin-top: 2rem;
  color: var(--muted);
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  align-items: center;
  justify-content: space-between;
}
