/* ==========================================================================
   sheets.css · arquivo, notas, CV, contacto e erro
   ========================================================================== */

/* ============================ ARQUIVO (quadro) ============================ */
.board { columns: 4 250px; column-gap: clamp(22px, 2.6vw, 40px); }
.pin {
    break-inside: avoid;
    display: inline-block; width: 100%;
    margin: 0 0 clamp(30px, 3.4vw, 50px);
    padding: 10px 10px 14px;
    background: var(--paper-3);
    box-shadow: 0 10px 26px rgba(21, 20, 18, .13), 0 1px 0 rgba(21, 20, 18, .08);
    position: relative;
    transform: rotate(var(--tilt, 0deg));
}
/* fita-cola */
.pin::before {
    content: ""; position: absolute; top: -12px; left: 50%; z-index: 2;
    width: 84px; height: 24px;
    transform: translateX(-50%) rotate(calc(var(--tilt, 0deg) * -2));
    background: rgba(226, 220, 205, .8);
    box-shadow: 0 1px 3px rgba(0, 0, 0, .1);
}
.pin--desenho::before { background: rgba(179, 38, 30, .22); }
.js .pin.reveal.is-in:hover, .pin:hover { transform: rotate(0deg) translateY(-6px); transition-delay: 0s; transition-duration: .5s; }
.pin-media { display: block; width: 100%; background: var(--paper-2); overflow: hidden; }
.pin-media img { width: 100%; height: auto; filter: grayscale(.92) contrast(1.05); transition: filter .7s var(--ease); }
.pin:hover .pin-media img { filter: none; }
.pin--desenho .pin-media img { filter: grayscale(.2) contrast(1.02); }
.pin-media video { width: 100%; }
.pin-cap { display: grid; gap: 4px; margin-top: 12px; }
.pin-title { font-family: var(--f-hand); font-size: 20px; line-height: 1.15; }
.pin-text { font-size: 13px; line-height: 1.5; color: var(--ink-2); }
.pin-meta { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; margin-top: 4px; font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); }
.pin-link { color: var(--red); }
.pin-link:hover { text-decoration: underline; }
/* ideias: ficha pautada escrita à máquina */
.pin--ideia { background-color: #f6f1e2; }
.pin-idea {
    display: grid; gap: 10px;
    padding: 14px 12px 8px 30px;
    min-height: 200px;
    background-image: repeating-linear-gradient(transparent 0 25px, rgba(21, 20, 18, .08) 25px 26px);
    background-position: 0 38px;
    position: relative;
}
.pin-idea::before { content: ""; position: absolute; left: 18px; top: 0; bottom: 0; width: 1px; background: rgba(179, 38, 30, .45); }
.pin-idea-no { font-size: 10px; letter-spacing: .18em; text-transform: uppercase; color: var(--red); }
.pin-idea strong { font-family: var(--f-sans); font-weight: 800; font-stretch: 75%; text-transform: uppercase; font-size: 22px; line-height: 1; }
.pin-idea p { font-size: 14px; line-height: 26px; }

.pager { display: flex; justify-content: center; gap: 6px; margin-top: 50px; font-size: 13px; letter-spacing: .1em; }
.pager a { border: 1px solid var(--rule); padding: 8px 12px; }
.pager a:hover, .pager a.is-active { background: var(--ink); color: var(--paper-3); border-color: var(--ink); }

/* ============================ NOTAS (livro de registo) ============================ */
.log { list-style: none; border-top: 1.5px solid var(--ink); }
.log-row a, .log-row--head {
    display: grid;
    grid-template-columns: 90px 130px minmax(0, 1fr) 140px;
    gap: 20px; align-items: baseline;
    padding: 22px 8px;
    border-bottom: 1px solid var(--rule);
}
.log-row--head { font-size: 10px; letter-spacing: .18em; text-transform: uppercase; color: var(--ink-3); padding-block: 10px; }
.log-row a { transition: background-color .35s, padding .5s var(--ease); }
.log-row a:hover { background: rgba(21, 20, 18, .045); padding-left: 20px; }
.log-no { font-size: 13px; letter-spacing: .1em; }
.log-pin { color: var(--red); font-weight: 400; }
.log-date { font-size: 13px; }
.log-subject { display: grid; gap: 6px; }
.log-subject strong { font-family: var(--f-sans); font-weight: 800; font-stretch: 75%; text-transform: uppercase; font-size: clamp(22px, 2.6vw, 36px); line-height: 1; }
.log-subject em { font-style: normal; font-size: 14px; color: var(--ink-2); }
.log-row a:hover .log-subject strong { color: var(--red); }
.log-tag { justify-self: end; font-size: 12px; letter-spacing: .1em; color: var(--red); }
@media (max-width: 760px) {
    .log-row a, .log-row--head { grid-template-columns: 60px minmax(0, 1fr); }
    .log-date, .log-tag, .log-row--head span:nth-child(2), .log-row--head span:nth-child(4) { display: none; }
}

/* memorando */
.memo-page { padding-block: clamp(40px, 6vw, 90px); }
.memo-sheet {
    position: relative;
    max-width: 860px; margin-inline: auto;
    background-color: var(--paper-3);
    background-image: var(--noise), var(--stain);
    border: 1px solid var(--rule);
    padding: clamp(26px, 5vw, 70px);
    box-shadow: 16px 18px 0 -6px rgba(21, 20, 18, .07);
}
.memo-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; border-bottom: 3px double var(--ink); padding-bottom: 16px; }
.memo-number { display: block; font-family: var(--f-sans); font-weight: 900; font-stretch: 70%; font-size: clamp(40px, 6vw, 72px); line-height: .9; margin-top: 6px; }
.memo-head .stamp { font-size: 16px; margin-top: 10px; }
.memo-fields { display: grid; gap: 8px; padding-block: 20px; border-bottom: 1px solid var(--rule); }
.memo-fields > div { display: grid; grid-template-columns: 80px 1fr; gap: 12px; }
.memo-fields dt { font-size: 11px; letter-spacing: .18em; text-transform: uppercase; color: var(--ink-3); padding-top: 3px; }
.memo-fields dd { font-size: 15px; }
.memo-subject { margin-top: 26px; font-family: var(--f-sans); font-weight: 800; font-stretch: 75%; text-transform: uppercase; font-size: clamp(28px, 4vw, 50px); line-height: 1; }
.memo-subject .t-label { display: block; margin-bottom: 8px; font-weight: 400; }
.memo-body { margin-top: 30px; max-width: none; }
.memo-sign { display: grid; justify-items: end; gap: 2px; margin-top: 50px; }
.memo-signature { font-family: var(--f-script); font-size: clamp(46px, 6vw, 72px); line-height: 1; color: var(--ink); border-bottom: 1px solid var(--rule); padding: 0 10px; transform: rotate(-3deg); }
.memo-nav { display: grid; grid-template-columns: 1fr auto 1fr; gap: 20px; align-items: center; max-width: 860px; margin: 40px auto 0; }
.memo-nav a { display: grid; gap: 4px; font-family: var(--f-sans); font-weight: 800; font-stretch: 75%; text-transform: uppercase; font-size: 18px; line-height: 1.1; }
.memo-nav a:hover { color: var(--red); }
.memo-nav .t-label { font-weight: 400; }
.memo-nav-next { text-align: right; }
.memo-nav a.memo-nav-all { font-family: var(--f-mono); font-weight: 400; font-size: 12px; letter-spacing: .14em; border: 1px solid var(--rule); padding: 10px 14px; }
@media (max-width: 640px) { .memo-nav { grid-template-columns: 1fr; } .memo-nav-next { text-align: left; } }

