/* =========================================================
   Psicóloga Vanessa Machado Martins — folha de estilo
   Cores e fontes ficam nas variáveis abaixo (:root).
   ========================================================= */

/* ---------- Fontes (arquivos em /fonts) ---------- */
@font-face { font-family: "Gloock"; font-weight: 400; font-style: normal; font-display: swap; src: url("../fonts/gloock-400-latin.woff2") format("woff2"); }
@font-face { font-family: "Spectral"; font-weight: 400; font-style: normal; font-display: swap; src: url("../fonts/spectral-400-latin.woff2") format("woff2"); }
@font-face { font-family: "Spectral"; font-weight: 500; font-style: normal; font-display: swap; src: url("../fonts/spectral-500-latin.woff2") format("woff2"); }
@font-face { font-family: "Spectral"; font-weight: 400; font-style: italic; font-display: swap; src: url("../fonts/spectral-400-italic-latin.woff2") format("woff2"); }
@font-face { font-family: "Spectral"; font-weight: 500; font-style: italic; font-display: swap; src: url("../fonts/spectral-500-italic-latin.woff2") format("woff2"); }
@font-face { font-family: "Hanken Grotesk"; font-weight: 400 700; font-style: normal; font-display: swap; src: url("../fonts/hanken-grotesk-latin.woff2") format("woff2"); }
@font-face { font-family: "Mrs Saint Delafield"; font-weight: 400; font-style: normal; font-display: swap; src: url("../fonts/mrs-saint-delafield-400-latin.woff2") format("woff2"); }

/* ---------- Variáveis ---------- */
:root {
  /* As três cores da identidade da Vanessa (Instagram): preto, branco e rosé */
  --ink: #000000;          /* preto: títulos, botões, faixas escuras */
  --ink-deep: #000000;     /* preto (faixas escuras e rodapé) */
  --paper: #f4f4f4;        /* branco-gelo das seções */
  --postmark: #daa498;     /* rosé: linhas, carimbo, detalhes; texto só sobre preto */
  --rose: #daa498;
  --rose-ink: #8c665a;     /* rosé escurecido, só para linhas finas no branco */

  /* Derivadas do azul */
  --ink-text: #141414;     /* texto corrido */
  --ink-soft: #5a5a5a;     /* texto secundário */
  --rule: #ecd5cf;         /* linhas finas (rosé bem claro) */
  --envelope: #000000;     /* fundo preto com padrão rosé */
  --sheet: #ffffff;        /* folha da carta */
  --on-dark: #f4f4f4;      /* texto sobre preto */
  --on-dark-soft: #bdbdbd; /* texto secundário sobre preto */

  --f-display: "Gloock", "Georgia", serif;
  --f-text: "Spectral", "Georgia", serif;
  --f-ui: "Hanken Grotesk", "Segoe UI", system-ui, sans-serif;
  --f-sign: "Mrs Saint Delafield", cursive;

  --wrap: 1180px;
  --pad: clamp(1.25rem, 4vw, 2.5rem);
  --section: clamp(4.5rem, 10vw, 8.5rem);
  --radius: 3px;
  --header-h: 64px;
  --ease: cubic-bezier(.16, 1, .3, 1);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 1rem); }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink-text);
  font-family: var(--f-text);
  font-size: clamp(1.0625rem, 0.98rem + 0.3vw, 1.1875rem);
  line-height: 1.65;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
img { height: auto; }
p { margin: 0 0 1em; }
h1, h2, h3 { margin: 0; font-weight: 400; text-wrap: balance; }
h2 {
  font-family: var(--f-display);
  font-size: clamp(2rem, 1.5rem + 2.2vw, 3.25rem);
  line-height: 1.08;
  letter-spacing: -0.015em;
  color: var(--ink);
  margin-bottom: 1.5rem;
}
h3 {
  font-family: var(--f-ui);
  font-weight: 600;
  font-size: 1.0625rem;
  line-height: 1.35;
  color: var(--ink);
  margin-bottom: .5rem;
}
a { color: var(--ink); text-decoration-thickness: 1px; text-underline-offset: .18em; }
a:hover { color: var(--ink-deep); }
::selection { background: var(--rose); color: #000; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 2px; }
html { scrollbar-color: var(--rose) var(--paper); }
address { font-style: normal; }

.skip {
  position: absolute; left: 1rem; top: -4rem; z-index: 100;
  background: var(--ink); color: #fff; padding: .6rem 1rem; font-family: var(--f-ui);
}
.skip:focus { top: 1rem; }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--pad); }
.lead { font-size: 1.15em; line-height: 1.55; color: var(--ink); }

