/* Portal Reinner para FutureProofing
   Design tokens extraidos do site futureproofing.dev (nov/2026):
   paper #e8e7f3, ink #171427, violet #7537eb, muted #777080, cream #f3f0e9,
   fonte Manrope, headings peso 500 com tracking apertado. */

:root {
  --paper: #e8e7f3;
  --ink: #171427;
  --violet: #7537eb;
  --accent: #9b6cf0;
  --muted: #777080;
  --line: rgba(23, 20, 39, .15);
  --cream: #f3f0e9;
  --card: #f4f3f9;
  --emerald: #00bb7f;
  --gutter: clamp(24px, 4vw, 72px);
  --font: "Manrope", Arial, sans-serif;
}

* { box-sizing: border-box; }

/* O atributo hidden perde para display proprio (ex.: .auth-shell grid);
   esta regra garante que esconder via hidden sempre funcione. */
[hidden] { display: none !important; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  margin: 0;
  font-weight: 500;
  letter-spacing: -.05em;
  line-height: 1.12;
  text-wrap: balance;
}

p { margin: 0; text-wrap: pretty; }

a { color: inherit; }

img { display: block; }

/* ---------- Auth shell (login / reset / recovery) ---------- */

.auth-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: var(--gutter);
}

.auth-card {
  width: 100%;
  max-width: 420px;
}

.auth-card .wordmark { height: 22px; width: auto; margin-bottom: 42px; }

.eyebrow {
  font-size: 11.5px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 10px;
}

.auth-card h1 { font-size: 34px; margin-bottom: 10px; }

.lead { color: var(--muted); margin-bottom: 28px; }

.field { display: block; margin-bottom: 16px; }

.field span {
  display: block;
  font-size: 12px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 6px;
}

.field input {
  width: 100%;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 14px;
  font: inherit;
  color: var(--ink);
  outline: none;
  transition: border-color .15s;
}

.field input:focus { border-color: var(--violet); }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  border: 0;
  border-radius: 8px;
  padding: 12px 22px;
  transition: opacity .15s, transform .15s;
}

.btn:active { transform: translateY(1px); }

.btn--primary { background: var(--ink); color: var(--paper); width: 100%; justify-content: center; }
.btn--primary:hover { opacity: .88; }
.btn[disabled] { opacity: .55; cursor: default; }

.linkbtn {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  font-size: 13px;
  color: var(--ink);
  border-bottom: 1px solid var(--line);
  cursor: pointer;
  transition: border-color .15s;
}
.linkbtn:hover { border-color: var(--ink); }
.linkbtn--muted { color: var(--muted); }

.row { display: flex; gap: 14px; margin-top: 18px; }
.row--end { justify-content: flex-end; }

.msg { font-size: 13.5px; margin-top: 14px; }
.msg--error { color: #b3261e; }
.msg--ok { color: var(--emerald); }

.spinner {
  width: 26px; height: 26px;
  border: 2px solid var(--line);
  border-top-color: var(--violet);
  border-radius: 50%;
  display: inline-block;
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.auth-foot {
  margin-top: 40px;
  font-size: 12px;
  color: var(--muted);
}

/* ---------- Portal ---------- */

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 20px var(--gutter);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(12px);
  z-index: 10;
}

.topbar .brandrow { display: flex; align-items: center; gap: 14px; }
.topbar .wordmark { height: 16px; width: auto; }
.topbar .brandx { font-size: 13px; color: var(--muted); white-space: nowrap; }
.topbar .brandx strong { color: var(--ink); font-weight: 600; }

.section {
  padding: clamp(48px, 7vw, 96px) var(--gutter);
  border-bottom: 1px solid var(--line);
}

.hero h1 {
  font-size: clamp(42px, 5.3vw, 84px);
  max-width: 14ch;
}
.hero h1 em { color: var(--violet); font-style: normal; }

.hero-grid {
  display: grid;
  grid-template-columns: 1.8fr 1fr;
  gap: 48px;
  align-items: end;
}

.hero-aside { max-width: 360px; color: var(--muted); justify-self: end; }
.hero-aside strong { color: var(--ink); }

.kicker {
  display: flex;
  align-items: baseline;
  gap: 16px;
  margin-bottom: 34px;
}
.kicker .num { font-size: 13px; color: var(--violet); font-weight: 700; letter-spacing: .08em; }
.kicker h2 { font-size: clamp(28px, 3vw, 44px); }
.kicker .tag { font-size: 12.5px; color: var(--muted); margin-left: auto; text-align: right; }

.project {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(24px, 4vw, 56px);
  align-items: start;
}

.project + .project { margin-top: clamp(40px, 6vw, 72px); padding-top: clamp(40px, 6vw, 72px); border-top: 1px solid var(--line); }

.project h3 { font-size: clamp(22px, 2.2vw, 30px); margin-bottom: 6px; }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px 12px;
  margin-bottom: 16px;
}
.badge .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--emerald); }
.badge--violet .dot { background: var(--violet); }