/* ============================ SOBRE / CV (folha manuscrita) ============================ */
.cv-page { padding-block: clamp(36px, 6vw, 90px); }
.cv-sheet {
    position: relative;
    max-width: 880px; margin-inline: auto;
    background: #faf8f3;
    padding: clamp(28px, 6vw, 80px) clamp(22px, 6vw, 80px) clamp(30px, 5vw, 60px);
    box-shadow: 0 2px 0 rgba(21, 20, 18, .05), 0 30px 60px -20px rgba(21, 20, 18, .25);
}
.cv-head { position: relative; display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; }
.cv-name { position: relative; font-family: var(--f-hand); font-weight: 400; line-height: .9; filter: url(#f-rough); will-change: transform; }
.cv-first { display: block; font-size: clamp(34px, 5.4vw, 64px); margin-left: clamp(90px, 30vw, 330px); transform: rotate(-5deg); transform-origin: 0 100%; }
.cv-last { display: block; font-size: clamp(46px, 8.4vw, 100px); letter-spacing: .02em; margin-top: -.12em; }
.cv-badge { position: relative; display: grid; justify-items: center; flex: none; margin-top: clamp(30px, 5vw, 60px); }
.cv-badge-txt { font-family: var(--f-hand); font-size: clamp(34px, 5vw, 58px); line-height: 1; padding: .15em .45em .1em; }
.cv-badge-ring { position: absolute; left: -10%; top: -16%; width: 120%; height: calc(100% - .2em); color: var(--ink); overflow: visible; }
.cv-badge-ring path { stroke-width: 2.2; }
.cv-badge small { font-family: var(--f-hand); font-size: 12px; margin-top: 8px; letter-spacing: .1em; }

.cv-photo { width: min(260px, 70%); aspect-ratio: 1; margin: clamp(30px, 5vw, 50px) auto 0; border: 3px solid var(--ink); background: var(--paper-2); overflow: hidden; }
.cv-photo img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(1) contrast(1.1); }
.cv-photo-empty { height: 100%; display: grid; place-content: center; justify-items: center; gap: 6px; background: repeating-linear-gradient(-45deg, transparent 0 10px, var(--rule-soft) 10px 11px); }
.cv-photo-empty .t-hand { font-size: 64px; color: var(--ink-3); }
.cv-hi { margin-top: 34px; text-align: center; font-family: var(--f-sans); font-weight: 900; font-size: clamp(22px, 3vw, 34px); letter-spacing: .01em; }
.cv-scrawl { text-align: center; font-family: var(--f-scrawl); color: var(--red); font-size: clamp(40px, 6vw, 76px); line-height: 1.1; transform: rotate(-6deg); margin-top: 4px; }

.cv-timeline { display: grid; gap: 22px; margin-top: clamp(40px, 6vw, 70px); }
.cv-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 26px; align-items: start; }
.cv-when { text-align: right; font-family: var(--f-hand); font-size: 16px; letter-spacing: .06em; }
.cv-what { font-family: var(--f-hand); font-size: 16px; letter-spacing: .04em; line-height: 1.3; text-transform: uppercase; }
.cv-what strong { font-weight: 400; color: var(--red); }
.cv-bio { margin: clamp(40px, 6vw, 60px) auto 0; max-width: 60ch; font-size: 15px; }

