/* ============================================================
   rascunhos — styles.css (v2)
   Evolução do desenho original: mesmo ADN — Literata, papel
   quente, cinza tinta — com ritmo editorial no índice,
   navegação no fim dos posts e formulário tipográfico.
   ============================================================ */

/* Base Reset */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* Typography - Literata from Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Literata:ital,opsz,wght@0,7..72,300;0,7..72,400;0,7..72,500;0,7..72,600;0,7..72,900;1,7..72,300;1,7..72,400&display=swap');

/* Root Variables */
:root {
  --bg-color: rgb(248, 247, 245);
  --text-color: rgb(68, 66, 62);
  --heading-color: rgb(25, 25, 25);
  --faint-color: rgb(155, 152, 146);
  --hairline-color: rgb(230, 227, 221);
  --font-family: Literata, Georgia, serif;
  --font-size-body: 19px;
  --line-height-body: 1.65;
  --letter-spacing-body: 0;
}

/* Body */
body {
  font-family: var(--font-family);
  font-size: var(--font-size-body);
  font-weight: 400;
  line-height: var(--line-height-body);
  letter-spacing: var(--letter-spacing-body);
  color: var(--text-color);
  background-color: var(--bg-color);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  text-rendering: optimizeLegibility;
}

/* Main Layout - Two Columns */
.site-container {
  display: flex;
  flex: 1;
  width: 100%;
}

/* ---------- Sidebar (lombada) ---------- */
.sidebar {
  width: 168px;
  flex-shrink: 0;
  position: relative;
}

