/* =========================================================
   Jefferson dos Santos · Portfólio
   Paleta: verde oliva + terracota sobre papel creme
   ========================================================= */

:root {
  --paper: #F3EEE3;
  --paper-2: #EAE3D3;
  --ink: #1D1E15;
  --ink-soft: #4A4B3C;
  --olive: #5C602B;
  --olive-deep: #2F321A;
  --olive-light: #B9BB86;
  --terra: #B5532C;
  --terra-light: #E59A73;
  --line: rgba(29, 30, 21, .16);
  --line-strong: rgba(29, 30, 21, .85);

  --display: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "Courier New", monospace;

  --gutter: clamp(16px, 4vw, 48px);
  --max: 1280px;
  --radius: 4px;
}

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

html { scroll-behavior: smooth; scroll-padding-top: 72px; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--display);
  font-size: 17px;
  line-height: 1.6;
  font-variation-settings: "wdth" 100;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3, h4 { margin: 0; line-height: 1.05; font-weight: 800; }
p { margin: 0 0 1em; }
ul, ol { margin: 0; padding: 0; list-style: none; }
figure { margin: 0; }
em { font-style: italic; }

::selection { background: var(--terra); color: var(--paper); }

:focus-visible { outline: 2px solid var(--terra); outline-offset: 3px; }

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.mono { font-family: var(--mono); font-size: .78rem; letter-spacing: .04em; text-transform: uppercase; font-weight: 500; }

.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: var(--paper); padding: 8px 14px; z-index: 100; }
.skip:focus { left: 8px; }

/* ---------- Topbar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 50;
  background: rgba(243, 238, 227, .88);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.topbar__inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { font-weight: 900; font-size: 1.35rem; text-decoration: none; letter-spacing: -.02em; font-variation-settings: "wdth" 125; }
.brand span { color: var(--terra); }

.nav { display: flex; align-items: center; gap: 28px; }
.nav a {
  font-family: var(--mono); font-size: .78rem; text-transform: uppercase; letter-spacing: .06em;
  text-decoration: none; position: relative; padding: 4px 0;
}
.nav a:not(.nav__cta)::after {
  content: ""; position: absolute; left: 0; right: 100%; bottom: 0; height: 1px; background: var(--terra);
  transition: right .25s ease;
}
.nav a:not(.nav__cta):hover::after { right: 0; }
.nav__cta { background: var(--ink); color: var(--paper); padding: 9px 16px !important; border-radius: 99px; transition: background .2s; }
.nav__cta:hover { background: var(--terra); }

.menu-btn { display: none; width: 44px; height: 44px; border: 1px solid var(--line-strong); border-radius: 99px; background: transparent; cursor: pointer; position: relative; }
.menu-btn span { position: absolute; left: 12px; right: 12px; height: 1.5px; background: var(--ink); transition: transform .25s, top .25s; }
.menu-btn span:first-child { top: 17px; }
.menu-btn span:last-child { top: 25px; }
.menu-btn[aria-expanded="true"] span:first-child { top: 21px; transform: rotate(45deg); }
.menu-btn[aria-expanded="true"] span:last-child { top: 21px; transform: rotate(-45deg); }

/* ---------- Hero ---------- */
.hero { padding: clamp(40px, 7vw, 96px) 0 clamp(56px, 7vw, 96px); }
.hero__grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, .65fr); gap: clamp(24px, 4vw, 56px); align-items: end; }

.label { display: inline-flex; align-items: center; gap: 10px; font-family: var(--mono); font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; margin-bottom: 28px; }
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--terra); box-shadow: 0 0 0 4px rgba(181, 83, 44, .18); }

.hero__name {
  font-size: clamp(3.2rem, 9.6vw, 9rem);
  font-weight: 900;
  line-height: .86;
  letter-spacing: -.035em;
  text-transform: uppercase;
  font-variation-settings: "wdth" 72;
  margin-bottom: 32px;
}
.hero__name .line { display: block; }
.line--outline { color: var(--olive); }

