/* ============================================================
   Reis da Navalha — bio site
   Paleta: #000000 (preto), #FFFFFF (branco), #EDEDE8 (branco quente),
           #9A9A94 (cinza texto secundário), rgba(255,255,255,.14) (linhas)
   Tipografia: Anton (display) + Montserrat (texto/UI)
   ============================================================ */

* { box-sizing: border-box; }

html, body {
  height: 100%;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Montserrat', sans-serif;
  color: #EDEDE8;
  background: #000;
  overflow-x: hidden;
  min-height: 100dvh;
}

/* ---------- Fundo ---------- */

.bg {
  position: fixed;
  inset: 0;
  z-index: -3;
  background-color: #000;
  background-image: url('assets/zona-de-conforto-mobile.jpg');
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center top;
  transform: translateZ(0);
}

.bg-overlay {
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    linear-gradient(180deg,
      rgba(0,0,0,.30) 0%,
      rgba(0,0,0,.28) 26%,
      rgba(0,0,0,.58) 52%,
      rgba(0,0,0,.88) 78%,
      rgba(0,0,0,.97) 100%);
}

.grain {
  position: fixed;
  inset: 0;
  z-index: -1;
  opacity: .05;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- Layout ---------- */

.page {
  min-height: 100dvh;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  padding: 28px 20px calc(28px + env(safe-area-inset-bottom));
  gap: 26px;
}

.identity {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  text-align: left;
  gap: 14px;
  animation: rise .7s ease-out both;
}

.identity-text {
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}

.avatar {
  flex-shrink: 0;
  width: 104px;
  height: 104px;
  border-radius: 50%;
  padding: 3px;
  background: linear-gradient(160deg, #fff, #6b6b6b 55%, #fff);
  box-shadow: 0 10px 30px rgba(0,0,0,.55);
}

.avatar img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  object-position: center 25%;
  display: block;
  background: #000;
  border: 3px solid #000;
}

.name {
  margin: 0;
  font-family: 'Anton', sans-serif;
  font-weight: 400;
  letter-spacing: .06em;
  font-size: clamp(24px, 6.2vw, 32px);
  color: #fff;
  text-shadow: 0 2px 18px rgba(0,0,0,.6);
}

.handle {
  margin: 0;
  font-size: 13px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: #9A9A94;
}

/* ---------- Links ---------- */

.links {
  width: 100%;
  max-width: 380px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  animation: rise .7s .1s ease-out both;
}

.link-btn {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 15px 16px;
  border-radius: 12px;
  text-decoration: none;
  color: #fff;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.16);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: background .2s ease, border-color .2s ease, transform .15s ease;
}

.link-btn:active { transform: scale(.98); }

.link-btn:hover {
  background: rgba(255,255,255,.12);
  border-color: rgba(255,255,255,.32);
}

.link-btn--outline {
  background: transparent;
  border: 1px solid rgba(255,255,255,.35);
}

.link-btn--outline:hover {
  background: rgba(255,255,255,.08);
}

.link-icon {
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #fff;
  color: #000;
  font-size: 15px;
}

.link-text {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  line-height: 1.25;
  min-width: 0;
}

.link-text strong {
  font-size: 14.5px;
  font-weight: 700;
  letter-spacing: .02em;
  text-transform: uppercase;
}

.link-text small {
  font-size: 12px;
  color: #B9B9B3;
  font-weight: 500;
}

.link-go {
  flex: 0 0 auto;
  color: #B9B9B3;
  font-size: 13px;
}

/* ---------- Footer ---------- */

.foot {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin-top: 4px;
  animation: rise .7s .2s ease-out both;
}

.foot-line {
  width: 34px;
  height: 1px;
  background: rgba(255,255,255,.3);
}

.foot p {
  margin: 0;
  font-size: 10.5px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: #7A7A75;
}

/* ---------- Motion ---------- */

@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  .identity, .links, .foot { animation: none; }
}

/* ============================================================
   RESPONSIVIDADE — FUNDO E CONTEÚDO
   ============================================================ */

/* Configuração geral para celulares em pé */
@media (max-width: 767px) and (orientation: portrait) {
  .bg {
    background-image: url('assets/zona-de-conforto-mobile.jpg');
    background-repeat: no-repeat;

    /* Mostra toda a largura da imagem sem cortar a frase */
    background-size: 100% auto;
    background-position: center top;
  }

  .page {
    min-height: 100svh;
    justify-content: flex-start;
  }

  .links {
    width: 100%;
  }
}

/* ============================================================
   CELULARES ENTRE 200PX E 299PX
   ============================================================ */