/* ---------- Botões ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .6rem;
  min-height: 52px; padding: .85rem 1.5rem;
  background: var(--ink); color: #fff;
  font-family: var(--f-ui); font-weight: 600; font-size: 1.0625rem; letter-spacing: .005em;
  text-decoration: none; border-radius: var(--radius);
  box-shadow: 0 1px 0 rgba(255,255,255,.18) inset, 0 6px 16px -8px rgba(0,0,0,.55);
  transition: background-color .25s var(--ease), transform .25s var(--ease), box-shadow .25s var(--ease);
}
.btn:hover { background: #2a2a2a; color: #fff; transform: translateY(-1px); box-shadow: 0 1px 0 rgba(255,255,255,.18) inset, 0 10px 22px -10px rgba(0,0,0,.6); }
.btn:active { transform: translateY(0); }
.btn .icon { width: 1.25em; height: 1.25em; flex: none; }
.btn--small { min-height: 42px; padding: .55rem 1rem; font-size: .95rem; }
.btn--paper { background: var(--rose); color: #000; box-shadow: 0 10px 28px -14px rgba(0,0,0,.5); }
.btn.btn--paper:hover { background: #fff; color: #000; }
.btn--block { width: 100%; }
.icon { width: 1.1em; height: 1.1em; }

/* ---------- Cabeçalho (papel timbrado) ---------- */
.letterhead {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .94);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--rule);
}
.letterhead__inner {
  max-width: var(--wrap); margin-inline: auto; padding-inline: var(--pad);
  min-height: var(--header-h);
  display: flex; align-items: center; gap: 2rem;
}
.letterhead__name { display: flex; flex-direction: column; text-decoration: none; line-height: 1.15; margin-right: auto; }
.letterhead__title { font-family: var(--f-display); font-size: 1.2rem; color: var(--ink); }
.letterhead__crp { font-family: var(--f-ui); font-size: .78rem; font-weight: 500; letter-spacing: .03em; color: var(--ink-soft); }
.letterhead__nav { display: none; gap: 1.75rem; font-family: var(--f-ui); font-size: .95rem; font-weight: 500; }
.letterhead__nav a { text-decoration: none; color: var(--ink-soft); padding-block: .5rem; }
.letterhead__nav a:hover { color: var(--ink); text-decoration: underline; }
.letterhead .btn { display: none; }

/* ---------- Envelope de segurança (fundo com padrão) ---------- */
.envelope {
  background-color: var(--envelope);
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M0 12L12 0M-3 3L3 -3M9 15L15 9' stroke='%23daa498' stroke-opacity='.30' stroke-width='1'/%3E%3Cpath d='M0 0L12 12M-3 9L3 15M9 -3L15 3' stroke='%23ffffff' stroke-opacity='.07' stroke-width='1'/%3E%3C/svg%3E");
}