.project p { color: var(--ink); margin-bottom: 14px; }
.project .sub { color: var(--muted); font-size: 13.5px; }

.media {
  background: var(--ink);
  border-radius: 14px;
  overflow: hidden;
  aspect-ratio: 16 / 10;
}
.media iframe, .media video { width: 100%; height: 100%; border: 0; display: block; object-fit: contain; background: var(--ink); }

.media-caption { font-size: 12.5px; color: var(--muted); margin-top: 10px; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.chip {
  font-size: 12.5px;
  text-decoration: none;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 13px;
  background: var(--card);
  transition: border-color .15s, background .15s;
}
.chip:hover { border-color: var(--violet); color: var(--violet); }

.cardgrid {
  display: grid;
  /* minmax(0,1fr) impede que a largura natural das thumbs estoure as colunas */
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 26px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.card h3 { font-size: 19px; }
.card p { color: var(--muted); font-size: 13.5px; flex: 1; }
.card a.out {
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid var(--line);
  align-self: flex-start;
  padding-bottom: 2px;
  transition: border-color .15s;
}
.card a.out:hover { border-color: var(--ink); }

.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  counter-reset: step;
}
.step {
  border-top: 2px solid var(--ink);
  padding-top: 16px;
}
.step .n { font-size: 12px; font-weight: 700; color: var(--violet); letter-spacing: .08em; }
.step h3 { font-size: 17px; margin: 6px 0 8px; }
.step p { color: var(--muted); font-size: 13.5px; }

.footer {
  background: var(--ink);
  color: var(--paper);
  padding: clamp(48px, 7vw, 80px) var(--gutter);
}
.footer .wordmark { height: 18px; width: auto; margin-bottom: 26px; }
.footer p { color: rgba(244, 243, 249, .65); font-size: 13.5px; max-width: 52ch; }
.footer .cta {
  display: inline-block;
  margin-top: 22px;
  color: var(--paper);
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid rgba(244, 243, 249, .4);
  padding-bottom: 2px;
}
.footer .cta:hover { border-color: var(--paper); }
.footer .legal { margin-top: 40px; font-size: 12px; color: rgba(244, 243, 249, .45); }

/* ---------- Galeria de sites ---------- */

.grid-intro { color: var(--muted); max-width: 70ch; margin-bottom: 30px; }

.cardgrid--sites .card { padding: 0 0 22px; overflow: hidden; }
.cardgrid--sites .card h3, .cardgrid--sites .card p { padding: 0 22px; }
.cardgrid--sites .card a.out { margin-left: 22px; }

.shotbtn {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: none;
  cursor: zoom-in;
  margin-bottom: 16px;
}
.shot {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  object-position: top;
  display: block;
  transition: opacity .15s;
}
.shotbtn:hover .shot { opacity: .85; }

/* ---------- Inspect (lightbox) ---------- */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(23, 20, 39, .92);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: clamp(16px, 4vw, 48px);
  gap: 14px;
}
.lb-body { max-width: min(1400px, 100%); max-height: 82vh; display: flex; }
.lb-body video, .lb-body img {
  max-width: 100%;
  max-height: 82vh;
  border-radius: 10px;
  background: #000;
  object-fit: contain;
}
.lb-close {
  position: absolute;
  top: 18px; right: 24px;
  background: none; border: 0;
  color: var(--paper);
  font-size: 34px;
  line-height: 1;
  cursor: pointer;
  opacity: .8;
}
.lb-close:hover { opacity: 1; }
.lb-open {
  color: rgba(244, 243, 249, .75);
  font-size: 13px;
  text-decoration: none;
  border-bottom: 1px solid rgba(244, 243, 249, .35);
  padding-bottom: 2px;
}
.lb-open:hover { color: var(--paper); }

