/* ============================================================
   typography.css — NewConnections
   Self-hosted Source Serif 4 + three-layer reading registers.
   ============================================================ */

/* ----- 1. Font declarations ------------------------------- */

@font-face {
  font-family: 'Source Serif 4';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/assets/fonts/source-serif-4-regular.woff2') format('woff2');
}

@font-face {
  font-family: 'Source Serif 4';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url('/assets/fonts/source-serif-4-italic.woff2') format('woff2');
}

@font-face {
  font-family: 'Source Serif 4';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/assets/fonts/source-serif-4-semibold.woff2') format('woff2');
}

/* ----- 2. Root tokens -------------------------------------- */

:root {
  /* Type family */
  --font-body: 'Source Serif 4', Georgia, 'Times New Roman', serif;

  /* Palette — layer backgrounds */
  --color-bg-surface: #FCFBF7;
  --color-bg-middle: #F7F4EC;
  --color-bg-depth: #F0EBDF;

  /* Body text colors */
  --color-text: #1A1A1A;
  --color-text-soft: #6B6863;

  /* Accent — primary and softened-for-depth */
  --color-accent: #B89968;
  --color-accent-depth: #A28857;

  /* Reading measure (currently unused but reserved) */
  --measure: 65ch;
}

/* ----- 3. Base reset (minimal) ----------------------------- */

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  color: var(--color-text);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* ----- 4. Layer registers ---------------------------------- */
/*
   Each layer of the site has its own typographic register.
   The class is applied to <body> via the layout templates.
   The texture difference between layers is felt but never announced.
*/

body.layer-surface {
  font-size: 17px;
  line-height: 1.55;
  background: var(--color-bg-surface);
}

body.layer-middle {
  font-size: 19px;
  line-height: 1.6;
  background: var(--color-bg-middle);
}

body.layer-depth {
  font-size: 20px;
  line-height: 2.0;
  background: var(--color-bg-depth);
}

/* Per-layer paragraph rhythm: depth pages breathe more between
   paragraphs. Surface and middle keep tighter rhythm. */
body.layer-surface p { margin-bottom: 1em; }
body.layer-middle p { margin-bottom: 1.1em; }
body.layer-depth p {
  margin-bottom: 1.4em;
  }

/* ----- 5. Type scale --------------------------------------- */

h1 {
  font-weight: 600;
  margin: 0 0 0.8em;
  line-height: 1.25;
}

h2 {
  font-weight: 600;
  margin: 2.4em 0 0.6em;
  line-height: 1.3;
}

h3 {
  font-weight: 600;
  margin: 2em 0 0.5em;
  line-height: 1.35;
}

h1 { font-size: 1.6em; }
h2 { font-size: 1.3em; }
h3 { font-size: 1.1em; }

p {
  margin: 0 0 1em;
  max-width: var(--measure);
}

/* ----- 6. Bridge sentences --------------------------------- */
/*
   Italic-with-arrow register. Reserved exclusively for:
   - descent (↓)
   - institutional contact (→)
   - future editorial cross-reference (→)
*/

.bridge {
  font-style: italic;
  font-size: 0.875em;
  color: var(--color-text-soft);
  margin-top: 6em;
  max-width: var(--measure);
}

.bridge a {
  color: var(--color-accent);
  text-decoration: none;
  margin-left: 0.5em;
}

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

/* ----- Writing layer index page --------------------------- */
/*
   The /escritos/ index is not a piece of writing; it is a list.
   Its heading reads as a layer label, its entries read as index
   entries (not as repetitions of the piece h1s the reader will
   see when they click through).
*/

.writing-index {
  list-style: none;
  padding: 0;
  margin: 2em 0 0;
}

.writing-index li {
  margin-bottom: 1.4em;
  line-height: 1.4;
}

.writing-index a {
  color: var(--color-text);
  text-decoration: none;
  font-weight: 400;
  font-size: 1em;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease;
}

.writing-index a:hover {
  border-bottom-color: var(--color-text-soft);
}

.writing-date {
  display: block;
  font-size: 0.8em;
  color: var(--color-text-soft);
  margin-top: 0.2em;
  font-style: italic;
}

