/* glaucio.me
   Papel frio, tinta azul, uma única família tipográfica (Spectral).
   Dois gestos: a linha do tempo das fases na home e as notas na margem nos poemas. */

@font-face { font-family: "Spectral"; font-style: normal; font-weight: 200; font-display: swap; src: url(/fonts/spectral-latin-200-normal.woff2) format("woff2"); }
@font-face { font-family: "Spectral"; font-style: italic; font-weight: 200; font-display: swap; src: url(/fonts/spectral-latin-200-italic.woff2) format("woff2"); }
@font-face { font-family: "Spectral"; font-style: normal; font-weight: 400; font-display: swap; src: url(/fonts/spectral-latin-400-normal.woff2) format("woff2"); }
@font-face { font-family: "Spectral"; font-style: italic; font-weight: 400; font-display: swap; src: url(/fonts/spectral-latin-400-italic.woff2) format("woff2"); }

:root {
  --paper: #f5f6f4;
  --ink: #1b1f2a;
  --muted: #5f6678;
  --rule: #d9dde2;
  --dots: #aeb4bf;
  --accent: #2b3fa0;

  --serif: "Spectral", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;

  --gutter: 5.5rem;   /* coluna dos numerais romanos */
  --margin: 11rem;    /* coluna das notas na margem (página do poema) */
  --gap: 2.5rem;

  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #0f1218;
    --ink: #e7e9ee;
    --muted: #9aa2b5;
    --rule: #262b36;
    --dots: #454c5d;
    --accent: #8ea2ff;
  }
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.1875rem;
  line-height: 1.65;
  font-kerning: normal;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--accent); color: var(--paper); }

a { color: inherit; text-decoration: none; }
a:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }

.wrap {
  width: 100%;
  max-width: 66rem;
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 5vw, 3rem);
}

.sr {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip {
  position: absolute; left: 1rem; top: -4rem; z-index: 10;
  background: var(--ink); color: var(--paper); padding: .5rem .9rem;
}
.skip:focus { top: 1rem; }

/* ---------------------------------------------------------------- cabeçalho */

.site-header {
  display: flex;
  align-items: baseline;
  gap: 2rem;
  padding-block: 1.75rem;
}

.brand { font-size: 1.5rem; line-height: 1; margin-right: auto; }

.nav { display: flex; gap: 1.75rem; font-size: 1.05rem; }
.nav a { color: var(--muted); transition: color .15s; }
.nav a:hover { color: var(--ink); }

.lang-switch { font-style: italic; font-size: 1.05rem; color: var(--muted); white-space: nowrap; }
.lang-switch [aria-current] { color: var(--ink); }
.lang-switch a { transition: color .15s; }
.lang-switch a:hover { color: var(--accent); }
.sep { margin-inline: .45em; color: var(--dots); }

@media (max-width: 560px) {
  .site-header { flex-wrap: wrap; row-gap: .9rem; gap: 1rem; }
  .nav { order: 3; width: 100%; }
}

/* ---------------------------------------------------------------- home */

.hero {
  max-width: 46rem;
  padding-top: clamp(3rem, 9vw, 7rem);
}

.hero h1 {
  margin: 0 0 1.75rem;
  font-weight: 200;
  font-size: clamp(2.9rem, 8.5vw, 5.75rem);
  line-height: 1.02;
  letter-spacing: -.015em;
  text-wrap: balance;
}

.bio { max-width: 34rem; margin: 0 0 1rem; font-size: 1.3rem; line-height: 1.6; }
.note { margin: 0; font-style: italic; color: var(--muted); font-size: 1rem; }

/* A linha do tempo: uma régua contínua liga as fases, do primeiro verso ao amor de agora. */
.phases {
  position: relative;
  margin-top: clamp(3rem, 8vw, 5.5rem);
  padding-bottom: 2rem;
}

.phases::before {
  content: "";
  position: absolute; top: 0; bottom: 0; left: var(--gutter);
  width: 1px; background: var(--rule);
}

.phase {
  display: grid;
  grid-template-columns: var(--gutter) 15rem minmax(0, 1fr);
  padding-block: clamp(2rem, 5vw, 3.25rem);
}

.numeral {
  position: relative;
  padding-right: 1.25rem;
  text-align: right;
  font-style: italic;
  font-weight: 200;
  font-size: 2.6rem;
  line-height: 1;
  color: var(--accent);
}

.numeral::after {
  content: "";
  position: absolute; right: -3.5px; top: calc(1.3rem - 3.5px);
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent);
}

.phase-head { padding-inline: 2.25rem 2rem; }

.phase-head h2 {
  margin: 0 0 .3rem;
  font-weight: 400;
  font-size: 1.7rem;
  line-height: 1.2;
}

.years { margin: 0; font-style: italic; color: var(--muted); font-size: 1rem; }
.tagline { margin: .9rem 0 0; color: var(--muted); font-size: 1rem; line-height: 1.5; }

.toc { list-style: none; margin: 0; padding: 0; align-self: start; }

.toc a { display: flex; align-items: baseline; padding-block: .5rem; }
.toc .t { font-size: 1.3rem; line-height: 1.35; transition: color .15s; }
.toc a:hover .t { color: var(--accent); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .2em; }

.leader {
  flex: 1; min-width: 1.5rem; margin-inline: .7rem;
  border-bottom: 1px dotted var(--dots);
  position: relative; top: -.2em;
}