@media (min-width: 200px) and (max-width: 299px) {
  .bg {
    background-size: 100% auto;
    background-position: center 0;
  }

  .page {
    padding:
      78vw
      10px
      calc(18px + env(safe-area-inset-bottom));
    gap: 14px;
  }

  .identity {
    gap: 5px;
  }

  .avatar {
    width: 68px;
    height: 68px;
    padding: 2px;
  }

  .avatar img {
    border-width: 2px;
  }

  .name {
    font-size: 19px;
    letter-spacing: .04em;
  }

  .handle {
    font-size: 9px;
    letter-spacing: .08em;
  }

  .links {
    max-width: 270px;
    gap: 8px;
  }

  .link-btn {
    gap: 8px;
    padding: 10px;
    border-radius: 10px;
  }

  .link-icon {
    width: 32px;
    height: 32px;
    font-size: 13px;
  }

  .link-text strong {
    font-size: 11px;
  }

  .link-text small {
    font-size: 9px;
  }

  .foot {
    gap: 7px;
  }

  .foot p {
    font-size: 8px;
  }
}

/* ============================================================
   CELULARES ENTRE 300PX E 349PX
   ============================================================ */

@media (min-width: 300px) and (max-width: 349px) {
  .bg {
    background-size: 100% auto;
    background-position: center top;
  }

  .page {
    padding:
      76vw
      14px
      calc(20px + env(safe-area-inset-bottom));
    gap: 16px;
  }

  .identity {
    gap: 6px;
  }

  .avatar {
    width: 76px;
    height: 76px;
  }

  .name {
    font-size: 21px;
  }

  .handle {
    font-size: 10px;
  }

  .links {
    max-width: 320px;
    gap: 9px;
  }

  .link-btn {
    padding: 11px 12px;
    gap: 10px;
  }

  .link-icon {
    width: 34px;
    height: 34px;
  }

  .link-text strong {
    font-size: 12px;
  }

  .link-text small {
    font-size: 10px;
  }

  .foot p {
    font-size: 8.5px;
  }
}

/* ============================================================
   CELULARES ENTRE 350PX E 379PX
   ============================================================ */

@media (min-width: 350px) and (max-width: 379px) {
  .bg {
    background-size: 100% auto;
    background-position: center top;
  }

  .page {
    padding:
      73vw
      16px
      calc(22px + env(safe-area-inset-bottom));
    gap: 18px;
  }

  .avatar {
    width: 84px;
    height: 84px;
  }

  .name {
    font-size: 23px;
  }

  .handle {
    font-size: 11px;
  }

  .links {
    max-width: 350px;
    gap: 10px;
  }

  .link-btn {
    padding: 12px 13px;
  }

  .link-icon {
    width: 36px;
    height: 36px;
  }

  .link-text strong {
    font-size: 13px;
  }

  .link-text small {
    font-size: 10.5px;
  }
}

/* ============================================================
   CELULARES ENTRE 380PX E 420PX
   AJUSTE PRINCIPAL PARA SAMSUNG, MOTOROLA E XIAOMI
   ============================================================ */

@media (min-width: 380px) and (max-width: 420px) {
  .bg {
    background-size: 100% auto;
    background-position: center top;
  }

  .page {
    padding:
      70vw
      18px
      calc(24px + env(safe-area-inset-bottom));
    gap: 20px;
  }

  .identity {
    gap: 8px;
  }

  .avatar {
    width: 92px;
    height: 92px;
  }

  .name {
    font-size: 25px;
  }

  .handle {
    font-size: 11.5px;
  }

  .links {
    max-width: 380px;
    gap: 11px;
  }

  .link-btn {
    padding: 13px 14px;
  }

  .link-icon {
    width: 38px;
    height: 38px;
  }

  .link-text strong {
    font-size: 13.5px;
  }

  .link-text small {
    font-size: 11px;
  }
}

/* ============================================================
   CELULARES ENTRE 421PX E 479PX
   ============================================================ */

@media (min-width: 421px) and (max-width: 479px) {
  .bg {
    background-size: 100% auto;
    background-position: center top;
  }

  .page {
    padding:
      68vw
      20px
      calc(26px + env(safe-area-inset-bottom));
    gap: 22px;
  }

  .avatar {
    width: 98px;
    height: 98px;
  }

  .name {
    font-size: 27px;
  }

  .links {
    max-width: 400px;
  }

  .link-btn {
    padding: 14px 15px;
  }
}

/* ============================================================
   CELULARES GRANDES ENTRE 480PX E 599PX
   ============================================================ */

@media (min-width: 480px) and (max-width: 599px) {
  .bg {
    background-size: 100% auto;
    background-position: center top;
  }

  .page {
    padding:
      63vw
      22px
      calc(28px + env(safe-area-inset-bottom));
    gap: 24px;
  }

  .avatar {
    width: 104px;
    height: 104px;
  }

  .links {
    max-width: 420px;
  }
}

/* ============================================================
   CELULARES MUITO GRANDES ENTRE 600PX E 767PX
   ============================================================ */