/* ---------- 1. A carta ---------- */
.hero { padding: clamp(1.5rem, 5vw, 4.5rem) var(--pad) clamp(3rem, 8vw, 6.5rem); }
.letter {
  position: relative;
  max-width: 780px;
  margin-inline: auto;
  background: var(--sheet);
  padding: clamp(1.5rem, 5vw, 4rem) clamp(1.25rem, 5vw, 4rem) clamp(1.75rem, 4vw, 3.25rem);
  border-radius: 2px;
  box-shadow:
    0 1px 2px rgba(0, 0, 0, .08),
    0 18px 40px -18px rgba(0, 0, 0, .35),
    0 50px 80px -50px rgba(0, 0, 0, .35);
}
.letter__photo {
  position: relative;
  float: right;
  width: 44%;
  max-width: 300px;
  margin: -.25rem -.25rem 1rem 1.1rem;
  transform: rotate(2.2deg);
  background: #fff;
  padding: 6px 6px 22px;
  box-shadow: 0 2px 4px rgba(0,0,0,.12), 0 14px 28px -14px rgba(0,0,0,.45);
}
.letter__photo img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: 50% 30%; }
.clip {
  position: absolute; z-index: 2;
  width: 22px; height: auto;
  left: 18%; top: -26px;
  transform: rotate(-4deg);
  filter: drop-shadow(0 2px 1.5px rgba(0,0,0,.25));
}
.postmark {
  position: absolute; z-index: 3;
  width: 96px; height: 96px;
  left: clamp(.5rem, 3vw, 1.75rem); bottom: clamp(5.5rem, 14vw, 7.5rem);
  transform: rotate(-14deg);
  opacity: .9;
  mix-blend-mode: multiply;
  pointer-events: none;
}
/* Linha de local da carta (como "Palhoça, 26 de novembro") e régua do papel timbrado */
.letter__place {
  font-family: var(--f-text); font-size: .98rem; color: var(--ink-soft);
  margin-bottom: 1.6rem; padding-bottom: .9rem;
  border-bottom: 1px solid var(--rule);
}
.place-long { display: none; }
@media (min-width: 720px) { .place-long { display: inline; } .place-short { display: none; } }
/* Margem da folha: linha vertical fina, como papel de carta */
.letter::before {
  content: ""; position: absolute; top: 0; bottom: 0;
  left: clamp(.6rem, 2.6vw, 2.25rem);
  border-left: 1px solid var(--rule);
  pointer-events: none;
}
.letter__hello { font-style: italic; color: var(--ink); font-size: 1.12em; margin-bottom: .75rem; }
.letter__title {
  font-family: var(--f-display);
  font-size: clamp(2.15rem, 1.4rem + 3.6vw, 4.25rem);
  line-height: 1.03;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin-bottom: 1.5rem;
  clear: both;
}
.letter__body { max-width: 58ch; }
.letter__reply { display: flex; flex-wrap: wrap; align-items: center; gap: .9rem 1.25rem; margin-top: 1.75rem; }
.letter__phone { margin: 0; font-family: var(--f-ui); font-size: .95rem; color: var(--ink-soft); }
.letter__phone a { font-weight: 600; white-space: nowrap; }
.signature {
  margin-top: 2.5rem; padding-top: .25rem;
  display: grid; justify-items: end; text-align: right;
}
.signature__script {
  font-family: var(--f-sign); font-size: clamp(3rem, 2.4rem + 2.5vw, 4.25rem);
  line-height: .8; color: var(--ink); margin-bottom: .35rem; padding-right: .5rem;
}
.signature__name { margin: 0; font-family: var(--f-display); font-size: 1.15rem; color: var(--ink); }
.signature__role { margin: 0; font-family: var(--f-ui); font-size: .85rem; font-weight: 500; letter-spacing: .03em; color: var(--ink-soft); }

/* ---------- Seções de papel ---------- */
.section { padding-block: var(--section); }
.paper { background: var(--paper); }
.paper + .paper { border-top: 1px solid var(--rule); }
.paper--sheet { background-color: var(--sheet); }

/* 2. Como trabalho */
.split { display: grid; gap: clamp(2.5rem, 6vw, 5rem); align-items: center; }
.split__text { max-width: 62ch; }
.note { margin: 0; }
.note__sheet {
  position: relative;
  background: var(--sheet);
  padding: clamp(1.75rem, 4vw, 2.75rem) clamp(1.5rem, 4vw, 2.5rem);
  background-image: linear-gradient(to bottom, transparent calc(100% - 1px), var(--rule) 0);
  background-size: 100% 2.6rem;
  background-position: 0 1.6rem;
  border: 1px solid var(--rule);
  box-shadow: 0 16px 34px -22px rgba(0,0,0,.45);
  transform: rotate(-1deg);
}
.note__line {
  font-family: var(--f-text); font-style: italic;
  font-size: clamp(1.35rem, 1.1rem + 1vw, 1.75rem);
  line-height: 1.5; color: var(--ink); margin: 0;
}
.note__line--old { position: relative; display: inline-block; color: var(--ink-soft); margin-bottom: 1.1rem; }
.note__strike {
  position: absolute; left: -.2em; right: -.2em; top: 54%;
  height: 2px; background: var(--ink);
  transform-origin: left center;
  border-radius: 2px;
}
.note__line--new { font-weight: 500; }
.note figcaption {
  margin-top: 1.1rem; font-family: var(--f-ui); font-size: .85rem; color: var(--ink-soft);
}

/* 3. Temas */
.topics {
  list-style: none; margin: 0; padding: 0;
  display: grid; gap: 0;
  border-top: 1px solid var(--ink);
}
.topics li {
  display: grid; gap: .15rem; align-content: start;
  padding: 1.15rem 0;
  border-bottom: 1px solid var(--rule);
}
.topics strong { font-family: var(--f-display); font-weight: 400; font-size: 1.45rem; line-height: 1.2; color: var(--ink); }
.topics span { color: var(--ink-soft); }