.hero__claim {
  font-size: clamp(1.25rem, 2.3vw, 1.8rem);
  line-height: 1.3;
  font-weight: 400;
  max-width: 26ch;
  margin-bottom: 32px;
}
.hero__claim em { font-style: italic; color: var(--terra); font-weight: 600; }

.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; }
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--mono); font-size: .82rem; text-transform: uppercase; letter-spacing: .06em; font-weight: 500;
  padding: 15px 22px; border-radius: 99px; text-decoration: none;
  border: 1px solid var(--ink); transition: background .2s, color .2s, border-color .2s;
}
.btn--solid { background: var(--terra); border-color: var(--terra); color: var(--paper); }
.btn--solid:hover { background: var(--ink); border-color: var(--ink); }
.btn--ghost:hover { background: var(--ink); color: var(--paper); }

.hero__img { position: relative; z-index: 0; }
.hero__photo img {
  width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: 40% 50%;
  border-radius: var(--radius);
  filter: saturate(.85) contrast(1.02);
}
.hero__img::before {
  content: ""; position: absolute; inset: 14px -14px -14px 14px; border: 1px solid var(--terra); border-radius: var(--radius); z-index: -1;
}
.hero__photo figcaption { margin-top: 26px; color: var(--ink-soft); font-size: .7rem; }

/* ---------- Ticker ---------- */
.ticker { background: var(--terra); color: var(--paper); overflow: hidden; border-block: 1px solid var(--ink); }
.ticker__track { display: flex; width: max-content; animation: ticker 28s linear infinite; }
.ticker span {
  font-size: clamp(1.4rem, 3vw, 2.2rem); font-weight: 800; text-transform: uppercase; letter-spacing: -.01em;
  font-variation-settings: "wdth" 75; padding: 14px 28px; white-space: nowrap; display: inline-flex; align-items: center; gap: 56px;
}
.ticker span::after { content: "✳"; font-size: .7em; color: var(--olive-deep); }
@keyframes ticker { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .ticker__track { animation: none; } }

/* ---------- Sections ---------- */
.section { padding: clamp(72px, 10vw, 140px) 0; }
.section--tight { padding: clamp(48px, 6vw, 80px) 0; border-top: 1px solid var(--line); }
.section--dark { background: var(--olive-deep); color: var(--paper); }
.section--olive { background: var(--paper-2); }

.section__head {
  display: grid; gap: 16px;
  border-bottom: 1px solid currentColor; padding-bottom: 20px; margin-bottom: clamp(40px, 6vw, 72px);
}
.section__head h2 {
  font-size: clamp(3rem, 9vw, 7.5rem); font-weight: 900; text-transform: uppercase; letter-spacing: -.035em;
  line-height: .85; font-variation-settings: "wdth" 72;
}
.section__intro { margin: 0; max-width: 52ch; font-size: clamp(1.05rem, 1.6vw, 1.25rem); opacity: .8; }
.section__head h2.section__title--long { font-size: clamp(2.6rem, 7vw, 6rem); line-height: .9; }
.section__title--long span { color: var(--terra); }

.subhead {
  font-family: var(--mono); font-size: .8rem; font-weight: 500; text-transform: uppercase; letter-spacing: .08em;
  margin: 0 0 24px; display: flex; align-items: center; gap: 12px;
}
.subhead::before { content: ""; width: 24px; height: 1px; background: currentColor; }

