/* Vértice España: calm, white, quiet editorial.
   No cards, no boxes, no borders, no shadows. Separation comes from whitespace and
   a single hairline <hr class="rule"> (a 1px background strip, never a CSS border). */

:root {
  color-scheme: light;

  --paper: #ffffff;
  --ink: #1d2833;
  --text: #2e3945;
  --muted: #68737f;
  --hairline: #e5e8eb;
  --wash: #f4f5f6;

  --slate: #2c3e50;
  --bronze: #8c6d46;
  --sage: #5f7a61;

  --font-serif: "Fraunces", Georgia, "Times New Roman", serif;
  --font-sans: "Source Sans 3", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --column: 40rem;
  --gutter: clamp(1.25rem, 5.5vw, 2rem);

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --duration-fast: 180ms;
  --duration-reader: 460ms;

  --accent: var(--slate);
}

.sec-politica { --accent: var(--slate); }
.sec-finanzas { --accent: var(--bronze); }
.sec-deportes { --accent: var(--sage); }

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--text);
  font-family: var(--font-sans);
  font-weight: 300;
  font-size: 1rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.is-reading { overflow: hidden; }

h1, h2, h3, p, ul, figure { margin: 0; padding: 0; }
ul { list-style: none; }

img { display: block; max-width: 100%; height: auto; }

a { color: inherit; text-decoration: none; }

button {
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

/* Keyboard focus is shown as a thick underline, never a box, so the page stays boxless
   while remaining fully operable without a pointer. */
:focus-visible {
  outline: none;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 0.35em;
  text-decoration-color: var(--accent);
}

/* One centered reading column for everything on the page. */
main,
.footer {
  width: 100%;
  max-width: calc(var(--column) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.rule {
  display: block;
  height: 1px;
  margin: 0;
  border: 0;
  background: var(--hairline);
}

/* ---------- Masthead ---------- */

.masthead {
  padding-top: max(clamp(3.5rem, 11vw, 6rem), env(safe-area-inset-top));
}

.wordmark {
  font-family: var(--font-serif);
  font-weight: 300;
  font-size: clamp(3.6rem, 2.2rem + 9vw, 6rem);
  line-height: 1;
  letter-spacing: 0.012em;
  color: var(--slate);
}

.wm-line { display: block; }

.wm-line-2 {
  margin-top: 0.06em;
  padding-left: 0.95em;
  font-style: italic;
  font-weight: 300;
}

.tagline {
  margin-top: clamp(1.6rem, 4vw, 2.2rem);
  max-width: 26rem;
  font-size: 1.05rem;
  font-weight: 300;
  line-height: 1.75;
  letter-spacing: 0.045em;
  color: var(--muted);
}

.index {
  margin-top: clamp(2.4rem, 6vw, 3.4rem);
}

.index ul {
  display: grid;
  gap: 0.35rem;
}

.index-link {
  display: inline-flex;
  align-items: baseline;
  gap: 1rem;
  padding-block: 0.3rem;
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: 400;
  letter-spacing: 0.02em;
  color: var(--ink);
  transition: color var(--duration-fast) ease;
}

.index-num {
  min-width: 1.6rem;
  font-style: italic;
  font-size: 0.95rem;
  letter-spacing: 0.06em;
  color: var(--accent);
  transition: transform var(--duration-fast) var(--ease-out);
}

.index-link:hover { color: var(--accent); }
.index-link:hover .index-num { transform: translateX(3px); }

/* ---------- Sections ---------- */

.section {
  padding-top: clamp(4.5rem, 13vw, 7.5rem);
  scroll-margin-top: 1rem;
}

.section-label {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  margin-bottom: clamp(1.8rem, 5vw, 2.6rem);
  font-family: var(--font-sans);
  font-size: 0.74rem;
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--accent);
}

.section-num {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1rem;
  font-weight: 400;
  letter-spacing: 0.06em;
  text-transform: none;
  opacity: 0.75;
}

/* ---------- Stories ---------- */

.story { cursor: pointer; }

.preview {
  color: var(--text);
  font-weight: 340;
  overflow-wrap: break-word;
}

.accent {
  color: var(--accent);
  font-weight: 600;
}

.more {
  display: inline-flex;
  align-items: baseline;
  gap: 0.4em;
  margin-top: 1.15rem;
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  color: var(--accent);
}

.arrow {
  display: inline-block;
  opacity: 0.7;
  transition: transform var(--duration-fast) var(--ease-out);
}

.story:hover .arrow,
.more:focus-visible .arrow { transform: translateX(4px); }

/* Hero: one per section, large type and soft, generously rounded image. */

.story-hero { padding-bottom: clamp(2.6rem, 7vw, 3.6rem); }

.hero-media {
  margin-bottom: clamp(1.5rem, 4vw, 2rem);
  border-radius: 1.75rem;
  overflow: hidden;
  background: var(--wash);
  aspect-ratio: 3 / 2;
}

.hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 900ms var(--ease-out);
}

@media (hover: hover) {
  .story-hero:hover .hero-img { transform: scale(1.025); }
}

.hero-title {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: clamp(1.9rem, 1.3rem + 2.6vw, 2.65rem);
  line-height: 1.22;
  letter-spacing: 0.008em;
  text-wrap: balance;
  color: var(--ink);
  transition: color var(--duration-fast) ease;
}

.story-hero:hover .hero-title { color: var(--accent); }

.story-hero .preview {
  margin-top: 1.25rem;
  font-size: 1.125rem;
  line-height: 1.75;
}

/* List stories: calmer, denser, flush square thumbnails. */

.story-item { padding-block: clamp(2rem, 5.5vw, 2.6rem); }

.item-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 6.75rem;
  gap: 1.5rem;
  align-items: start;
}