/* ---------- Acesso de cliente (login e senha por projeto) ---------- */

.access {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 22px 24px;
}
.access h4 { font-size: 15px; margin: 0 0 4px; }
.access-shot {
  display: block;
  width: 100%;
  border: 0;
  padding: 0;
  margin: 0 0 16px;
  border-radius: 10px;
  overflow: hidden;
  cursor: zoom-in;
  background: none;
}
.access-shot .shot { border-radius: 10px; }
.access .sub { margin-bottom: 14px; }
.access dl { margin: 0; display: grid; gap: 8px; }
.access dl div { display: flex; gap: 12px; align-items: baseline; }
.access dt {
  font-size: 11px;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--muted);
  min-width: 76px;
}
.access dd { margin: 0; font-size: 14px; word-break: break-all; }
.access .mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; }
.access a { color: var(--violet); text-decoration: none; border-bottom: 1px solid rgba(117, 55, 235, .3); }

.btn--small { padding: 9px 16px; font-size: 13px; width: auto; justify-self: start; background: var(--ink); color: var(--paper); }

/* ---------- Camada de revisao: pinos, aprovacao e inspect ---------- */

.rv-crosshair, .rv-crosshair * { cursor: crosshair !important; }

.rv-toolbar {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 60;
  display: flex;
  gap: 8px;
  background: var(--ink);
  border-radius: 999px;
  padding: 6px;
  box-shadow: 0 10px 30px rgba(23, 20, 39, .35);
}
.rv-toolbar button {
  border: 0;
  background: transparent;
  color: var(--paper);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: 999px;
  cursor: pointer;
}
.rv-toolbar button.on, .rv-toolbar button:hover { background: var(--violet); }
#rv-count { color: rgba(244, 243, 249, .65); font-weight: 400; }

.rv-pins { position: absolute; top: 0; left: 0; width: 100%; height: 0; z-index: 55; }
.rv-pin {
  position: absolute;
  transform: translate(-50%, -100%);
  width: 26px;
  height: 26px;
  border-radius: 50% 50% 50% 4px;
  border: 2px solid #fff;
  background: var(--violet);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(23, 20, 39, .3);
}
.rv-pin--answered { background: #b8860b; }
.rv-pin--resolved { background: #2e7d4f; opacity: .55; }

.rv-composer {
  position: absolute;
  z-index: 62;
  width: 280px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
  display: grid;
  gap: 8px;
  box-shadow: 0 14px 40px rgba(23, 20, 39, .25);
}
.rv-composer input, .rv-composer textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  font: inherit;
  font-size: 13px;
  outline: none;
}
.rv-composer textarea { min-height: 64px; resize: vertical; }
.rv-composer input:focus, .rv-composer textarea:focus { border-color: var(--violet); }
.rv-row { display: flex; gap: 8px; }

.rv-panel {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(360px, 92vw);
  z-index: 61;
  background: #fff;
  border-left: 1px solid var(--line);
  box-shadow: -18px 0 50px rgba(23, 20, 39, .15);
  display: flex;
  flex-direction: column;
}
.rv-panel header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
}
.rv-panel h4 { margin: 0; font-size: 15px; flex: 1; }
.rv-x, .rv-back { border: 0; background: none; font-size: 20px; cursor: pointer; color: var(--muted); padding: 0 4px; }
.rv-body { padding: 16px 18px; overflow-y: auto; flex: 1; }
.rv-hint { font-size: 13.5px; color: var(--muted); }