/* ---------- Sobre ---------- */
.about { display: grid; grid-template-columns: 1.2fr .8fr; gap: clamp(32px, 6vw, 96px); align-items: start; margin-bottom: clamp(64px, 9vw, 120px); }
.lead { font-size: clamp(1.3rem, 2.2vw, 1.75rem); line-height: 1.35; font-weight: 400; margin-bottom: 1.2em; }
.lead strong { font-weight: 700; color: var(--olive); }
.about__text p:not(.lead) { color: var(--ink-soft); max-width: 60ch; }
.about__text p.statement {
  margin: 36px 0 0; padding: 4px 0 4px 24px; border-left: 3px solid var(--terra);
  font-size: clamp(1.1rem, 1.8vw, 1.35rem); line-height: 1.4; font-weight: 600; color: var(--ink);
}
.about__photo img { aspect-ratio: 3 / 4; object-fit: cover; object-position: 42% 40%; border-radius: var(--radius); width: 100%; }

.steps { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line-strong); margin-bottom: clamp(64px, 9vw, 120px); }
.step { padding: 24px 24px 8px 0; border-right: 1px solid var(--line); }
.step + .step { padding-left: 24px; }
.step:last-child { border-right: 0; }
.step__n { color: var(--terra); }
.step h4 { font-size: clamp(1.4rem, 2.2vw, 1.9rem); margin: 14px 0 10px; font-variation-settings: "wdth" 85; letter-spacing: -.01em; }
.step p { color: var(--ink-soft); font-size: .95rem; }

.skills { display: grid; grid-template-columns: 1.2fr .8fr; gap: clamp(32px, 6vw, 96px); }
.tags { display: flex; flex-wrap: wrap; gap: 10px; }
.tags li { border: 1px solid var(--line-strong); border-radius: 99px; padding: 8px 16px; font-size: .95rem; transition: background .2s, color .2s; }
.tags li:hover { background: var(--olive); border-color: var(--olive); color: var(--paper); }

.tools li { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.tools li span { font-weight: 600; }
.lvl { font-style: normal; font-family: var(--mono); font-size: .7rem; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-soft); display: inline-grid; grid-template-columns: 54px 9.5em; align-items: center; gap: 10px; }
.lvl::before {
  content: ""; width: 54px; height: 6px; border-radius: 6px;
  background: linear-gradient(90deg, var(--olive) var(--fill), rgba(29, 30, 21, .12) var(--fill));
}
.lvl[data-lvl="1"] { --fill: 33%; }
.lvl[data-lvl="2"] { --fill: 66%; }
.lvl[data-lvl="3"] { --fill: 100%; }

/* ---------- Cases ---------- */
.case {
  display: grid; grid-template-columns: .9fr 1.1fr; gap: 32px clamp(32px, 5vw, 80px);
  padding: clamp(40px, 6vw, 72px) 0; border-top: 1px solid rgba(243, 238, 227, .22);
}
.case:first-of-type { border-top: 0; padding-top: 0; }
.case__index { color: var(--terra-light); }
.case__title {
  font-size: clamp(2.2rem, 5vw, 4.2rem); font-weight: 900; letter-spacing: -.03em; line-height: .92;
  text-transform: uppercase; font-variation-settings: "wdth" 75; margin: 14px 0 28px;
}
.case__title span { color: var(--olive-light); }
.case__facts { margin: 0; border-top: 1px solid rgba(243, 238, 227, .22); }
.case__facts div { display: grid; grid-template-columns: 96px 1fr; gap: 16px; padding: 12px 0; border-bottom: 1px solid rgba(243, 238, 227, .22); }
.case__facts dt { font-family: var(--mono); font-size: .7rem; text-transform: uppercase; letter-spacing: .06em; opacity: .65; padding-top: 3px; }
.case__facts dd { margin: 0; font-size: .95rem; }

