@font-face { font-family: 'Cormorant'; src: url('/fonts/cormorant-normal.woff2') format('woff2'); font-weight: 500 700; font-style: normal; font-display: swap; }
@font-face { font-family: 'Cormorant'; src: url('/fonts/cormorant-italic.woff2') format('woff2'); font-weight: 500 700; font-style: italic; font-display: swap; }
@font-face { font-family: 'Inter'; src: url('/fonts/inter-normal.woff2') format('woff2'); font-weight: 400 700; font-style: normal; font-display: swap; }

:root {
  --field: #0E0D0C;
  --paper: #F6F1EA;
  --sand: #E9DFD2;
  --ink: #141210;
  --soft: #55514C;
  --gold: #B8933F;
  --m: clamp(16px, 2.2vw, 32px);
  --pad: clamp(20px, 5.2vw, 84px);
  --gap: clamp(24px, 4vw, 64px);
  --xl: clamp(56px, 10.6vw, 168px);
  --l: clamp(36px, 4.4vw, 66px);
  --md: clamp(22px, 1.9vw, 28px);
  --body: 18px;
  --sm: 14px;
  --display: 'Cormorant', 'Iowan Old Style', Georgia, serif;
  --text: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

* { box-sizing: border-box; }
html { background: var(--field); -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--field); color: var(--ink); font-family: var(--text); font-size: var(--body); line-height: 1.6; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: .18em; }
h1, h2, h3 { font-family: var(--display); font-weight: 600; letter-spacing: -0.02em; line-height: 1; margin: 0; text-wrap: balance; }
p { margin: 0; }
::selection { background: var(--gold); color: var(--ink); }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }
.skip { position: absolute; left: var(--m); top: -100px; background: var(--paper); padding: 10px 16px; z-index: 10; }
.skip:focus { top: 12px; }

/* ---------- barra superior, no campo escuro ---------- */
.bar { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px; padding: 22px var(--m); color: var(--paper); }
.wordmark { font-family: var(--display); font-weight: 600; font-size: var(--md); letter-spacing: -0.01em; text-decoration: none; white-space: nowrap; }
.nav { display: flex; gap: clamp(16px, 2.4vw, 36px); font-size: var(--sm); }
.nav a { text-decoration: none; padding: 6px 0; transition: opacity .2s; }
.nav a:hover { text-decoration: underline; }
.action { justify-self: end; display: inline-block; background: var(--gold); color: var(--ink); font-size: var(--sm); font-weight: 600; text-decoration: none; padding: 12px 20px; transition: transform .2s var(--ease), background-color .2s; }
.action:hover { background: var(--paper); transform: translateY(-2px); }
.action:active { transform: translateY(0); }

/* ---------- a folha de papel ---------- */
main { position: relative; z-index: 1; background: var(--field); padding-bottom: clamp(96px, 12vw, 200px); }
.sheet { background: var(--paper); margin: 0 var(--m); padding: var(--pad); }
.sheet + .sheet { margin-top: clamp(16px, 2vw, 28px); }
.sheet.tone { background: var(--sand); }
.grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap); }

/* primeira página */
.masthead { text-align: center; padding-top: clamp(8px, 2vw, 24px); }
.mast { font-size: var(--xl); line-height: .88; letter-spacing: -0.035em; }
.lede { font-family: var(--display); font-style: italic; font-weight: 500; font-size: var(--md); line-height: 1.3; margin-top: clamp(14px, 1.6vw, 24px); }
.dateline { font-size: var(--sm); color: var(--soft); margin-top: 10px; }
.lead { margin-top: clamp(40px, 6vw, 96px); align-items: end; }
.lead-media { grid-column: 1 / 8; overflow: hidden; aspect-ratio: 4 / 3; background: var(--sand); }
.lead-media img { width: 100%; height: 100%; object-fit: cover; animation: drift 26s ease-in-out infinite alternate; }
@keyframes drift { from { transform: scale(1); } to { transform: scale(1.07); } }
.lead-text { grid-column: 8 / 13; display: grid; gap: 18px; padding-bottom: 6px; }
.lead-text h2 { font-size: var(--l); }
.lead-text h2 a, .story h3 a { text-decoration: none; }
.lead-text h2 a:hover, .story h3 a:hover { text-decoration: underline; text-decoration-thickness: 2px; }
.standfirst { font-family: var(--display); font-weight: 500; font-size: var(--md); line-height: 1.3; }
.meta { font-size: var(--sm); color: var(--soft); }
.more { justify-self: start; font-weight: 600; font-size: var(--body); }
.more:hover { text-decoration-thickness: 2px; }