.rv-row-note {
  display: block;
  width: 100%;
  text-align: left;
  border: 1px solid var(--line);
  background: var(--card);
  border-radius: 10px;
  padding: 12px;
  margin-bottom: 10px;
  cursor: pointer;
  font: inherit;
}
.rv-row-note:hover { border-color: var(--violet); }
.rv-row-note p { margin: 6px 0 0; font-size: 13.5px; }
.rv-note-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.rv-num {
  width: 20px; height: 20px; border-radius: 50%;
  background: var(--violet); color: #fff;
  font-size: 11px; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center;
}
.rv-who { font-size: 12px; color: var(--muted); }
.rv-status {
  font-size: 11px; font-weight: 600;
  padding: 2px 8px; border-radius: 999px;
  margin-left: auto;
}
.rv-status--open { background: rgba(117, 55, 235, .12); color: var(--violet); }
.rv-status--answered { background: rgba(184, 134, 11, .14); color: #8a6508; }
.rv-status--resolved { background: rgba(46, 125, 79, .14); color: #2e7d4f; }
.rv-full { font-size: 14px; margin: 10px 0 16px; }
.rv-reply { border-left: 2px solid var(--line); padding-left: 10px; margin-bottom: 12px; }
.rv-reply p { font-size: 13.5px; margin: 2px 0 0; }
.rv-replyform { display: grid; gap: 8px; margin: 14px 0; }
.rv-replyform textarea {
  width: 100%; border: 1px solid var(--line); border-radius: 8px;
  padding: 8px 10px; font: inherit; font-size: 13px; min-height: 56px; resize: vertical; outline: none;
}
.rv-replyform textarea:focus { border-color: var(--violet); }
.rv-actions { display: flex; gap: 8px; margin-top: 4px; }
.rv-jump { margin-top: 14px; font-size: 13px; color: var(--violet); border: 0; background: none; cursor: pointer; text-decoration: underline; }

.rv-overlay { position: fixed; inset: 0; z-index: 58; pointer-events: none; }
.rv-outline { position: fixed; border: 1.5px solid var(--violet); background: rgba(117, 55, 235, .06); }
.rv-outline--fixed { border-width: 2px; }
.rv-margin { position: fixed; background: rgba(230, 150, 60, .22); }
.rv-padding {
  position: fixed;
  background: repeating-linear-gradient(45deg, rgba(46, 125, 79, .18) 0 4px, transparent 4px 8px);
}
.rv-tag {
  position: fixed;
  background: var(--ink);
  color: var(--paper);
  font-size: 11.5px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  padding: 3px 8px;
  border-radius: 6px;
  white-space: nowrap;
}
.rv-specs { margin: 0; display: grid; gap: 10px; }
.rv-specs div { border-bottom: 1px dashed var(--line); padding-bottom: 8px; }
.rv-specs dt { font-size: 11px; letter-spacing: .09em; text-transform: uppercase; color: var(--muted); }
.rv-specs dd { margin: 2px 0 0; font-size: 13px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; word-break: break-all; }

/* ---------- Responsive ---------- */

@media (max-width: 920px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-aside { justify-self: start; }
  .project { grid-template-columns: 1fr; }
  .cardgrid { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr 1fr; }
  .kicker { flex-wrap: wrap; }
  .kicker .tag { margin-left: 0; text-align: left; width: 100%; }
}

@media (max-width: 560px) {
  .steps { grid-template-columns: 1fr; }
  .topbar .brandx { display: none; }
}