.case__body { display: grid; gap: 28px; align-content: start; }
.case__block h4 { font-family: var(--mono); font-size: .75rem; font-weight: 500; text-transform: uppercase; letter-spacing: .08em; color: var(--terra-light); margin-bottom: 12px; }
.case__block p { font-size: clamp(1.1rem, 1.6vw, 1.3rem); line-height: 1.45; margin: 0; }
.checks li { position: relative; padding: 8px 0 8px 28px; border-bottom: 1px dashed rgba(243, 238, 227, .18); }
.checks li::before { content: "→"; position: absolute; left: 0; top: 8px; color: var(--terra-light); }
.case__links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.chip {
  font-family: var(--mono); font-size: .75rem; text-decoration: none; letter-spacing: .03em;
  padding: 9px 14px; border-radius: 99px; border: 1px solid rgba(243, 238, 227, .5); transition: background .2s, color .2s;
}
.chip:hover { background: var(--paper); color: var(--olive-deep); }

.case__media { grid-column: 1 / -1; min-width: 0; }

.embeds { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.embeds > * { min-width: 0; }
.embed__frame {
  position: relative; aspect-ratio: 9 / 15; background: rgba(243, 238, 227, .06);
  border: 1px solid rgba(243, 238, 227, .2); border-radius: var(--radius); overflow: hidden;
}
.embed__frame::before {
  content: "Carregando post…"; position: absolute; inset: 0; display: grid; place-items: center;
  font-family: var(--mono); font-size: .7rem; text-transform: uppercase; letter-spacing: .06em; opacity: .5;
}
.embed__frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: #fff; }

/* Resultados */
.results { grid-column: 1 / -1; border-top: 1px solid rgba(243, 238, 227, .22); padding-top: 24px; }
.results__label { color: var(--terra-light); margin: 0 0 20px; font-size: .72rem; }
.results__grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 1px; background: rgba(243, 238, 227, .18); border: 1px solid rgba(243, 238, 227, .18); border-radius: var(--radius); overflow: hidden; }
.results__grid li { background: var(--olive-deep); padding: 22px 18px; }
.results__grid strong { display: block; font-size: clamp(1.9rem, 3.4vw, 3rem); font-weight: 900; line-height: 1; letter-spacing: -.02em; font-variation-settings: "wdth" 78; color: var(--paper); }
.results__grid span { display: block; margin-top: 10px; font-family: var(--mono); font-size: .7rem; text-transform: uppercase; letter-spacing: .05em; opacity: .7; }