.item-title {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 1.3rem;
  line-height: 1.34;
  letter-spacing: 0.01em;
  overflow-wrap: break-word;
  color: var(--ink);
  transition: color var(--duration-fast) ease;
}

.story-item:hover .item-title { color: var(--accent); }

.thumb {
  width: 6.75rem;
  height: 4.75rem;
  margin-top: 0.3rem;
  object-fit: cover;
  border-radius: 0;
  background: var(--wash);
}

.story-item .preview {
  margin-top: 1rem;
  font-size: 0.975rem;
  line-height: 1.7;
}

.story-item .more { margin-top: 0.9rem; font-size: 0.9rem; }

@media (max-width: 26rem) {
  .item-head { grid-template-columns: minmax(0, 1fr) 4.75rem; gap: 1rem; }
  .thumb { width: 4.75rem; height: 4.75rem; }
  .item-title { font-size: 1.16rem; }
}

/* ---------- Footer ---------- */

.rule-footer {
  max-width: calc(var(--column) + var(--gutter) * 2);
  margin: clamp(4.5rem, 12vw, 7rem) auto 0;
  width: calc(100% - var(--gutter) * 2);
}

.footer {
  padding-block: 2.2rem max(3.2rem, env(safe-area-inset-bottom));
}

.footer-name {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: 400;
  letter-spacing: 0.03em;
  color: var(--slate);
}

.footer-mail {
  margin-top: 0.35rem;
  font-size: 0.92rem;
  letter-spacing: 0.02em;
  color: var(--muted);
}

.footer-mail a { transition: color var(--duration-fast) ease; }
.footer-mail a:hover { color: var(--slate); }

/* ---------- Reader overlay ---------- */

.reader {
  position: fixed;
  inset: 0;
  z-index: 10;
  background: var(--paper);
  visibility: hidden;
  opacity: 0;
  transform: translateY(28px);
  transition:
    opacity 320ms ease,
    transform var(--duration-reader) var(--ease-out),
    visibility 0s linear var(--duration-reader);
}

.reader.is-open {
  visibility: visible;
  opacity: 1;
  transform: none;
  transition:
    opacity 320ms ease,
    transform var(--duration-reader) var(--ease-out),
    visibility 0s;
}

.reader-scroll {
  height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.reader-bar {
  position: sticky;
  top: 0;
  z-index: 1;
  padding: max(1rem, env(safe-area-inset-top)) var(--gutter) 1.6rem;
  background: linear-gradient(var(--paper) 62%, rgba(255, 255, 255, 0));
}

.reader-bar,
.reader-col {
  width: 100%;
  max-width: calc(var(--column) + var(--gutter) * 2);
  margin-inline: auto;
}

.reader-back {
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--muted);
  transition: color var(--duration-fast) ease;
}

.reader-back:hover { color: var(--accent); }

.reader-col {
  padding: 0.6rem var(--gutter) max(4.5rem, env(safe-area-inset-bottom));
}

.reader-kicker {
  margin-bottom: 1.4rem;
  font-size: 0.74rem;
  font-weight: 500;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--accent);
}

.reader-title {
  font-family: var(--font-serif);
  font-weight: 650;
  font-size: clamp(1.9rem, 1.35rem + 2.7vw, 2.7rem);
  line-height: 1.24;
  letter-spacing: 0.008em;
  text-wrap: balance;
  color: var(--ink);
}

.reader-media {
  margin-block: clamp(1.8rem, 5vw, 2.6rem);
  border-radius: 1.75rem;
  overflow: hidden;
  background: var(--wash);
}

.reader-media img { width: 100%; height: auto; }

.reader-body p {
  margin-bottom: 1.5rem;
  font-size: 1.125rem;
  font-weight: 350;
  line-height: 1.82;
  color: var(--text);
  overflow-wrap: break-word;
}

/* Editorial drop cap on the first paragraph. */
.reader-body p:first-child::first-letter {
  float: left;
  margin: 0.06em 0.1em 0 -0.02em;
  font-family: var(--font-serif);
  font-size: 4.6em;
  font-weight: 500;
  line-height: 0.74;
  color: var(--accent);
}

.reader-back-end {
  display: block;
  margin-top: 2.6rem;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reader,
  .reader.is-open { transition: none; transform: none; }
  .hero-img,
  .arrow,
  .index-num { transition: none; }
}