.cv-lists { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 22px; margin-top: clamp(40px, 6vw, 70px); }
.cv-list-h { font-size: 13px; margin-bottom: 12px; color: var(--ink-2); }
.cv-list li { list-style: none; font-size: 14px; line-height: 1.75; }
@media (max-width: 760px) { .cv-lists { grid-template-columns: repeat(2, minmax(0, 1fr)); } .cv-row { grid-template-columns: 1fr; gap: 4px; } .cv-when { text-align: left; } }

.cv-foot { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: clamp(50px, 7vw, 80px); font-family: var(--f-hand); font-size: 14px; letter-spacing: .06em; }
.cv-foot a:hover { color: var(--red); }

/* ============================ CONTACTO ============================ */
.contact-grid { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: clamp(30px, 6vw, 90px); align-items: start; }
@media (max-width: 900px) { .contact-grid { grid-template-columns: 1fr; } }
.contact-side { display: grid; gap: 22px; position: relative; }
.contact-mail { font-family: var(--f-scrawl); color: var(--red); font-size: clamp(28px, 3.4vw, 46px); line-height: 1.15; word-break: break-word; }
.contact-mail:hover { text-decoration: underline; text-decoration-thickness: 2px; }
.contact-list { list-style: none; display: grid; gap: 10px; font-size: 15px; }
.contact-list li { display: flex; gap: 10px; align-items: center; }
.contact-note { font-family: var(--f-serif); font-style: italic; font-size: 19px; line-height: 1.5; max-width: 38ch; }
.contact-seal { width: 130px; height: 130px; color: var(--red); opacity: .8; transform: rotate(-10deg); filter: url(#f-stamp); }

.paper-form {
    background-color: var(--paper-3);
    background-image: var(--noise);
    border: 1px solid var(--rule);
    padding: clamp(22px, 4vw, 48px);
    box-shadow: 14px 16px 0 -5px rgba(21, 20, 18, .07);
}
.paper-form-head { display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap; font-size: 10px; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-3); border-bottom: 1px dashed var(--rule); padding-bottom: 12px; margin-bottom: 26px; }
.paper-form .flash { margin-bottom: 20px; }
.paper-form-foot { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-sent { display: grid; justify-items: start; gap: 16px; padding-block: 30px; }
.form-sent .stamp { font-size: 30px; animation: slam .5s cubic-bezier(.3, 1.6, .5, 1) both; }
.form-sent-title { font-family: var(--f-sans); font-weight: 800; font-stretch: 72%; text-transform: uppercase; font-size: clamp(32px, 4vw, 54px); line-height: .95; }
@keyframes slam { from { opacity: 0; transform: rotate(-7deg) scale(2); } }

/* ============================ ERRO ============================ */
.error-page { border-bottom: 1px solid var(--rule); }
.error-wrap { position: relative; min-height: 72vh; display: grid; align-content: center; justify-items: start; gap: 18px; padding-block: 80px; }
.error-code { font-family: var(--f-hand); font-weight: 400; font-size: clamp(120px, 26vw, 360px); line-height: .8; filter: url(#f-brush); will-change: transform; }
.error-title { font-family: var(--f-sans); font-weight: 900; font-stretch: 70%; text-transform: uppercase; font-size: clamp(34px, 5vw, 70px); line-height: .9; }
.error-text { max-width: 50ch; font-size: 15px; }
.error-lines { display: grid; gap: 8px; justify-items: start; margin-block: 10px; }
.error-lines .redacted { cursor: default; }
.error-stamp { position: absolute; right: clamp(10px, 10vw, 180px); top: 32%; font-size: clamp(24px, 3.4vw, 46px); }