.m { font-size: .95rem; font-style: italic; color: var(--muted); white-space: nowrap; }
.langs { display: inline-block; min-width: 3.4em; margin-right: .5rem; text-align: right; }

@media (max-width: 560px) {
  .toc a { flex-wrap: wrap; padding-block: .55rem; }
  .toc .t { flex-basis: 100%; }
  .leader { display: none; }
  .m { flex-basis: 100%; font-size: .88rem; line-height: 1.3; }
  .langs { min-width: 0; margin-right: .6rem; text-align: left; }
}

.empty { margin: 0; align-self: start; padding-top: .45rem; font-style: italic; color: var(--muted); }

@media (max-width: 820px) {
  :root { --gutter: 3.5rem; }
  .phase { grid-template-columns: var(--gutter) minmax(0, 1fr); }
  .numeral { font-size: 1.9rem; padding-right: .85rem; }
  .numeral::after { top: calc(.95rem - 3.5px); }
  .phase-head { padding-inline: 1.4rem 0; }
  .toc, .empty { grid-column: 2; padding-left: 1.4rem; margin-top: 1rem; }
}

/* ---------------------------------------------------------------- folha (poema / sobre) */

.sheet {
  display: grid;
  grid-template-columns: var(--margin) minmax(0, 35rem);
  column-gap: var(--gap);
  padding-top: clamp(2.5rem, 8vw, 6rem);
}

.sheet-head { grid-column: 2; grid-row: 1; }

.sheet-head h1 {
  margin: 0 0 clamp(1.75rem, 4vw, 2.75rem);
  font-weight: 200;
  font-size: clamp(2.5rem, 6.5vw, 3.9rem);
  line-height: 1.08;
  letter-spacing: -.01em;
  text-wrap: balance;
}

/* Nota na margem: fase, data, idioma — ao lado do primeiro verso. */
.sheet-meta {
  grid-column: 1; grid-row: 2; align-self: start;
  padding-top: .4rem;
  font-size: .95rem; line-height: 1.5; color: var(--muted);
}
.sheet-meta p { margin: 0 0 .8rem; }
.sheet-meta a { text-decoration: underline; text-decoration-color: var(--dots); text-decoration-thickness: 1px; text-underline-offset: .22em; transition: color .15s, text-decoration-color .15s; }
.sheet-meta a:hover { color: var(--accent); text-decoration-color: var(--accent); }
.sheet-meta time { font-style: italic; }

.sheet-body { grid-column: 2; grid-row: 2; }

.poem-body { font-size: 1.3rem; line-height: 1.75; hyphens: none; -webkit-hyphens: none; }
.stanza { margin: 0 0 1.9em; }
.line { display: block; padding-left: 2em; text-indent: -2em; }

.prose { max-width: 34rem; font-size: 1.3rem; line-height: 1.7; }
.prose p { margin: 0 0 1.2em; }
.prose a { text-decoration: underline; text-decoration-color: var(--dots); text-decoration-thickness: 1px; text-underline-offset: .22em; }
.prose a:hover { color: var(--accent); text-decoration-color: var(--accent); }

/* Um único movimento na página inteira: as estrofes aparecem na ordem em que são lidas. */
@media (prefers-reduced-motion: no-preference) {
  .poem-body .stanza {
    animation: read .9s cubic-bezier(.2, .6, .2, 1) both;
    animation-delay: calc(min(var(--i, 0), 8) * 140ms + 120ms);
  }
  @keyframes read { from { opacity: 0; } to { opacity: 1; } }
}

.pager {
  display: grid; grid-template-columns: 1fr 1fr; gap: 2rem;
  max-width: 35rem;
  margin: clamp(3rem, 7vw, 5rem) 0 0 calc(var(--margin) + var(--gap));
  padding-top: 1.5rem;
  border-top: 1px solid var(--rule);
}
.pager a { display: flex; flex-direction: column; }
.pager .prev { grid-column: 1; }
.pager .next { grid-column: 2; align-items: flex-end; text-align: right; }
.pager .dir { font-style: italic; color: var(--muted); font-size: .95rem; }
.pager .pt { font-size: 1.2rem; transition: color .15s; }
.pager a:hover .pt { color: var(--accent); }

@media (max-width: 860px) {
  .sheet { display: block; }
  .sheet-meta { margin-bottom: 2.25rem; padding-top: 0; }
  .sheet-meta p { margin-bottom: .25rem; }
  .pager { margin-left: 0; }
}

/* ---------------------------------------------------------------- rodapé e raiz */

.site-footer { padding-block: 4rem 3rem; color: var(--muted); font-size: .9rem; }
.site-footer p { margin: 0; display: flex; flex-wrap: wrap; gap: .25rem 1.5rem; }
.site-footer a { text-decoration: underline; text-decoration-color: var(--dots); text-decoration-thickness: 1px; text-underline-offset: .22em; transition: color .15s; }
.site-footer a:hover { color: var(--accent); }

.root { padding-top: 22vh; }
.root h1 { margin: 0 0 1rem; font-weight: 200; font-size: clamp(3rem, 10vw, 5rem); line-height: 1; }
.root p { font-size: 1.3rem; font-style: italic; }
.root a { text-decoration: underline; text-decoration-color: var(--dots); text-underline-offset: .22em; }

@media print {
  .site-header, .site-footer, .pager, .skip { display: none; }
  body { background: #fff; color: #000; }
  .sheet { display: block; padding-top: 0; }
  .sheet-meta { color: #444; margin-bottom: 1.5rem; }
  .poem-body .stanza { animation: none !important; }
}