.layer-heading {
  font-size: 1.4em;
  font-weight: 500;
  letter-spacing: 0.02em;
  margin-bottom: 1.2em;
}
/* ----- Return-to-top affordance --------------------------- */
/*
   Bottom-of-page exit on writing-layer pieces. Same italic-arrow
   grammar as the bridge sentences, but a fuller wording — this
   is the deliberate exit at the end of a long read, not the
   casual upper-right one.
*/

.return-to-top {
  font-style: italic;
  font-size: 0.875em;
  color: var(--color-text-soft);
  margin-top: 1.2em;
  text-align: left;
}

.return-to-top a {
  color: var(--color-accent);
  text-decoration: none;
}

.return-to-top a:hover {
  text-decoration: underline;
}
html {
  scroll-behavior: smooth;
}

/* ----- Library footer ------------------------------------- */
/*
   The small set of available exits at the foot of every content
   page. Quiet, label-based, non-directive. Same position and form
   on every page; contents adapt to context.
*/

.library-footer {
  font-size: 0.875em;
  color: var(--color-text-soft);
  margin-top: 6em;
  text-align: left;
  letter-spacing: 0.01em;
}

.library-footer a {
  color: var(--color-accent);
  text-decoration: none;
  padding: 0 0.1em;
}

.library-footer a:hover {
  text-decoration: underline;
}

.library-footer-divider {
  color: var(--color-text-soft);
  margin: 0 0.3em;
  opacity: 0.5;
}

/* ----- Related-piece block -------------------------------- */
/*
   A small panel at the foot of a page (above the library footer)
   that names a related piece — typically an escrito that
   develops the topic in depth. Topic pages point to escritos;
   escritos do not point back. The architecture is descent.
*/

.related-piece {
  margin-top: 4em;
  padding: 1.25em 1.5em 1.4em;
  background: rgba(184, 153, 104, 0.06);
  border-left: 2px solid var(--color-accent);
  max-width: var(--measure);
}

.related-intro {
  font-size: 0.60em;
  font-style: normal;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text-soft);
  margin: 0 0 0.10em;
}

.related-title {
  margin: 0;
  font-size: 0.85em;
  line-height: 1.4;
}

.related-title a {
  color: var(--color-text);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease;
}

.related-title a:hover {
  color: var(--color-accent);
  border-bottom-color: var(--color-accent);
}
/* ----- Topics index page ---------------------------------- */
/*
   The /temas/ index. Entries are title + lede.
   Topics aren't dated; the alphabetical sort and the absence
   of a date treatment signal "these are standing descriptions
   of situations, not a timeline of publications."
*/

.topic-index {
  list-style: none;
  padding: 0;
  margin: 2em 0 0;
}

.topic-index li {
  margin-bottom: 1.8em;
}

.topic-index a {
  color: var(--color-text);
  text-decoration: none;
  font-weight: 500;
  font-size: 1.05em;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease;
}

.topic-index a:hover {
  border-bottom-color: var(--color-text-soft);
}

.topic-lede {
  font-size: 0.875em;
  color: var(--color-text-soft);
  line-height: 1.5;
  margin: 0.4em 0 0;
  font-style: italic;
  max-width: var(--measure);
}
/* ----- Index page intros ---------------------------------- */
/*
   The introductory paragraph at the top of an index page (Temas
   or Escritos). Distinct from body prose because it is meta-prose
   — naming what the page is, not developing an argument. The
   reader's eye should recognize "this is orientation, the list
   below is content" before reading either.

   Distinct via two signals: a narrower column than body measure,
   and a slightly smaller body size. Same color and weight — the
   intro is meaningful and worth reading, just operating in a
   different register.
*/

.index-intro {
  max-width: 28em;
  font-size: 0.875em;
  line-height: 1.55;
  margin-bottom: 3em;
}
/* ----- Home page ------------------------------------------ */
/*
   The home is the facade: large centered wordmark, wide intro
   prose, then Temas and Escritos side-by-side as evidence of
   what is inside.
*/

.home {
  max-width: 44rem;
  margin: 0 auto;
  padding: 2.5rem 2rem 2rem;
}

