/* Portfólio 5 · Carta — carta de apresentação numa folha clara sobre mesa escura; assinatura à mão no fim.
   Cores da marca: --c1..--c6 vêm do site.json → cores. --c5 = mesa (escura) · --c1 = acento (botão, P.S.).
   A tinta da assinatura usa --ink. */
:root {
  --c1: #E8B24C; --c2: #3D7BE0; --c3: #D9534F; --c4: #2E9E7A; --c5: #141418; --c6: #8A8F99;
  --desk: color-mix(in srgb, var(--c5) 82%, #24344A);
  --bg: var(--desk); --bg-2: #FCFBF8; --fg: #1D1C22; --muted: #5C5A64; --line: rgba(29, 28, 34, .12);
  --ink: #1F2D5C;
  --accent: var(--c1); --on-accent: #1D1C22;
  --f-display: "Literata", Georgia, serif;
  --f-text: "Literata", Georgia, serif;
  --f-sign: "Mrs Saint Delafield", cursive;
  --gut: clamp(12px, 4vw, 48px);
}
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scrollbar-gutter: stable; background: var(--bg); }
html:not(.has-lenis) { scroll-behavior: smooth; }
body { font: 400 1.125rem/1.7 var(--f-text); color: var(--fg); background: radial-gradient(90% 60% at 50% 0%, color-mix(in srgb, var(--desk) 70%, #fff 6%), var(--desk) 70%) fixed; overflow-x: clip; -webkit-font-smoothing: antialiased; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
ul { list-style: none; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--accent); color: var(--on-accent); padding: 10px 16px; border-radius: 8px; }
.skip:focus { top: 12px; }
[hidden] { display: none !important; }

main { padding: clamp(24px, 6vw, 80px) var(--gut) 0; overflow-x: clip; }

/* ---------- A folha ---------- */
.letter {
  position: relative; max-width: 780px; margin: 0 auto; padding: clamp(28px, 6vw, 72px) clamp(22px, 6vw, 80px) clamp(36px, 6vw, 72px);
  background: var(--bg-2); border-radius: 4px;
  box-shadow: 0 1px 0 rgba(255, 255, 255, .6) inset, 0 30px 60px -20px rgba(0, 0, 0, .55), 0 8px 18px -8px rgba(0, 0, 0, .4);
}
.letter::before { /* textura leve do papel */
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .45; mix-blend-mode: multiply; border-radius: inherit;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .5 0 0 0 0 .5 0 0 0 0 .5 0 0 0 .06 0'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)'/%3E%3C/svg%3E");
}
.letter__head { position: relative; display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; align-items: center; padding-bottom: 22px; margin-bottom: clamp(26px, 4vw, 44px); border-bottom: 1px solid var(--line); }
.letter__mark { width: 52px; height: 52px; border-radius: 50%; }
.letter__name { font-weight: 600; font-size: clamp(1.25rem, 2.6vw, 1.6rem); line-height: 1.15; }
.letter__role { font-size: .92rem; color: var(--muted); }
.letter__kind { grid-column: 1 / -1; font-size: .75rem; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); }
@media (min-width: 640px) { .letter__head { grid-template-columns: auto 1fr auto; } .letter__kind { grid-column: auto; } }

.letter__body { position: relative; display: grid; gap: 18px; }
.letter__hello { font-style: italic; font-size: 1.3rem; }
.letter__lead { font-size: clamp(1.35rem, 2.6vw, 1.75rem); line-height: 1.4; font-variation-settings: "opsz" 48; }
.letter__text p { max-width: 62ch; }
.letter__h { margin-top: 18px; font-size: .78rem; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); }
.roles { display: grid; gap: 10px; }
.roles li { padding-left: 18px; border-left: 2px solid var(--accent); }