.also { margin-top: clamp(64px, 8vw, 128px); row-gap: 28px; }
.also > h2 { grid-column: 1 / -1; font-size: var(--l); }
.story { display: grid; gap: 14px; align-content: start; }
.story h3 { font-size: var(--l); }
.story .media { overflow: hidden; background: var(--sand); }
.story .media img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease); }
.story:hover .media img { transform: scale(1.03); }
.story-a { grid-column: 1 / 6; }
.story-a .media { aspect-ratio: 4 / 5; }
.story-b { grid-column: 6 / 13; }
.story-b .media { aspect-ratio: 5 / 4; }

/* mito ou facto */
.myth { align-items: start; row-gap: 32px; }
.myth-intro { grid-column: 1 / 8; display: grid; gap: 20px; align-content: start; }
.myth-intro h2 { font-size: var(--l); }
.myth-media { grid-column: 8 / 13; overflow: hidden; aspect-ratio: 4 / 5; }
.myth-media img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; }
.stage { background: var(--paper); padding: clamp(24px, 4vw, 56px); display: grid; gap: 24px; align-content: start; margin-top: 12px; }
.claim-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.claim { background: var(--sand); padding: 18px 20px; }
.claim summary { cursor: pointer; font-family: var(--display); font-weight: 500; font-size: var(--md); line-height: 1.3; }
.claim .why { margin-top: 12px; }
.progress { font-size: var(--sm); color: var(--soft); }
.claim-text { font-family: var(--display); font-weight: 600; font-size: var(--md); line-height: 1.25; text-wrap: balance; max-width: 30ch; }
.answers { display: flex; gap: 12px; flex-wrap: wrap; }
.btn { appearance: none; border: 0; cursor: pointer; font: 600 var(--body)/1 var(--text); padding: 18px 28px; min-width: 132px; background: var(--ink); color: var(--paper); transition: transform .2s var(--ease), background-color .2s; }
.btn:hover { transform: translateY(-2px); background: #2A2622; }
.btn:active { transform: translateY(0); }
.btn.quiet { background: var(--sand); color: var(--ink); }
.btn.quiet:hover { background: #DDD1C1; }
.verdict { display: grid; gap: 14px; }
.stamp { justify-self: start; background: var(--gold); color: var(--ink); font-family: var(--display); font-style: italic; font-weight: 600; font-size: var(--md); padding: 6px 18px; transform: rotate(-3deg); }
.verdict a { font-size: var(--sm); }
.stage [hidden] { display: none !important; }

/* índice de histórias */
.index-col { grid-column: 1 / 8; }
.giant { font-size: var(--xl); line-height: .82; letter-spacing: -0.04em; }
.rows { margin-top: 28px; display: grid; gap: 6px; }
.row { background: var(--sand); }
.row summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; min-height: 56px; padding: 0 18px; font-weight: 600; transition: background-color .2s; }
.row summary::-webkit-details-marker { display: none; }
.row summary:hover { background: #DDD1C1; }
.row summary .plus { font-size: 22px; font-weight: 400; transition: transform .3s var(--ease); }
.row[open] summary .plus { transform: rotate(45deg); }
.row ul { list-style: none; margin: 0; padding: 4px 18px 20px; display: grid; gap: 14px; }
.row li { display: flex; justify-content: space-between; gap: 16px; }
.row li span { color: var(--soft); font-size: var(--sm); white-space: nowrap; padding-top: 3px; }
.index-media { grid-column: 8 / 13; overflow: hidden; align-self: stretch; min-height: 420px; }
.index-media img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 45%; }

/* carta dos editores */
.letter-wrap { padding: clamp(80px, 11vw, 168px) var(--m) 0; }
.letter { max-width: 680px; margin: 0 auto; background: var(--paper); padding: clamp(28px, 5vw, 64px); display: grid; gap: 22px; }
.letter h2 { font-size: var(--l); }
.letter .sign { font-family: var(--display); font-style: italic; font-weight: 600; font-size: var(--md); margin-top: 6px; }
.letter .role { font-size: var(--sm); color: var(--soft); margin-top: -16px; }
.mark { background: var(--sand); padding: 0 .2em; }
.tear { max-width: 680px; margin: 0 auto; background: var(--paper); border-top: 6px dotted var(--field); padding: 22px clamp(28px, 5vw, 64px); display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.tear a.mail { font-weight: 600; }

/* ---------- artigo ---------- */
.story-head { max-width: 1040px; display: grid; gap: 22px; }
.story-head h1 { font-size: var(--l); }
.story-head .standfirst { max-width: 820px; }
.byline { font-size: var(--sm); color: var(--soft); }
.lead-figure { margin: clamp(32px, 4vw, 56px) 0 0; }
.lead-figure .frame { overflow: hidden; aspect-ratio: 16 / 9; background: var(--sand); }
.lead-figure img { width: 100%; height: 100%; object-fit: cover; }
figcaption { font-size: var(--sm); color: var(--soft); margin-top: 10px; }
.body { max-width: 720px; margin: clamp(40px, 5vw, 72px) auto 0; }
.body > * + * { margin-top: 1.1em; }
.body h2 { font-size: var(--l); margin-top: 1.6em; }
.body blockquote { margin: 1.4em 0; padding: 22px 26px; background: var(--sand); font-family: var(--display); font-weight: 600; font-size: var(--md); line-height: 1.3; }
.body figure { margin: 2em 0; }
.body .figure-wide img { width: 100%; }
.body ul, .body ol { padding-left: 1.2em; }
.body li + li { margin-top: .6em; }
.table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.table caption { text-align: left; font-size: var(--sm); color: var(--soft); padding-bottom: 8px; }
.table th, .table td { text-align: left; padding: 10px 12px; }
.table thead th { background: var(--ink); color: var(--paper); }
.table tbody tr:nth-child(odd) { background: var(--sand); }
.sources { max-width: 720px; margin: clamp(48px, 6vw, 88px) auto 0; background: var(--sand); padding: clamp(22px, 3vw, 36px); display: grid; gap: 14px; }
.sources h2 { font-size: var(--md); }
.sources ul { margin: 0; padding-left: 1.1em; display: grid; gap: 8px; }
.sources li, .sources p { font-size: var(--sm); }
.next h2 { grid-column: 1 / -1; font-size: var(--l); margin-bottom: 28px; }

/* ---------- rodapé: o verso do postal (cortina) ---------- */
.back { padding: 0 var(--m) var(--m); }
.scallops { display: block; width: 100%; height: 34px; fill: var(--paper); }
.postcard { background: var(--paper); padding: clamp(24px, 4vw, 56px) var(--pad) 24px; display: grid; gap: 28px; }
.postcard .halves { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gap); }
.postcard h2 { font-size: var(--l); }
.postcard .msg { margin-top: 16px; max-width: 44ch; }
.addr { position: relative; display: grid; gap: 12px; align-content: start; padding-right: 108px; }
.addr a { font-size: var(--body); text-decoration: none; }
.addr a:hover { text-decoration: underline; }
.stamp-photo { position: absolute; top: 0; right: 0; width: 88px; background: var(--paper); padding: 6px; transform: rotate(4deg); }
.stamp-photo img { aspect-ratio: 3 / 4; object-fit: cover; width: 100%; }
.imprint { font-size: var(--sm); color: var(--ink); max-width: 75ch; }
.imprint a { word-break: break-word; }

/* ---------- entrada (só com JS; sem JS tudo fica visível) ---------- */
html.js [data-reveal] { opacity: 0; transform: translateY(24px); transition: opacity .8s var(--ease), transform .8s var(--ease); transition-delay: calc(var(--i, 0) * 80ms); }
html.js [data-reveal].in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html.js [data-reveal] { opacity: 1; transform: none; transition: none; }
  .lead-media img { animation: none; }
  .back { position: static; }
  * { scroll-behavior: auto; }
}

/* ---------- telemóvel ---------- */
@media (max-width: 860px) {
  .bar { grid-template-columns: 1fr auto; row-gap: 10px; }
  .nav { grid-column: 1 / -1; grid-row: 2; justify-content: space-between; }
  .lead-media, .lead-text, .story-a, .story-b, .myth-intro, .myth-media, .index-col, .index-media { grid-column: 1 / -1; }
  .lead-text { margin-top: 24px; }
  .story-b { margin-top: 24px; }
  .story-a .media { aspect-ratio: 4 / 3; }
  .index-media { min-height: 320px; margin-top: 28px; }
  .myth-media { aspect-ratio: 16 / 10; margin-top: 28px; }
  .postcard .halves { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  :root { --body: 17px; }
  .action { padding: 11px 14px; }
  .addr { padding-right: 76px; }
  .stamp-photo { width: 64px; }
}