.sidebar nav {
  position: fixed;
  top: 30px;
  left: 47px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.sidebar .site-title {
  writing-mode: vertical-rl;
  text-orientation: mixed;
  font-size: 28px;
  font-weight: 900;
  letter-spacing: 0.09em;
  line-height: 1;
  text-transform: lowercase;
  color: var(--text-color);
  text-decoration: none;
  margin-top: 10px;
}

.sidebar .site-title:hover { text-decoration: underline; text-decoration-thickness: 1px; }

/* ---------- Main Content ---------- */
.main-content {
  flex: 1;
  padding: 138px 60px 100px 0;
  max-width: 1010px;
}

/* Kicker (o mais recente / mais rascunhos) */
.kicker {
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 0.18em;
  color: var(--faint-color);
  margin: 0 0 22px 0;
}

/* ---------- Featured post ---------- */
.post-featured { margin-bottom: 130px; }

.post-title-featured {
  font-size: clamp(44px, 5vw, 68px);
  font-weight: 600;
  line-height: 1.0;
  letter-spacing: -0.025em;
  color: var(--heading-color);
  margin: 0;
  text-wrap: balance;
}

.post-title-featured a { color: var(--heading-color); text-decoration: none; }
.post-title-featured a:hover {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 8px;
}

.post-excerpt-featured {
  max-width: 743px;
  margin: 26px 0 0 0;
  font-size: 21px;
  line-height: 1.62;
  text-wrap: pretty;
}

/* ---------- Standard posts ---------- */
.post-list { list-style: none; }

.post-item { margin-bottom: 110px; }

.post-title {
  font-size: 44px;
  font-weight: 600;
  line-height: 1.02;
  letter-spacing: -0.02em;
  color: var(--heading-color);
  margin: 0;
  text-wrap: balance;
}

.post-title a { color: var(--heading-color); text-decoration: none; }
.post-title a:hover {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 6px;
}

.post-excerpt {
  max-width: 743px;
  margin: 19px 0 0 0;
  text-wrap: pretty;
}

.read-more {
  color: var(--text-color);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: color 200ms ease;
}

.read-more:hover { color: var(--heading-color); }

/* ---------- Archive (mais rascunhos) ---------- */
.post-archive { margin-top: 0; }

.post-archive ul { list-style: none; margin-top: 18px; }

.post-archive a { text-decoration: none; display: block; }

.archive-item {
  display: flex;
  gap: 28px;
  align-items: baseline;
  padding: 26px 0;
  border-top: 1px solid var(--hairline-color);
  max-width: 860px;
}

.post-archive li:last-child .archive-item { border-bottom: 1px solid var(--hairline-color); }

.archive-title {
  font-size: 26px;
  font-weight: 600;
  letter-spacing: -0.015em;
  color: var(--heading-color);
  margin: 0;
  white-space: nowrap;
  transition: color 200ms ease;
}

.archive-line {
  font-style: italic;
  font-weight: 300;
  font-size: 17px;
  color: var(--faint-color);
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
  min-width: 0;
}

.post-archive a:hover .archive-title { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }

/* ---------- Pagination ---------- */
.pagination {
  margin-top: 110px;
  display: flex;
  align-items: baseline;
  gap: 22px;
  max-width: 860px;
}

.pagination a, .pagination span {
  color: var(--faint-color);
  text-decoration: none;
  font-size: 17px;
  transition: color 200ms ease;
}

.pagination a:hover { color: var(--heading-color); }

.pagination .current { color: var(--heading-color); font-weight: 500; }

.pagination .next { margin-left: auto; font-style: italic; }

/* ---------- Single Post ---------- */
.post-content { max-width: 700px; }

.post-content h1 {
  font-size: 44px;
  font-weight: 600;
  line-height: 1.02;
  letter-spacing: -0.02em;
  color: var(--heading-color);
  margin-bottom: 44px;
  text-wrap: balance;
}

.post-content p { margin-bottom: 1.5em; text-wrap: pretty; }

.post-content a {
  color: var(--heading-color);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

/* asterism — separador de secções dentro de um post */
.asterism {
  color: var(--faint-color);
  font-size: 22px;
  letter-spacing: 0.5em;
  font-weight: 400;
  margin: 44px 0;
}

/* fim do post */
.post-end {
  margin: 70px 0 0 0;
  color: var(--faint-color);
  font-size: 20px;
  letter-spacing: 0.5em;
}

/* anterior / seguinte */
.post-nav {
  margin-top: 90px;
  border-top: 1px solid var(--hairline-color);
  padding-top: 36px;
  display: flex;
  justify-content: space-between;
  gap: 40px;
  max-width: 700px;
}

.post-nav a { text-decoration: none; display: block; }
.post-nav .next-post { text-align: right; }

.post-nav-label {
  font-size: 13px;
  letter-spacing: 0.14em;
  color: var(--faint-color);
  margin: 0 0 8px 0;
  font-weight: 400;
}

.post-nav-title {
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.015em;
  color: var(--heading-color);
  margin: 0;
}

.post-nav a:hover .post-nav-title {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 5px;
}

/* convite à subscrição no fim do post */
.post-subscribe {
  margin-top: 70px;
  max-width: 700px;
  border-top: 1px solid var(--hairline-color);
  padding-top: 36px;
}

.post-subscribe p {
  margin: 0 0 18px 0;
  font-style: italic;
}

/* ---------- Formulário tipográfico (sublinhado) ---------- */
.uform {
  display: flex;
  gap: 26px;
  align-items: baseline;
  max-width: 540px;
}

.uform input[type="email"] {
  flex: 1;
  font-family: var(--font-family);
  font-size: 18px;
  font-weight: 300;
  font-style: italic;
  color: var(--heading-color);
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--text-color);
  border-radius: 0;
  padding: 6px 0;
  outline: none;
  transition: border-color 200ms ease;
}

.uform input[type="email"]::placeholder { color: var(--faint-color); font-style: italic; opacity: 1; }
.uform input[type="email"]:focus { border-bottom-color: var(--heading-color); }

.uform button {
  font-family: var(--font-family);
  font-size: 18px;
  font-weight: 500;
  color: var(--heading-color);
  background: transparent;
  border: 0;
  padding: 6px 0;
  cursor: pointer;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

.uform button:hover { text-decoration-thickness: 2px; }

/* ---------- Footer ---------- */
.site-footer {
  background-color: rgb(255, 255, 255);
  color: var(--heading-color);
  padding: 90px 60px 50px 47px;
  margin-top: 20px;
}

.footer-content { max-width: 1200px; }

.footer-title {
  font-size: clamp(56px, 12vw, 150px);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1;
  color: var(--heading-color);
  margin: 0;
}

.footer-tagline {
  font-size: clamp(19px, 2.6vw, 30px);
  font-weight: 300;
  font-style: italic;
  color: var(--text-color);
  margin: 22px 0 54px 0;
}

.footer-note { margin: 0 0 16px 0; font-size: 17px; }

.footer-bottom {
  margin-top: 80px;
  padding-top: 24px;
  border-top: 1px solid var(--hairline-color);
  display: flex;
  gap: 28px;
  font-size: 15px;
  color: var(--faint-color);
}

.footer-bottom a {
  color: var(--faint-color);
  text-decoration: none;
  transition: color 200ms ease;
}

.footer-bottom a:hover { color: var(--heading-color); }

.footer-bottom .right { margin-left: auto; }

/* ---------- Author Page ---------- */
.author-content { max-width: 700px; }

.author-content h1 {
  font-size: 44px;
  font-weight: 600;
  line-height: 1.02;
  letter-spacing: -0.02em;
  color: var(--heading-color);
  margin-bottom: 44px;
}

.author-content p { margin-bottom: 1.5em; }

.author-content a {
  color: var(--text-color);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.author-content a:hover { color: var(--heading-color); }

.author-list {
  list-style: none;
  margin: 0 0 1.5em 0;
  max-width: 660px;
}

.author-list li {
  padding: 16px 0;
  border-top: 1px solid var(--hairline-color);
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 16px;
}

.author-list li:last-child { border-bottom: 1px solid var(--hairline-color); }

.author-list .dash { color: var(--faint-color); }

/* ============================================================
   Legacy components — preserved for pages not yet migrated to
   v2 (post pages, author page, page/2.html, page/3.html). These
   still carry the hamburger icon and the floating subscribe
   button; their markup is gone from the v2 homepage, so these
   rules are inert there but keep the older pages intact.
   ============================================================ */

/* Hamburger menu button (legacy) */
.sidebar .menu-icon {
  width: 24px;
  height: 24px;
  position: relative;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sidebar .menu-icon::before,
.sidebar .menu-icon::after {
  content: '';
  position: absolute;
  left: 0;
  width: 24px;
  height: 1px;
  background-color: var(--heading-color);
}

.sidebar .menu-icon::before { top: 8px; }
.sidebar .menu-icon::after { top: 15px; }

/* Floating subscribe button (legacy) */
.subscribe-float {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 100;
}

.subscribe-float button {
  font-family: var(--font-family);
  font-size: 16px;
  font-weight: 400;
  line-height: 20.8px;
  letter-spacing: normal;
  color: var(--bg-color);
  background-color: var(--heading-color);
  padding: 15px 23px;
  border: none;
  cursor: pointer;
}

.subscribe-float button:hover { opacity: 0.9; }

.subscribe-float-link { text-decoration: none; }

/* Legacy footer subscribe form (pill style) — used by pages still on the old
   markup, where the form has no `.uform` class. The `:not(.uform)` scope keeps
   these rules off the v2 homepage footer entirely. */
.footer-subscribe { max-width: 600px; }

.footer-subscribe form:not(.uform) { display: flex; gap: 0; }

.footer-subscribe form:not(.uform) input[type="email"] {
  flex: 1;
  padding: 15px 23px;
  font-family: Arial, sans-serif;
  font-size: 16px;
  font-weight: 400;
  border: 1px solid rgb(118, 118, 118);
  border-right: none;
  border-radius: 50px 0 0 50px;
  background: rgb(255, 255, 255);
  color: rgb(0, 0, 0);
  line-height: 20.8px;
}

.footer-subscribe form:not(.uform) input[type="email"]::placeholder {
  color: rgb(0, 0, 0);
  opacity: 0.5;
}

.footer-subscribe form:not(.uform) input[type="email"]:focus {
  outline: none;
  border-color: var(--heading-color);
}

.footer-subscribe form:not(.uform) button {
  padding: 15px 23px;
  font-family: var(--font-family);
  font-size: 16px;
  font-weight: 400;
  line-height: 20.8px;
  background: var(--heading-color);
  color: var(--bg-color);
  border: 1px solid transparent;
  border-radius: 0 50px 50px 0;
  cursor: pointer;
}

.footer-subscribe form:not(.uform) button:hover { opacity: 0.9; }

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
  body { font-size: 17px; }

  .site-container { flex-direction: column; }

  .sidebar { width: 100%; }

  .sidebar nav {
    position: static;
    flex-direction: row;
    align-items: center;
    gap: 16px;
    padding: 22px 24px 0 24px;
  }

  .sidebar .site-title {
    writing-mode: horizontal-tb;
    font-size: 20px;
    font-weight: 900;
    letter-spacing: 0.07em;
    margin-top: 0;
  }

  .main-content { padding: 44px 24px 60px 24px; }

  .post-featured { margin-bottom: 64px; }
  .post-title-featured { font-size: 42px; }
  .post-excerpt-featured { font-size: 17px; }

  .post-item { margin-bottom: 64px; }
  .post-title { font-size: 30px; line-height: 1.05; }

  .archive-item {
    flex-direction: column;
    gap: 6px;
    padding: 18px 0;
  }
  .archive-title { font-size: 22px; white-space: normal; }
  .archive-line { font-size: 15px; max-width: 100%; }

  .pagination { margin-top: 70px; }

  .post-content h1 { font-size: 32px; margin-bottom: 30px; }

  .post-nav { flex-direction: column; gap: 28px; margin-top: 56px; }
  .post-nav .next-post { text-align: left; }
  .post-nav-title { font-size: 21px; }

  .post-subscribe { margin-top: 56px; }

  .uform input[type="email"], .uform button { font-size: 16px; }

  .site-footer { padding: 54px 24px 36px 24px; }
  .footer-tagline { margin: 14px 0 34px 0; }
  .footer-bottom { margin-top: 44px; flex-wrap: wrap; }

  .author-content h1 { font-size: 32px; }

  .subscribe-float { bottom: 10px; right: 10px; }
}