.attach { display: flex; flex-wrap: wrap; gap: 14px; }
.attach { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 190px), 1fr)); gap: 22px 16px; }
.clip { position: relative; display: grid; gap: 8px; text-decoration: none; font-size: .85rem; line-height: 1.3; color: var(--muted); }
.clip b { display: block; color: var(--fg); font-size: .95rem; }
.clip img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: 3px; box-shadow: 0 6px 14px -6px rgba(0, 0, 0, .35); transition: translate .25s, box-shadow .25s; }
.clip::before { /* clipe */
  content: ""; position: absolute; z-index: 1; top: -8px; left: 18px; width: 14px; height: 34px; border: 2px solid #9AA0AA; border-radius: 8px; border-bottom-color: transparent;
}
@media (hover: hover) and (pointer: fine) { .clip:hover img { translate: 0 -4px; box-shadow: 0 14px 24px -10px rgba(0, 0, 0, .45); } .clip:hover span { color: var(--fg); } }

.sign { margin-top: 26px; display: grid; justify-items: start; gap: 2px; }
.sign__bye { font-style: italic; }
.sign__ink { position: relative; width: min(420px, 90%); height: clamp(90px, 16vw, 140px); color: var(--ink); }
.sign__txt { position: absolute; left: 0; bottom: 6px; font-family: var(--f-sign); font-size: clamp(3.6rem, 9vw, 5.6rem); line-height: 1; white-space: nowrap; }
.sign__ink svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.sign__ink path { fill: currentColor; stroke: currentColor; stroke-width: 1.2; stroke-linecap: round; stroke-linejoin: round; }
.sign__name { font-weight: 600; }
.sign__role { font-size: .92rem; color: var(--muted); }
.ps { margin-top: 18px; padding-top: 18px; border-top: 1px dashed var(--line); font-style: italic; }
.ps b { font-style: normal; color: color-mix(in srgb, var(--accent) 55%, var(--fg)); }

/* ---------- Responder ---------- */
.reply { max-width: 780px; margin: 0 auto; padding: clamp(56px, 9vw, 110px) 0 clamp(40px, 6vw, 70px); text-align: center; color: #F3F1EC; display: grid; gap: 16px; justify-items: center; }
.reply h2 { font-weight: 500; font-size: clamp(2rem, 5vw, 3.4rem); line-height: 1.05; }
.reply p { color: #C9C7D0; max-width: 46ch; }
.reply__acts { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 52px; padding: 0 24px; border-radius: 999px; border: 1.5px solid currentColor; background: none; font-family: var(--f-text); font-weight: 600; text-decoration: none; cursor: pointer; transition: background-color .2s, color .2s; }
.btn--accent { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
@media (hover: hover) and (pointer: fine) { .reply .btn:not(.btn--accent):hover { background: #F3F1EC; color: var(--fg); } }

/* ---------- Anexo aberto ---------- */
.lb { margin: auto; max-width: min(92vw, 900px); max-height: 92svh; padding: 14px; border: 0; border-radius: 6px; background: var(--bg-2); color: var(--fg); }
.lb::backdrop { background: rgba(10, 12, 18, .78); }
.lb img { max-height: calc(92svh - 130px); width: auto; margin: 0 auto; border-radius: 3px; }
.lb__txt { display: grid; gap: 8px; padding: 14px 6px 4px; }
.lb__txt h2 { font-weight: 600; font-size: 1.4rem; line-height: 1.15; }
.lb__txt p { max-width: 62ch; }
.lb__acts { display: flex; flex-wrap: wrap; gap: 10px; }
.lb .btn { min-height: 44px; }

.foot { display: grid; gap: 6px; justify-items: center; padding: 10px var(--gut) 40px; color: #B9B7C2; font-size: .9rem; }
.foot__links { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 18px; }
.foot a { min-height: 32px; display: inline-flex; align-items: center; text-underline-offset: 3px; }
.foot :focus-visible, .reply :focus-visible { outline-color: var(--accent); }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition-duration: .01ms !important; } }