@media (min-width: 600px) and (max-width: 767px) {
  .bg {
    background-size: 100% auto;
    background-position: center top;
  }

  .page {
    padding:
      55vw
      26px
      calc(30px + env(safe-area-inset-bottom));
    gap: 26px;
  }

  .avatar {
    width: 112px;
    height: 112px;
  }

  .links {
    max-width: 440px;
  }

  .name {
    font-size: 30px;
  }
}

/* ============================================================
   AJUSTES PELA ALTURA DO CELULAR
   ============================================================ */

/* Celulares muito baixos */
@media
  (max-width: 479px)
  and (orientation: portrait)
  and (max-height: 599px) {

  .page {
    padding-top: 55vw;
    gap: 10px;
  }

  .avatar {
    width: 68px;
    height: 68px;
  }

  .name {
    font-size: 20px;
  }

  .handle {
    font-size: 9px;
  }

  .links {
    gap: 7px;
  }

  .link-btn {
    padding-top: 9px;
    padding-bottom: 9px;
  }

  .foot {
    margin-top: 0;
    gap: 6px;
  }
}

/* Altura entre 600px e 699px */
@media
  (max-width: 479px)
  and (orientation: portrait)
  and (min-height: 600px)
  and (max-height: 699px) {

  .page {
    padding-top: 60vw;
    gap: 13px;
  }

  .avatar {
    width: 76px;
    height: 76px;
  }

  .links {
    gap: 8px;
  }

  .link-btn {
    padding-top: 10px;
    padding-bottom: 10px;
  }
}

/* Altura entre 700px e 799px */
@media
  (max-width: 479px)
  and (orientation: portrait)
  and (min-height: 700px)
  and (max-height: 799px) {

  .page {
    padding-top: 65vw;
    gap: 16px;
  }

  .avatar {
    width: 84px;
    height: 84px;
  }
}

/* Altura entre 800px e 899px */
@media
  (max-width: 479px)
  and (orientation: portrait)
  and (min-height: 800px)
  and (max-height: 899px) {

  .page {
    padding-top: 69vw;
    gap: 19px;
  }

  .avatar {
    width: 90px;
    height: 90px;
  }
}

/* Altura entre 900px e 999px */
@media
  (max-width: 479px)
  and (orientation: portrait)
  and (min-height: 900px)
  and (max-height: 999px) {

  .page {
    padding-top: 72vw;
    gap: 21px;
  }

  .avatar {
    width: 96px;
    height: 96px;
  }
}

/* Celulares com mais de 1000px de altura */
@media
  (max-width: 479px)
  and (orientation: portrait)
  and (min-height: 1000px) {

  .page {
    padding-top: 74vw;
    gap: 24px;
  }

  .avatar {
    width: 104px;
    height: 104px;
  }
}

/* ============================================================
   TABLETS
   ============================================================ */

@media (min-width: 768px) and (max-width: 1023px) {
  .bg {
    background-image: url('assets/zona-de-conforto-desktop.jpg');
    background-size: cover;
    background-position: 58% center;
  }

  .page {
    justify-content: center;
    padding: 40px 28px;
    gap: 30px;
  }

  .avatar {
    width: 116px;
    height: 116px;
  }

  .links {
    max-width: 430px;
  }
}

/* Tablets grandes */
@media (min-width: 1024px) and (max-width: 1199px) {
  .bg {
    background-image: url('assets/zona-de-conforto-desktop.jpg');
    background-size: cover;
    background-position: center center;
  }

  .page {
    justify-content: center;
    padding: 45px 30px;
    gap: 32px;
  }

  .avatar {
    width: 120px;
    height: 120px;
  }

  .links {
    max-width: 440px;
  }
}

/* ============================================================
   COMPUTADORES
   ============================================================ */

@media (min-width: 1200px) {
  .bg {
    background-image: url('assets/zona-de-conforto-desktop.jpg');
    background-size: cover;
    background-position: center center;
  }

  .page {
    justify-content: center;
    gap: 34px;
  }

  .avatar {
    width: 120px;
    height: 120px;
  }
}

/* ============================================================
   CELULAR DEITADO
   ============================================================ */

@media
  (orientation: landscape)
  and (max-width: 950px)
  and (max-height: 650px) {

  .bg {
    background-image: url('assets/zona-de-conforto-desktop.jpg');
    background-size: cover;
    background-position: center 30%;
  }

  .page {
    min-height: 100dvh;
    justify-content: flex-start;
    padding: 18px 20px;
    gap: 12px;
  }

  .identity {
    gap: 4px;
  }

  .avatar {
    width: 64px;
    height: 64px;
  }

  .name {
    font-size: 20px;
  }

  .handle {
    font-size: 9px;
  }

  .links {
    max-width: 420px;
    gap: 7px;
  }

  .link-btn {
    padding: 9px 12px;
  }

  .foot {
    display: none;
  }
}