/* 4. Como funciona */
.route { list-style: none; margin: 0; padding: 0; display: grid; gap: 2.25rem; position: relative; }
.route__stop { position: relative; padding-left: 4.25rem; max-width: 46ch; }
.route__stop p { margin: 0; color: var(--ink-text); }
.route__num {
  position: absolute; left: 0; top: -.35rem;
  width: 2.9rem; height: 2.9rem; border-radius: 50%;
  display: grid; place-items: center;
  border: 1.5px solid var(--ink);
  font-family: var(--f-display); font-size: 1.35rem; color: var(--ink);
  background: var(--paper);
}
.route::before {
  content: ""; position: absolute; left: calc(1.45rem - 1px); top: 2.6rem; bottom: 2.6rem;
  border-left: 2px dashed var(--rose);
}

/* 5. Online ou presencial */
.formats { display: grid; gap: clamp(2.5rem, 6vw, 5rem); align-items: center; }
.formats__photo { margin: 0; }
.formats__photo img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 2px; }
.format { padding-block: 1.5rem; border-top: 1px solid var(--rule); }
.format:last-child { padding-bottom: 0; }
.format p, .format address { margin: 0 0 .9rem; }
.format address { font-size: 1.05em; color: var(--ink); line-height: 1.55; }
.link-arrow {
  display: inline-flex; align-items: center; gap: .45rem;
  font-family: var(--f-ui); font-weight: 600; font-size: .98rem;
  min-height: 44px;
}

/* 6. Sigilo */
.envelope--band { padding: var(--section) var(--pad); }
.seal {
  max-width: 640px; margin-inline: auto; text-align: center;
  background: var(--sheet);
  padding: clamp(2rem, 5vw, 3.25rem) clamp(1.5rem, 5vw, 3.5rem);
  box-shadow: 0 18px 40px -22px rgba(0,0,0,.45);
  border-radius: 2px;
}
.seal h2 { font-size: clamp(1.75rem, 1.3rem + 2vw, 2.6rem); margin-bottom: 1rem; }
.seal p { margin: 0; color: var(--ink-soft); }

/* 7. Sobre mim */
.about { display: grid; gap: clamp(2.5rem, 6vw, 5rem); align-items: start; }
.about__photo { margin: 0; }
.about__photo img { width: 100%; aspect-ratio: 1000 / 1214; object-fit: cover; border-radius: 2px; }
.about__text { max-width: 62ch; }
.pullquote {
  margin: 2rem 0 0; padding: 1.5rem 0 0;
  border-top: 1px solid var(--ink);
}
.pullquote p {
  margin: 0; font-style: italic; font-size: 1.22em; line-height: 1.5; color: var(--ink);
}

/* 8. Resposta */
.reply {
  position: relative;
  background: var(--ink);
  color: var(--on-dark);
  padding: calc(var(--section) + clamp(1.5rem, 5vw, 3.5rem)) var(--pad) calc(var(--section) * .85);
  text-align: center;
}
/* Aba do envelope: a resposta chega como um envelope aberto */
.reply::before {
  content: ""; position: absolute; left: 0; right: 0; top: -1px;
  height: clamp(1.75rem, 5vw, 3.75rem);
  background: var(--paper);
  clip-path: polygon(0 0, 100% 0, 50% 100%);
}
.reply__inner { max-width: 760px; margin-inline: auto; }
.reply h2 { color: var(--on-dark); font-size: clamp(2.25rem, 1.5rem + 3.4vw, 4rem); }
.reply p { color: var(--on-dark-soft); }
.reply .btn { margin-top: 1rem; }
.reply__number { margin: 1rem 0 0; font-family: var(--f-ui); font-weight: 600; letter-spacing: .03em; color: var(--rose) !important; }
.reply__also {
  margin: 3rem auto 0; max-width: 46ch;
  padding-top: 1.5rem; border-top: 1px solid rgba(218,164,152,.45);
  font-size: .95em;
}