.results__note { margin: 12px 0 0; font-size: .8rem; opacity: .6; max-width: 80ch; }
.results__grid--wide { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.results__grid--wide span { text-transform: none; font-family: var(--display); font-size: .98rem; letter-spacing: 0; line-height: 1.45; opacity: .85; max-width: 46ch; }

/* ---------- Logos ---------- */
.logos { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.logos li {
  display: grid; place-items: center; height: 110px; padding: 24px;
  border-right: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.logos img { max-height: 40px; max-width: 120px; width: auto; filter: brightness(0); opacity: .72; transition: opacity .2s, filter .2s; }
.logos li:hover img { opacity: 1; }
.logos .logo--small { max-height: 30px; }
/* ---------- Contato ---------- */
.contact { background: var(--ink); color: var(--paper); }
.contact .dot { box-shadow: 0 0 0 4px rgba(229, 154, 115, .2); }
.contact__title {
  font-size: clamp(3.4rem, 13vw, 11rem); font-weight: 900; text-transform: uppercase; letter-spacing: -.04em;
  line-height: .85; font-variation-settings: "wdth" 70; margin-bottom: 36px;
}
.contact__title em { color: var(--terra-light); font-style: italic; }
.contact__mail {
  display: inline-block; font-size: clamp(1.3rem, 4vw, 3rem); font-weight: 700; letter-spacing: -.02em;
  text-decoration: none; border-bottom: 2px solid var(--terra); padding-bottom: 4px; margin-bottom: 56px;
  word-break: break-word; transition: color .2s;
}
.contact__mail:hover { color: var(--terra-light); }
.contact__list { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid rgba(243, 238, 227, .25); }
.contact__list a {
  display: flex; flex-direction: column; gap: 8px; padding: 22px 16px 22px 0; text-decoration: none; font-size: 1.05rem; font-weight: 600;
  border-right: 1px solid rgba(243, 238, 227, .15); transition: color .2s;
}
.contact__list li + li a { padding-left: 16px; }
.contact__list li:last-child a { border-right: 0; }
.contact__list a .mono { color: var(--olive-light); font-size: .7rem; font-weight: 500; }
.contact__list a:hover { color: var(--terra-light); }

/* ---------- Footer ---------- */
.footer { background: var(--ink); color: rgba(243, 238, 227, .6); border-top: 1px solid rgba(243, 238, 227, .12); font-size: .85rem; }
.footer__inner { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-block: 24px; }
.footer a { text-decoration: none; }
.footer a:hover { color: var(--paper); }

/* ---------- Revelar ao rolar ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s ease; }
.reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } }

/* =========================================================
   Responsivo
   ========================================================= */
@media (max-width: 1024px) {
  .embeds { grid-template-columns: repeat(4, 300px); overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 8px; margin-right: calc(var(--gutter) * -1); padding-right: var(--gutter); }
  .embeds > * { scroll-snap-align: start; }
  .steps { grid-template-columns: 1fr 1fr; }
  .step:nth-child(2) { border-right: 0; }
  .step:nth-child(3) { padding-left: 0; }
  .step:nth-child(n+3) { border-top: 1px solid var(--line); }
}

@media (max-width: 860px) {
  .nav {
    position: fixed; inset: 64px 0 auto 0; flex-direction: column; align-items: stretch; gap: 0;
    background: var(--paper); border-bottom: 1px solid var(--line-strong);
    padding: 8px var(--gutter) 24px;
    transform: translateY(-8px); opacity: 0; visibility: hidden; transition: opacity .2s, transform .2s, visibility .2s;
  }
  .nav.is-open { transform: none; opacity: 1; visibility: visible; }
  .nav a { font-size: 1rem; padding: 16px 0; border-bottom: 1px solid var(--line); }
  .nav a::after { display: none; }
  .nav__cta { margin-top: 16px; text-align: center; border-bottom: 0 !important; padding: 14px !important; }
  .menu-btn { display: block; }

  .hero__grid { grid-template-columns: 1fr; }
  .hero__photo { order: -1; max-width: 420px; }
  .hero__photo img { aspect-ratio: 5 / 4; object-position: 40% 35%; }
  .hero__img::before { inset: 10px -10px -10px 10px; }
  .hero__photo figcaption { display: none; }
  .label { margin-bottom: 20px; }

  .about, .skills { grid-template-columns: 1fr; }
  .about__photo { order: -1; }
  .about__photo img { aspect-ratio: 4 / 3; }

  .case { grid-template-columns: 1fr; }
  .results__grid { grid-template-columns: 1fr 1fr; }
  .results__grid:not(.results__grid--wide) li:first-child { grid-column: 1 / -1; }
  .results__grid--wide { grid-template-columns: 1fr; }
  .embeds { grid-template-columns: repeat(4, 78%); overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 8px; margin-right: calc(var(--gutter) * -1); padding-right: var(--gutter); }
  .embeds > * { scroll-snap-align: start; }

}

@media (max-width: 520px) {
  body { font-size: 16px; }
  .steps { grid-template-columns: 1fr; }
  .step { border-right: 0 !important; padding-left: 0 !important; border-top: 1px solid var(--line); }
  .step:first-child { border-top: 0; }
  .contact__list { grid-template-columns: 1fr; }
  .contact__list a { border-right: 0 !important; padding-left: 0 !important; border-top: 1px solid rgba(243, 238, 227, .15); flex-direction: row; justify-content: space-between; align-items: center; }
  .contact__list li:first-child a { border-top: 0; }
  .case__facts div { grid-template-columns: 80px 1fr; }
  .logos { grid-template-columns: repeat(2, 1fr); }
  .logos li { height: 92px; padding: 18px; }
  .btn { flex: 1 1 auto; justify-content: center; }
}