.home-wordmark {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 2.8em;
  font-variant: small-caps;
  letter-spacing: 0.06em;
  color: var(--color-text);
  text-align: center;
  margin: 0 0 3rem;
  line-height: 1.1;
}

.home-intro {
  margin: 0 auto 4em;
  max-width: 36em;
 }

.home-intro p {
  font-size: 1em;
  line-height: 1.6;
  margin-bottom: 1.2em;
}

.home-sections {
  max-width: 36em;
  margin: 0 auto 3rem;
}

.home-section {
  margin-bottom: 4em;
}

.home-section:last-child {
  margin-bottom: 0;
}

.home-section-heading {
  font-size: 0.7em;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-text-soft);
  margin: 0 0 1.2em;
}

.home-section-heading a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease;
  padding-bottom: 0.1em;
}

.home-section-heading a:hover {
  border-bottom-color: var(--color-text-soft);
}

.home-section-arrow {
  color: var(--color-accent);
  margin-left: 0.1em;
  font-weight: 400;
}

.home-section-practica {
  margin-top: 1em;
}

.home-section-practica a {
  color: var(--color-text);
  text-decoration: none;
  font-style: italic;
  font-size: 0.95em;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease;
}

.home-section-practica a:hover {
  border-bottom-color: var(--color-text-soft);
}


.home-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.home-list li {
  margin-bottom: 1.6em;
}

.home-list a {
  color: var(--color-text);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95em;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease;
}

.home-list a:hover {
  border-bottom-color: var(--color-text-soft);
}

.home-lede,
.home-date {
  font-size: 0.85em;
  color: var(--color-text-soft);
  line-height: 1.5;
  margin: 0.3em 0 0;
  font-style: italic;
  max-width: 30em;
}

/* Hide the upper-left header wordmark on the home —
   redundant with the large centered wordmark below. */
body.layer-surface .site-header .mark-wordmark {
  visibility: hidden;
}

/* Two-column home → single column on narrow viewports */
@media (max-width: 48rem) {
	
	/* Step body type down on small screens. The desktop reading
     sizes (17/19/20) are calibrated against wide columns; on a
     phone they run large with too few words per line. */
  body.layer-surface { font-size: 15px; }
  body.layer-middle  { font-size: 16px; }
  body.layer-depth   { font-size: 16px; line-height: 1.7; }

  /* ...existing .home and .home-wordmark rules stay as they are... */
	
  .home {
    padding: 3rem 1.5rem 1.5rem;
  }

  .home-wordmark {
    font-size: 2em;
    margin-bottom: 2rem;
  }

}
/* ----- Site footer ---------------------------------------- */
/*
   The page-closer. Quiet, soft color, low presence. Signals
   "this page has ended" without saying it. Locates NC
   geographically as a small piece of editorial work.
*/

.site-footer {
  width: 100vw;
  position: relative;
  left: 50%;
  transform: translateX(-50%);
  margin-top: 6em;
  padding: 2em 2rem 3em;
  text-align: center;
  font-size: 0.75em;
  color: var(--color-text-soft);
  letter-spacing: 0.04em;
}

.site-footer p {
  max-width: none;
  margin: 0 auto;
}

.site-footer-contacto {
  margin-bottom: 1.2em;
  font-style: normal;
}

.site-footer-contacto a {
  color: var(--color-accent);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease;
}

.site-footer-contacto a:hover {
  border-bottom-color: var(--color-accent);
}

.site-footer-identity {
  font-style: italic;
}

@media (max-width: 48rem) {
  .site-footer {
    margin-top: 4em;
    padding: 1.5em 1.5rem 2em;
  }
}
/* ----- Contact page email --------------------------------- */
/*
   The email link on /contacto/ — the page's primary affordance.
   Larger than body type, in the accent color, sitting alone
   below the prose. Reads as "this is where you click to write."
*/

.contact-email {
  margin: 3em 0 2em;
  font-size: 1.05em;
  text-align: left;
}

.contact-email a {
  color: var(--color-accent);
  text-decoration: none;
  border-bottom: 1px solid var(--color-accent);
  padding-bottom: 0.15em;
  transition: opacity 0.2s ease;
}