/* ---------- Rodapé ---------- */
.site-footer {
  background: var(--ink-deep); color: var(--on-dark-soft);
  border-top: 1px solid rgba(218,164,152,.35);
  padding-block: 3rem 2rem;
  font-family: var(--f-ui); font-size: .92rem; line-height: 1.6;
}
.site-footer p { margin: 0; }
.site-footer a { color: var(--on-dark); }
.site-footer a:hover { color: var(--rose); }
.site-footer__grid { display: grid; gap: 1.5rem; }
.site-footer__name { font-family: var(--f-display); font-size: 1.15rem; color: var(--on-dark); }
.site-footer__links { display: grid; gap: .35rem; }
.site-footer__links a { display: inline-flex; min-height: 32px; align-items: center; }
.site-footer .site-footer__care { margin: 2rem auto 0; padding-top: 1.25rem; border-top: 1px solid rgba(255,255,255,.14); color: #9a9a9a; }

/* ---------- Barra fixa do celular ---------- */
.mobile-reply {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
  padding: .7rem var(--pad) calc(.7rem + env(safe-area-inset-bottom));
  background: rgba(255, 255, 255, .96);
  border-top: 1px solid var(--rule);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  transition: transform .35s var(--ease);
}
.mobile-reply.is-hidden { transform: translateY(110%); }
.site-footer { padding-bottom: calc(2rem + 76px + env(safe-area-inset-bottom)); }

/* ---------- Movimento: a escrita à tinta ---------- */
.js .note__strike { transform: scaleX(0); transition: transform .9s var(--ease) .35s; }
.js .ink-reveal { clip-path: inset(0 100% 0 0); transition: clip-path 1.3s var(--ease) 1.1s; }
.js .is-written .note__strike { transform: scaleX(1); }
.js .is-written .ink-reveal { clip-path: inset(0 0 0 0); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .note__strike { transform: none; transition: none; }
  .js .ink-reveal { clip-path: none; transition: none; }
  .btn, .mobile-reply { transition: none; }
}

/* ---------- Tablet (≥ 720px) ---------- */
@media (min-width: 720px) {
  .letter__photo { width: 40%; margin: -.5rem -.75rem 1.25rem 1.75rem; }
  .letter__title { clear: none; }
  .postmark { width: 118px; height: 118px; left: auto; top: auto; right: 18rem; bottom: 2.25rem; }
  .letterhead .btn { display: inline-flex; }
  .topics { grid-template-columns: 1fr 1fr; column-gap: 3rem; }
  .route { grid-template-columns: repeat(3, 1fr); gap: 2.5rem; }
  .route__stop { padding-left: 0; padding-top: 4.25rem; }
  .route__num { top: 0; }
  .route::before { left: 1.45rem; right: calc((100% - 5rem) / 3 - 1.45rem); top: calc(1.45rem - 1px); bottom: auto; border-left: 0; border-top: 2px dashed var(--rose); }
  .formats { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); }
  .site-footer__grid { grid-template-columns: 1fr 1.2fr 1fr; }
  .mobile-reply { display: none; }
  .site-footer { padding-bottom: 2rem; }
  .about { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
  .about__photo { order: 2; }
}

/* ---------- Computador (≥ 1040px) ---------- */
@media (min-width: 1040px) {
  .letterhead__nav { display: flex; }
  .hero { padding-top: 4rem; }
  .letter { margin-left: max(calc((100% - var(--wrap)) / 2 + 2rem), 6%); margin-right: auto; max-width: 720px; padding-right: 4rem; }
  .letter__photo {
    float: none; position: absolute;
    width: 320px; max-width: none;
    right: -250px; top: 3.5rem; margin: 0;
  }
  .letter__title { max-width: 12ch; }
  .letter__body { max-width: 52ch; }
  .postmark { width: 132px; height: 132px; right: 1.25rem; top: 25rem; bottom: auto; }
  .split { grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); }
  .topics { grid-template-columns: 1fr 1fr 1fr; }
}
@media (min-width: 1280px) {
  .letter { margin-left: calc((100% - var(--wrap)) / 2 + 4rem); }
}

/* Contorno de foco claro nos fundos azuis (contraste) */
.reply :focus-visible, .site-footer :focus-visible, .envelope :focus-visible { outline-color: var(--rose); }

/* Linha rosé curta sob os títulos, como nos posts da Vanessa */
.section h2::after, .seal h2::after {
  content: ""; display: block; width: 4.5rem; height: 2px; margin-top: 1.1rem;
  background: var(--rose);
}
.seal h2::after { margin-inline: auto; }
.topics { border-top-color: var(--rose); }
.pullquote { border-top-color: var(--rose); }
.route__num { border-color: var(--ink); }
.reply h2::after { content: ""; display: block; width: 4.5rem; height: 2px; margin: 1.25rem auto 0; background: var(--rose); }
.reply::before { background: var(--paper); }