.contact-email a:hover {
  opacity: 0.75;
}
/* ----- Spine links ---------------------------------------- */
/*
   Links between the hub (La práctica) and the framework
   (Nuestra mirada). Quiet, in the editorial italic-arrow
   register, but distinct from the bridge/library-footer system.
*/

.spine-link {
  font-style: italic;
  font-size: 0.9em;
  margin-top: 3em;
}

.spine-link a {
  color: var(--color-accent);
  text-decoration: none;
}

.spine-link a:hover {
  text-decoration: underline;
}

/* ----- Empty Note for the Situations page ---------------------------------------- */


.index-empty {
  font-size: 0.9em;
  color: var(--color-text-soft);
  margin-top: 2em;
}

/* ============================================================
   Mobile calibration
   Fires at the same breakpoint as layout.css (48rem / 768px).
   Handles spacing, type scale, and component rhythm.
   The grid collapse itself is handled in layout.css.
   ============================================================ */

@media (max-width: 48rem) {

  /* ----- Layer registers ---------------------------------- */
  /* Reduce vertical page padding on all layers.
     The desktop values (5rem, 7rem) are too tall on a phone. */
  body.layer-surface .page,
  body.layer-surface .page-centered { --page-padding-y: 2rem; }
  body.layer-middle .page,
  body.layer-middle .page-centered  { --page-padding-y: 2.5rem; }
  body.layer-depth .page,
  body.layer-depth .page-centered   { --page-padding-y: 3.5rem; }

  

  /* ----- Type scale --------------------------------------- */
  h1 { font-size: 1.35em; }
  h2 { font-size: 1.2em;  }
  h3 { font-size: 1.05em; }

  /* ----- Bridge sentences --------------------------------- */
  /* Desktop top margin (6em) is excessive on a short screen. */
  .bridge {
    margin-top: 3.5rem;
  }

  /* ----- Library footer ----------------------------------- */
  .library-footer {
    margin-top: 3.5rem;
  }

  /* ----- Related-piece block ------------------------------ */
  .related-piece {
    margin-top: 2.5rem;
    padding: 1em 1.2em 1.2em;
  }

  /* ----- Writing index ------------------------------------ */
  /* The flex row (title + date side by side) breaks on narrow
     screens when titles are long. Stack title above date. */
  .writing-index li {
    flex-direction: column;
    gap: 0.2em;
  }

  .writing-date {
    font-size: 0.75em;
  }

  /* ----- Home page ---------------------------------------- */
  /* .home has its own padding outside the grid system. */
  .home {
    padding: 2rem 1.25rem 1.5rem;
  }

  .home-wordmark {
    font-size: 1.75em;
    margin-bottom: 1.75rem;
  }

  .home-intro {
    margin-bottom: 2.5em;
  }

  .home-section {
    margin-bottom: 2.5em;
  }

  /* ----- Site footer -------------------------------------- */
  /* Already has a mobile block — these values are already there.
     No change needed. */

}

/* ----- Private contact (Voice page) ----------------------- */
/*
   The personal contact path at the foot of the Voice page. Set
   apart from the prose — italic, accent colour — for the reader
   who has descended this far and wants to write to the person,
   not the firm. No form; they write.
*/

.private-contact {
  margin-top: 3em;
  font-style: italic;
  color: var(--color-text-soft);
}

.private-contact a {
  color: var(--color-accent);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease;
}

.private-contact a:hover {
  border-bottom-color: var(--color-accent);
}

/* ----- Voice index entries -------------------------------- */
.voice-entry {
  margin-top: 1.5em;
  font-size: 1.05em;
}

.voice-entry a {
  color: var(--color-text);
  text-decoration: none;
  border-bottom: 1px solid var(--color-accent);
  padding-bottom: 0.1em;
  transition: color 0.2s ease;
}

.voice-entry a:hover {
  color: var(--color-accent);
}
/* ----- Library footer: Contacto, set apart ---------------- */
/*
   Contacto is an action, not a content section, so it sits on
   its own line, separated from the content exits above it, and
   pushed down toward the page foot.
*/

.library-contacto {
  margin-top: 3em;
  font-size: 0.875em;
}

.library-contacto a {
  color: var(--color-accent);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease;
}

.library-contacto a:hover {
  border-bottom-color: var(--color-accent);
}